diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 33 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-ict.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 140 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 266 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-csr.h | 39 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 6 |
16 files changed, 126 insertions, 433 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 27c5007e577c..2601b552c6fa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -179,8 +179,6 @@ static struct iwl_lib_ops iwl1000_lib = { | |||
179 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, | 179 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
180 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | 180 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, |
181 | .txq_set_sched = iwlagn_txq_set_sched, | 181 | .txq_set_sched = iwlagn_txq_set_sched, |
182 | .txq_agg_enable = iwlagn_txq_agg_enable, | ||
183 | .txq_agg_disable = iwlagn_txq_agg_disable, | ||
184 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | 182 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
185 | .txq_free_tfd = iwl_hw_txq_free_tfd, | 183 | .txq_free_tfd = iwl_hw_txq_free_tfd, |
186 | .txq_init = iwl_hw_tx_queue_init, | 184 | .txq_init = iwl_hw_tx_queue_init, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index d7b6126408c9..55274a14af01 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -259,8 +259,6 @@ static struct iwl_lib_ops iwl2000_lib = { | |||
259 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, | 259 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
260 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | 260 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, |
261 | .txq_set_sched = iwlagn_txq_set_sched, | 261 | .txq_set_sched = iwlagn_txq_set_sched, |
262 | .txq_agg_enable = iwlagn_txq_agg_enable, | ||
263 | .txq_agg_disable = iwlagn_txq_agg_disable, | ||
264 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | 262 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
265 | .txq_free_tfd = iwl_hw_txq_free_tfd, | 263 | .txq_free_tfd = iwl_hw_txq_free_tfd, |
266 | .txq_init = iwl_hw_tx_queue_init, | 264 | .txq_init = iwl_hw_tx_queue_init, |
@@ -471,37 +469,6 @@ struct iwl_cfg iwl2030_2bg_cfg = { | |||
471 | IWL_DEVICE_2030, | 469 | IWL_DEVICE_2030, |
472 | }; | 470 | }; |
473 | 471 | ||
474 | #define IWL_DEVICE_6035 \ | ||
475 | .fw_name_pre = IWL2030_FW_PRE, \ | ||
476 | .ucode_api_max = IWL2030_UCODE_API_MAX, \ | ||
477 | .ucode_api_min = IWL2030_UCODE_API_MIN, \ | ||
478 | .eeprom_ver = EEPROM_6035_EEPROM_VERSION, \ | ||
479 | .eeprom_calib_ver = EEPROM_6035_TX_POWER_VERSION, \ | ||
480 | .ops = &iwl2030_ops, \ | ||
481 | .mod_params = &iwlagn_mod_params, \ | ||
482 | .base_params = &iwl2030_base_params, \ | ||
483 | .bt_params = &iwl2030_bt_params, \ | ||
484 | .need_dc_calib = true, \ | ||
485 | .need_temp_offset_calib = true, \ | ||
486 | .led_mode = IWL_LED_RF_STATE, \ | ||
487 | .adv_pm = true \ | ||
488 | |||
489 | struct iwl_cfg iwl6035_2agn_cfg = { | ||
490 | .name = "2000 Series 2x2 AGN/BT", | ||
491 | IWL_DEVICE_6035, | ||
492 | .ht_params = &iwl2000_ht_params, | ||
493 | }; | ||
494 | |||
495 | struct iwl_cfg iwl6035_2abg_cfg = { | ||
496 | .name = "2000 Series 2x2 ABG/BT", | ||
497 | IWL_DEVICE_6035, | ||
498 | }; | ||
499 | |||
500 | struct iwl_cfg iwl6035_2bg_cfg = { | ||
501 | .name = "2000 Series 2x2 BG/BT", | ||
502 | IWL_DEVICE_6035, | ||
503 | }; | ||
504 | |||
505 | #define IWL_DEVICE_200 \ | 472 | #define IWL_DEVICE_200 \ |
506 | .fw_name_pre = IWL200_FW_PRE, \ | 473 | .fw_name_pre = IWL200_FW_PRE, \ |
507 | .ucode_api_max = IWL200_UCODE_API_MAX, \ | 474 | .ucode_api_max = IWL200_UCODE_API_MAX, \ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 3ea31b659d1a..8cab3571047d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -348,8 +348,6 @@ static struct iwl_lib_ops iwl5000_lib = { | |||
348 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, | 348 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
349 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | 349 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, |
350 | .txq_set_sched = iwlagn_txq_set_sched, | 350 | .txq_set_sched = iwlagn_txq_set_sched, |
351 | .txq_agg_enable = iwlagn_txq_agg_enable, | ||
352 | .txq_agg_disable = iwlagn_txq_agg_disable, | ||
353 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | 351 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
354 | .txq_free_tfd = iwl_hw_txq_free_tfd, | 352 | .txq_free_tfd = iwl_hw_txq_free_tfd, |
355 | .txq_init = iwl_hw_tx_queue_init, | 353 | .txq_init = iwl_hw_tx_queue_init, |
@@ -416,8 +414,6 @@ static struct iwl_lib_ops iwl5150_lib = { | |||
416 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, | 414 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
417 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | 415 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, |
418 | .txq_set_sched = iwlagn_txq_set_sched, | 416 | .txq_set_sched = iwlagn_txq_set_sched, |
419 | .txq_agg_enable = iwlagn_txq_agg_enable, | ||
420 | .txq_agg_disable = iwlagn_txq_agg_disable, | ||
421 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | 417 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
422 | .txq_free_tfd = iwl_hw_txq_free_tfd, | 418 | .txq_free_tfd = iwl_hw_txq_free_tfd, |
423 | .txq_init = iwl_hw_tx_queue_init, | 419 | .txq_init = iwl_hw_tx_queue_init, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index a745b01c0ec1..7ecfbbc9457a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -288,8 +288,6 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
288 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, | 288 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
289 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | 289 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, |
290 | .txq_set_sched = iwlagn_txq_set_sched, | 290 | .txq_set_sched = iwlagn_txq_set_sched, |
291 | .txq_agg_enable = iwlagn_txq_agg_enable, | ||
292 | .txq_agg_disable = iwlagn_txq_agg_disable, | ||
293 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | 291 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
294 | .txq_free_tfd = iwl_hw_txq_free_tfd, | 292 | .txq_free_tfd = iwl_hw_txq_free_tfd, |
295 | .txq_init = iwl_hw_tx_queue_init, | 293 | .txq_init = iwl_hw_tx_queue_init, |
@@ -357,8 +355,6 @@ static struct iwl_lib_ops iwl6030_lib = { | |||
357 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, | 355 | .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, |
358 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, | 356 | .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, |
359 | .txq_set_sched = iwlagn_txq_set_sched, | 357 | .txq_set_sched = iwlagn_txq_set_sched, |
360 | .txq_agg_enable = iwlagn_txq_agg_enable, | ||
361 | .txq_agg_disable = iwlagn_txq_agg_disable, | ||
362 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, | 358 | .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, |
363 | .txq_free_tfd = iwl_hw_txq_free_tfd, | 359 | .txq_free_tfd = iwl_hw_txq_free_tfd, |
364 | .txq_init = iwl_hw_tx_queue_init, | 360 | .txq_init = iwl_hw_tx_queue_init, |
@@ -613,6 +609,22 @@ struct iwl_cfg iwl6030_2bg_cfg = { | |||
613 | IWL_DEVICE_6030, | 609 | IWL_DEVICE_6030, |
614 | }; | 610 | }; |
615 | 611 | ||
612 | struct iwl_cfg iwl6035_2agn_cfg = { | ||
613 | .name = "6035 Series 2x2 AGN/BT", | ||
614 | IWL_DEVICE_6030, | ||
615 | .ht_params = &iwl6000_ht_params, | ||
616 | }; | ||
617 | |||
618 | struct iwl_cfg iwl6035_2abg_cfg = { | ||
619 | .name = "6035 Series 2x2 ABG/BT", | ||
620 | IWL_DEVICE_6030, | ||
621 | }; | ||
622 | |||
623 | struct iwl_cfg iwl6035_2bg_cfg = { | ||
624 | .name = "6035 Series 2x2 BG/BT", | ||
625 | IWL_DEVICE_6030, | ||
626 | }; | ||
627 | |||
616 | struct iwl_cfg iwl1030_bgn_cfg = { | 628 | struct iwl_cfg iwl1030_bgn_cfg = { |
617 | .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN", | 629 | .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN", |
618 | IWL_DEVICE_6030, | 630 | IWL_DEVICE_6030, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c index b5cb3be0eb4b..47e1fa4bacfd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c | |||
@@ -59,8 +59,6 @@ void iwl_free_isr_ict(struct iwl_priv *priv) | |||
59 | int iwl_alloc_isr_ict(struct iwl_priv *priv) | 59 | int iwl_alloc_isr_ict(struct iwl_priv *priv) |
60 | { | 60 | { |
61 | 61 | ||
62 | if (priv->cfg->base_params->use_isr_legacy) | ||
63 | return 0; | ||
64 | /* allocate shrared data table */ | 62 | /* allocate shrared data table */ |
65 | priv->_agn.ict_tbl_vir = | 63 | priv->_agn.ict_tbl_vir = |
66 | dma_alloc_coherent(&priv->pci_dev->dev, | 64 | dma_alloc_coherent(&priv->pci_dev->dev, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 08ccb9496f76..3a02bea46328 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -652,8 +652,7 @@ int iwlagn_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
652 | const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */ | 652 | const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */ |
653 | u32 rb_timeout = 0; /* FIXME: RX_RB_TIMEOUT for all devices? */ | 653 | u32 rb_timeout = 0; /* FIXME: RX_RB_TIMEOUT for all devices? */ |
654 | 654 | ||
655 | if (!priv->cfg->base_params->use_isr_legacy) | 655 | rb_timeout = RX_RB_TIMEOUT; |
656 | rb_timeout = RX_RB_TIMEOUT; | ||
657 | 656 | ||
658 | if (priv->cfg->mod_params->amsdu_size_8K) | 657 | if (priv->cfg->mod_params->amsdu_size_8K) |
659 | rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K; | 658 | rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index d03b4734c892..e394e49228ba 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -115,13 +115,18 @@ const struct iwl_rate_info iwl_rates[IWL_RATE_COUNT] = { | |||
115 | /* FIXME:RS: ^^ should be INV (legacy) */ | 115 | /* FIXME:RS: ^^ should be INV (legacy) */ |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static inline u8 rs_extract_rate(u32 rate_n_flags) | ||
119 | { | ||
120 | return (u8)(rate_n_flags & RATE_MCS_RATE_MSK); | ||
121 | } | ||
122 | |||
118 | static int iwl_hwrate_to_plcp_idx(u32 rate_n_flags) | 123 | static int iwl_hwrate_to_plcp_idx(u32 rate_n_flags) |
119 | { | 124 | { |
120 | int idx = 0; | 125 | int idx = 0; |
121 | 126 | ||
122 | /* HT rate format */ | 127 | /* HT rate format */ |
123 | if (rate_n_flags & RATE_MCS_HT_MSK) { | 128 | if (rate_n_flags & RATE_MCS_HT_MSK) { |
124 | idx = (rate_n_flags & 0xff); | 129 | idx = rs_extract_rate(rate_n_flags); |
125 | 130 | ||
126 | if (idx >= IWL_RATE_MIMO3_6M_PLCP) | 131 | if (idx >= IWL_RATE_MIMO3_6M_PLCP) |
127 | idx = idx - IWL_RATE_MIMO3_6M_PLCP; | 132 | idx = idx - IWL_RATE_MIMO3_6M_PLCP; |
@@ -138,7 +143,8 @@ static int iwl_hwrate_to_plcp_idx(u32 rate_n_flags) | |||
138 | /* legacy rate format, search for match in table */ | 143 | /* legacy rate format, search for match in table */ |
139 | } else { | 144 | } else { |
140 | for (idx = 0; idx < ARRAY_SIZE(iwl_rates); idx++) | 145 | for (idx = 0; idx < ARRAY_SIZE(iwl_rates); idx++) |
141 | if (iwl_rates[idx].plcp == (rate_n_flags & 0xFF)) | 146 | if (iwl_rates[idx].plcp == |
147 | rs_extract_rate(rate_n_flags)) | ||
142 | return idx; | 148 | return idx; |
143 | } | 149 | } |
144 | 150 | ||
@@ -239,11 +245,6 @@ static const struct iwl_rate_mcs_info iwl_rate_mcs[IWL_RATE_COUNT] = { | |||
239 | 245 | ||
240 | #define MCS_INDEX_PER_STREAM (8) | 246 | #define MCS_INDEX_PER_STREAM (8) |
241 | 247 | ||
242 | static inline u8 rs_extract_rate(u32 rate_n_flags) | ||
243 | { | ||
244 | return (u8)(rate_n_flags & 0xFF); | ||
245 | } | ||
246 | |||
247 | static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window) | 248 | static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window) |
248 | { | 249 | { |
249 | window->data = 0; | 250 | window->data = 0; |
@@ -2912,7 +2913,8 @@ static void rs_fill_link_cmd(struct iwl_priv *priv, | |||
2912 | ant_toggle_cnt = 1; | 2913 | ant_toggle_cnt = 1; |
2913 | repeat_rate = IWL_NUMBER_TRY; | 2914 | repeat_rate = IWL_NUMBER_TRY; |
2914 | } else { | 2915 | } else { |
2915 | repeat_rate = IWL_HT_NUMBER_TRY; | 2916 | repeat_rate = min(IWL_HT_NUMBER_TRY, |
2917 | LINK_QUAL_AGG_DISABLE_START_DEF - 1); | ||
2916 | } | 2918 | } |
2917 | 2919 | ||
2918 | lq_cmd->general_params.mimo_delimiter = | 2920 | lq_cmd->general_params.mimo_delimiter = |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index a709d05c5868..cb8eacd5fdb5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -222,13 +222,8 @@ void iwlagn_tx_queue_set_status(struct iwl_priv *priv, | |||
222 | scd_retry ? "BA" : "AC/CMD", txq_id, tx_fifo_id); | 222 | scd_retry ? "BA" : "AC/CMD", txq_id, tx_fifo_id); |
223 | } | 223 | } |
224 | 224 | ||
225 | int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id, | 225 | static int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id, int sta_id, int tid) |
226 | int tx_fifo, int sta_id, int tid, u16 ssn_idx) | ||
227 | { | 226 | { |
228 | unsigned long flags; | ||
229 | u16 ra_tid; | ||
230 | int ret; | ||
231 | |||
232 | if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || | 227 | if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || |
233 | (IWLAGN_FIRST_AMPDU_QUEUE + | 228 | (IWLAGN_FIRST_AMPDU_QUEUE + |
234 | priv->cfg->base_params->num_of_ampdu_queues <= txq_id)) { | 229 | priv->cfg->base_params->num_of_ampdu_queues <= txq_id)) { |
@@ -240,12 +235,33 @@ int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id, | |||
240 | return -EINVAL; | 235 | return -EINVAL; |
241 | } | 236 | } |
242 | 237 | ||
243 | ra_tid = BUILD_RAxTID(sta_id, tid); | ||
244 | |||
245 | /* Modify device's station table to Tx this TID */ | 238 | /* Modify device's station table to Tx this TID */ |
246 | ret = iwl_sta_tx_modify_enable_tid(priv, sta_id, tid); | 239 | return iwl_sta_tx_modify_enable_tid(priv, sta_id, tid); |
247 | if (ret) | 240 | } |
248 | return ret; | 241 | |
242 | void iwlagn_txq_agg_queue_setup(struct iwl_priv *priv, | ||
243 | struct ieee80211_sta *sta, | ||
244 | int tid, int frame_limit) | ||
245 | { | ||
246 | int sta_id, tx_fifo, txq_id, ssn_idx; | ||
247 | u16 ra_tid; | ||
248 | unsigned long flags; | ||
249 | struct iwl_tid_data *tid_data; | ||
250 | |||
251 | sta_id = iwl_sta_id(sta); | ||
252 | if (WARN_ON(sta_id == IWL_INVALID_STATION)) | ||
253 | return; | ||
254 | if (WARN_ON(tid >= MAX_TID_COUNT)) | ||
255 | return; | ||
256 | |||
257 | spin_lock_irqsave(&priv->sta_lock, flags); | ||
258 | tid_data = &priv->stations[sta_id].tid[tid]; | ||
259 | ssn_idx = SEQ_TO_SN(tid_data->seq_number); | ||
260 | txq_id = tid_data->agg.txq_id; | ||
261 | tx_fifo = tid_data->agg.tx_fifo; | ||
262 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
263 | |||
264 | ra_tid = BUILD_RAxTID(sta_id, tid); | ||
249 | 265 | ||
250 | spin_lock_irqsave(&priv->lock, flags); | 266 | spin_lock_irqsave(&priv->lock, flags); |
251 | 267 | ||
@@ -271,10 +287,10 @@ int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id, | |||
271 | iwl_write_targ_mem(priv, priv->scd_base_addr + | 287 | iwl_write_targ_mem(priv, priv->scd_base_addr + |
272 | IWLAGN_SCD_CONTEXT_QUEUE_OFFSET(txq_id) + | 288 | IWLAGN_SCD_CONTEXT_QUEUE_OFFSET(txq_id) + |
273 | sizeof(u32), | 289 | sizeof(u32), |
274 | ((SCD_WIN_SIZE << | 290 | ((frame_limit << |
275 | IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) & | 291 | IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) & |
276 | IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) | | 292 | IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) | |
277 | ((SCD_FRAME_LIMIT << | 293 | ((frame_limit << |
278 | IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) & | 294 | IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) & |
279 | IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK)); | 295 | IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK)); |
280 | 296 | ||
@@ -284,12 +300,10 @@ int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id, | |||
284 | iwlagn_tx_queue_set_status(priv, &priv->txq[txq_id], tx_fifo, 1); | 300 | iwlagn_tx_queue_set_status(priv, &priv->txq[txq_id], tx_fifo, 1); |
285 | 301 | ||
286 | spin_unlock_irqrestore(&priv->lock, flags); | 302 | spin_unlock_irqrestore(&priv->lock, flags); |
287 | |||
288 | return 0; | ||
289 | } | 303 | } |
290 | 304 | ||
291 | int iwlagn_txq_agg_disable(struct iwl_priv *priv, u16 txq_id, | 305 | static int iwlagn_txq_agg_disable(struct iwl_priv *priv, u16 txq_id, |
292 | u16 ssn_idx, u8 tx_fifo) | 306 | u16 ssn_idx, u8 tx_fifo) |
293 | { | 307 | { |
294 | if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || | 308 | if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || |
295 | (IWLAGN_FIRST_AMPDU_QUEUE + | 309 | (IWLAGN_FIRST_AMPDU_QUEUE + |
@@ -1034,11 +1048,11 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
1034 | tid_data = &priv->stations[sta_id].tid[tid]; | 1048 | tid_data = &priv->stations[sta_id].tid[tid]; |
1035 | *ssn = SEQ_TO_SN(tid_data->seq_number); | 1049 | *ssn = SEQ_TO_SN(tid_data->seq_number); |
1036 | tid_data->agg.txq_id = txq_id; | 1050 | tid_data->agg.txq_id = txq_id; |
1051 | tid_data->agg.tx_fifo = tx_fifo; | ||
1037 | iwl_set_swq_id(&priv->txq[txq_id], get_ac_from_tid(tid), txq_id); | 1052 | iwl_set_swq_id(&priv->txq[txq_id], get_ac_from_tid(tid), txq_id); |
1038 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 1053 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
1039 | 1054 | ||
1040 | ret = priv->cfg->ops->lib->txq_agg_enable(priv, txq_id, tx_fifo, | 1055 | ret = iwlagn_txq_agg_enable(priv, txq_id, sta_id, tid); |
1041 | sta_id, tid, *ssn); | ||
1042 | if (ret) | 1056 | if (ret) |
1043 | return ret; | 1057 | return ret; |
1044 | 1058 | ||
@@ -1125,8 +1139,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
1125 | * to deactivate the uCode queue, just return "success" to allow | 1139 | * to deactivate the uCode queue, just return "success" to allow |
1126 | * mac80211 to clean up it own data. | 1140 | * mac80211 to clean up it own data. |
1127 | */ | 1141 | */ |
1128 | priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, ssn, | 1142 | iwlagn_txq_agg_disable(priv, txq_id, ssn, tx_fifo_id); |
1129 | tx_fifo_id); | ||
1130 | spin_unlock_irqrestore(&priv->lock, flags); | 1143 | spin_unlock_irqrestore(&priv->lock, flags); |
1131 | 1144 | ||
1132 | ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); | 1145 | ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); |
@@ -1155,8 +1168,7 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv, | |||
1155 | u16 ssn = SEQ_TO_SN(tid_data->seq_number); | 1168 | u16 ssn = SEQ_TO_SN(tid_data->seq_number); |
1156 | int tx_fifo = get_fifo_from_tid(ctx, tid); | 1169 | int tx_fifo = get_fifo_from_tid(ctx, tid); |
1157 | IWL_DEBUG_HT(priv, "HW queue empty: continue DELBA flow\n"); | 1170 | IWL_DEBUG_HT(priv, "HW queue empty: continue DELBA flow\n"); |
1158 | priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, | 1171 | iwlagn_txq_agg_disable(priv, txq_id, ssn, tx_fifo); |
1159 | ssn, tx_fifo); | ||
1160 | tid_data->agg.state = IWL_AGG_OFF; | 1172 | tid_data->agg.state = IWL_AGG_OFF; |
1161 | ieee80211_stop_tx_ba_cb_irqsafe(ctx->vif, addr, tid); | 1173 | ieee80211_stop_tx_ba_cb_irqsafe(ctx->vif, addr, tid); |
1162 | } | 1174 | } |
@@ -1251,11 +1263,11 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv, | |||
1251 | struct iwl_compressed_ba_resp *ba_resp) | 1263 | struct iwl_compressed_ba_resp *ba_resp) |
1252 | 1264 | ||
1253 | { | 1265 | { |
1254 | int i, sh, ack; | 1266 | int sh; |
1255 | u16 seq_ctl = le16_to_cpu(ba_resp->seq_ctl); | 1267 | u16 seq_ctl = le16_to_cpu(ba_resp->seq_ctl); |
1256 | u16 scd_flow = le16_to_cpu(ba_resp->scd_flow); | 1268 | u16 scd_flow = le16_to_cpu(ba_resp->scd_flow); |
1257 | int successes = 0; | ||
1258 | struct ieee80211_tx_info *info; | 1269 | struct ieee80211_tx_info *info; |
1270 | u64 bitmap, sent_bitmap; | ||
1259 | 1271 | ||
1260 | if (unlikely(!agg->wait_for_ba)) { | 1272 | if (unlikely(!agg->wait_for_ba)) { |
1261 | if (unlikely(ba_resp->bitmap)) | 1273 | if (unlikely(ba_resp->bitmap)) |
@@ -1269,70 +1281,42 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv, | |||
1269 | 1281 | ||
1270 | /* Calculate shift to align block-ack bits with our Tx window bits */ | 1282 | /* Calculate shift to align block-ack bits with our Tx window bits */ |
1271 | sh = agg->start_idx - SEQ_TO_INDEX(seq_ctl >> 4); | 1283 | sh = agg->start_idx - SEQ_TO_INDEX(seq_ctl >> 4); |
1272 | if (sh < 0) /* tbw something is wrong with indices */ | 1284 | if (sh < 0) |
1273 | sh += 0x100; | 1285 | sh += 0x100; |
1274 | 1286 | ||
1275 | if (agg->frame_count > (64 - sh)) { | 1287 | /* |
1276 | IWL_DEBUG_TX_REPLY(priv, "more frames than bitmap size"); | 1288 | * Check for success or failure according to the |
1277 | return -1; | 1289 | * transmitted bitmap and block-ack bitmap |
1278 | } | 1290 | */ |
1279 | if (!priv->cfg->base_params->no_agg_framecnt_info && ba_resp->txed) { | 1291 | bitmap = le64_to_cpu(ba_resp->bitmap) >> sh; |
1292 | sent_bitmap = bitmap & agg->bitmap; | ||
1293 | |||
1294 | /* Sanity check values reported by uCode */ | ||
1295 | if (ba_resp->txed_2_done > ba_resp->txed) { | ||
1296 | IWL_DEBUG_TX_REPLY(priv, | ||
1297 | "bogus sent(%d) and ack(%d) count\n", | ||
1298 | ba_resp->txed, ba_resp->txed_2_done); | ||
1280 | /* | 1299 | /* |
1281 | * sent and ack information provided by uCode | 1300 | * set txed_2_done = txed, |
1282 | * use it instead of figure out ourself | 1301 | * so it won't impact rate scale |
1283 | */ | 1302 | */ |
1284 | if (ba_resp->txed_2_done > ba_resp->txed) { | 1303 | ba_resp->txed = ba_resp->txed_2_done; |
1285 | IWL_DEBUG_TX_REPLY(priv, | 1304 | } |
1286 | "bogus sent(%d) and ack(%d) count\n", | 1305 | IWL_DEBUG_HT(priv, "agg frames sent:%d, acked:%d\n", |
1287 | ba_resp->txed, ba_resp->txed_2_done); | 1306 | ba_resp->txed, ba_resp->txed_2_done); |
1288 | /* | ||
1289 | * set txed_2_done = txed, | ||
1290 | * so it won't impact rate scale | ||
1291 | */ | ||
1292 | ba_resp->txed = ba_resp->txed_2_done; | ||
1293 | } | ||
1294 | IWL_DEBUG_HT(priv, "agg frames sent:%d, acked:%d\n", | ||
1295 | ba_resp->txed, ba_resp->txed_2_done); | ||
1296 | } else { | ||
1297 | u64 bitmap, sent_bitmap; | ||
1298 | |||
1299 | /* don't use 64-bit values for now */ | ||
1300 | bitmap = le64_to_cpu(ba_resp->bitmap) >> sh; | ||
1301 | |||
1302 | /* check for success or failure according to the | ||
1303 | * transmitted bitmap and block-ack bitmap */ | ||
1304 | sent_bitmap = bitmap & agg->bitmap; | ||
1305 | |||
1306 | /* For each frame attempted in aggregation, | ||
1307 | * update driver's record of tx frame's status. */ | ||
1308 | i = 0; | ||
1309 | while (sent_bitmap) { | ||
1310 | ack = sent_bitmap & 1ULL; | ||
1311 | successes += ack; | ||
1312 | IWL_DEBUG_TX_REPLY(priv, "%s ON i=%d idx=%d raw=%d\n", | ||
1313 | ack ? "ACK" : "NACK", i, | ||
1314 | (agg->start_idx + i) & 0xff, | ||
1315 | agg->start_idx + i); | ||
1316 | sent_bitmap >>= 1; | ||
1317 | ++i; | ||
1318 | } | ||
1319 | 1307 | ||
1320 | IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", | 1308 | /* Find the first ACKed frame to store the TX status */ |
1321 | (unsigned long long)bitmap); | 1309 | while (sent_bitmap && !(sent_bitmap & 1)) { |
1310 | agg->start_idx = (agg->start_idx + 1) & 0xff; | ||
1311 | sent_bitmap >>= 1; | ||
1322 | } | 1312 | } |
1323 | 1313 | ||
1324 | info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb); | 1314 | info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb); |
1325 | memset(&info->status, 0, sizeof(info->status)); | 1315 | memset(&info->status, 0, sizeof(info->status)); |
1326 | info->flags |= IEEE80211_TX_STAT_ACK; | 1316 | info->flags |= IEEE80211_TX_STAT_ACK; |
1327 | info->flags |= IEEE80211_TX_STAT_AMPDU; | 1317 | info->flags |= IEEE80211_TX_STAT_AMPDU; |
1328 | if (!priv->cfg->base_params->no_agg_framecnt_info && ba_resp->txed) { | 1318 | info->status.ampdu_ack_len = ba_resp->txed_2_done; |
1329 | info->status.ampdu_ack_len = ba_resp->txed_2_done; | 1319 | info->status.ampdu_len = ba_resp->txed; |
1330 | info->status.ampdu_len = ba_resp->txed; | ||
1331 | |||
1332 | } else { | ||
1333 | info->status.ampdu_ack_len = successes; | ||
1334 | info->status.ampdu_len = agg->frame_count; | ||
1335 | } | ||
1336 | iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info); | 1320 | iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info); |
1337 | 1321 | ||
1338 | return 0; | 1322 | return 0; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 7adc60ea03cb..28ac0d44555e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -409,7 +409,7 @@ int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, | |||
409 | * Tell nic where to find circular buffer of Tx Frame Descriptors for | 409 | * Tell nic where to find circular buffer of Tx Frame Descriptors for |
410 | * given Tx queue, and enable the DMA channel used for that queue. | 410 | * given Tx queue, and enable the DMA channel used for that queue. |
411 | * | 411 | * |
412 | * 4965 supports up to 16 Tx queues in DRAM, mapped to up to 8 Tx DMA | 412 | * supports up to 16 Tx queues in DRAM, mapped to up to 8 Tx DMA |
413 | * channels supported in hardware. | 413 | * channels supported in hardware. |
414 | */ | 414 | */ |
415 | int iwl_hw_tx_queue_init(struct iwl_priv *priv, | 415 | int iwl_hw_tx_queue_init(struct iwl_priv *priv, |
@@ -845,191 +845,6 @@ static inline void iwl_synchronize_irq(struct iwl_priv *priv) | |||
845 | tasklet_kill(&priv->irq_tasklet); | 845 | tasklet_kill(&priv->irq_tasklet); |
846 | } | 846 | } |
847 | 847 | ||
848 | static void iwl_irq_tasklet_legacy(struct iwl_priv *priv) | ||
849 | { | ||
850 | u32 inta, handled = 0; | ||
851 | u32 inta_fh; | ||
852 | unsigned long flags; | ||
853 | u32 i; | ||
854 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
855 | u32 inta_mask; | ||
856 | #endif | ||
857 | |||
858 | spin_lock_irqsave(&priv->lock, flags); | ||
859 | |||
860 | /* Ack/clear/reset pending uCode interrupts. | ||
861 | * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, | ||
862 | * and will clear only when CSR_FH_INT_STATUS gets cleared. */ | ||
863 | inta = iwl_read32(priv, CSR_INT); | ||
864 | iwl_write32(priv, CSR_INT, inta); | ||
865 | |||
866 | /* Ack/clear/reset pending flow-handler (DMA) interrupts. | ||
867 | * Any new interrupts that happen after this, either while we're | ||
868 | * in this tasklet, or later, will show up in next ISR/tasklet. */ | ||
869 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); | ||
870 | iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); | ||
871 | |||
872 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
873 | if (iwl_get_debug_level(priv) & IWL_DL_ISR) { | ||
874 | /* just for debug */ | ||
875 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | ||
876 | IWL_DEBUG_ISR(priv, "inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | ||
877 | inta, inta_mask, inta_fh); | ||
878 | } | ||
879 | #endif | ||
880 | |||
881 | spin_unlock_irqrestore(&priv->lock, flags); | ||
882 | |||
883 | /* Since CSR_INT and CSR_FH_INT_STATUS reads and clears are not | ||
884 | * atomic, make sure that inta covers all the interrupts that | ||
885 | * we've discovered, even if FH interrupt came in just after | ||
886 | * reading CSR_INT. */ | ||
887 | if (inta_fh & CSR49_FH_INT_RX_MASK) | ||
888 | inta |= CSR_INT_BIT_FH_RX; | ||
889 | if (inta_fh & CSR49_FH_INT_TX_MASK) | ||
890 | inta |= CSR_INT_BIT_FH_TX; | ||
891 | |||
892 | /* Now service all interrupt bits discovered above. */ | ||
893 | if (inta & CSR_INT_BIT_HW_ERR) { | ||
894 | IWL_ERR(priv, "Hardware error detected. Restarting.\n"); | ||
895 | |||
896 | /* Tell the device to stop sending interrupts */ | ||
897 | iwl_disable_interrupts(priv); | ||
898 | |||
899 | priv->isr_stats.hw++; | ||
900 | iwl_irq_handle_error(priv); | ||
901 | |||
902 | handled |= CSR_INT_BIT_HW_ERR; | ||
903 | |||
904 | return; | ||
905 | } | ||
906 | |||
907 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
908 | if (iwl_get_debug_level(priv) & (IWL_DL_ISR)) { | ||
909 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ | ||
910 | if (inta & CSR_INT_BIT_SCD) { | ||
911 | IWL_DEBUG_ISR(priv, "Scheduler finished to transmit " | ||
912 | "the frame/frames.\n"); | ||
913 | priv->isr_stats.sch++; | ||
914 | } | ||
915 | |||
916 | /* Alive notification via Rx interrupt will do the real work */ | ||
917 | if (inta & CSR_INT_BIT_ALIVE) { | ||
918 | IWL_DEBUG_ISR(priv, "Alive interrupt\n"); | ||
919 | priv->isr_stats.alive++; | ||
920 | } | ||
921 | } | ||
922 | #endif | ||
923 | /* Safely ignore these bits for debug checks below */ | ||
924 | inta &= ~(CSR_INT_BIT_SCD | CSR_INT_BIT_ALIVE); | ||
925 | |||
926 | /* HW RF KILL switch toggled */ | ||
927 | if (inta & CSR_INT_BIT_RF_KILL) { | ||
928 | int hw_rf_kill = 0; | ||
929 | if (!(iwl_read32(priv, CSR_GP_CNTRL) & | ||
930 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)) | ||
931 | hw_rf_kill = 1; | ||
932 | |||
933 | IWL_WARN(priv, "RF_KILL bit toggled to %s.\n", | ||
934 | hw_rf_kill ? "disable radio" : "enable radio"); | ||
935 | |||
936 | priv->isr_stats.rfkill++; | ||
937 | |||
938 | /* driver only loads ucode once setting the interface up. | ||
939 | * the driver allows loading the ucode even if the radio | ||
940 | * is killed. Hence update the killswitch state here. The | ||
941 | * rfkill handler will care about restarting if needed. | ||
942 | */ | ||
943 | if (!test_bit(STATUS_ALIVE, &priv->status)) { | ||
944 | if (hw_rf_kill) | ||
945 | set_bit(STATUS_RF_KILL_HW, &priv->status); | ||
946 | else | ||
947 | clear_bit(STATUS_RF_KILL_HW, &priv->status); | ||
948 | wiphy_rfkill_set_hw_state(priv->hw->wiphy, hw_rf_kill); | ||
949 | } | ||
950 | |||
951 | handled |= CSR_INT_BIT_RF_KILL; | ||
952 | } | ||
953 | |||
954 | /* Chip got too hot and stopped itself */ | ||
955 | if (inta & CSR_INT_BIT_CT_KILL) { | ||
956 | IWL_ERR(priv, "Microcode CT kill error detected.\n"); | ||
957 | priv->isr_stats.ctkill++; | ||
958 | handled |= CSR_INT_BIT_CT_KILL; | ||
959 | } | ||
960 | |||
961 | /* Error detected by uCode */ | ||
962 | if (inta & CSR_INT_BIT_SW_ERR) { | ||
963 | IWL_ERR(priv, "Microcode SW error detected. " | ||
964 | " Restarting 0x%X.\n", inta); | ||
965 | priv->isr_stats.sw++; | ||
966 | iwl_irq_handle_error(priv); | ||
967 | handled |= CSR_INT_BIT_SW_ERR; | ||
968 | } | ||
969 | |||
970 | /* | ||
971 | * uCode wakes up after power-down sleep. | ||
972 | * Tell device about any new tx or host commands enqueued, | ||
973 | * and about any Rx buffers made available while asleep. | ||
974 | */ | ||
975 | if (inta & CSR_INT_BIT_WAKEUP) { | ||
976 | IWL_DEBUG_ISR(priv, "Wakeup interrupt\n"); | ||
977 | iwl_rx_queue_update_write_ptr(priv, &priv->rxq); | ||
978 | for (i = 0; i < priv->hw_params.max_txq_num; i++) | ||
979 | iwl_txq_update_write_ptr(priv, &priv->txq[i]); | ||
980 | priv->isr_stats.wakeup++; | ||
981 | handled |= CSR_INT_BIT_WAKEUP; | ||
982 | } | ||
983 | |||
984 | /* All uCode command responses, including Tx command responses, | ||
985 | * Rx "responses" (frame-received notification), and other | ||
986 | * notifications from uCode come through here*/ | ||
987 | if (inta & (CSR_INT_BIT_FH_RX | CSR_INT_BIT_SW_RX)) { | ||
988 | iwl_rx_handle(priv); | ||
989 | priv->isr_stats.rx++; | ||
990 | handled |= (CSR_INT_BIT_FH_RX | CSR_INT_BIT_SW_RX); | ||
991 | } | ||
992 | |||
993 | /* This "Tx" DMA channel is used only for loading uCode */ | ||
994 | if (inta & CSR_INT_BIT_FH_TX) { | ||
995 | IWL_DEBUG_ISR(priv, "uCode load interrupt\n"); | ||
996 | priv->isr_stats.tx++; | ||
997 | handled |= CSR_INT_BIT_FH_TX; | ||
998 | /* Wake up uCode load routine, now that load is complete */ | ||
999 | priv->ucode_write_complete = 1; | ||
1000 | wake_up_interruptible(&priv->wait_command_queue); | ||
1001 | } | ||
1002 | |||
1003 | if (inta & ~handled) { | ||
1004 | IWL_ERR(priv, "Unhandled INTA bits 0x%08x\n", inta & ~handled); | ||
1005 | priv->isr_stats.unhandled++; | ||
1006 | } | ||
1007 | |||
1008 | if (inta & ~(priv->inta_mask)) { | ||
1009 | IWL_WARN(priv, "Disabled INTA bits 0x%08x were pending\n", | ||
1010 | inta & ~priv->inta_mask); | ||
1011 | IWL_WARN(priv, " with FH_INT = 0x%08x\n", inta_fh); | ||
1012 | } | ||
1013 | |||
1014 | /* Re-enable all interrupts */ | ||
1015 | /* only Re-enable if disabled by irq */ | ||
1016 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) | ||
1017 | iwl_enable_interrupts(priv); | ||
1018 | /* Re-enable RF_KILL if it occurred */ | ||
1019 | else if (handled & CSR_INT_BIT_RF_KILL) | ||
1020 | iwl_enable_rfkill_int(priv); | ||
1021 | |||
1022 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
1023 | if (iwl_get_debug_level(priv) & (IWL_DL_ISR)) { | ||
1024 | inta = iwl_read32(priv, CSR_INT); | ||
1025 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | ||
1026 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); | ||
1027 | IWL_DEBUG_ISR(priv, "End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " | ||
1028 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); | ||
1029 | } | ||
1030 | #endif | ||
1031 | } | ||
1032 | |||
1033 | /* tasklet for iwlagn interrupt */ | 848 | /* tasklet for iwlagn interrupt */ |
1034 | static void iwl_irq_tasklet(struct iwl_priv *priv) | 849 | static void iwl_irq_tasklet(struct iwl_priv *priv) |
1035 | { | 850 | { |
@@ -1171,7 +986,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1171 | if (inta & (CSR_INT_BIT_FH_RX | CSR_INT_BIT_SW_RX)) { | 986 | if (inta & (CSR_INT_BIT_FH_RX | CSR_INT_BIT_SW_RX)) { |
1172 | handled |= (CSR_INT_BIT_FH_RX | CSR_INT_BIT_SW_RX); | 987 | handled |= (CSR_INT_BIT_FH_RX | CSR_INT_BIT_SW_RX); |
1173 | iwl_write32(priv, CSR_FH_INT_STATUS, | 988 | iwl_write32(priv, CSR_FH_INT_STATUS, |
1174 | CSR49_FH_INT_RX_MASK); | 989 | CSR_FH_INT_RX_MASK); |
1175 | } | 990 | } |
1176 | if (inta & CSR_INT_BIT_RX_PERIODIC) { | 991 | if (inta & CSR_INT_BIT_RX_PERIODIC) { |
1177 | handled |= CSR_INT_BIT_RX_PERIODIC; | 992 | handled |= CSR_INT_BIT_RX_PERIODIC; |
@@ -1209,7 +1024,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1209 | 1024 | ||
1210 | /* This "Tx" DMA channel is used only for loading uCode */ | 1025 | /* This "Tx" DMA channel is used only for loading uCode */ |
1211 | if (inta & CSR_INT_BIT_FH_TX) { | 1026 | if (inta & CSR_INT_BIT_FH_TX) { |
1212 | iwl_write32(priv, CSR_FH_INT_STATUS, CSR49_FH_INT_TX_MASK); | 1027 | iwl_write32(priv, CSR_FH_INT_STATUS, CSR_FH_INT_TX_MASK); |
1213 | IWL_DEBUG_ISR(priv, "uCode load interrupt\n"); | 1028 | IWL_DEBUG_ISR(priv, "uCode load interrupt\n"); |
1214 | priv->isr_stats.tx++; | 1029 | priv->isr_stats.tx++; |
1215 | handled |= CSR_INT_BIT_FH_TX; | 1030 | handled |= CSR_INT_BIT_FH_TX; |
@@ -1444,28 +1259,19 @@ static int iwlagn_load_legacy_firmware(struct iwl_priv *priv, | |||
1444 | 1259 | ||
1445 | switch (api_ver) { | 1260 | switch (api_ver) { |
1446 | default: | 1261 | default: |
1447 | /* | 1262 | hdr_size = 28; |
1448 | * 4965 doesn't revision the firmware file format | 1263 | if (ucode_raw->size < hdr_size) { |
1449 | * along with the API version, it always uses v1 | 1264 | IWL_ERR(priv, "File size too small!\n"); |
1450 | * file format. | 1265 | return -EINVAL; |
1451 | */ | ||
1452 | if ((priv->hw_rev & CSR_HW_REV_TYPE_MSK) != | ||
1453 | CSR_HW_REV_TYPE_4965) { | ||
1454 | hdr_size = 28; | ||
1455 | if (ucode_raw->size < hdr_size) { | ||
1456 | IWL_ERR(priv, "File size too small!\n"); | ||
1457 | return -EINVAL; | ||
1458 | } | ||
1459 | pieces->build = le32_to_cpu(ucode->u.v2.build); | ||
1460 | pieces->inst_size = le32_to_cpu(ucode->u.v2.inst_size); | ||
1461 | pieces->data_size = le32_to_cpu(ucode->u.v2.data_size); | ||
1462 | pieces->init_size = le32_to_cpu(ucode->u.v2.init_size); | ||
1463 | pieces->init_data_size = le32_to_cpu(ucode->u.v2.init_data_size); | ||
1464 | pieces->boot_size = le32_to_cpu(ucode->u.v2.boot_size); | ||
1465 | src = ucode->u.v2.data; | ||
1466 | break; | ||
1467 | } | 1266 | } |
1468 | /* fall through for 4965 */ | 1267 | pieces->build = le32_to_cpu(ucode->u.v2.build); |
1268 | pieces->inst_size = le32_to_cpu(ucode->u.v2.inst_size); | ||
1269 | pieces->data_size = le32_to_cpu(ucode->u.v2.data_size); | ||
1270 | pieces->init_size = le32_to_cpu(ucode->u.v2.init_size); | ||
1271 | pieces->init_data_size = le32_to_cpu(ucode->u.v2.init_data_size); | ||
1272 | pieces->boot_size = le32_to_cpu(ucode->u.v2.boot_size); | ||
1273 | src = ucode->u.v2.data; | ||
1274 | break; | ||
1469 | case 0: | 1275 | case 0: |
1470 | case 1: | 1276 | case 1: |
1471 | case 2: | 1277 | case 2: |
@@ -3348,6 +3154,10 @@ int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3348 | } | 3154 | } |
3349 | break; | 3155 | break; |
3350 | case IEEE80211_AMPDU_TX_OPERATIONAL: | 3156 | case IEEE80211_AMPDU_TX_OPERATIONAL: |
3157 | buf_size = min_t(int, buf_size, LINK_QUAL_AGG_FRAME_LIMIT_DEF); | ||
3158 | |||
3159 | iwlagn_txq_agg_queue_setup(priv, sta, tid, buf_size); | ||
3160 | |||
3351 | /* | 3161 | /* |
3352 | * If the limit is 0, then it wasn't initialised yet, | 3162 | * If the limit is 0, then it wasn't initialised yet, |
3353 | * use the default. We can do that since we take the | 3163 | * use the default. We can do that since we take the |
@@ -3750,12 +3560,8 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
3750 | priv->watchdog.data = (unsigned long)priv; | 3560 | priv->watchdog.data = (unsigned long)priv; |
3751 | priv->watchdog.function = iwl_bg_watchdog; | 3561 | priv->watchdog.function = iwl_bg_watchdog; |
3752 | 3562 | ||
3753 | if (!priv->cfg->base_params->use_isr_legacy) | 3563 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) |
3754 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | 3564 | iwl_irq_tasklet, (unsigned long)priv); |
3755 | iwl_irq_tasklet, (unsigned long)priv); | ||
3756 | else | ||
3757 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | ||
3758 | iwl_irq_tasklet_legacy, (unsigned long)priv); | ||
3759 | } | 3565 | } |
3760 | 3566 | ||
3761 | static void iwl_cancel_deferred_work(struct iwl_priv *priv) | 3567 | static void iwl_cancel_deferred_work(struct iwl_priv *priv) |
@@ -3968,14 +3774,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3968 | * 1. Allocating HW data | 3774 | * 1. Allocating HW data |
3969 | ************************/ | 3775 | ************************/ |
3970 | 3776 | ||
3971 | /* Disabling hardware scan means that mac80211 will perform scans | ||
3972 | * "the hard way", rather than using device's scan. */ | ||
3973 | if (cfg->mod_params->disable_hw_scan) { | ||
3974 | dev_printk(KERN_DEBUG, &(pdev->dev), | ||
3975 | "sw scan support is deprecated\n"); | ||
3976 | iwlagn_hw_ops.hw_scan = NULL; | ||
3977 | } | ||
3978 | |||
3979 | hw = iwl_alloc_all(cfg); | 3777 | hw = iwl_alloc_all(cfg); |
3980 | if (!hw) { | 3778 | if (!hw) { |
3981 | err = -ENOMEM; | 3779 | err = -ENOMEM; |
@@ -4585,43 +4383,21 @@ module_exit(iwl_exit); | |||
4585 | module_init(iwl_init); | 4383 | module_init(iwl_init); |
4586 | 4384 | ||
4587 | #ifdef CONFIG_IWLWIFI_DEBUG | 4385 | #ifdef CONFIG_IWLWIFI_DEBUG |
4588 | module_param_named(debug50, iwl_debug_level, uint, S_IRUGO); | ||
4589 | MODULE_PARM_DESC(debug50, "50XX debug output mask (deprecated)"); | ||
4590 | module_param_named(debug, iwl_debug_level, uint, S_IRUGO | S_IWUSR); | 4386 | module_param_named(debug, iwl_debug_level, uint, S_IRUGO | S_IWUSR); |
4591 | MODULE_PARM_DESC(debug, "debug output mask"); | 4387 | MODULE_PARM_DESC(debug, "debug output mask"); |
4592 | #endif | 4388 | #endif |
4593 | 4389 | ||
4594 | module_param_named(swcrypto50, iwlagn_mod_params.sw_crypto, bool, S_IRUGO); | ||
4595 | MODULE_PARM_DESC(swcrypto50, | ||
4596 | "using crypto in software (default 0 [hardware]) (deprecated)"); | ||
4597 | module_param_named(swcrypto, iwlagn_mod_params.sw_crypto, int, S_IRUGO); | 4390 | module_param_named(swcrypto, iwlagn_mod_params.sw_crypto, int, S_IRUGO); |
4598 | MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])"); | 4391 | MODULE_PARM_DESC(swcrypto, "using crypto in software (default 0 [hardware])"); |
4599 | module_param_named(queues_num50, | ||
4600 | iwlagn_mod_params.num_of_queues, int, S_IRUGO); | ||
4601 | MODULE_PARM_DESC(queues_num50, | ||
4602 | "number of hw queues in 50xx series (deprecated)"); | ||
4603 | module_param_named(queues_num, iwlagn_mod_params.num_of_queues, int, S_IRUGO); | 4392 | module_param_named(queues_num, iwlagn_mod_params.num_of_queues, int, S_IRUGO); |
4604 | MODULE_PARM_DESC(queues_num, "number of hw queues."); | 4393 | MODULE_PARM_DESC(queues_num, "number of hw queues."); |
4605 | module_param_named(11n_disable50, iwlagn_mod_params.disable_11n, int, S_IRUGO); | ||
4606 | MODULE_PARM_DESC(11n_disable50, "disable 50XX 11n functionality (deprecated)"); | ||
4607 | module_param_named(11n_disable, iwlagn_mod_params.disable_11n, int, S_IRUGO); | 4394 | module_param_named(11n_disable, iwlagn_mod_params.disable_11n, int, S_IRUGO); |
4608 | MODULE_PARM_DESC(11n_disable, "disable 11n functionality"); | 4395 | MODULE_PARM_DESC(11n_disable, "disable 11n functionality"); |
4609 | module_param_named(amsdu_size_8K50, iwlagn_mod_params.amsdu_size_8K, | ||
4610 | int, S_IRUGO); | ||
4611 | MODULE_PARM_DESC(amsdu_size_8K50, | ||
4612 | "enable 8K amsdu size in 50XX series (deprecated)"); | ||
4613 | module_param_named(amsdu_size_8K, iwlagn_mod_params.amsdu_size_8K, | 4396 | module_param_named(amsdu_size_8K, iwlagn_mod_params.amsdu_size_8K, |
4614 | int, S_IRUGO); | 4397 | int, S_IRUGO); |
4615 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); | 4398 | MODULE_PARM_DESC(amsdu_size_8K, "enable 8K amsdu size"); |
4616 | module_param_named(fw_restart50, iwlagn_mod_params.restart_fw, int, S_IRUGO); | ||
4617 | MODULE_PARM_DESC(fw_restart50, | ||
4618 | "restart firmware in case of error (deprecated)"); | ||
4619 | module_param_named(fw_restart, iwlagn_mod_params.restart_fw, int, S_IRUGO); | 4399 | module_param_named(fw_restart, iwlagn_mod_params.restart_fw, int, S_IRUGO); |
4620 | MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); | 4400 | MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); |
4621 | module_param_named( | ||
4622 | disable_hw_scan, iwlagn_mod_params.disable_hw_scan, int, S_IRUGO); | ||
4623 | MODULE_PARM_DESC(disable_hw_scan, | ||
4624 | "disable hardware scanning (default 0) (deprecated)"); | ||
4625 | 4401 | ||
4626 | module_param_named(ucode_alternative, iwlagn_wanted_ucode_alternative, int, | 4402 | module_param_named(ucode_alternative, iwlagn_wanted_ucode_alternative, int, |
4627 | S_IRUGO); | 4403 | S_IRUGO); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 20f8e4188994..39313acb9cc7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -133,10 +133,6 @@ void iwlagn_txq_update_byte_cnt_tbl(struct iwl_priv *priv, | |||
133 | u16 byte_cnt); | 133 | u16 byte_cnt); |
134 | void iwlagn_txq_inval_byte_cnt_tbl(struct iwl_priv *priv, | 134 | void iwlagn_txq_inval_byte_cnt_tbl(struct iwl_priv *priv, |
135 | struct iwl_tx_queue *txq); | 135 | struct iwl_tx_queue *txq); |
136 | int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id, | ||
137 | int tx_fifo, int sta_id, int tid, u16 ssn_idx); | ||
138 | int iwlagn_txq_agg_disable(struct iwl_priv *priv, u16 txq_id, | ||
139 | u16 ssn_idx, u8 tx_fifo); | ||
140 | void iwlagn_txq_set_sched(struct iwl_priv *priv, u32 mask); | 136 | void iwlagn_txq_set_sched(struct iwl_priv *priv, u32 mask); |
141 | void iwl_free_tfds_in_queue(struct iwl_priv *priv, | 137 | void iwl_free_tfds_in_queue(struct iwl_priv *priv, |
142 | int sta_id, int tid, int freed); | 138 | int sta_id, int tid, int freed); |
@@ -206,6 +202,9 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
206 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); | 202 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); |
207 | int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, | 203 | int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, |
208 | struct ieee80211_sta *sta, u16 tid); | 204 | struct ieee80211_sta *sta, u16 tid); |
205 | void iwlagn_txq_agg_queue_setup(struct iwl_priv *priv, | ||
206 | struct ieee80211_sta *sta, | ||
207 | int tid, int frame_limit); | ||
209 | int iwlagn_txq_check_empty(struct iwl_priv *priv, | 208 | int iwlagn_txq_check_empty(struct iwl_priv *priv, |
210 | int sta_id, u8 tid, int txq_id); | 209 | int sta_id, u8 tid, int txq_id); |
211 | void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, | 210 | void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, |
@@ -311,7 +310,7 @@ static inline u32 iwl_ant_idx_to_flags(u8 ant_idx) | |||
311 | 310 | ||
312 | static inline u8 iwl_hw_get_rate(__le32 rate_n_flags) | 311 | static inline u8 iwl_hw_get_rate(__le32 rate_n_flags) |
313 | { | 312 | { |
314 | return le32_to_cpu(rate_n_flags) & 0xFF; | 313 | return le32_to_cpu(rate_n_flags) & RATE_MCS_RATE_MSK; |
315 | } | 314 | } |
316 | 315 | ||
317 | static inline __le32 iwl_hw_set_rate_n_flags(u8 rate, u32 flags) | 316 | static inline __le32 iwl_hw_set_rate_n_flags(u8 rate, u32 flags) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index ca42ffa63ed7..cc2151482f31 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -324,6 +324,8 @@ struct iwl3945_power_per_rate { | |||
324 | #define RATE_MCS_SPATIAL_MSK 0x18 | 324 | #define RATE_MCS_SPATIAL_MSK 0x18 |
325 | #define RATE_MCS_HT_DUP_POS 5 | 325 | #define RATE_MCS_HT_DUP_POS 5 |
326 | #define RATE_MCS_HT_DUP_MSK 0x20 | 326 | #define RATE_MCS_HT_DUP_MSK 0x20 |
327 | /* Both legacy and HT use bits 7:0 as the CCK/OFDM rate or HT MCS */ | ||
328 | #define RATE_MCS_RATE_MSK 0xff | ||
327 | 329 | ||
328 | /* Bit 8: (1) HT format, (0) legacy format in bits 7:0 */ | 330 | /* Bit 8: (1) HT format, (0) legacy format in bits 7:0 */ |
329 | #define RATE_MCS_FLAGS_POS 8 | 331 | #define RATE_MCS_FLAGS_POS 8 |
@@ -2130,7 +2132,7 @@ struct iwl_link_qual_general_params { | |||
2130 | #define LINK_QUAL_AGG_DISABLE_START_MAX (255) | 2132 | #define LINK_QUAL_AGG_DISABLE_START_MAX (255) |
2131 | #define LINK_QUAL_AGG_DISABLE_START_MIN (0) | 2133 | #define LINK_QUAL_AGG_DISABLE_START_MIN (0) |
2132 | 2134 | ||
2133 | #define LINK_QUAL_AGG_FRAME_LIMIT_DEF (31) | 2135 | #define LINK_QUAL_AGG_FRAME_LIMIT_DEF (63) |
2134 | #define LINK_QUAL_AGG_FRAME_LIMIT_MAX (63) | 2136 | #define LINK_QUAL_AGG_FRAME_LIMIT_MAX (63) |
2135 | #define LINK_QUAL_AGG_FRAME_LIMIT_MIN (0) | 2137 | #define LINK_QUAL_AGG_FRAME_LIMIT_MIN (0) |
2136 | 2138 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index b316d833d9a2..967b4c008bc0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -171,11 +171,6 @@ struct iwl_lib_ops { | |||
171 | struct iwl_tx_queue *txq); | 171 | struct iwl_tx_queue *txq); |
172 | int (*txq_init)(struct iwl_priv *priv, | 172 | int (*txq_init)(struct iwl_priv *priv, |
173 | struct iwl_tx_queue *txq); | 173 | struct iwl_tx_queue *txq); |
174 | /* aggregations */ | ||
175 | int (*txq_agg_enable)(struct iwl_priv *priv, int txq_id, int tx_fifo, | ||
176 | int sta_id, int tid, u16 ssn_idx); | ||
177 | int (*txq_agg_disable)(struct iwl_priv *priv, u16 txq_id, u16 ssn_idx, | ||
178 | u8 tx_fifo); | ||
179 | /* setup Rx handler */ | 174 | /* setup Rx handler */ |
180 | void (*rx_handler_setup)(struct iwl_priv *priv); | 175 | void (*rx_handler_setup)(struct iwl_priv *priv); |
181 | /* setup deferred work */ | 176 | /* setup deferred work */ |
@@ -252,7 +247,6 @@ struct iwl_ops { | |||
252 | 247 | ||
253 | struct iwl_mod_params { | 248 | struct iwl_mod_params { |
254 | int sw_crypto; /* def: 0 = using hardware encryption */ | 249 | int sw_crypto; /* def: 0 = using hardware encryption */ |
255 | int disable_hw_scan; /* def: 0 = use h/w scan */ | ||
256 | int num_of_queues; /* def: HW dependent */ | 250 | int num_of_queues; /* def: HW dependent */ |
257 | int disable_11n; /* def: 0 = 11n capabilities enabled */ | 251 | int disable_11n; /* def: 0 = 11n capabilities enabled */ |
258 | int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */ | 252 | int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */ |
@@ -286,8 +280,6 @@ struct iwl_mod_params { | |||
286 | * @chain_noise_calib_by_driver: driver has the capability to perform | 280 | * @chain_noise_calib_by_driver: driver has the capability to perform |
287 | * chain noise calibration operation | 281 | * chain noise calibration operation |
288 | * @shadow_reg_enable: HW shadhow register bit | 282 | * @shadow_reg_enable: HW shadhow register bit |
289 | * @no_agg_framecnt_info: uCode do not provide aggregation frame count | ||
290 | * information | ||
291 | */ | 283 | */ |
292 | struct iwl_base_params { | 284 | struct iwl_base_params { |
293 | int eeprom_size; | 285 | int eeprom_size; |
@@ -298,7 +290,6 @@ struct iwl_base_params { | |||
298 | bool set_l0s; | 290 | bool set_l0s; |
299 | bool use_bsm; | 291 | bool use_bsm; |
300 | 292 | ||
301 | bool use_isr_legacy; | ||
302 | const u16 max_ll_items; | 293 | const u16 max_ll_items; |
303 | const bool shadow_ram_support; | 294 | const bool shadow_ram_support; |
304 | u16 led_compensation; | 295 | u16 led_compensation; |
@@ -317,7 +308,6 @@ struct iwl_base_params { | |||
317 | const bool sensitivity_calib_by_driver; | 308 | const bool sensitivity_calib_by_driver; |
318 | const bool chain_noise_calib_by_driver; | 309 | const bool chain_noise_calib_by_driver; |
319 | const bool shadow_reg_enable; | 310 | const bool shadow_reg_enable; |
320 | const bool no_agg_framecnt_info; | ||
321 | }; | 311 | }; |
322 | /* | 312 | /* |
323 | * @advanced_bt_coexist: support advanced bt coexist | 313 | * @advanced_bt_coexist: support advanced bt coexist |
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h index f52bc040bcbf..1123319f2e2b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-csr.h +++ b/drivers/net/wireless/iwlwifi/iwl-csr.h | |||
@@ -155,18 +155,10 @@ | |||
155 | #define CSR_DBG_LINK_PWR_MGMT_REG (CSR_BASE+0x250) | 155 | #define CSR_DBG_LINK_PWR_MGMT_REG (CSR_BASE+0x250) |
156 | 156 | ||
157 | /* Bits for CSR_HW_IF_CONFIG_REG */ | 157 | /* Bits for CSR_HW_IF_CONFIG_REG */ |
158 | #define CSR49_HW_IF_CONFIG_REG_BIT_4965_R (0x00000010) | ||
159 | #define CSR_HW_IF_CONFIG_REG_MSK_BOARD_VER (0x00000C00) | 158 | #define CSR_HW_IF_CONFIG_REG_MSK_BOARD_VER (0x00000C00) |
160 | #define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI (0x00000100) | 159 | #define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI (0x00000100) |
161 | #define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI (0x00000200) | 160 | #define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI (0x00000200) |
162 | 161 | ||
163 | #define CSR39_HW_IF_CONFIG_REG_BIT_3945_MB (0x00000100) | ||
164 | #define CSR39_HW_IF_CONFIG_REG_BIT_3945_MM (0x00000200) | ||
165 | #define CSR39_HW_IF_CONFIG_REG_BIT_SKU_MRC (0x00000400) | ||
166 | #define CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE (0x00000800) | ||
167 | #define CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A (0x00000000) | ||
168 | #define CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B (0x00001000) | ||
169 | |||
170 | #define CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A (0x00080000) | 162 | #define CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A (0x00080000) |
171 | #define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM (0x00200000) | 163 | #define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM (0x00200000) |
172 | #define CSR_HW_IF_CONFIG_REG_BIT_NIC_READY (0x00400000) /* PCI_OWN_SEM */ | 164 | #define CSR_HW_IF_CONFIG_REG_BIT_NIC_READY (0x00400000) /* PCI_OWN_SEM */ |
@@ -186,7 +178,7 @@ | |||
186 | #define CSR_INT_BIT_SW_ERR (1 << 25) /* uCode error */ | 178 | #define CSR_INT_BIT_SW_ERR (1 << 25) /* uCode error */ |
187 | #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTRL[27] toggled */ | 179 | #define CSR_INT_BIT_RF_KILL (1 << 7) /* HW RFKILL switch GP_CNTRL[27] toggled */ |
188 | #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too hot) rfkill */ | 180 | #define CSR_INT_BIT_CT_KILL (1 << 6) /* Critical temp (chip too hot) rfkill */ |
189 | #define CSR_INT_BIT_SW_RX (1 << 3) /* Rx, command responses, 3945 */ | 181 | #define CSR_INT_BIT_SW_RX (1 << 3) /* Rx, command responses */ |
190 | #define CSR_INT_BIT_WAKEUP (1 << 1) /* NIC controller waking up (pwr mgmt) */ | 182 | #define CSR_INT_BIT_WAKEUP (1 << 1) /* NIC controller waking up (pwr mgmt) */ |
191 | #define CSR_INT_BIT_ALIVE (1 << 0) /* uCode interrupts once it initializes */ | 183 | #define CSR_INT_BIT_ALIVE (1 << 0) /* uCode interrupts once it initializes */ |
192 | 184 | ||
@@ -202,29 +194,17 @@ | |||
202 | /* interrupt flags in FH (flow handler) (PCI busmaster DMA) */ | 194 | /* interrupt flags in FH (flow handler) (PCI busmaster DMA) */ |
203 | #define CSR_FH_INT_BIT_ERR (1 << 31) /* Error */ | 195 | #define CSR_FH_INT_BIT_ERR (1 << 31) /* Error */ |
204 | #define CSR_FH_INT_BIT_HI_PRIOR (1 << 30) /* High priority Rx, bypass coalescing */ | 196 | #define CSR_FH_INT_BIT_HI_PRIOR (1 << 30) /* High priority Rx, bypass coalescing */ |
205 | #define CSR39_FH_INT_BIT_RX_CHNL2 (1 << 18) /* Rx channel 2 (3945 only) */ | ||
206 | #define CSR_FH_INT_BIT_RX_CHNL1 (1 << 17) /* Rx channel 1 */ | 197 | #define CSR_FH_INT_BIT_RX_CHNL1 (1 << 17) /* Rx channel 1 */ |
207 | #define CSR_FH_INT_BIT_RX_CHNL0 (1 << 16) /* Rx channel 0 */ | 198 | #define CSR_FH_INT_BIT_RX_CHNL0 (1 << 16) /* Rx channel 0 */ |
208 | #define CSR39_FH_INT_BIT_TX_CHNL6 (1 << 6) /* Tx channel 6 (3945 only) */ | ||
209 | #define CSR_FH_INT_BIT_TX_CHNL1 (1 << 1) /* Tx channel 1 */ | 199 | #define CSR_FH_INT_BIT_TX_CHNL1 (1 << 1) /* Tx channel 1 */ |
210 | #define CSR_FH_INT_BIT_TX_CHNL0 (1 << 0) /* Tx channel 0 */ | 200 | #define CSR_FH_INT_BIT_TX_CHNL0 (1 << 0) /* Tx channel 0 */ |
211 | 201 | ||
212 | #define CSR39_FH_INT_RX_MASK (CSR_FH_INT_BIT_HI_PRIOR | \ | 202 | #define CSR_FH_INT_RX_MASK (CSR_FH_INT_BIT_HI_PRIOR | \ |
213 | CSR39_FH_INT_BIT_RX_CHNL2 | \ | 203 | CSR_FH_INT_BIT_RX_CHNL1 | \ |
214 | CSR_FH_INT_BIT_RX_CHNL1 | \ | 204 | CSR_FH_INT_BIT_RX_CHNL0) |
215 | CSR_FH_INT_BIT_RX_CHNL0) | ||
216 | |||
217 | |||
218 | #define CSR39_FH_INT_TX_MASK (CSR39_FH_INT_BIT_TX_CHNL6 | \ | ||
219 | CSR_FH_INT_BIT_TX_CHNL1 | \ | ||
220 | CSR_FH_INT_BIT_TX_CHNL0) | ||
221 | |||
222 | #define CSR49_FH_INT_RX_MASK (CSR_FH_INT_BIT_HI_PRIOR | \ | ||
223 | CSR_FH_INT_BIT_RX_CHNL1 | \ | ||
224 | CSR_FH_INT_BIT_RX_CHNL0) | ||
225 | 205 | ||
226 | #define CSR49_FH_INT_TX_MASK (CSR_FH_INT_BIT_TX_CHNL1 | \ | 206 | #define CSR_FH_INT_TX_MASK (CSR_FH_INT_BIT_TX_CHNL1 | \ |
227 | CSR_FH_INT_BIT_TX_CHNL0) | 207 | CSR_FH_INT_BIT_TX_CHNL0) |
228 | 208 | ||
229 | /* GPIO */ | 209 | /* GPIO */ |
230 | #define CSR_GPIO_IN_BIT_AUX_POWER (0x00000200) | 210 | #define CSR_GPIO_IN_BIT_AUX_POWER (0x00000200) |
@@ -268,7 +248,7 @@ | |||
268 | * Indicates MAC (ucode processor, etc.) is powered up and can run. | 248 | * Indicates MAC (ucode processor, etc.) is powered up and can run. |
269 | * Internal resources are accessible. | 249 | * Internal resources are accessible. |
270 | * NOTE: This does not indicate that the processor is actually running. | 250 | * NOTE: This does not indicate that the processor is actually running. |
271 | * NOTE: This does not indicate that 4965 or 3945 has completed | 251 | * NOTE: This does not indicate that device has completed |
272 | * init or post-power-down restore of internal SRAM memory. | 252 | * init or post-power-down restore of internal SRAM memory. |
273 | * Use CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP as indication that | 253 | * Use CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP as indication that |
274 | * SRAM is restored and uCode is in normal operation mode. | 254 | * SRAM is restored and uCode is in normal operation mode. |
@@ -291,8 +271,6 @@ | |||
291 | 271 | ||
292 | /* HW REV */ | 272 | /* HW REV */ |
293 | #define CSR_HW_REV_TYPE_MSK (0x00001F0) | 273 | #define CSR_HW_REV_TYPE_MSK (0x00001F0) |
294 | #define CSR_HW_REV_TYPE_3945 (0x00000D0) | ||
295 | #define CSR_HW_REV_TYPE_4965 (0x0000000) | ||
296 | #define CSR_HW_REV_TYPE_5300 (0x0000020) | 274 | #define CSR_HW_REV_TYPE_5300 (0x0000020) |
297 | #define CSR_HW_REV_TYPE_5350 (0x0000030) | 275 | #define CSR_HW_REV_TYPE_5350 (0x0000030) |
298 | #define CSR_HW_REV_TYPE_5100 (0x0000050) | 276 | #define CSR_HW_REV_TYPE_5100 (0x0000050) |
@@ -363,7 +341,7 @@ | |||
363 | * 0: MAC_SLEEP | 341 | * 0: MAC_SLEEP |
364 | * uCode sets this when preparing a power-saving power-down. | 342 | * uCode sets this when preparing a power-saving power-down. |
365 | * uCode resets this when power-up is complete and SRAM is sane. | 343 | * uCode resets this when power-up is complete and SRAM is sane. |
366 | * NOTE: 3945/4965 saves internal SRAM data to host when powering down, | 344 | * NOTE: device saves internal SRAM data to host when powering down, |
367 | * and must restore this data after powering back up. | 345 | * and must restore this data after powering back up. |
368 | * MAC_SLEEP is the best indication that restore is complete. | 346 | * MAC_SLEEP is the best indication that restore is complete. |
369 | * Later devices (5xxx/6xxx/1xxx) use non-volatile SRAM, and | 347 | * Later devices (5xxx/6xxx/1xxx) use non-volatile SRAM, and |
@@ -394,7 +372,6 @@ | |||
394 | #define CSR_LED_REG_TRUN_OFF (0x38) | 372 | #define CSR_LED_REG_TRUN_OFF (0x38) |
395 | 373 | ||
396 | /* ANA_PLL */ | 374 | /* ANA_PLL */ |
397 | #define CSR39_ANA_PLL_CFG_VAL (0x01000000) | ||
398 | #define CSR50_ANA_PLL_CFG_VAL (0x00880300) | 375 | #define CSR50_ANA_PLL_CFG_VAL (0x00880300) |
399 | 376 | ||
400 | /* HPET MEM debug */ | 377 | /* HPET MEM debug */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 68b953f2bdc7..a5d438d91821 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -416,6 +416,7 @@ struct iwl_ht_agg { | |||
416 | #define IWL_EMPTYING_HW_QUEUE_ADDBA 2 | 416 | #define IWL_EMPTYING_HW_QUEUE_ADDBA 2 |
417 | #define IWL_EMPTYING_HW_QUEUE_DELBA 3 | 417 | #define IWL_EMPTYING_HW_QUEUE_DELBA 3 |
418 | u8 state; | 418 | u8 state; |
419 | u8 tx_fifo; | ||
419 | }; | 420 | }; |
420 | 421 | ||
421 | 422 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 833194a2c639..c831a0f24613 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -198,8 +198,6 @@ static int iwlcore_get_nvm_type(struct iwl_priv *priv) | |||
198 | case CSR_HW_REV_TYPE_NONE: | 198 | case CSR_HW_REV_TYPE_NONE: |
199 | IWL_ERR(priv, "Unknown hardware type\n"); | 199 | IWL_ERR(priv, "Unknown hardware type\n"); |
200 | return -ENOENT; | 200 | return -ENOENT; |
201 | case CSR_HW_REV_TYPE_3945: | ||
202 | case CSR_HW_REV_TYPE_4965: | ||
203 | case CSR_HW_REV_TYPE_5300: | 201 | case CSR_HW_REV_TYPE_5300: |
204 | case CSR_HW_REV_TYPE_5350: | 202 | case CSR_HW_REV_TYPE_5350: |
205 | case CSR_HW_REV_TYPE_5100: | 203 | case CSR_HW_REV_TYPE_5100: |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index bc90a12408a3..b0dcca07ff45 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -306,12 +306,6 @@ u8 iwl_prep_station(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
306 | */ | 306 | */ |
307 | iwl_set_ht_add_station(priv, sta_id, sta, ctx); | 307 | iwl_set_ht_add_station(priv, sta_id, sta, ctx); |
308 | 308 | ||
309 | /* 3945 only */ | ||
310 | rate = (priv->band == IEEE80211_BAND_5GHZ) ? | ||
311 | IWL_RATE_6M_PLCP : IWL_RATE_1M_PLCP; | ||
312 | /* Turn on both antennas for the station... */ | ||
313 | station->sta.rate_n_flags = cpu_to_le16(rate | RATE_MCS_ANT_AB_MSK); | ||
314 | |||
315 | return sta_id; | 309 | return sta_id; |
316 | 310 | ||
317 | } | 311 | } |