aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c59
1 files changed, 30 insertions, 29 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 1e6b5e41a72b..28422c03d673 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1206,35 +1206,17 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1206 /* TODO: remove fw from shared data later */ 1206 /* TODO: remove fw from shared data later */
1207 priv->shrd->fw = fw; 1207 priv->shrd->fw = fw;
1208 1208
1209 /************************ 1209 /*
1210 * 2. Setup HW constants 1210 * Populate the state variables that the transport layer needs
1211 ************************/ 1211 * to know about.
1212 iwl_set_hw_params(priv); 1212 */
1213 trans_cfg.op_mode = op_mode;
1213 1214
1214 ucode_flags = fw->ucode_capa.flags; 1215 ucode_flags = fw->ucode_capa.flags;
1215 1216
1216#ifndef CONFIG_IWLWIFI_P2P 1217#ifndef CONFIG_IWLWIFI_P2P
1217 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN; 1218 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1218#endif 1219#endif
1219 if (!(hw_params(priv).sku & EEPROM_SKU_CAP_IPAN_ENABLE))
1220 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1221
1222 /*
1223 * if not PAN, then don't support P2P -- might be a uCode
1224 * packaging bug or due to the eeprom check above
1225 */
1226 if (!(ucode_flags & IWL_UCODE_TLV_FLAGS_PAN))
1227 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
1228
1229
1230 /*****************************
1231 * Configure transport layer
1232 *****************************/
1233 /*
1234 * Populate the state variables that the transport layer needs
1235 * to know about.
1236 */
1237 trans_cfg.op_mode = op_mode;
1238 1220
1239 if (ucode_flags & IWL_UCODE_TLV_FLAGS_PAN) { 1221 if (ucode_flags & IWL_UCODE_TLV_FLAGS_PAN) {
1240 priv->sta_key_max_num = STA_KEY_MAX_NUM_PAN; 1222 priv->sta_key_max_num = STA_KEY_MAX_NUM_PAN;
@@ -1277,7 +1259,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1277 spin_lock_init(&priv->statistics.lock); 1259 spin_lock_init(&priv->statistics.lock);
1278 1260
1279 /*********************** 1261 /***********************
1280 * 3. Read REV register 1262 * 2. Read REV register
1281 ***********************/ 1263 ***********************/
1282 IWL_INFO(priv, "Detected %s, REV=0x%X\n", 1264 IWL_INFO(priv, "Detected %s, REV=0x%X\n",
1283 cfg(priv)->name, trans(priv)->hw_rev); 1265 cfg(priv)->name, trans(priv)->hw_rev);
@@ -1287,9 +1269,8 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1287 goto out_free_traffic_mem; 1269 goto out_free_traffic_mem;
1288 1270
1289 /***************** 1271 /*****************
1290 * 4. Read EEPROM 1272 * 3. Read EEPROM
1291 *****************/ 1273 *****************/
1292 /* Read the EEPROM */
1293 err = iwl_eeprom_init(trans(priv), trans(priv)->hw_rev); 1274 err = iwl_eeprom_init(trans(priv), trans(priv)->hw_rev);
1294 /* Reset chip to save power until we load uCode during "up". */ 1275 /* Reset chip to save power until we load uCode during "up". */
1295 iwl_trans_stop_hw(trans(priv)); 1276 iwl_trans_stop_hw(trans(priv));
@@ -1318,8 +1299,28 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1318 priv->hw->wiphy->n_addresses++; 1299 priv->hw->wiphy->n_addresses++;
1319 } 1300 }
1320 1301
1302 /************************
1303 * 4. Setup HW constants
1304 ************************/
1305 iwl_set_hw_params(priv);
1306
1307 if (!(hw_params(priv).sku & EEPROM_SKU_CAP_IPAN_ENABLE)) {
1308 IWL_DEBUG_INFO(priv, "Your EEPROM disabled PAN");
1309 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN;
1310 /*
1311 * if not PAN, then don't support P2P -- might be a uCode
1312 * packaging bug or due to the eeprom check above
1313 */
1314 ucode_flags &= ~IWL_UCODE_TLV_FLAGS_P2P;
1315 priv->sta_key_max_num = STA_KEY_MAX_NUM;
1316 trans_cfg.cmd_queue = IWL_DEFAULT_CMD_QUEUE_NUM;
1317
1318 /* Configure transport layer again*/
1319 iwl_trans_configure(trans(priv), &trans_cfg);
1320 }
1321
1321 /******************* 1322 /*******************
1322 * 6. Setup priv 1323 * 5. Setup priv
1323 *******************/ 1324 *******************/
1324 1325
1325 err = iwl_init_drv(priv); 1326 err = iwl_init_drv(priv);
@@ -1328,7 +1329,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1328 /* At this point both hw and priv are initialized. */ 1329 /* At this point both hw and priv are initialized. */
1329 1330
1330 /******************** 1331 /********************
1331 * 7. Setup services 1332 * 6. Setup services
1332 ********************/ 1333 ********************/
1333 iwl_setup_deferred_work(priv); 1334 iwl_setup_deferred_work(priv);
1334 iwl_setup_rx_handlers(priv); 1335 iwl_setup_rx_handlers(priv);
@@ -1355,7 +1356,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1355 /************************************************** 1356 /**************************************************
1356 * This is still part of probe() in a sense... 1357 * This is still part of probe() in a sense...
1357 * 1358 *
1358 * 9. Setup and register with mac80211 and debugfs 1359 * 7. Setup and register with mac80211 and debugfs
1359 **************************************************/ 1360 **************************************************/
1360 err = iwlagn_mac_setup_register(priv, &fw->ucode_capa); 1361 err = iwlagn_mac_setup_register(priv, &fw->ucode_capa);
1361 if (err) 1362 if (err)