aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-ucode.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-02-21 11:31:06 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-02-27 16:25:06 -0500
commita78be210d53b24cc3437d4362912c510b895a8eb (patch)
tree3b8e30a6df0a44a876a719c3f76d8977f471d831 /drivers/net/wireless/iwlwifi/iwl-ucode.c
parente211b2427a61e92e5a6bdd629bc2c2e6114c2dc1 (diff)
iwlwifi: move uCode flags handling to op_mode
The uCode flags modification is op_mode dependent since the P2P config is an op-mode config. This also fixes P2P enabling: due to the uCode loading code shuffle moving the SKU check before the EEPROM was read it was always false and would always disable PAN/P2P. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-ucode.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-ucode.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c
index 99f89b27f42c..3645bf3d61c6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c
@@ -1226,9 +1226,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
1226 nic->inst_evtlog_size = 1226 nic->inst_evtlog_size =
1227 cfg->base_params->max_event_log_size; 1227 cfg->base_params->max_event_log_size;
1228 nic->inst_errlog_ptr = pieces.inst_errlog_ptr; 1228 nic->inst_errlog_ptr = pieces.inst_errlog_ptr;
1229#ifndef CONFIG_IWLWIFI_P2P 1229
1230 fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1231#endif
1232 /* 1230 /*
1233 * figure out the offset of chain noise reset and gain commands 1231 * figure out the offset of chain noise reset and gain commands
1234 * base on the size of standard phy calibration commands table size 1232 * base on the size of standard phy calibration commands table size
@@ -1238,16 +1236,6 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
1238 fw->ucode_capa.standard_phy_calibration_size = 1236 fw->ucode_capa.standard_phy_calibration_size =
1239 IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE; 1237 IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE;
1240 1238
1241 if (!(cfg->sku & EEPROM_SKU_CAP_IPAN_ENABLE))
1242 fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1243
1244 /*
1245 * if not PAN, then don't support P2P -- might be a uCode
1246 * packaging bug or due to the eeprom check above
1247 */
1248 if (!(fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN))
1249 fw->ucode_capa.flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
1250
1251 /* We have our copies now, allow OS release its copies */ 1239 /* We have our copies now, allow OS release its copies */
1252 release_firmware(ucode_raw); 1240 release_firmware(ucode_raw);
1253 complete(&nic->request_firmware_complete); 1241 complete(&nic->request_firmware_complete);