]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: mvm: save and export regdb blob from the NVM
authorLuca Coelho <luciano.coelho@intel.com>
Mon, 13 Aug 2018 12:30:35 +0000 (15:30 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 29 Jan 2019 14:10:30 +0000 (16:10 +0200)
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: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c

index 514aaec6d59e5b172a624beeba3e30ffc6ddc5c9..cbbd4b076e1730af1f1a80b6dbb95e47ce43aec4 100644 (file)
@@ -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);
 
index 503e51d32e7fde3cebdfcf6e34a54cc83b29f372..c314f77f657f6b1b91bc77a2d988ee3f39b9ddda 100644 (file)
@@ -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;
index f08934b03cf34d15af1c93898a317c5697d434e7..7bdbd010ae6b8c316b459681219640395c18e5ed 100644 (file)
@@ -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;