diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2017-08-17 18:51:56 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-08-18 17:36:42 +0300 |
commit | 8fe34b060a4b11be35ffd9383acdd0bc7bee72e2 (patch) | |
tree | 438032078fe8818c743c3bac6d5ee31a15fb8a40 /drivers/net/wireless/intel/iwlwifi/mvm | |
parent | ee4fe54024f071976120dce71aefe056dfab4eb7 (diff) | |
download | linux-8fe34b060a4b11be35ffd9383acdd0bc7bee72e2.tar.xz |
iwlwifi: use big-endian for the hw section of the nvm
Unlike the other sections of the NVM, the hw section is in big-endian.
To read a value from it, we had to cast it to __be16. Fix that by
using __be16 * for the entire section.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c index b05673e4a193..422aa6be9932 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c @@ -292,7 +292,8 @@ static struct iwl_nvm_data * iwl_parse_nvm_sections(struct iwl_mvm *mvm) { struct iwl_nvm_section *sections = mvm->nvm_sections; - const __le16 *hw, *sw, *calib, *regulatory, *mac_override, *phy_sku; + const __be16 *hw; + const __le16 *sw, *calib, *regulatory, *mac_override, *phy_sku; bool lar_enabled; /* Checking for required sections */ @@ -326,7 +327,7 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm) } } - hw = (const __le16 *)sections[mvm->cfg->nvm_hw_section_num].data; + hw = (const __be16 *)sections[mvm->cfg->nvm_hw_section_num].data; sw = (const __le16 *)sections[NVM_SECTION_TYPE_SW].data; calib = (const __le16 *)sections[NVM_SECTION_TYPE_CALIBRATION].data; regulatory = (const __le16 *)sections[NVM_SECTION_TYPE_REGULATORY].data; |