aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-11-22 15:28:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-22 15:28:30 -0500
commit840fd8ff64f7b6c9cbfa9b7d0419f015f33303ff (patch)
treebcdc472c9b794f1d141534c14dcb0dd17015f030
parentb84a7d3d9e7cd5a25f4fd32142cebdf4481a74a4 (diff)
parent9e2e7422d059f9b98c3a0810df92a1ff660ade2f (diff)
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c13
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c37
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c21
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c17
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c32
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c103
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c77
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-ucode.c65
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h13
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-helpers.h36
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-led.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-led.h6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c51
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c11
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c2
26 files changed, 345 insertions, 225 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 068f1e1e3297..3100a72b9b44 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -278,7 +278,6 @@ struct iwl_cfg iwl1000_bgn_cfg = {
278 .fw_name_pre = IWL1000_FW_PRE, 278 .fw_name_pre = IWL1000_FW_PRE,
279 .ucode_api_max = IWL1000_UCODE_API_MAX, 279 .ucode_api_max = IWL1000_UCODE_API_MAX,
280 .ucode_api_min = IWL1000_UCODE_API_MIN, 280 .ucode_api_min = IWL1000_UCODE_API_MIN,
281 .sku = IWL_SKU_G|IWL_SKU_N,
282 .valid_tx_ant = ANT_A, 281 .valid_tx_ant = ANT_A,
283 .valid_rx_ant = ANT_AB, 282 .valid_rx_ant = ANT_AB,
284 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, 283 .eeprom_ver = EEPROM_1000_EEPROM_VERSION,
@@ -287,6 +286,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
287 .mod_params = &iwlagn_mod_params, 286 .mod_params = &iwlagn_mod_params,
288 .base_params = &iwl1000_base_params, 287 .base_params = &iwl1000_base_params,
289 .ht_params = &iwl1000_ht_params, 288 .ht_params = &iwl1000_ht_params,
289 .led_mode = IWL_LED_BLINK,
290}; 290};
291 291
292struct iwl_cfg iwl1000_bg_cfg = { 292struct iwl_cfg iwl1000_bg_cfg = {
@@ -294,7 +294,6 @@ struct iwl_cfg iwl1000_bg_cfg = {
294 .fw_name_pre = IWL1000_FW_PRE, 294 .fw_name_pre = IWL1000_FW_PRE,
295 .ucode_api_max = IWL1000_UCODE_API_MAX, 295 .ucode_api_max = IWL1000_UCODE_API_MAX,
296 .ucode_api_min = IWL1000_UCODE_API_MIN, 296 .ucode_api_min = IWL1000_UCODE_API_MIN,
297 .sku = IWL_SKU_G,
298 .valid_tx_ant = ANT_A, 297 .valid_tx_ant = ANT_A,
299 .valid_rx_ant = ANT_AB, 298 .valid_rx_ant = ANT_AB,
300 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, 299 .eeprom_ver = EEPROM_1000_EEPROM_VERSION,
@@ -302,6 +301,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
302 .ops = &iwl1000_ops, 301 .ops = &iwl1000_ops,
303 .mod_params = &iwlagn_mod_params, 302 .mod_params = &iwlagn_mod_params,
304 .base_params = &iwl1000_base_params, 303 .base_params = &iwl1000_base_params,
304 .led_mode = IWL_LED_BLINK,
305}; 305};
306 306
307struct iwl_cfg iwl100_bgn_cfg = { 307struct iwl_cfg iwl100_bgn_cfg = {
@@ -309,7 +309,6 @@ struct iwl_cfg iwl100_bgn_cfg = {
309 .fw_name_pre = IWL100_FW_PRE, 309 .fw_name_pre = IWL100_FW_PRE,
310 .ucode_api_max = IWL100_UCODE_API_MAX, 310 .ucode_api_max = IWL100_UCODE_API_MAX,
311 .ucode_api_min = IWL100_UCODE_API_MIN, 311 .ucode_api_min = IWL100_UCODE_API_MIN,
312 .sku = IWL_SKU_G|IWL_SKU_N,
313 .valid_tx_ant = ANT_A, 312 .valid_tx_ant = ANT_A,
314 .valid_rx_ant = ANT_A, 313 .valid_rx_ant = ANT_A,
315 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, 314 .eeprom_ver = EEPROM_1000_EEPROM_VERSION,
@@ -318,6 +317,7 @@ struct iwl_cfg iwl100_bgn_cfg = {
318 .mod_params = &iwlagn_mod_params, 317 .mod_params = &iwlagn_mod_params,
319 .base_params = &iwl1000_base_params, 318 .base_params = &iwl1000_base_params,
320 .ht_params = &iwl1000_ht_params, 319 .ht_params = &iwl1000_ht_params,
320 .led_mode = IWL_LED_RF_STATE,
321}; 321};
322 322
323struct iwl_cfg iwl100_bg_cfg = { 323struct iwl_cfg iwl100_bg_cfg = {
@@ -325,7 +325,6 @@ struct iwl_cfg iwl100_bg_cfg = {
325 .fw_name_pre = IWL100_FW_PRE, 325 .fw_name_pre = IWL100_FW_PRE,
326 .ucode_api_max = IWL100_UCODE_API_MAX, 326 .ucode_api_max = IWL100_UCODE_API_MAX,
327 .ucode_api_min = IWL100_UCODE_API_MIN, 327 .ucode_api_min = IWL100_UCODE_API_MIN,
328 .sku = IWL_SKU_G,
329 .valid_tx_ant = ANT_A, 328 .valid_tx_ant = ANT_A,
330 .valid_rx_ant = ANT_A, 329 .valid_rx_ant = ANT_A,
331 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, 330 .eeprom_ver = EEPROM_1000_EEPROM_VERSION,
@@ -333,6 +332,7 @@ struct iwl_cfg iwl100_bg_cfg = {
333 .ops = &iwl1000_ops, 332 .ops = &iwl1000_ops,
334 .mod_params = &iwlagn_mod_params, 333 .mod_params = &iwlagn_mod_params,
335 .base_params = &iwl1000_base_params, 334 .base_params = &iwl1000_base_params,
335 .led_mode = IWL_LED_RF_STATE,
336}; 336};
337 337
338MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 338MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index ebac04b7887c..56f4ca7e49d9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -297,7 +297,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv,
297 if (iwl_queue_space(q) > q->low_mark && (txq_id >= 0) && 297 if (iwl_queue_space(q) > q->low_mark && (txq_id >= 0) &&
298 (txq_id != IWL39_CMD_QUEUE_NUM) && 298 (txq_id != IWL39_CMD_QUEUE_NUM) &&
299 priv->mac80211_registered) 299 priv->mac80211_registered)
300 iwl_wake_queue(priv, txq_id); 300 iwl_wake_queue(priv, txq);
301} 301}
302 302
303/** 303/**
@@ -2788,6 +2788,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
2788 .ops = &iwl3945_ops, 2788 .ops = &iwl3945_ops,
2789 .mod_params = &iwl3945_mod_params, 2789 .mod_params = &iwl3945_mod_params,
2790 .base_params = &iwl3945_base_params, 2790 .base_params = &iwl3945_base_params,
2791 .led_mode = IWL_LED_BLINK,
2791}; 2792};
2792 2793
2793static struct iwl_cfg iwl3945_abg_cfg = { 2794static struct iwl_cfg iwl3945_abg_cfg = {
@@ -2800,6 +2801,7 @@ static struct iwl_cfg iwl3945_abg_cfg = {
2800 .ops = &iwl3945_ops, 2801 .ops = &iwl3945_ops,
2801 .mod_params = &iwl3945_mod_params, 2802 .mod_params = &iwl3945_mod_params,
2802 .base_params = &iwl3945_base_params, 2803 .base_params = &iwl3945_base_params,
2804 .led_mode = IWL_LED_BLINK,
2803}; 2805};
2804 2806
2805DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = { 2807DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 4748d067eb1d..6788ceb37686 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2238,12 +2238,8 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2238 2238
2239 if (priv->mac80211_registered && 2239 if (priv->mac80211_registered &&
2240 (iwl_queue_space(&txq->q) > txq->q.low_mark) && 2240 (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
2241 (agg->state != IWL_EMPTYING_HW_QUEUE_DELBA)) { 2241 (agg->state != IWL_EMPTYING_HW_QUEUE_DELBA))
2242 if (agg->state == IWL_AGG_OFF) 2242 iwl_wake_queue(priv, txq);
2243 iwl_wake_queue(priv, txq_id);
2244 else
2245 iwl_wake_queue(priv, txq->swq_id);
2246 }
2247 } 2243 }
2248 } else { 2244 } else {
2249 info->status.rates[0].count = tx_resp->failure_frame + 1; 2245 info->status.rates[0].count = tx_resp->failure_frame + 1;
@@ -2267,7 +2263,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2267 2263
2268 if (priv->mac80211_registered && 2264 if (priv->mac80211_registered &&
2269 (iwl_queue_space(&txq->q) > txq->q.low_mark)) 2265 (iwl_queue_space(&txq->q) > txq->q.low_mark))
2270 iwl_wake_queue(priv, txq_id); 2266 iwl_wake_queue(priv, txq);
2271 } 2267 }
2272 if (qc && likely(sta_id != IWL_INVALID_STATION)) 2268 if (qc && likely(sta_id != IWL_INVALID_STATION))
2273 iwlagn_txq_check_empty(priv, sta_id, tid, txq_id); 2269 iwlagn_txq_check_empty(priv, sta_id, tid, txq_id);
@@ -2620,6 +2616,7 @@ static struct iwl_base_params iwl4965_base_params = {
2620 .ucode_tracing = true, 2616 .ucode_tracing = true,
2621 .sensitivity_calib_by_driver = true, 2617 .sensitivity_calib_by_driver = true,
2622 .chain_noise_calib_by_driver = true, 2618 .chain_noise_calib_by_driver = true,
2619 .no_agg_framecnt_info = true,
2623}; 2620};
2624 2621
2625struct iwl_cfg iwl4965_agn_cfg = { 2622struct iwl_cfg iwl4965_agn_cfg = {
@@ -2627,7 +2624,6 @@ struct iwl_cfg iwl4965_agn_cfg = {
2627 .fw_name_pre = IWL4965_FW_PRE, 2624 .fw_name_pre = IWL4965_FW_PRE,
2628 .ucode_api_max = IWL4965_UCODE_API_MAX, 2625 .ucode_api_max = IWL4965_UCODE_API_MAX,
2629 .ucode_api_min = IWL4965_UCODE_API_MIN, 2626 .ucode_api_min = IWL4965_UCODE_API_MIN,
2630 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
2631 .valid_tx_ant = ANT_AB, 2627 .valid_tx_ant = ANT_AB,
2632 .valid_rx_ant = ANT_ABC, 2628 .valid_rx_ant = ANT_ABC,
2633 .eeprom_ver = EEPROM_4965_EEPROM_VERSION, 2629 .eeprom_ver = EEPROM_4965_EEPROM_VERSION,
@@ -2635,6 +2631,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
2635 .ops = &iwl4965_ops, 2631 .ops = &iwl4965_ops,
2636 .mod_params = &iwlagn_mod_params, 2632 .mod_params = &iwlagn_mod_params,
2637 .base_params = &iwl4965_base_params, 2633 .base_params = &iwl4965_base_params,
2634 .led_mode = IWL_LED_BLINK,
2638 /* 2635 /*
2639 * Force use of chains B and C for scan RX on 5 GHz band 2636 * Force use of chains B and C for scan RX on 5 GHz band
2640 * because the device has off-channel reception on chain A. 2637 * because the device has off-channel reception on chain A.
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index ad43f0fdf919..3ee0f7c035cf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -527,7 +527,6 @@ struct iwl_cfg iwl5300_agn_cfg = {
527 .fw_name_pre = IWL5000_FW_PRE, 527 .fw_name_pre = IWL5000_FW_PRE,
528 .ucode_api_max = IWL5000_UCODE_API_MAX, 528 .ucode_api_max = IWL5000_UCODE_API_MAX,
529 .ucode_api_min = IWL5000_UCODE_API_MIN, 529 .ucode_api_min = IWL5000_UCODE_API_MIN,
530 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
531 .valid_tx_ant = ANT_ABC, 530 .valid_tx_ant = ANT_ABC,
532 .valid_rx_ant = ANT_ABC, 531 .valid_rx_ant = ANT_ABC,
533 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, 532 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
@@ -536,6 +535,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
536 .mod_params = &iwlagn_mod_params, 535 .mod_params = &iwlagn_mod_params,
537 .base_params = &iwl5000_base_params, 536 .base_params = &iwl5000_base_params,
538 .ht_params = &iwl5000_ht_params, 537 .ht_params = &iwl5000_ht_params,
538 .led_mode = IWL_LED_BLINK,
539}; 539};
540 540
541struct iwl_cfg iwl5100_bgn_cfg = { 541struct iwl_cfg iwl5100_bgn_cfg = {
@@ -543,7 +543,6 @@ struct iwl_cfg iwl5100_bgn_cfg = {
543 .fw_name_pre = IWL5000_FW_PRE, 543 .fw_name_pre = IWL5000_FW_PRE,
544 .ucode_api_max = IWL5000_UCODE_API_MAX, 544 .ucode_api_max = IWL5000_UCODE_API_MAX,
545 .ucode_api_min = IWL5000_UCODE_API_MIN, 545 .ucode_api_min = IWL5000_UCODE_API_MIN,
546 .sku = IWL_SKU_G|IWL_SKU_N,
547 .valid_tx_ant = ANT_B, 546 .valid_tx_ant = ANT_B,
548 .valid_rx_ant = ANT_AB, 547 .valid_rx_ant = ANT_AB,
549 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, 548 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
@@ -552,6 +551,7 @@ struct iwl_cfg iwl5100_bgn_cfg = {
552 .mod_params = &iwlagn_mod_params, 551 .mod_params = &iwlagn_mod_params,
553 .base_params = &iwl5000_base_params, 552 .base_params = &iwl5000_base_params,
554 .ht_params = &iwl5000_ht_params, 553 .ht_params = &iwl5000_ht_params,
554 .led_mode = IWL_LED_BLINK,
555}; 555};
556 556
557struct iwl_cfg iwl5100_abg_cfg = { 557struct iwl_cfg iwl5100_abg_cfg = {
@@ -559,7 +559,6 @@ struct iwl_cfg iwl5100_abg_cfg = {
559 .fw_name_pre = IWL5000_FW_PRE, 559 .fw_name_pre = IWL5000_FW_PRE,
560 .ucode_api_max = IWL5000_UCODE_API_MAX, 560 .ucode_api_max = IWL5000_UCODE_API_MAX,
561 .ucode_api_min = IWL5000_UCODE_API_MIN, 561 .ucode_api_min = IWL5000_UCODE_API_MIN,
562 .sku = IWL_SKU_A|IWL_SKU_G,
563 .valid_tx_ant = ANT_B, 562 .valid_tx_ant = ANT_B,
564 .valid_rx_ant = ANT_AB, 563 .valid_rx_ant = ANT_AB,
565 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, 564 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
@@ -567,6 +566,7 @@ struct iwl_cfg iwl5100_abg_cfg = {
567 .ops = &iwl5000_ops, 566 .ops = &iwl5000_ops,
568 .mod_params = &iwlagn_mod_params, 567 .mod_params = &iwlagn_mod_params,
569 .base_params = &iwl5000_base_params, 568 .base_params = &iwl5000_base_params,
569 .led_mode = IWL_LED_BLINK,
570}; 570};
571 571
572struct iwl_cfg iwl5100_agn_cfg = { 572struct iwl_cfg iwl5100_agn_cfg = {
@@ -574,7 +574,6 @@ struct iwl_cfg iwl5100_agn_cfg = {
574 .fw_name_pre = IWL5000_FW_PRE, 574 .fw_name_pre = IWL5000_FW_PRE,
575 .ucode_api_max = IWL5000_UCODE_API_MAX, 575 .ucode_api_max = IWL5000_UCODE_API_MAX,
576 .ucode_api_min = IWL5000_UCODE_API_MIN, 576 .ucode_api_min = IWL5000_UCODE_API_MIN,
577 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
578 .valid_tx_ant = ANT_B, 577 .valid_tx_ant = ANT_B,
579 .valid_rx_ant = ANT_AB, 578 .valid_rx_ant = ANT_AB,
580 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, 579 .eeprom_ver = EEPROM_5000_EEPROM_VERSION,
@@ -583,6 +582,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
583 .mod_params = &iwlagn_mod_params, 582 .mod_params = &iwlagn_mod_params,
584 .base_params = &iwl5000_base_params, 583 .base_params = &iwl5000_base_params,
585 .ht_params = &iwl5000_ht_params, 584 .ht_params = &iwl5000_ht_params,
585 .led_mode = IWL_LED_BLINK,
586}; 586};
587 587
588struct iwl_cfg iwl5350_agn_cfg = { 588struct iwl_cfg iwl5350_agn_cfg = {
@@ -590,7 +590,6 @@ struct iwl_cfg iwl5350_agn_cfg = {
590 .fw_name_pre = IWL5000_FW_PRE, 590 .fw_name_pre = IWL5000_FW_PRE,
591 .ucode_api_max = IWL5000_UCODE_API_MAX, 591 .ucode_api_max = IWL5000_UCODE_API_MAX,
592 .ucode_api_min = IWL5000_UCODE_API_MIN, 592 .ucode_api_min = IWL5000_UCODE_API_MIN,
593 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
594 .valid_tx_ant = ANT_ABC, 593 .valid_tx_ant = ANT_ABC,
595 .valid_rx_ant = ANT_ABC, 594 .valid_rx_ant = ANT_ABC,
596 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, 595 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
@@ -599,6 +598,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
599 .mod_params = &iwlagn_mod_params, 598 .mod_params = &iwlagn_mod_params,
600 .base_params = &iwl5000_base_params, 599 .base_params = &iwl5000_base_params,
601 .ht_params = &iwl5000_ht_params, 600 .ht_params = &iwl5000_ht_params,
601 .led_mode = IWL_LED_BLINK,
602}; 602};
603 603
604struct iwl_cfg iwl5150_agn_cfg = { 604struct iwl_cfg iwl5150_agn_cfg = {
@@ -606,7 +606,6 @@ struct iwl_cfg iwl5150_agn_cfg = {
606 .fw_name_pre = IWL5150_FW_PRE, 606 .fw_name_pre = IWL5150_FW_PRE,
607 .ucode_api_max = IWL5150_UCODE_API_MAX, 607 .ucode_api_max = IWL5150_UCODE_API_MAX,
608 .ucode_api_min = IWL5150_UCODE_API_MIN, 608 .ucode_api_min = IWL5150_UCODE_API_MIN,
609 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
610 .valid_tx_ant = ANT_A, 609 .valid_tx_ant = ANT_A,
611 .valid_rx_ant = ANT_AB, 610 .valid_rx_ant = ANT_AB,
612 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, 611 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
@@ -616,6 +615,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
616 .base_params = &iwl5000_base_params, 615 .base_params = &iwl5000_base_params,
617 .ht_params = &iwl5000_ht_params, 616 .ht_params = &iwl5000_ht_params,
618 .need_dc_calib = true, 617 .need_dc_calib = true,
618 .led_mode = IWL_LED_BLINK,
619}; 619};
620 620
621struct iwl_cfg iwl5150_abg_cfg = { 621struct iwl_cfg iwl5150_abg_cfg = {
@@ -623,7 +623,6 @@ struct iwl_cfg iwl5150_abg_cfg = {
623 .fw_name_pre = IWL5150_FW_PRE, 623 .fw_name_pre = IWL5150_FW_PRE,
624 .ucode_api_max = IWL5150_UCODE_API_MAX, 624 .ucode_api_max = IWL5150_UCODE_API_MAX,
625 .ucode_api_min = IWL5150_UCODE_API_MIN, 625 .ucode_api_min = IWL5150_UCODE_API_MIN,
626 .sku = IWL_SKU_A|IWL_SKU_G,
627 .valid_tx_ant = ANT_A, 626 .valid_tx_ant = ANT_A,
628 .valid_rx_ant = ANT_AB, 627 .valid_rx_ant = ANT_AB,
629 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, 628 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
@@ -632,6 +631,7 @@ struct iwl_cfg iwl5150_abg_cfg = {
632 .mod_params = &iwlagn_mod_params, 631 .mod_params = &iwlagn_mod_params,
633 .base_params = &iwl5000_base_params, 632 .base_params = &iwl5000_base_params,
634 .need_dc_calib = true, 633 .need_dc_calib = true,
634 .led_mode = IWL_LED_BLINK,
635}; 635};
636 636
637MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); 637MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index c7ff1bdf42cd..0cc66fdc7a0d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -546,6 +546,7 @@ static struct iwl_bt_params iwl6000_bt_params = {
546 .bt_statistics = true, 546 .bt_statistics = true,
547 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 547 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
548 .advanced_bt_coexist = true, 548 .advanced_bt_coexist = true,
549 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
549 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, 550 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
550 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, 551 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
551}; 552};
@@ -555,7 +556,6 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
555 .fw_name_pre = IWL6000G2A_FW_PRE, 556 .fw_name_pre = IWL6000G2A_FW_PRE,
556 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 557 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
557 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 558 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
558 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
559 .valid_tx_ant = ANT_AB, 559 .valid_tx_ant = ANT_AB,
560 .valid_rx_ant = ANT_AB, 560 .valid_rx_ant = ANT_AB,
561 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 561 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -566,6 +566,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
566 .ht_params = &iwl6000_ht_params, 566 .ht_params = &iwl6000_ht_params,
567 .need_dc_calib = true, 567 .need_dc_calib = true,
568 .need_temp_offset_calib = true, 568 .need_temp_offset_calib = true,
569 .led_mode = IWL_LED_RF_STATE,
569}; 570};
570 571
571struct iwl_cfg iwl6000g2a_2abg_cfg = { 572struct iwl_cfg iwl6000g2a_2abg_cfg = {
@@ -573,7 +574,6 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = {
573 .fw_name_pre = IWL6000G2A_FW_PRE, 574 .fw_name_pre = IWL6000G2A_FW_PRE,
574 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 575 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
575 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 576 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
576 .sku = IWL_SKU_A|IWL_SKU_G,
577 .valid_tx_ant = ANT_AB, 577 .valid_tx_ant = ANT_AB,
578 .valid_rx_ant = ANT_AB, 578 .valid_rx_ant = ANT_AB,
579 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 579 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -583,6 +583,7 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = {
583 .base_params = &iwl6000_base_params, 583 .base_params = &iwl6000_base_params,
584 .need_dc_calib = true, 584 .need_dc_calib = true,
585 .need_temp_offset_calib = true, 585 .need_temp_offset_calib = true,
586 .led_mode = IWL_LED_RF_STATE,
586}; 587};
587 588
588struct iwl_cfg iwl6000g2a_2bg_cfg = { 589struct iwl_cfg iwl6000g2a_2bg_cfg = {
@@ -590,7 +591,6 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = {
590 .fw_name_pre = IWL6000G2A_FW_PRE, 591 .fw_name_pre = IWL6000G2A_FW_PRE,
591 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 592 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
592 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 593 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
593 .sku = IWL_SKU_G,
594 .valid_tx_ant = ANT_AB, 594 .valid_tx_ant = ANT_AB,
595 .valid_rx_ant = ANT_AB, 595 .valid_rx_ant = ANT_AB,
596 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 596 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -600,6 +600,7 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = {
600 .base_params = &iwl6000_base_params, 600 .base_params = &iwl6000_base_params,
601 .need_dc_calib = true, 601 .need_dc_calib = true,
602 .need_temp_offset_calib = true, 602 .need_temp_offset_calib = true,
603 .led_mode = IWL_LED_RF_STATE,
603}; 604};
604 605
605struct iwl_cfg iwl6000g2b_2agn_cfg = { 606struct iwl_cfg iwl6000g2b_2agn_cfg = {
@@ -607,7 +608,6 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = {
607 .fw_name_pre = IWL6000G2B_FW_PRE, 608 .fw_name_pre = IWL6000G2B_FW_PRE,
608 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 609 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
609 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 610 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
610 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
611 .valid_tx_ant = ANT_AB, 611 .valid_tx_ant = ANT_AB,
612 .valid_rx_ant = ANT_AB, 612 .valid_rx_ant = ANT_AB,
613 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 613 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -619,6 +619,7 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = {
619 .ht_params = &iwl6000_ht_params, 619 .ht_params = &iwl6000_ht_params,
620 .need_dc_calib = true, 620 .need_dc_calib = true,
621 .need_temp_offset_calib = true, 621 .need_temp_offset_calib = true,
622 .led_mode = IWL_LED_RF_STATE,
622 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 623 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
623 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 624 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
624}; 625};
@@ -628,7 +629,6 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = {
628 .fw_name_pre = IWL6000G2B_FW_PRE, 629 .fw_name_pre = IWL6000G2B_FW_PRE,
629 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 630 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
630 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 631 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
631 .sku = IWL_SKU_A|IWL_SKU_G,
632 .valid_tx_ant = ANT_AB, 632 .valid_tx_ant = ANT_AB,
633 .valid_rx_ant = ANT_AB, 633 .valid_rx_ant = ANT_AB,
634 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 634 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -639,6 +639,7 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = {
639 .bt_params = &iwl6000_bt_params, 639 .bt_params = &iwl6000_bt_params,
640 .need_dc_calib = true, 640 .need_dc_calib = true,
641 .need_temp_offset_calib = true, 641 .need_temp_offset_calib = true,
642 .led_mode = IWL_LED_RF_STATE,
642 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 643 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
643 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 644 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
644}; 645};
@@ -648,7 +649,6 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = {
648 .fw_name_pre = IWL6000G2B_FW_PRE, 649 .fw_name_pre = IWL6000G2B_FW_PRE,
649 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 650 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
650 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 651 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
651 .sku = IWL_SKU_G|IWL_SKU_N,
652 .valid_tx_ant = ANT_AB, 652 .valid_tx_ant = ANT_AB,
653 .valid_rx_ant = ANT_AB, 653 .valid_rx_ant = ANT_AB,
654 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 654 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -660,6 +660,7 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = {
660 .ht_params = &iwl6000_ht_params, 660 .ht_params = &iwl6000_ht_params,
661 .need_dc_calib = true, 661 .need_dc_calib = true,
662 .need_temp_offset_calib = true, 662 .need_temp_offset_calib = true,
663 .led_mode = IWL_LED_RF_STATE,
663 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 664 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
664 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 665 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
665}; 666};
@@ -669,7 +670,6 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = {
669 .fw_name_pre = IWL6000G2B_FW_PRE, 670 .fw_name_pre = IWL6000G2B_FW_PRE,
670 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 671 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
671 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 672 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
672 .sku = IWL_SKU_G,
673 .valid_tx_ant = ANT_AB, 673 .valid_tx_ant = ANT_AB,
674 .valid_rx_ant = ANT_AB, 674 .valid_rx_ant = ANT_AB,
675 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 675 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -680,6 +680,7 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = {
680 .bt_params = &iwl6000_bt_params, 680 .bt_params = &iwl6000_bt_params,
681 .need_dc_calib = true, 681 .need_dc_calib = true,
682 .need_temp_offset_calib = true, 682 .need_temp_offset_calib = true,
683 .led_mode = IWL_LED_RF_STATE,
683 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 684 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
684 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 685 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
685}; 686};
@@ -689,7 +690,6 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = {
689 .fw_name_pre = IWL6000G2B_FW_PRE, 690 .fw_name_pre = IWL6000G2B_FW_PRE,
690 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 691 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
691 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 692 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
692 .sku = IWL_SKU_G|IWL_SKU_N,
693 .valid_tx_ant = ANT_A, 693 .valid_tx_ant = ANT_A,
694 .valid_rx_ant = ANT_AB, 694 .valid_rx_ant = ANT_AB,
695 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 695 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -701,6 +701,7 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = {
701 .ht_params = &iwl6000_ht_params, 701 .ht_params = &iwl6000_ht_params,
702 .need_dc_calib = true, 702 .need_dc_calib = true,
703 .need_temp_offset_calib = true, 703 .need_temp_offset_calib = true,
704 .led_mode = IWL_LED_RF_STATE,
704 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 705 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
705 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 706 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
706}; 707};
@@ -710,7 +711,6 @@ struct iwl_cfg iwl6000g2b_bg_cfg = {
710 .fw_name_pre = IWL6000G2B_FW_PRE, 711 .fw_name_pre = IWL6000G2B_FW_PRE,
711 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 712 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
712 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 713 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
713 .sku = IWL_SKU_G,
714 .valid_tx_ant = ANT_A, 714 .valid_tx_ant = ANT_A,
715 .valid_rx_ant = ANT_AB, 715 .valid_rx_ant = ANT_AB,
716 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 716 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -721,6 +721,7 @@ struct iwl_cfg iwl6000g2b_bg_cfg = {
721 .bt_params = &iwl6000_bt_params, 721 .bt_params = &iwl6000_bt_params,
722 .need_dc_calib = true, 722 .need_dc_calib = true,
723 .need_temp_offset_calib = true, 723 .need_temp_offset_calib = true,
724 .led_mode = IWL_LED_RF_STATE,
724 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 725 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
725 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 726 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
726}; 727};
@@ -733,7 +734,6 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
733 .fw_name_pre = IWL6000_FW_PRE, 734 .fw_name_pre = IWL6000_FW_PRE,
734 .ucode_api_max = IWL6000_UCODE_API_MAX, 735 .ucode_api_max = IWL6000_UCODE_API_MAX,
735 .ucode_api_min = IWL6000_UCODE_API_MIN, 736 .ucode_api_min = IWL6000_UCODE_API_MIN,
736 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
737 .valid_tx_ant = ANT_BC, 737 .valid_tx_ant = ANT_BC,
738 .valid_rx_ant = ANT_BC, 738 .valid_rx_ant = ANT_BC,
739 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, 739 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
@@ -743,6 +743,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
743 .base_params = &iwl6000_base_params, 743 .base_params = &iwl6000_base_params,
744 .ht_params = &iwl6000_ht_params, 744 .ht_params = &iwl6000_ht_params,
745 .pa_type = IWL_PA_INTERNAL, 745 .pa_type = IWL_PA_INTERNAL,
746 .led_mode = IWL_LED_BLINK,
746}; 747};
747 748
748struct iwl_cfg iwl6000i_2abg_cfg = { 749struct iwl_cfg iwl6000i_2abg_cfg = {
@@ -750,7 +751,6 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
750 .fw_name_pre = IWL6000_FW_PRE, 751 .fw_name_pre = IWL6000_FW_PRE,
751 .ucode_api_max = IWL6000_UCODE_API_MAX, 752 .ucode_api_max = IWL6000_UCODE_API_MAX,
752 .ucode_api_min = IWL6000_UCODE_API_MIN, 753 .ucode_api_min = IWL6000_UCODE_API_MIN,
753 .sku = IWL_SKU_A|IWL_SKU_G,
754 .valid_tx_ant = ANT_BC, 754 .valid_tx_ant = ANT_BC,
755 .valid_rx_ant = ANT_BC, 755 .valid_rx_ant = ANT_BC,
756 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, 756 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
@@ -759,6 +759,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
759 .mod_params = &iwlagn_mod_params, 759 .mod_params = &iwlagn_mod_params,
760 .base_params = &iwl6000_base_params, 760 .base_params = &iwl6000_base_params,
761 .pa_type = IWL_PA_INTERNAL, 761 .pa_type = IWL_PA_INTERNAL,
762 .led_mode = IWL_LED_BLINK,
762}; 763};
763 764
764struct iwl_cfg iwl6000i_2bg_cfg = { 765struct iwl_cfg iwl6000i_2bg_cfg = {
@@ -766,7 +767,6 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
766 .fw_name_pre = IWL6000_FW_PRE, 767 .fw_name_pre = IWL6000_FW_PRE,
767 .ucode_api_max = IWL6000_UCODE_API_MAX, 768 .ucode_api_max = IWL6000_UCODE_API_MAX,
768 .ucode_api_min = IWL6000_UCODE_API_MIN, 769 .ucode_api_min = IWL6000_UCODE_API_MIN,
769 .sku = IWL_SKU_G,
770 .valid_tx_ant = ANT_BC, 770 .valid_tx_ant = ANT_BC,
771 .valid_rx_ant = ANT_BC, 771 .valid_rx_ant = ANT_BC,
772 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, 772 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
@@ -775,6 +775,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
775 .mod_params = &iwlagn_mod_params, 775 .mod_params = &iwlagn_mod_params,
776 .base_params = &iwl6000_base_params, 776 .base_params = &iwl6000_base_params,
777 .pa_type = IWL_PA_INTERNAL, 777 .pa_type = IWL_PA_INTERNAL,
778 .led_mode = IWL_LED_BLINK,
778}; 779};
779 780
780struct iwl_cfg iwl6050_2agn_cfg = { 781struct iwl_cfg iwl6050_2agn_cfg = {
@@ -782,7 +783,6 @@ struct iwl_cfg iwl6050_2agn_cfg = {
782 .fw_name_pre = IWL6050_FW_PRE, 783 .fw_name_pre = IWL6050_FW_PRE,
783 .ucode_api_max = IWL6050_UCODE_API_MAX, 784 .ucode_api_max = IWL6050_UCODE_API_MAX,
784 .ucode_api_min = IWL6050_UCODE_API_MIN, 785 .ucode_api_min = IWL6050_UCODE_API_MIN,
785 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
786 .valid_tx_ant = ANT_AB, 786 .valid_tx_ant = ANT_AB,
787 .valid_rx_ant = ANT_AB, 787 .valid_rx_ant = ANT_AB,
788 .ops = &iwl6050_ops, 788 .ops = &iwl6050_ops,
@@ -792,6 +792,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
792 .base_params = &iwl6050_base_params, 792 .base_params = &iwl6050_base_params,
793 .ht_params = &iwl6000_ht_params, 793 .ht_params = &iwl6000_ht_params,
794 .need_dc_calib = true, 794 .need_dc_calib = true,
795 .led_mode = IWL_LED_BLINK,
795}; 796};
796 797
797struct iwl_cfg iwl6050g2_bgn_cfg = { 798struct iwl_cfg iwl6050g2_bgn_cfg = {
@@ -799,7 +800,6 @@ struct iwl_cfg iwl6050g2_bgn_cfg = {
799 .fw_name_pre = IWL6050_FW_PRE, 800 .fw_name_pre = IWL6050_FW_PRE,
800 .ucode_api_max = IWL6050_UCODE_API_MAX, 801 .ucode_api_max = IWL6050_UCODE_API_MAX,
801 .ucode_api_min = IWL6050_UCODE_API_MIN, 802 .ucode_api_min = IWL6050_UCODE_API_MIN,
802 .sku = IWL_SKU_G|IWL_SKU_N,
803 .valid_tx_ant = ANT_A, 803 .valid_tx_ant = ANT_A,
804 .valid_rx_ant = ANT_AB, 804 .valid_rx_ant = ANT_AB,
805 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, 805 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
@@ -809,6 +809,7 @@ struct iwl_cfg iwl6050g2_bgn_cfg = {
809 .base_params = &iwl6050_base_params, 809 .base_params = &iwl6050_base_params,
810 .ht_params = &iwl6000_ht_params, 810 .ht_params = &iwl6000_ht_params,
811 .need_dc_calib = true, 811 .need_dc_calib = true,
812 .led_mode = IWL_LED_RF_STATE,
812}; 813};
813 814
814struct iwl_cfg iwl6050_2abg_cfg = { 815struct iwl_cfg iwl6050_2abg_cfg = {
@@ -816,7 +817,6 @@ struct iwl_cfg iwl6050_2abg_cfg = {
816 .fw_name_pre = IWL6050_FW_PRE, 817 .fw_name_pre = IWL6050_FW_PRE,
817 .ucode_api_max = IWL6050_UCODE_API_MAX, 818 .ucode_api_max = IWL6050_UCODE_API_MAX,
818 .ucode_api_min = IWL6050_UCODE_API_MIN, 819 .ucode_api_min = IWL6050_UCODE_API_MIN,
819 .sku = IWL_SKU_A|IWL_SKU_G,
820 .valid_tx_ant = ANT_AB, 820 .valid_tx_ant = ANT_AB,
821 .valid_rx_ant = ANT_AB, 821 .valid_rx_ant = ANT_AB,
822 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, 822 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
@@ -825,6 +825,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
825 .mod_params = &iwlagn_mod_params, 825 .mod_params = &iwlagn_mod_params,
826 .base_params = &iwl6050_base_params, 826 .base_params = &iwl6050_base_params,
827 .need_dc_calib = true, 827 .need_dc_calib = true,
828 .led_mode = IWL_LED_BLINK,
828}; 829};
829 830
830struct iwl_cfg iwl6000_3agn_cfg = { 831struct iwl_cfg iwl6000_3agn_cfg = {
@@ -832,7 +833,6 @@ struct iwl_cfg iwl6000_3agn_cfg = {
832 .fw_name_pre = IWL6000_FW_PRE, 833 .fw_name_pre = IWL6000_FW_PRE,
833 .ucode_api_max = IWL6000_UCODE_API_MAX, 834 .ucode_api_max = IWL6000_UCODE_API_MAX,
834 .ucode_api_min = IWL6000_UCODE_API_MIN, 835 .ucode_api_min = IWL6000_UCODE_API_MIN,
835 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
836 .valid_tx_ant = ANT_ABC, 836 .valid_tx_ant = ANT_ABC,
837 .valid_rx_ant = ANT_ABC, 837 .valid_rx_ant = ANT_ABC,
838 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, 838 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
@@ -842,6 +842,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
842 .base_params = &iwl6000_base_params, 842 .base_params = &iwl6000_base_params,
843 .ht_params = &iwl6000_ht_params, 843 .ht_params = &iwl6000_ht_params,
844 .need_dc_calib = true, 844 .need_dc_calib = true,
845 .led_mode = IWL_LED_BLINK,
845}; 846};
846 847
847struct iwl_cfg iwl130_bgn_cfg = { 848struct iwl_cfg iwl130_bgn_cfg = {
@@ -849,7 +850,6 @@ struct iwl_cfg iwl130_bgn_cfg = {
849 .fw_name_pre = IWL6000G2B_FW_PRE, 850 .fw_name_pre = IWL6000G2B_FW_PRE,
850 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 851 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
851 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 852 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
852 .sku = IWL_SKU_G|IWL_SKU_N,
853 .valid_tx_ant = ANT_A, 853 .valid_tx_ant = ANT_A,
854 .valid_rx_ant = ANT_A, 854 .valid_rx_ant = ANT_A,
855 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 855 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -860,6 +860,7 @@ struct iwl_cfg iwl130_bgn_cfg = {
860 .bt_params = &iwl6000_bt_params, 860 .bt_params = &iwl6000_bt_params,
861 .ht_params = &iwl6000_ht_params, 861 .ht_params = &iwl6000_ht_params,
862 .need_dc_calib = true, 862 .need_dc_calib = true,
863 .led_mode = IWL_LED_RF_STATE,
863 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 864 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
864 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 865 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
865}; 866};
@@ -869,7 +870,6 @@ struct iwl_cfg iwl130_bg_cfg = {
869 .fw_name_pre = IWL6000G2B_FW_PRE, 870 .fw_name_pre = IWL6000G2B_FW_PRE,
870 .ucode_api_max = IWL6000G2_UCODE_API_MAX, 871 .ucode_api_max = IWL6000G2_UCODE_API_MAX,
871 .ucode_api_min = IWL6000G2_UCODE_API_MIN, 872 .ucode_api_min = IWL6000G2_UCODE_API_MIN,
872 .sku = IWL_SKU_G,
873 .valid_tx_ant = ANT_A, 873 .valid_tx_ant = ANT_A,
874 .valid_rx_ant = ANT_A, 874 .valid_rx_ant = ANT_A,
875 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, 875 .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION,
@@ -879,6 +879,7 @@ struct iwl_cfg iwl130_bg_cfg = {
879 .base_params = &iwl6000_coex_base_params, 879 .base_params = &iwl6000_coex_base_params,
880 .bt_params = &iwl6000_bt_params, 880 .bt_params = &iwl6000_bt_params,
881 .need_dc_calib = true, 881 .need_dc_calib = true,
882 .led_mode = IWL_LED_RF_STATE,
882 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 883 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
883 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 884 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
884}; 885};
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
index a650baba0809..8a4d3acb9b79 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
@@ -248,6 +248,27 @@ err:
248 248
249} 249}
250 250
251int iwl_eeprom_check_sku(struct iwl_priv *priv)
252{
253 u16 eeprom_sku;
254
255 eeprom_sku = iwl_eeprom_query16(priv, EEPROM_SKU_CAP);
256
257 priv->cfg->sku = ((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >>
258 EEPROM_SKU_CAP_BAND_POS);
259 if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE)
260 priv->cfg->sku |= IWL_SKU_N;
261
262 if (!priv->cfg->sku) {
263 IWL_ERR(priv, "Invalid device sku\n");
264 return -EINVAL;
265 }
266
267 IWL_INFO(priv, "Device SKU: 0X%x\n", priv->cfg->sku);
268
269 return 0;
270}
271
251void iwl_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac) 272void iwl_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac)
252{ 273{
253 const u8 *addr = priv->cfg->ops->lib->eeprom_ops.query_addr(priv, 274 const u8 *addr = priv->cfg->ops->lib->eeprom_ops.query_addr(priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
index ffb2f4111ad0..366340f3fb0f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
@@ -307,6 +307,7 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
307 307
308 if (ctx_bss->vif && ctx_pan->vif) { 308 if (ctx_bss->vif && ctx_pan->vif) {
309 int bcnint = ctx_pan->vif->bss_conf.beacon_int; 309 int bcnint = ctx_pan->vif->bss_conf.beacon_int;
310 int dtim = ctx_pan->vif->bss_conf.dtim_period ?: 1;
310 311
311 /* should be set, but seems unused?? */ 312 /* should be set, but seems unused?? */
312 cmd.flags |= cpu_to_le16(IWL_WIPAN_PARAMS_FLG_SLOTTED_MODE); 313 cmd.flags |= cpu_to_le16(IWL_WIPAN_PARAMS_FLG_SLOTTED_MODE);
@@ -329,10 +330,10 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
329 if (test_bit(STATUS_SCAN_HW, &priv->status) || 330 if (test_bit(STATUS_SCAN_HW, &priv->status) ||
330 (!ctx_bss->vif->bss_conf.idle && 331 (!ctx_bss->vif->bss_conf.idle &&
331 !ctx_bss->vif->bss_conf.assoc)) { 332 !ctx_bss->vif->bss_conf.assoc)) {
332 slot0 = bcnint * 3 - 20; 333 slot0 = dtim * bcnint * 3 - 20;
333 slot1 = 20; 334 slot1 = 20;
334 } else if (!ctx_pan->vif->bss_conf.idle && 335 } else if (!ctx_pan->vif->bss_conf.idle &&
335 !ctx_pan->vif->bss_conf.assoc) { 336 !ctx_pan->vif->bss_conf.assoc) {
336 slot1 = bcnint * 3 - 20; 337 slot1 = bcnint * 3 - 20;
337 slot0 = 20; 338 slot0 = 20;
338 } 339 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index ca3530c4295a..881475cf5ad7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -445,22 +445,17 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv,
445 445
446 if (priv->mac80211_registered && 446 if (priv->mac80211_registered &&
447 (iwl_queue_space(&txq->q) > txq->q.low_mark) && 447 (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
448 (agg->state != IWL_EMPTYING_HW_QUEUE_DELBA)) { 448 (agg->state != IWL_EMPTYING_HW_QUEUE_DELBA))
449 if (agg->state == IWL_AGG_OFF) 449 iwl_wake_queue(priv, txq);
450 iwl_wake_queue(priv, txq_id);
451 else
452 iwl_wake_queue(priv, txq->swq_id);
453 }
454 } 450 }
455 } else { 451 } else {
456 BUG_ON(txq_id != txq->swq_id);
457 iwlagn_set_tx_status(priv, info, tx_resp, txq_id, false); 452 iwlagn_set_tx_status(priv, info, tx_resp, txq_id, false);
458 freed = iwlagn_tx_queue_reclaim(priv, txq_id, index); 453 freed = iwlagn_tx_queue_reclaim(priv, txq_id, index);
459 iwl_free_tfds_in_queue(priv, sta_id, tid, freed); 454 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
460 455
461 if (priv->mac80211_registered && 456 if (priv->mac80211_registered &&
462 (iwl_queue_space(&txq->q) > txq->q.low_mark)) 457 (iwl_queue_space(&txq->q) > txq->q.low_mark))
463 iwl_wake_queue(priv, txq_id); 458 iwl_wake_queue(priv, txq);
464 } 459 }
465 460
466 iwlagn_txq_check_empty(priv, sta_id, tid, txq_id); 461 iwlagn_txq_check_empty(priv, sta_id, tid, txq_id);
@@ -2025,7 +2020,6 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,
2025 struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif; 2020 struct iwl_bt_coex_profile_notif *coex = &pkt->u.bt_coex_profile_notif;
2026 struct iwlagn_bt_sco_cmd sco_cmd = { .flags = 0 }; 2021 struct iwlagn_bt_sco_cmd sco_cmd = { .flags = 0 };
2027 struct iwl_bt_uart_msg *uart_msg = &coex->last_bt_uart_msg; 2022 struct iwl_bt_uart_msg *uart_msg = &coex->last_bt_uart_msg;
2028 u8 last_traffic_load;
2029 2023
2030 IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n"); 2024 IWL_DEBUG_NOTIF(priv, "BT Coex notification:\n");
2031 IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status); 2025 IWL_DEBUG_NOTIF(priv, " status: %d\n", coex->bt_status);
@@ -2034,11 +2028,10 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,
2034 coex->bt_ci_compliance); 2028 coex->bt_ci_compliance);
2035 iwlagn_print_uartmsg(priv, uart_msg); 2029 iwlagn_print_uartmsg(priv, uart_msg);
2036 2030
2037 last_traffic_load = priv->notif_bt_traffic_load; 2031 priv->last_bt_traffic_load = priv->bt_traffic_load;
2038 priv->notif_bt_traffic_load = coex->bt_traffic_load;
2039 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { 2032 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
2040 if (priv->bt_status != coex->bt_status || 2033 if (priv->bt_status != coex->bt_status ||
2041 last_traffic_load != coex->bt_traffic_load) { 2034 priv->last_bt_traffic_load != coex->bt_traffic_load) {
2042 if (coex->bt_status) { 2035 if (coex->bt_status) {
2043 /* BT on */ 2036 /* BT on */
2044 if (!priv->bt_ch_announce) 2037 if (!priv->bt_ch_announce)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 065553629de5..f450adc72361 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -833,17 +833,23 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
833 struct iwl_lq_sta *lq_sta) 833 struct iwl_lq_sta *lq_sta)
834{ 834{
835 struct iwl_scale_tbl_info *tbl; 835 struct iwl_scale_tbl_info *tbl;
836 bool full_concurrent; 836 bool full_concurrent = priv->bt_full_concurrent;
837 unsigned long flags; 837 unsigned long flags;
838 838
839 spin_lock_irqsave(&priv->lock, flags); 839 if (priv->bt_ant_couple_ok) {
840 if (priv->bt_ci_compliance && priv->bt_ant_couple_ok) 840 /*
841 full_concurrent = true; 841 * Is there a need to switch between
842 else 842 * full concurrency and 3-wire?
843 full_concurrent = false; 843 */
844 spin_unlock_irqrestore(&priv->lock, flags); 844 spin_lock_irqsave(&priv->lock, flags);
845 845 if (priv->bt_ci_compliance && priv->bt_ant_couple_ok)
846 if (priv->bt_full_concurrent != full_concurrent) { 846 full_concurrent = true;
847 else
848 full_concurrent = false;
849 spin_unlock_irqrestore(&priv->lock, flags);
850 }
851 if ((priv->bt_traffic_load != priv->last_bt_traffic_load) ||
852 (priv->bt_full_concurrent != full_concurrent)) {
847 priv->bt_full_concurrent = full_concurrent; 853 priv->bt_full_concurrent = full_concurrent;
848 854
849 /* Update uCode's rate table. */ 855 /* Update uCode's rate table. */
@@ -1040,8 +1046,7 @@ done:
1040 if (sta && sta->supp_rates[sband->band]) 1046 if (sta && sta->supp_rates[sband->band])
1041 rs_rate_scale_perform(priv, skb, sta, lq_sta); 1047 rs_rate_scale_perform(priv, skb, sta, lq_sta);
1042 1048
1043 /* Is there a need to switch between full concurrency and 3-wire? */ 1049 if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist)
1044 if (priv->bt_ant_couple_ok)
1045 rs_bt_update_lq(priv, ctx, lq_sta); 1050 rs_bt_update_lq(priv, ctx, lq_sta);
1046} 1051}
1047 1052
@@ -3010,10 +3015,7 @@ static void rs_fill_link_cmd(struct iwl_priv *priv,
3010 */ 3015 */
3011 if (priv && priv->cfg->bt_params && 3016 if (priv && priv->cfg->bt_params &&
3012 priv->cfg->bt_params->agg_time_limit && 3017 priv->cfg->bt_params->agg_time_limit &&
3013 priv->cfg->bt_params->agg_time_limit >= 3018 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)
3014 LINK_QUAL_AGG_TIME_LIMIT_MIN &&
3015 priv->cfg->bt_params->agg_time_limit <=
3016 LINK_QUAL_AGG_TIME_LIMIT_MAX)
3017 lq_cmd->agg_params.agg_time_limit = 3019 lq_cmd->agg_params.agg_time_limit =
3018 cpu_to_le16(priv->cfg->bt_params->agg_time_limit); 3020 cpu_to_le16(priv->cfg->bt_params->agg_time_limit);
3019} 3021}
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 2d927a94074d..203ee60a82b4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -72,6 +72,34 @@ static int iwlagn_disable_pan(struct iwl_priv *priv,
72 return ret; 72 return ret;
73} 73}
74 74
75static void iwlagn_update_qos(struct iwl_priv *priv,
76 struct iwl_rxon_context *ctx)
77{
78 int ret;
79
80 if (!ctx->is_active)
81 return;
82
83 ctx->qos_data.def_qos_parm.qos_flags = 0;
84
85 if (ctx->qos_data.qos_active)
86 ctx->qos_data.def_qos_parm.qos_flags |=
87 QOS_PARAM_FLG_UPDATE_EDCA_MSK;
88
89 if (ctx->ht.enabled)
90 ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
91
92 IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
93 ctx->qos_data.qos_active,
94 ctx->qos_data.def_qos_parm.qos_flags);
95
96 ret = iwl_send_cmd_pdu(priv, ctx->qos_cmd,
97 sizeof(struct iwl_qosparam_cmd),
98 &ctx->qos_data.def_qos_parm);
99 if (ret)
100 IWL_ERR(priv, "Failed to update QoS\n");
101}
102
75static int iwlagn_update_beacon(struct iwl_priv *priv, 103static int iwlagn_update_beacon(struct iwl_priv *priv,
76 struct ieee80211_vif *vif) 104 struct ieee80211_vif *vif)
77{ 105{
@@ -97,6 +125,7 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
97 /* cast away the const for active_rxon in this function */ 125 /* cast away the const for active_rxon in this function */
98 struct iwl_rxon_cmd *active = (void *)&ctx->active; 126 struct iwl_rxon_cmd *active = (void *)&ctx->active;
99 bool new_assoc = !!(ctx->staging.filter_flags & RXON_FILTER_ASSOC_MSK); 127 bool new_assoc = !!(ctx->staging.filter_flags & RXON_FILTER_ASSOC_MSK);
128 bool old_assoc = !!(ctx->active.filter_flags & RXON_FILTER_ASSOC_MSK);
100 int ret; 129 int ret;
101 130
102 lockdep_assert_held(&priv->mutex); 131 lockdep_assert_held(&priv->mutex);
@@ -176,25 +205,27 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
176 * AP station must be done after the BSSID is set to correctly 205 * AP station must be done after the BSSID is set to correctly
177 * set up filters in the device. 206 * set up filters in the device.
178 */ 207 */
179 if (ctx->ctxid == IWL_RXON_CTX_BSS) 208 if ((old_assoc && new_assoc) || !new_assoc) {
180 ret = iwlagn_disable_bss(priv, ctx, &ctx->staging); 209 if (ctx->ctxid == IWL_RXON_CTX_BSS)
181 else 210 ret = iwlagn_disable_bss(priv, ctx, &ctx->staging);
182 ret = iwlagn_disable_pan(priv, ctx, &ctx->staging); 211 else
183 if (ret) 212 ret = iwlagn_disable_pan(priv, ctx, &ctx->staging);
184 return ret; 213 if (ret)
214 return ret;
185 215
186 memcpy(active, &ctx->staging, sizeof(*active)); 216 memcpy(active, &ctx->staging, sizeof(*active));
187 217
188 /* 218 /*
189 * Un-assoc RXON clears the station table and WEP 219 * Un-assoc RXON clears the station table and WEP
190 * keys, so we have to restore those afterwards. 220 * keys, so we have to restore those afterwards.
191 */ 221 */
192 iwl_clear_ucode_stations(priv, ctx); 222 iwl_clear_ucode_stations(priv, ctx);
193 iwl_restore_stations(priv, ctx); 223 iwl_restore_stations(priv, ctx);
194 ret = iwl_restore_default_wep_keys(priv, ctx); 224 ret = iwl_restore_default_wep_keys(priv, ctx);
195 if (ret) { 225 if (ret) {
196 IWL_ERR(priv, "Failed to restore WEP keys (%d)\n", ret); 226 IWL_ERR(priv, "Failed to restore WEP keys (%d)\n", ret);
197 return ret; 227 return ret;
228 }
198 } 229 }
199 230
200 /* RXON timing must be before associated RXON */ 231 /* RXON timing must be before associated RXON */
@@ -205,6 +236,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
205 } 236 }
206 237
207 if (new_assoc) { 238 if (new_assoc) {
239 /* QoS info may be cleared by previous un-assoc RXON */
240 iwlagn_update_qos(priv, ctx);
241
208 /* 242 /*
209 * We'll run into this code path when beaconing is 243 * We'll run into this code path when beaconing is
210 * enabled, but then we also need to send the beacon 244 * enabled, but then we also need to send the beacon
@@ -235,6 +269,8 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
235 } 269 }
236 memcpy(active, &ctx->staging, sizeof(*active)); 270 memcpy(active, &ctx->staging, sizeof(*active));
237 271
272 iwl_reprogram_ap_sta(priv, ctx);
273
238 /* IBSS beacon needs to be sent after setting assoc */ 274 /* IBSS beacon needs to be sent after setting assoc */
239 if (ctx->vif && (ctx->vif->type == NL80211_IFTYPE_ADHOC)) 275 if (ctx->vif && (ctx->vif->type == NL80211_IFTYPE_ADHOC))
240 if (iwlagn_update_beacon(priv, ctx->vif)) 276 if (iwlagn_update_beacon(priv, ctx->vif))
@@ -261,34 +297,6 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
261 return 0; 297 return 0;
262} 298}
263 299
264static void iwlagn_update_qos(struct iwl_priv *priv,
265 struct iwl_rxon_context *ctx)
266{
267 int ret;
268
269 if (!ctx->is_active)
270 return;
271
272 ctx->qos_data.def_qos_parm.qos_flags = 0;
273
274 if (ctx->qos_data.qos_active)
275 ctx->qos_data.def_qos_parm.qos_flags |=
276 QOS_PARAM_FLG_UPDATE_EDCA_MSK;
277
278 if (ctx->ht.enabled)
279 ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
280
281 IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
282 ctx->qos_data.qos_active,
283 ctx->qos_data.def_qos_parm.qos_flags);
284
285 ret = iwl_send_cmd_pdu(priv, ctx->qos_cmd,
286 sizeof(struct iwl_qosparam_cmd),
287 &ctx->qos_data.def_qos_parm);
288 if (ret)
289 IWL_ERR(priv, "Failed to update QoS\n");
290}
291
292int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) 300int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed)
293{ 301{
294 struct iwl_priv *priv = hw->priv; 302 struct iwl_priv *priv = hw->priv;
@@ -507,6 +515,11 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
507 515
508 mutex_lock(&priv->mutex); 516 mutex_lock(&priv->mutex);
509 517
518 if (WARN_ON(!ctx->vif)) {
519 mutex_unlock(&priv->mutex);
520 return;
521 }
522
510 if (changes & BSS_CHANGED_BEACON_INT) 523 if (changes & BSS_CHANGED_BEACON_INT)
511 force = true; 524 force = true;
512 525
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 1205cecfcaf0..07bbc915529a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -518,7 +518,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
518 struct iwl_cmd_meta *out_meta; 518 struct iwl_cmd_meta *out_meta;
519 struct iwl_tx_cmd *tx_cmd; 519 struct iwl_tx_cmd *tx_cmd;
520 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; 520 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
521 int swq_id, txq_id; 521 int txq_id;
522 dma_addr_t phys_addr; 522 dma_addr_t phys_addr;
523 dma_addr_t txcmd_phys; 523 dma_addr_t txcmd_phys;
524 dma_addr_t scratch_phys; 524 dma_addr_t scratch_phys;
@@ -620,7 +620,6 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
620 } 620 }
621 621
622 txq = &priv->txq[txq_id]; 622 txq = &priv->txq[txq_id];
623 swq_id = txq->swq_id;
624 q = &txq->q; 623 q = &txq->q;
625 624
626 if (unlikely(iwl_queue_space(q) < q->high_mark)) { 625 if (unlikely(iwl_queue_space(q) < q->high_mark)) {
@@ -775,7 +774,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
775 iwl_txq_update_write_ptr(priv, txq); 774 iwl_txq_update_write_ptr(priv, txq);
776 spin_unlock_irqrestore(&priv->lock, flags); 775 spin_unlock_irqrestore(&priv->lock, flags);
777 } else { 776 } else {
778 iwl_stop_queue(priv, txq->swq_id); 777 iwl_stop_queue(priv, txq);
779 } 778 }
780 } 779 }
781 780
@@ -1004,7 +1003,7 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif,
1004 tid_data = &priv->stations[sta_id].tid[tid]; 1003 tid_data = &priv->stations[sta_id].tid[tid];
1005 *ssn = SEQ_TO_SN(tid_data->seq_number); 1004 *ssn = SEQ_TO_SN(tid_data->seq_number);
1006 tid_data->agg.txq_id = txq_id; 1005 tid_data->agg.txq_id = txq_id;
1007 priv->txq[txq_id].swq_id = iwl_virtual_agg_queue_num(get_ac_from_tid(tid), txq_id); 1006 iwl_set_swq_id(&priv->txq[txq_id], get_ac_from_tid(tid), txq_id);
1008 spin_unlock_irqrestore(&priv->sta_lock, flags); 1007 spin_unlock_irqrestore(&priv->sta_lock, flags);
1009 1008
1010 ret = priv->cfg->ops->lib->txq_agg_enable(priv, txq_id, tx_fifo, 1009 ret = priv->cfg->ops->lib->txq_agg_enable(priv, txq_id, tx_fifo,
@@ -1232,37 +1231,61 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1232 if (sh < 0) /* tbw something is wrong with indices */ 1231 if (sh < 0) /* tbw something is wrong with indices */
1233 sh += 0x100; 1232 sh += 0x100;
1234 1233
1235 /* don't use 64-bit values for now */
1236 bitmap = le64_to_cpu(ba_resp->bitmap) >> sh;
1237
1238 if (agg->frame_count > (64 - sh)) { 1234 if (agg->frame_count > (64 - sh)) {
1239 IWL_DEBUG_TX_REPLY(priv, "more frames than bitmap size"); 1235 IWL_DEBUG_TX_REPLY(priv, "more frames than bitmap size");
1240 return -1; 1236 return -1;
1241 } 1237 }
1242 1238 if (!priv->cfg->base_params->no_agg_framecnt_info && ba_resp->txed) {
1243 /* check for success or failure according to the 1239 /*
1244 * transmitted bitmap and block-ack bitmap */ 1240 * sent and ack information provided by uCode
1245 sent_bitmap = bitmap & agg->bitmap; 1241 * use it instead of figure out ourself
1246 1242 */
1247 /* For each frame attempted in aggregation, 1243 if (ba_resp->txed_2_done > ba_resp->txed) {
1248 * update driver's record of tx frame's status. */ 1244 IWL_DEBUG_TX_REPLY(priv,
1249 i = 0; 1245 "bogus sent(%d) and ack(%d) count\n",
1250 while (sent_bitmap) { 1246 ba_resp->txed, ba_resp->txed_2_done);
1251 ack = sent_bitmap & 1ULL; 1247 /*
1252 successes += ack; 1248 * set txed_2_done = txed,
1253 IWL_DEBUG_TX_REPLY(priv, "%s ON i=%d idx=%d raw=%d\n", 1249 * so it won't impact rate scale
1254 ack ? "ACK" : "NACK", i, (agg->start_idx + i) & 0xff, 1250 */
1255 agg->start_idx + i); 1251 ba_resp->txed = ba_resp->txed_2_done;
1256 sent_bitmap >>= 1; 1252 }
1257 ++i; 1253 IWL_DEBUG_HT(priv, "agg frames sent:%d, acked:%d\n",
1254 ba_resp->txed, ba_resp->txed_2_done);
1255 } else {
1256 /* don't use 64-bit values for now */
1257 bitmap = le64_to_cpu(ba_resp->bitmap) >> sh;
1258
1259 /* check for success or failure according to the
1260 * transmitted bitmap and block-ack bitmap */
1261 sent_bitmap = bitmap & agg->bitmap;
1262
1263 /* For each frame attempted in aggregation,
1264 * update driver's record of tx frame's status. */
1265 i = 0;
1266 while (sent_bitmap) {
1267 ack = sent_bitmap & 1ULL;
1268 successes += ack;
1269 IWL_DEBUG_TX_REPLY(priv, "%s ON i=%d idx=%d raw=%d\n",
1270 ack ? "ACK" : "NACK", i,
1271 (agg->start_idx + i) & 0xff,
1272 agg->start_idx + i);
1273 sent_bitmap >>= 1;
1274 ++i;
1275 }
1258 } 1276 }
1259
1260 info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb); 1277 info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb);
1261 memset(&info->status, 0, sizeof(info->status)); 1278 memset(&info->status, 0, sizeof(info->status));
1262 info->flags |= IEEE80211_TX_STAT_ACK; 1279 info->flags |= IEEE80211_TX_STAT_ACK;
1263 info->flags |= IEEE80211_TX_STAT_AMPDU; 1280 info->flags |= IEEE80211_TX_STAT_AMPDU;
1264 info->status.ampdu_ack_len = successes; 1281 if (!priv->cfg->base_params->no_agg_framecnt_info && ba_resp->txed) {
1265 info->status.ampdu_len = agg->frame_count; 1282 info->status.ampdu_ack_len = ba_resp->txed_2_done;
1283 info->status.ampdu_len = ba_resp->txed;
1284
1285 } else {
1286 info->status.ampdu_ack_len = successes;
1287 info->status.ampdu_len = agg->frame_count;
1288 }
1266 iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info); 1289 iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info);
1267 1290
1268 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap); 1291 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap);
@@ -1376,7 +1399,7 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
1376 if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && 1399 if ((iwl_queue_space(&txq->q) > txq->q.low_mark) &&
1377 priv->mac80211_registered && 1400 priv->mac80211_registered &&
1378 (agg->state != IWL_EMPTYING_HW_QUEUE_DELBA)) 1401 (agg->state != IWL_EMPTYING_HW_QUEUE_DELBA))
1379 iwl_wake_queue(priv, txq->swq_id); 1402 iwl_wake_queue(priv, txq);
1380 1403
1381 iwlagn_txq_check_empty(priv, sta_id, tid, scd_flow); 1404 iwlagn_txq_check_empty(priv, sta_id, tid, scd_flow);
1382 } 1405 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
index 703621107dac..411a7a20450a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
@@ -40,30 +40,36 @@
40#include "iwl-agn.h" 40#include "iwl-agn.h"
41#include "iwl-agn-calib.h" 41#include "iwl-agn-calib.h"
42 42
43static const s8 iwlagn_default_queue_to_tx_fifo[] = { 43#define IWL_AC_UNSET -1
44 IWL_TX_FIFO_VO, 44
45 IWL_TX_FIFO_VI, 45struct queue_to_fifo_ac {
46 IWL_TX_FIFO_BE, 46 s8 fifo, ac;
47 IWL_TX_FIFO_BK, 47};
48 IWLAGN_CMD_FIFO_NUM, 48
49 IWL_TX_FIFO_UNUSED, 49static const struct queue_to_fifo_ac iwlagn_default_queue_to_tx_fifo[] = {
50 IWL_TX_FIFO_UNUSED, 50 { IWL_TX_FIFO_VO, 0, },
51 IWL_TX_FIFO_UNUSED, 51 { IWL_TX_FIFO_VI, 1, },
52 IWL_TX_FIFO_UNUSED, 52 { IWL_TX_FIFO_BE, 2, },
53 IWL_TX_FIFO_UNUSED, 53 { IWL_TX_FIFO_BK, 3, },
54 { IWLAGN_CMD_FIFO_NUM, IWL_AC_UNSET, },
55 { IWL_TX_FIFO_UNUSED, IWL_AC_UNSET, },
56 { IWL_TX_FIFO_UNUSED, IWL_AC_UNSET, },
57 { IWL_TX_FIFO_UNUSED, IWL_AC_UNSET, },
58 { IWL_TX_FIFO_UNUSED, IWL_AC_UNSET, },
59 { IWL_TX_FIFO_UNUSED, IWL_AC_UNSET, },
54}; 60};
55 61
56static const s8 iwlagn_ipan_queue_to_tx_fifo[] = { 62static const struct queue_to_fifo_ac iwlagn_ipan_queue_to_tx_fifo[] = {
57 IWL_TX_FIFO_VO, 63 { IWL_TX_FIFO_VO, 0, },
58 IWL_TX_FIFO_VI, 64 { IWL_TX_FIFO_VI, 1, },
59 IWL_TX_FIFO_BE, 65 { IWL_TX_FIFO_BE, 2, },
60 IWL_TX_FIFO_BK, 66 { IWL_TX_FIFO_BK, 3, },
61 IWL_TX_FIFO_BK_IPAN, 67 { IWL_TX_FIFO_BK_IPAN, 3, },
62 IWL_TX_FIFO_BE_IPAN, 68 { IWL_TX_FIFO_BE_IPAN, 2, },
63 IWL_TX_FIFO_VI_IPAN, 69 { IWL_TX_FIFO_VI_IPAN, 1, },
64 IWL_TX_FIFO_VO_IPAN, 70 { IWL_TX_FIFO_VO_IPAN, 0, },
65 IWL_TX_FIFO_BE_IPAN, 71 { IWL_TX_FIFO_BE_IPAN, 2, },
66 IWLAGN_CMD_FIFO_NUM, 72 { IWLAGN_CMD_FIFO_NUM, IWL_AC_UNSET, },
67}; 73};
68 74
69static struct iwl_wimax_coex_event_entry cu_priorities[COEX_NUM_OF_EVENTS] = { 75static struct iwl_wimax_coex_event_entry cu_priorities[COEX_NUM_OF_EVENTS] = {
@@ -429,7 +435,7 @@ void iwlagn_send_bt_env(struct iwl_priv *priv, u8 action, u8 type)
429 435
430int iwlagn_alive_notify(struct iwl_priv *priv) 436int iwlagn_alive_notify(struct iwl_priv *priv)
431{ 437{
432 const s8 *queues; 438 const struct queue_to_fifo_ac *queue_to_fifo;
433 u32 a; 439 u32 a;
434 unsigned long flags; 440 unsigned long flags;
435 int i, chan; 441 int i, chan;
@@ -492,9 +498,9 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
492 498
493 /* map queues to FIFOs */ 499 /* map queues to FIFOs */
494 if (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS)) 500 if (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS))
495 queues = iwlagn_ipan_queue_to_tx_fifo; 501 queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo;
496 else 502 else
497 queues = iwlagn_default_queue_to_tx_fifo; 503 queue_to_fifo = iwlagn_default_queue_to_tx_fifo;
498 504
499 iwlagn_set_wr_ptrs(priv, priv->cmd_queue, 0); 505 iwlagn_set_wr_ptrs(priv, priv->cmd_queue, 0);
500 506
@@ -510,14 +516,17 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
510 BUILD_BUG_ON(ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo) != 10); 516 BUILD_BUG_ON(ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo) != 10);
511 517
512 for (i = 0; i < 10; i++) { 518 for (i = 0; i < 10; i++) {
513 int ac = queues[i]; 519 int fifo = queue_to_fifo[i].fifo;
520 int ac = queue_to_fifo[i].ac;
514 521
515 iwl_txq_ctx_activate(priv, i); 522 iwl_txq_ctx_activate(priv, i);
516 523
517 if (ac == IWL_TX_FIFO_UNUSED) 524 if (fifo == IWL_TX_FIFO_UNUSED)
518 continue; 525 continue;
519 526
520 iwlagn_tx_queue_set_status(priv, &priv->txq[i], ac, 0); 527 if (ac != IWL_AC_UNSET)
528 iwl_set_swq_id(&priv->txq[i], ac, i);
529 iwlagn_tx_queue_set_status(priv, &priv->txq[i], fifo, 0);
521 } 530 }
522 531
523 spin_unlock_irqrestore(&priv->lock, flags); 532 spin_unlock_irqrestore(&priv->lock, flags);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 007fb20d78ab..5b96b0d80091 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -97,7 +97,8 @@ void iwl_update_chain_flags(struct iwl_priv *priv)
97 if (priv->cfg->ops->hcmd->set_rxon_chain) { 97 if (priv->cfg->ops->hcmd->set_rxon_chain) {
98 for_each_context(priv, ctx) { 98 for_each_context(priv, ctx) {
99 priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx); 99 priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx);
100 iwlcore_commit_rxon(priv, ctx); 100 if (ctx->active.rx_chain != ctx->staging.rx_chain)
101 iwlcore_commit_rxon(priv, ctx);
101 } 102 }
102 } 103 }
103} 104}
@@ -2716,6 +2717,8 @@ static void iwl_alive_start(struct iwl_priv *priv)
2716 2717
2717 iwl_reset_run_time_calib(priv); 2718 iwl_reset_run_time_calib(priv);
2718 2719
2720 set_bit(STATUS_READY, &priv->status);
2721
2719 /* Configure the adapter for unassociated operation */ 2722 /* Configure the adapter for unassociated operation */
2720 iwlcore_commit_rxon(priv, ctx); 2723 iwlcore_commit_rxon(priv, ctx);
2721 2724
@@ -2725,7 +2728,6 @@ static void iwl_alive_start(struct iwl_priv *priv)
2725 iwl_leds_init(priv); 2728 iwl_leds_init(priv);
2726 2729
2727 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); 2730 IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n");
2728 set_bit(STATUS_READY, &priv->status);
2729 wake_up_interruptible(&priv->wait_command_queue); 2731 wake_up_interruptible(&priv->wait_command_queue);
2730 2732
2731 iwl_power_update_mode(priv, true); 2733 iwl_power_update_mode(priv, true);
@@ -3837,7 +3839,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
3837 priv->bt_on_thresh = BT_ON_THRESHOLD_DEF; 3839 priv->bt_on_thresh = BT_ON_THRESHOLD_DEF;
3838 priv->bt_duration = BT_DURATION_LIMIT_DEF; 3840 priv->bt_duration = BT_DURATION_LIMIT_DEF;
3839 priv->dynamic_frag_thresh = BT_FRAG_THRESHOLD_DEF; 3841 priv->dynamic_frag_thresh = BT_FRAG_THRESHOLD_DEF;
3840 priv->dynamic_agg_thresh = BT_AGG_THRESHOLD_DEF;
3841 } 3842 }
3842 3843
3843 /* Set the tx_power_user_lmt to the lowest power level 3844 /* Set the tx_power_user_lmt to the lowest power level
@@ -4135,6 +4136,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
4135 if (err) 4136 if (err)
4136 goto out_free_eeprom; 4137 goto out_free_eeprom;
4137 4138
4139 err = iwl_eeprom_check_sku(priv);
4140 if (err)
4141 goto out_free_eeprom;
4142
4138 /* extract MAC Address */ 4143 /* extract MAC Address */
4139 iwl_eeprom_get_mac(priv, priv->addresses[0].addr); 4144 iwl_eeprom_get_mac(priv, priv->addresses[0].addr);
4140 IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->addresses[0].addr); 4145 IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->addresses[0].addr);
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 424801abc80e..9c1b7fbef099 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -2022,6 +2022,9 @@ struct iwl_compressed_ba_resp {
2022 __le64 bitmap; 2022 __le64 bitmap;
2023 __le16 scd_flow; 2023 __le16 scd_flow;
2024 __le16 scd_ssn; 2024 __le16 scd_ssn;
2025 /* following only for 5000 series and up */
2026 u8 txed; /* number of frames sent */
2027 u8 txed_2_done; /* number of frames acked */
2025} __packed; 2028} __packed;
2026 2029
2027/* 2030/*
@@ -2407,9 +2410,9 @@ struct iwl_link_quality_cmd {
2407#define BT_FRAG_THRESHOLD_MAX 0 2410#define BT_FRAG_THRESHOLD_MAX 0
2408#define BT_FRAG_THRESHOLD_MIN 0 2411#define BT_FRAG_THRESHOLD_MIN 0
2409 2412
2410#define BT_AGG_THRESHOLD_DEF 0 2413#define BT_AGG_THRESHOLD_DEF 1200
2411#define BT_AGG_THRESHOLD_MAX 0 2414#define BT_AGG_THRESHOLD_MAX 8000
2412#define BT_AGG_THRESHOLD_MIN 0 2415#define BT_AGG_THRESHOLD_MIN 400
2413 2416
2414/* 2417/*
2415 * REPLY_BT_CONFIG = 0x9b (command, has simple generic response) 2418 * REPLY_BT_CONFIG = 0x9b (command, has simple generic response)
@@ -2447,8 +2450,8 @@ struct iwl_bt_cmd {
2447 2450
2448#define IWLAGN_BT3_T7_DEFAULT 1 2451#define IWLAGN_BT3_T7_DEFAULT 1
2449 2452
2450#define IWLAGN_BT_KILL_ACK_MASK_DEFAULT cpu_to_le32(0xffffffff) 2453#define IWLAGN_BT_KILL_ACK_MASK_DEFAULT cpu_to_le32(0xffff0000)
2451#define IWLAGN_BT_KILL_CTS_MASK_DEFAULT cpu_to_le32(0xffffffff) 2454#define IWLAGN_BT_KILL_CTS_MASK_DEFAULT cpu_to_le32(0xffff0000)
2452 2455
2453#define IWLAGN_BT3_PRIO_SAMPLE_DEFAULT 2 2456#define IWLAGN_BT3_PRIO_SAMPLE_DEFAULT 2
2454 2457
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index c884ed385fcf..c41f5a878210 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1469,7 +1469,7 @@ static void iwl_teardown_interface(struct iwl_priv *priv,
1469 * both values are the same and zero. 1469 * both values are the same and zero.
1470 */ 1470 */
1471 if (vif->type == NL80211_IFTYPE_ADHOC) 1471 if (vif->type == NL80211_IFTYPE_ADHOC)
1472 priv->bt_traffic_load = priv->notif_bt_traffic_load; 1472 priv->bt_traffic_load = priv->last_bt_traffic_load;
1473} 1473}
1474 1474
1475void iwl_mac_remove_interface(struct ieee80211_hw *hw, 1475void iwl_mac_remove_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index ee8cf240d65d..9035cd82d85b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -291,7 +291,9 @@ struct iwl_mod_params {
291 * @chain_noise_calib_by_driver: driver has the capability to perform 291 * @chain_noise_calib_by_driver: driver has the capability to perform
292 * chain noise calibration operation 292 * chain noise calibration operation
293 * @shadow_reg_enable: HW shadhow register bit 293 * @shadow_reg_enable: HW shadhow register bit
294*/ 294 * @no_agg_framecnt_info: uCode do not provide aggregation frame count
295 * information
296 */
295struct iwl_base_params { 297struct iwl_base_params {
296 int eeprom_size; 298 int eeprom_size;
297 int num_of_queues; /* def: HW dependent */ 299 int num_of_queues; /* def: HW dependent */
@@ -322,6 +324,7 @@ struct iwl_base_params {
322 const bool sensitivity_calib_by_driver; 324 const bool sensitivity_calib_by_driver;
323 const bool chain_noise_calib_by_driver; 325 const bool chain_noise_calib_by_driver;
324 const bool shadow_reg_enable; 326 const bool shadow_reg_enable;
327 const bool no_agg_framecnt_info;
325}; 328};
326/* 329/*
327 * @advanced_bt_coexist: support advanced bt coexist 330 * @advanced_bt_coexist: support advanced bt coexist
@@ -360,6 +363,7 @@ struct iwl_ht_params {
360 * @need_dc_calib: need to perform init dc calibration 363 * @need_dc_calib: need to perform init dc calibration
361 * @need_temp_offset_calib: need to perform temperature offset calibration 364 * @need_temp_offset_calib: need to perform temperature offset calibration
362 * @scan_antennas: available antenna for scan operation 365 * @scan_antennas: available antenna for scan operation
366 * @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off)
363 * 367 *
364 * We enable the driver to be backward compatible wrt API version. The 368 * We enable the driver to be backward compatible wrt API version. The
365 * driver specifies which APIs it supports (with @ucode_api_max being the 369 * driver specifies which APIs it supports (with @ucode_api_max being the
@@ -406,6 +410,7 @@ struct iwl_cfg {
406 const bool need_temp_offset_calib; /* if used set to true */ 410 const bool need_temp_offset_calib; /* if used set to true */
407 u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; 411 u8 scan_rx_antennas[IEEE80211_NUM_BANDS];
408 u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; 412 u8 scan_tx_antennas[IEEE80211_NUM_BANDS];
413 enum iwl_led_mode led_mode;
409}; 414};
410 415
411/*************************** 416/***************************
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 8fdd4efdb1d3..3cc58420d445 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -992,11 +992,8 @@ static ssize_t iwl_dbgfs_tx_queue_read(struct file *file,
992 " swq_id=%#.2x (ac %d/hwq %d)\n", 992 " swq_id=%#.2x (ac %d/hwq %d)\n",
993 cnt, q->read_ptr, q->write_ptr, 993 cnt, q->read_ptr, q->write_ptr,
994 !!test_bit(cnt, priv->queue_stopped), 994 !!test_bit(cnt, priv->queue_stopped),
995 txq->swq_id, 995 txq->swq_id, txq->swq_id & 3,
996 txq->swq_id & 0x80 ? txq->swq_id & 3 : 996 (txq->swq_id >> 2) & 0x1f);
997 txq->swq_id,
998 txq->swq_id & 0x80 ? (txq->swq_id >> 2) &
999 0x1f : txq->swq_id);
1000 if (cnt >= 4) 997 if (cnt >= 4)
1001 continue; 998 continue;
1002 /* for the ACs, display the stop count too */ 999 /* for the ACs, display the stop count too */
@@ -1580,7 +1577,7 @@ static ssize_t iwl_dbgfs_bt_traffic_read(struct file *file,
1580 priv->bt_full_concurrent ? "full concurrency" : "3-wire"); 1577 priv->bt_full_concurrent ? "full concurrency" : "3-wire");
1581 pos += scnprintf(buf + pos, bufsz - pos, "BT status: %s, " 1578 pos += scnprintf(buf + pos, bufsz - pos, "BT status: %s, "
1582 "last traffic notif: %d\n", 1579 "last traffic notif: %d\n",
1583 priv->bt_status ? "On" : "Off", priv->notif_bt_traffic_load); 1580 priv->bt_status ? "On" : "Off", priv->last_bt_traffic_load);
1584 pos += scnprintf(buf + pos, bufsz - pos, "ch_announcement: %d, " 1581 pos += scnprintf(buf + pos, bufsz - pos, "ch_announcement: %d, "
1585 "sco_active: %d, kill_ack_mask: %x, " 1582 "sco_active: %d, kill_ack_mask: %x, "
1586 "kill_cts_mask: %x\n", 1583 "kill_cts_mask: %x\n",
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 9fcaaf0cfe93..ea81ced13756 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1471,7 +1471,7 @@ struct iwl_priv {
1471 1471
1472 /* bt coex */ 1472 /* bt coex */
1473 u8 bt_status; 1473 u8 bt_status;
1474 u8 bt_traffic_load, notif_bt_traffic_load; 1474 u8 bt_traffic_load, last_bt_traffic_load;
1475 bool bt_ch_announce; 1475 bool bt_ch_announce;
1476 bool bt_sco_active; 1476 bool bt_sco_active;
1477 bool bt_full_concurrent; 1477 bool bt_full_concurrent;
@@ -1482,7 +1482,6 @@ struct iwl_priv {
1482 u16 bt_on_thresh; 1482 u16 bt_on_thresh;
1483 u16 bt_duration; 1483 u16 bt_duration;
1484 u16 dynamic_frag_thresh; 1484 u16 dynamic_frag_thresh;
1485 u16 dynamic_agg_thresh;
1486 u8 bt_ci_compliance; 1485 u8 bt_ci_compliance;
1487 struct work_struct bt_traffic_change_work; 1486 struct work_struct bt_traffic_change_work;
1488 1487
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index d9b590625ae4..e87be1e551aa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -110,9 +110,18 @@ enum {
110}; 110};
111 111
112/* SKU Capabilities */ 112/* SKU Capabilities */
113/* 3945 only */
113#define EEPROM_SKU_CAP_SW_RF_KILL_ENABLE (1 << 0) 114#define EEPROM_SKU_CAP_SW_RF_KILL_ENABLE (1 << 0)
114#define EEPROM_SKU_CAP_HW_RF_KILL_ENABLE (1 << 1) 115#define EEPROM_SKU_CAP_HW_RF_KILL_ENABLE (1 << 1)
115 116
117/* 5000 and up */
118#define EEPROM_SKU_CAP_BAND_POS (4)
119#define EEPROM_SKU_CAP_BAND_SELECTION \
120 (3 << EEPROM_SKU_CAP_BAND_POS)
121#define EEPROM_SKU_CAP_11N_ENABLE (1 << 6)
122#define EEPROM_SKU_CAP_AMT_ENABLE (1 << 7)
123#define EEPROM_SKU_CAP_IPAN_ENABLE (1 << 8)
124
116/* *regulatory* channel data format in eeprom, one for each channel. 125/* *regulatory* channel data format in eeprom, one for each channel.
117 * There are separate entries for HT40 (40 MHz) vs. normal (20 MHz) channels. */ 126 * There are separate entries for HT40 (40 MHz) vs. normal (20 MHz) channels. */
118struct iwl_eeprom_channel { 127struct iwl_eeprom_channel {
@@ -397,7 +406,7 @@ struct iwl_eeprom_calib_info {
397#define EEPROM_BOARD_REVISION (2*0x35) /* 2 bytes */ 406#define EEPROM_BOARD_REVISION (2*0x35) /* 2 bytes */
398#define EEPROM_BOARD_PBA_NUMBER (2*0x3B+1) /* 9 bytes */ 407#define EEPROM_BOARD_PBA_NUMBER (2*0x3B+1) /* 9 bytes */
399#define EEPROM_VERSION (2*0x44) /* 2 bytes */ 408#define EEPROM_VERSION (2*0x44) /* 2 bytes */
400#define EEPROM_SKU_CAP (2*0x45) /* 1 bytes */ 409#define EEPROM_SKU_CAP (2*0x45) /* 2 bytes */
401#define EEPROM_OEM_MODE (2*0x46) /* 2 bytes */ 410#define EEPROM_OEM_MODE (2*0x46) /* 2 bytes */
402#define EEPROM_WOWLAN_MODE (2*0x47) /* 2 bytes */ 411#define EEPROM_WOWLAN_MODE (2*0x47) /* 2 bytes */
403#define EEPROM_RADIO_CONFIG (2*0x48) /* 2 bytes */ 412#define EEPROM_RADIO_CONFIG (2*0x48) /* 2 bytes */
@@ -504,6 +513,7 @@ struct iwl_eeprom_ops {
504int iwl_eeprom_init(struct iwl_priv *priv); 513int iwl_eeprom_init(struct iwl_priv *priv);
505void iwl_eeprom_free(struct iwl_priv *priv); 514void iwl_eeprom_free(struct iwl_priv *priv);
506int iwl_eeprom_check_version(struct iwl_priv *priv); 515int iwl_eeprom_check_version(struct iwl_priv *priv);
516int iwl_eeprom_check_sku(struct iwl_priv *priv);
507const u8 *iwl_eeprom_query_addr(const struct iwl_priv *priv, size_t offset); 517const u8 *iwl_eeprom_query_addr(const struct iwl_priv *priv, size_t offset);
508int iwlcore_eeprom_verify_signature(struct iwl_priv *priv); 518int iwlcore_eeprom_verify_signature(struct iwl_priv *priv);
509u16 iwl_eeprom_query16(const struct iwl_priv *priv, size_t offset); 519u16 iwl_eeprom_query16(const struct iwl_priv *priv, size_t offset);
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index 923368304153..3f5bedd8875f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -95,42 +95,36 @@ static inline int iwl_alloc_fw_desc(struct pci_dev *pci_dev,
95 * | | | | | | | | 95 * | | | | | | | |
96 * | | | | | | +-+-------- AC queue (0-3) 96 * | | | | | | +-+-------- AC queue (0-3)
97 * | | | | | | 97 * | | | | | |
98 * | +-+-+-+-+------------ HW A-MPDU queue 98 * | +-+-+-+-+------------ HW queue ID
99 * | 99 * |
100 * +---------------------- indicates agg queue 100 * +---------------------- unused
101 */ 101 */
102static inline u8 iwl_virtual_agg_queue_num(u8 ac, u8 hwq) 102static inline void iwl_set_swq_id(struct iwl_tx_queue *txq, u8 ac, u8 hwq)
103{ 103{
104 BUG_ON(ac > 3); /* only have 2 bits */ 104 BUG_ON(ac > 3); /* only have 2 bits */
105 BUG_ON(hwq > 31); /* only have 5 bits */ 105 BUG_ON(hwq > 31); /* only use 5 bits */
106 106
107 return 0x80 | (hwq << 2) | ac; 107 txq->swq_id = (hwq << 2) | ac;
108} 108}
109 109
110static inline void iwl_wake_queue(struct iwl_priv *priv, u8 queue) 110static inline void iwl_wake_queue(struct iwl_priv *priv,
111 struct iwl_tx_queue *txq)
111{ 112{
112 u8 ac = queue; 113 u8 queue = txq->swq_id;
113 u8 hwq = queue; 114 u8 ac = queue & 3;
114 115 u8 hwq = (queue >> 2) & 0x1f;
115 if (queue & 0x80) {
116 ac = queue & 3;
117 hwq = (queue >> 2) & 0x1f;
118 }
119 116
120 if (test_and_clear_bit(hwq, priv->queue_stopped)) 117 if (test_and_clear_bit(hwq, priv->queue_stopped))
121 if (atomic_dec_return(&priv->queue_stop_count[ac]) <= 0) 118 if (atomic_dec_return(&priv->queue_stop_count[ac]) <= 0)
122 ieee80211_wake_queue(priv->hw, ac); 119 ieee80211_wake_queue(priv->hw, ac);
123} 120}
124 121
125static inline void iwl_stop_queue(struct iwl_priv *priv, u8 queue) 122static inline void iwl_stop_queue(struct iwl_priv *priv,
123 struct iwl_tx_queue *txq)
126{ 124{
127 u8 ac = queue; 125 u8 queue = txq->swq_id;
128 u8 hwq = queue; 126 u8 ac = queue & 3;
129 127 u8 hwq = (queue >> 2) & 0x1f;
130 if (queue & 0x80) {
131 ac = queue & 3;
132 hwq = (queue >> 2) & 0x1f;
133 }
134 128
135 if (!test_and_set_bit(hwq, priv->queue_stopped)) 129 if (!test_and_set_bit(hwq, priv->queue_stopped))
136 if (atomic_inc_return(&priv->queue_stop_count[ac]) > 0) 130 if (atomic_inc_return(&priv->queue_stop_count[ac]) > 0)
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c
index 5a9129219c90..516e5577ed2a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-led.c
@@ -45,9 +45,8 @@
45/* default: IWL_LED_BLINK(0) using blinking index table */ 45/* default: IWL_LED_BLINK(0) using blinking index table */
46static int led_mode; 46static int led_mode;
47module_param(led_mode, int, S_IRUGO); 47module_param(led_mode, int, S_IRUGO);
48MODULE_PARM_DESC(led_mode, "led mode: 0=blinking, 1=On(RF On)/Off(RF Off), " 48MODULE_PARM_DESC(led_mode, "led mode: 0=system default, "
49 "(default 0)"); 49 "1=On(RF On)/Off(RF Off), 2=blinking");
50
51 50
52static const struct { 51static const struct {
53 u16 tpt; /* Mb/s */ 52 u16 tpt; /* Mb/s */
@@ -128,7 +127,7 @@ EXPORT_SYMBOL(iwl_led_start);
128int iwl_led_associate(struct iwl_priv *priv) 127int iwl_led_associate(struct iwl_priv *priv)
129{ 128{
130 IWL_DEBUG_LED(priv, "Associated\n"); 129 IWL_DEBUG_LED(priv, "Associated\n");
131 if (led_mode == IWL_LED_BLINK) 130 if (priv->cfg->led_mode == IWL_LED_BLINK)
132 priv->allow_blinking = 1; 131 priv->allow_blinking = 1;
133 priv->last_blink_time = jiffies; 132 priv->last_blink_time = jiffies;
134 133
@@ -223,5 +222,8 @@ void iwl_leds_init(struct iwl_priv *priv)
223 priv->last_blink_rate = 0; 222 priv->last_blink_rate = 0;
224 priv->last_blink_time = 0; 223 priv->last_blink_time = 0;
225 priv->allow_blinking = 0; 224 priv->allow_blinking = 0;
225 if (led_mode != IWL_LED_DEFAULT &&
226 led_mode != priv->cfg->led_mode)
227 priv->cfg->led_mode = led_mode;
226} 228}
227EXPORT_SYMBOL(iwl_leds_init); 229EXPORT_SYMBOL(iwl_leds_init);
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.h b/drivers/net/wireless/iwlwifi/iwl-led.h
index 49a70baa3fb6..9079b33486ef 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.h
+++ b/drivers/net/wireless/iwlwifi/iwl-led.h
@@ -47,14 +47,16 @@ enum led_type {
47 47
48/* 48/*
49 * LED mode 49 * LED mode
50 * IWL_LED_BLINK: adjust led blink rate based on blink table 50 * IWL_LED_DEFAULT: use system default
51 * IWL_LED_RF_STATE: turn LED on/off based on RF state 51 * IWL_LED_RF_STATE: turn LED on/off based on RF state
52 * LED ON = RF ON 52 * LED ON = RF ON
53 * LED OFF = RF OFF 53 * LED OFF = RF OFF
54 * IWL_LED_BLINK: adjust led blink rate based on blink table
54 */ 55 */
55enum iwl_led_mode { 56enum iwl_led_mode {
56 IWL_LED_BLINK, 57 IWL_LED_DEFAULT,
57 IWL_LED_RF_STATE, 58 IWL_LED_RF_STATE,
59 IWL_LED_BLINK,
58}; 60};
59 61
60void iwl_leds_init(struct iwl_priv *priv); 62void iwl_leds_init(struct iwl_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 7c7f7dcb1b1e..0a67b2fa52a1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -400,7 +400,8 @@ static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, u8 sta_id)
400} 400}
401 401
402static int iwl_send_remove_station(struct iwl_priv *priv, 402static int iwl_send_remove_station(struct iwl_priv *priv,
403 const u8 *addr, int sta_id) 403 const u8 *addr, int sta_id,
404 bool temporary)
404{ 405{
405 struct iwl_rx_packet *pkt; 406 struct iwl_rx_packet *pkt;
406 int ret; 407 int ret;
@@ -436,9 +437,11 @@ static int iwl_send_remove_station(struct iwl_priv *priv,
436 if (!ret) { 437 if (!ret) {
437 switch (pkt->u.rem_sta.status) { 438 switch (pkt->u.rem_sta.status) {
438 case REM_STA_SUCCESS_MSK: 439 case REM_STA_SUCCESS_MSK:
439 spin_lock_irqsave(&priv->sta_lock, flags_spin); 440 if (!temporary) {
440 iwl_sta_ucode_deactivate(priv, sta_id); 441 spin_lock_irqsave(&priv->sta_lock, flags_spin);
441 spin_unlock_irqrestore(&priv->sta_lock, flags_spin); 442 iwl_sta_ucode_deactivate(priv, sta_id);
443 spin_unlock_irqrestore(&priv->sta_lock, flags_spin);
444 }
442 IWL_DEBUG_ASSOC(priv, "REPLY_REMOVE_STA PASSED\n"); 445 IWL_DEBUG_ASSOC(priv, "REPLY_REMOVE_STA PASSED\n");
443 break; 446 break;
444 default: 447 default:
@@ -505,7 +508,7 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 sta_id,
505 508
506 spin_unlock_irqrestore(&priv->sta_lock, flags); 509 spin_unlock_irqrestore(&priv->sta_lock, flags);
507 510
508 return iwl_send_remove_station(priv, addr, sta_id); 511 return iwl_send_remove_station(priv, addr, sta_id, false);
509out_err: 512out_err:
510 spin_unlock_irqrestore(&priv->sta_lock, flags); 513 spin_unlock_irqrestore(&priv->sta_lock, flags);
511 return -EINVAL; 514 return -EINVAL;
@@ -624,6 +627,44 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
624} 627}
625EXPORT_SYMBOL(iwl_restore_stations); 628EXPORT_SYMBOL(iwl_restore_stations);
626 629
630void iwl_reprogram_ap_sta(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
631{
632 unsigned long flags;
633 int sta_id = ctx->ap_sta_id;
634 int ret;
635 struct iwl_addsta_cmd sta_cmd;
636 struct iwl_link_quality_cmd lq;
637 bool active;
638
639 spin_lock_irqsave(&priv->sta_lock, flags);
640 if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) {
641 spin_unlock_irqrestore(&priv->sta_lock, flags);
642 return;
643 }
644
645 memcpy(&sta_cmd, &priv->stations[sta_id].sta, sizeof(sta_cmd));
646 sta_cmd.mode = 0;
647 memcpy(&lq, priv->stations[sta_id].lq, sizeof(lq));
648
649 active = priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE;
650 spin_unlock_irqrestore(&priv->sta_lock, flags);
651
652 if (active) {
653 ret = iwl_send_remove_station(
654 priv, priv->stations[sta_id].sta.sta.addr,
655 sta_id, true);
656 if (ret)
657 IWL_ERR(priv, "failed to remove STA %pM (%d)\n",
658 priv->stations[sta_id].sta.sta.addr, ret);
659 }
660 ret = iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC);
661 if (ret)
662 IWL_ERR(priv, "failed to re-add STA %pM (%d)\n",
663 priv->stations[sta_id].sta.sta.addr, ret);
664 iwl_send_lq_cmd(priv, ctx, &lq, CMD_SYNC, true);
665}
666EXPORT_SYMBOL(iwl_reprogram_ap_sta);
667
627int iwl_get_free_ucode_key_index(struct iwl_priv *priv) 668int iwl_get_free_ucode_key_index(struct iwl_priv *priv)
628{ 669{
629 int i; 670 int i;
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.h b/drivers/net/wireless/iwlwifi/iwl-sta.h
index 06475872eee4..206f1e1a0caf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.h
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.h
@@ -63,6 +63,7 @@ u8 iwl_prep_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
63 63
64int iwl_send_lq_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx, 64int iwl_send_lq_cmd(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
65 struct iwl_link_quality_cmd *lq, u8 flags, bool init); 65 struct iwl_link_quality_cmd *lq, u8 flags, bool init);
66void iwl_reprogram_ap_sta(struct iwl_priv *priv, struct iwl_rxon_context *ctx);
66 67
67/** 68/**
68 * iwl_clear_driver_stations - clear knowledge of all stations from driver 69 * iwl_clear_driver_stations - clear knowledge of all stations from driver
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index feaa3670c6bb..90659bcf5804 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -359,13 +359,12 @@ int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
359 txq->need_update = 0; 359 txq->need_update = 0;
360 360
361 /* 361 /*
362 * Aggregation TX queues will get their ID when aggregation begins; 362 * For the default queues 0-3, set up the swq_id
363 * they overwrite the setting done here. The command FIFO doesn't 363 * already -- all others need to get one later
364 * need an swq_id so don't set one to catch errors, all others can 364 * (if they need one at all).
365 * be set up to the identity mapping.
366 */ 365 */
367 if (txq_id != priv->cmd_queue) 366 if (txq_id < 4)
368 txq->swq_id = txq_id; 367 iwl_set_swq_id(txq, txq_id, txq_id);
369 368
370 /* TFD_QUEUE_SIZE_MAX must be power-of-two size, otherwise 369 /* TFD_QUEUE_SIZE_MAX must be power-of-two size, otherwise
371 * iwl_queue_inc_wrap and iwl_queue_dec_wrap are broken. */ 370 * iwl_queue_inc_wrap and iwl_queue_dec_wrap are broken. */
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 6d09c0965645..c3ebc04cbd00 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -655,7 +655,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
655 spin_unlock_irqrestore(&priv->lock, flags); 655 spin_unlock_irqrestore(&priv->lock, flags);
656 } 656 }
657 657
658 iwl_stop_queue(priv, skb_get_queue_mapping(skb)); 658 iwl_stop_queue(priv, txq);
659 } 659 }
660 660
661 return 0; 661 return 0;