Commit 0f8bf03c authored by Luca Coelho's avatar Luca Coelho
Browse files

iwlwifi: mvm: save and export regdb blob from the NVM



Sometimes we want to debug issues related to the regulatory blob in
the NVM.  To make that easier, add a debugfs entry to export it
together with the other nvm blobs we export.

Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent e6aeeb4f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2028,6 +2028,9 @@ int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir)
	if (!debugfs_create_blob("nvm_phy_sku", 0400,
				 mvm->debugfs_dir, &mvm->nvm_phy_sku_blob))
		goto err;
	if (!debugfs_create_blob("nvm_reg", S_IRUSR,
				 mvm->debugfs_dir, &mvm->nvm_reg_blob))
		goto err;

	debugfs_create_file("mem", 0600, dbgfs_dir, mvm, &iwl_dbgfs_mem_ops);

+1 −0
Original line number Diff line number Diff line
@@ -965,6 +965,7 @@ struct iwl_mvm {
	struct debugfs_blob_wrapper nvm_calib_blob;
	struct debugfs_blob_wrapper nvm_prod_blob;
	struct debugfs_blob_wrapper nvm_phy_sku_blob;
	struct debugfs_blob_wrapper nvm_reg_blob;

	struct iwl_mvm_frame_stats drv_rx_stats;
	spinlock_t drv_stats_lock;
+5 −0
Original line number Diff line number Diff line
@@ -416,6 +416,11 @@ int iwl_nvm_init(struct iwl_mvm *mvm)
			mvm->nvm_phy_sku_blob.data = temp;
			mvm->nvm_phy_sku_blob.size  = ret;
			break;
		case NVM_SECTION_TYPE_REGULATORY_SDP:
		case NVM_SECTION_TYPE_REGULATORY:
			mvm->nvm_reg_blob.data = temp;
			mvm->nvm_reg_blob.size  = ret;
			break;
		default:
			if (section == mvm->cfg->nvm_hw_section_num) {
				mvm->nvm_hw_blob.data = temp;