diff options
author | Arik Nemtsov <arik@wizery.com> | 2014-03-05 12:19:10 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-03-12 09:57:22 +0200 |
commit | af45a9003f1f14af24804f7747f14238e8d51163 (patch) | |
tree | 8fe4b038d577987ec80ec9579264debad450a11f /drivers/net/wireless/iwlwifi/iwl-nvm-parse.h | |
parent | 90d4f7db6c5d8af1f4eab7bc714ec0ee130f9f00 (diff) |
iwlwifi: create regdomain from mcc_update_cmd response
Parse the NVM channel data and create a regulatory domain with a rule
for every 20Mhz channel. Use the AUTO_BW flag so the regulatory core
can unify single-channel rules into ranges.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-nvm-parse.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-nvm-parse.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.h b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.h index c9c45a39d212..fa493ce01aad 100644 --- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.h +++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.h @@ -62,6 +62,7 @@ #ifndef __iwl_nvm_parse_h__ #define __iwl_nvm_parse_h__ +#include <net/cfg80211.h> #include "iwl-eeprom-parse.h" /** @@ -78,4 +79,17 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, const __le16 *nvm_calib, const __le16 *regulatory, const __le16 *mac_override, u8 tx_chains, u8 rx_chains); +/** + * iwl_parse_mcc_info - parse MCC (mobile country code) info coming from FW + * + * This function parses the regulatory channel data received as a + * MCC_UPDATE_CMD command. It returns a newly allocation regulatory domain, + * to be fed into the regulatory core. An ERR_PTR is returned on error. + * If not given to the regulatory core, the user is responsible for freeing + * the regdomain returned here with kfree. + */ +struct ieee80211_regdomain * +iwl_parse_nvm_mcc_info(struct device *dev, int num_of_ch, __le32 *channels, + u16 fw_mcc); + #endif /* __iwl_nvm_parse_h__ */ |