aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-07 12:52:16 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-08 13:59:47 -0500
commite755f882b7e72c48da820acc24196532977cfd07 (patch)
tree43fbd47dce75f6c08908f2b4c14e4c72ab565390 /drivers/net/wireless/iwlwifi
parentea886a6014024d027fa207b8765e46d746cd2a18 (diff)
iwlwifi: redesign PASSIVE_NO_RX workaround
The PASSIVE_NO_RX workaround currently crosses through the op_mode and transport layers, which is a bit odd. This also isn't necessary, if the transport simply reports when queues are full (or no longer full) the op_mode can keep track of this state, and report to mac80211 only what *it* thinks is appropriate. What is appropriate can then be based on whether queues should be stopped to wait for RX or not. This significantly simplifies the transport API, it no longer needs to expose anything to stop a queue, nor to wake "any" queue, this can all be handled in the upper layer completely. Also simplify the handling to not be dependent on the context, that makes little sense as the queues are shared and both contexts have to be on the same channel anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rx.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c33
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie.c36
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h36
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-ucode.c6
11 files changed, 56 insertions, 119 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
index 521c820ea10a..a9bdbad6663e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c
@@ -807,16 +807,12 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,
807 * sometimes even after already having transmitted frames for the 807 * sometimes even after already having transmitted frames for the
808 * association because the new RXON may reset the information. 808 * association because the new RXON may reset the information.
809 */ 809 */
810 if (unlikely(ieee80211_is_beacon(fc))) { 810 if (unlikely(ieee80211_is_beacon(fc) && priv->passive_no_rx)) {
811 for_each_context(priv, ctx) { 811 for_each_context(priv, ctx) {
812 if (!ctx->last_tx_rejected)
813 continue;
814 if (compare_ether_addr(hdr->addr3, 812 if (compare_ether_addr(hdr->addr3,
815 ctx->active.bssid_addr)) 813 ctx->active.bssid_addr))
816 continue; 814 continue;
817 ctx->last_tx_rejected = false; 815 iwlagn_lift_passive_no_rx(priv);
818 iwl_trans_wake_any_queue(trans(priv), ctx->ctxid,
819 "channel got active");
820 } 816 }
821 } 817 }
822 818
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 9d955fa387e5..66e9a71aaac6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -833,12 +833,8 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
833 * not get stuck in this case either since it 833 * not get stuck in this case either since it
834 * can happen if userspace gets confused. 834 * can happen if userspace gets confused.
835 */ 835 */
836 if (ctx->last_tx_rejected) { 836 iwlagn_lift_passive_no_rx(priv);
837 ctx->last_tx_rejected = false; 837
838 iwl_trans_wake_any_queue(trans(priv),
839 ctx->ctxid,
840 "Disassoc: flush queue");
841 }
842 ctx->staging.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 838 ctx->staging.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
843 839
844 if (ctx->ctxid == IWL_RXON_CTX_BSS) 840 if (ctx->ctxid == IWL_RXON_CTX_BSS)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index c454c6782395..a19db4c0c9fa 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1064,8 +1064,8 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
1064 } 1064 }
1065 1065
1066 /*we can free until ssn % q.n_bd not inclusive */ 1066 /*we can free until ssn % q.n_bd not inclusive */
1067 WARN_ON(iwl_trans_reclaim(trans(priv), sta_id, tid, txq_id, 1067 WARN_ON(iwl_trans_reclaim(trans(priv), sta_id, tid,
1068 ssn, status, &skbs)); 1068 txq_id, ssn, &skbs));
1069 iwlagn_check_ratid_empty(priv, sta_id, tid); 1069 iwlagn_check_ratid_empty(priv, sta_id, tid);
1070 freed = 0; 1070 freed = 0;
1071 1071
@@ -1086,9 +1086,9 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
1086 if (status == TX_STATUS_FAIL_PASSIVE_NO_RX && 1086 if (status == TX_STATUS_FAIL_PASSIVE_NO_RX &&
1087 iwl_is_associated_ctx(ctx) && ctx->vif && 1087 iwl_is_associated_ctx(ctx) && ctx->vif &&
1088 ctx->vif->type == NL80211_IFTYPE_STATION) { 1088 ctx->vif->type == NL80211_IFTYPE_STATION) {
1089 ctx->last_tx_rejected = true; 1089 /* block and stop all queues */
1090 iwl_trans_stop_queue(trans(priv), txq_id, 1090 priv->passive_no_rx = true;
1091 "Tx on passive channel"); 1091 ieee80211_stop_queues(priv->hw);
1092 1092
1093 IWL_DEBUG_TX_REPLY(priv, 1093 IWL_DEBUG_TX_REPLY(priv,
1094 "TXQ %d status %s (0x%08x) " 1094 "TXQ %d status %s (0x%08x) "
@@ -1182,7 +1182,7 @@ int iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
1182 * block-ack window (we assume that they've been successfully 1182 * block-ack window (we assume that they've been successfully
1183 * transmitted ... if not, it's too late anyway). */ 1183 * transmitted ... if not, it's too late anyway). */
1184 if (iwl_trans_reclaim(trans(priv), sta_id, tid, scd_flow, 1184 if (iwl_trans_reclaim(trans(priv), sta_id, tid, scd_flow,
1185 ba_resp_scd_ssn, 0, &reclaimed_skbs)) { 1185 ba_resp_scd_ssn, &reclaimed_skbs)) {
1186 spin_unlock(&priv->sta_lock); 1186 spin_unlock(&priv->sta_lock);
1187 return 0; 1187 return 0;
1188 } 1188 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 397faf9023e4..29f40eab9715 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1427,6 +1427,39 @@ static void iwl_nic_config(struct iwl_op_mode *op_mode)
1427 cfg(priv)->lib->nic_config(priv); 1427 cfg(priv)->lib->nic_config(priv);
1428} 1428}
1429 1429
1430static void iwl_stop_sw_queue(struct iwl_op_mode *op_mode, u8 ac)
1431{
1432 struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode);
1433
1434 set_bit(ac, &priv->transport_queue_stop);
1435 ieee80211_stop_queue(priv->hw, ac);
1436}
1437
1438static void iwl_wake_sw_queue(struct iwl_op_mode *op_mode, u8 ac)
1439{
1440 struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode);
1441
1442 clear_bit(ac, &priv->transport_queue_stop);
1443
1444 if (!priv->passive_no_rx)
1445 ieee80211_wake_queue(priv->hw, ac);
1446}
1447
1448void iwlagn_lift_passive_no_rx(struct iwl_priv *priv)
1449{
1450 int ac;
1451
1452 if (!priv->passive_no_rx)
1453 return;
1454
1455 for (ac = IEEE80211_AC_VO; ac < IEEE80211_NUM_ACS; ac++) {
1456 if (!test_bit(ac, &priv->transport_queue_stop))
1457 ieee80211_wake_queue(priv->hw, ac);
1458 }
1459
1460 priv->passive_no_rx = false;
1461}
1462
1430const struct iwl_op_mode_ops iwl_dvm_ops = { 1463const struct iwl_op_mode_ops iwl_dvm_ops = {
1431 .start = iwl_op_mode_dvm_start, 1464 .start = iwl_op_mode_dvm_start,
1432 .stop = iwl_op_mode_dvm_stop, 1465 .stop = iwl_op_mode_dvm_stop,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index 82930ef86ad1..b56498b796c2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -84,14 +84,13 @@ void iwl_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb);
84int __must_check iwl_rx_dispatch(struct iwl_op_mode *op_mode, 84int __must_check iwl_rx_dispatch(struct iwl_op_mode *op_mode,
85 struct iwl_rx_cmd_buffer *rxb, 85 struct iwl_rx_cmd_buffer *rxb,
86 struct iwl_device_cmd *cmd); 86 struct iwl_device_cmd *cmd);
87void iwl_stop_sw_queue(struct iwl_op_mode *op_mode, u8 ac);
88void iwl_wake_sw_queue(struct iwl_op_mode *op_mode, u8 ac);
89void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state); 87void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state);
90void iwl_stop_sw_queue(struct iwl_op_mode *op_mode, u8 ac);
91void iwl_nic_error(struct iwl_op_mode *op_mode); 88void iwl_nic_error(struct iwl_op_mode *op_mode);
92 89
93bool iwl_check_for_ct_kill(struct iwl_priv *priv); 90bool iwl_check_for_ct_kill(struct iwl_priv *priv);
94 91
92void iwlagn_lift_passive_no_rx(struct iwl_priv *priv);
93
95/* MAC80211 */ 94/* MAC80211 */
96struct ieee80211_hw *iwl_alloc_all(void); 95struct ieee80211_hw *iwl_alloc_all(void);
97int iwlagn_mac_setup_register(struct iwl_priv *priv, 96int iwlagn_mac_setup_register(struct iwl_priv *priv,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index f43f51d1570e..f50bd4263b88 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1477,17 +1477,3 @@ void iwl_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb)
1477 kmem_cache_free(priv->tx_cmd_pool, (info->driver_data[1])); 1477 kmem_cache_free(priv->tx_cmd_pool, (info->driver_data[1]));
1478 dev_kfree_skb_any(skb); 1478 dev_kfree_skb_any(skb);
1479} 1479}
1480
1481void iwl_stop_sw_queue(struct iwl_op_mode *op_mode, u8 ac)
1482{
1483 struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode);
1484
1485 ieee80211_stop_queue(priv->hw, ac);
1486}
1487
1488void iwl_wake_sw_queue(struct iwl_op_mode *op_mode, u8 ac)
1489{
1490 struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode);
1491
1492 ieee80211_wake_queue(priv->hw, ac);
1493}
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index d1e722bd9f5b..74429702b130 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -670,8 +670,6 @@ struct iwl_rxon_context {
670 bool enabled, is_40mhz; 670 bool enabled, is_40mhz;
671 u8 extension_chan_offset; 671 u8 extension_chan_offset;
672 } ht; 672 } ht;
673
674 bool last_tx_rejected;
675}; 673};
676 674
677enum iwl_scan_type { 675enum iwl_scan_type {
@@ -720,6 +718,9 @@ struct iwl_priv {
720 spinlock_t sta_lock; 718 spinlock_t sta_lock;
721 struct mutex mutex; 719 struct mutex mutex;
722 720
721 unsigned long transport_queue_stop;
722 bool passive_no_rx;
723
723 /* ieee device used by generic ieee processing code */ 724 /* ieee device used by generic ieee processing code */
724 struct ieee80211_hw *hw; 725 struct ieee80211_hw *hw;
725 struct ieee80211_channel *ieee_channels; 726 struct ieee80211_channel *ieee_channels;
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
index d13b8d1f08fa..4f73a6d06509 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
@@ -451,18 +451,6 @@ static inline void iwl_stop_queue(struct iwl_trans *trans,
451 } 451 }
452} 452}
453 453
454#ifdef ieee80211_stop_queue
455#undef ieee80211_stop_queue
456#endif
457
458#define ieee80211_stop_queue DO_NOT_USE_ieee80211_stop_queue
459
460#ifdef ieee80211_wake_queue
461#undef ieee80211_wake_queue
462#endif
463
464#define ieee80211_wake_queue DO_NOT_USE_ieee80211_wake_queue
465
466static inline void iwl_txq_ctx_activate(struct iwl_trans_pcie *trans_pcie, 454static inline void iwl_txq_ctx_activate(struct iwl_trans_pcie *trans_pcie,
467 int txq_id) 455 int txq_id)
468{ 456{
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
index 26bb44242090..1c4fbcd348a8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
@@ -1559,8 +1559,7 @@ static void iwl_trans_pcie_stop_hw(struct iwl_trans *trans)
1559} 1559}
1560 1560
1561static int iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid, 1561static int iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid,
1562 int txq_id, int ssn, u32 status, 1562 int txq_id, int ssn, struct sk_buff_head *skbs)
1563 struct sk_buff_head *skbs)
1564{ 1563{
1565 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 1564 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1566 struct iwl_tx_queue *txq = &trans_pcie->txq[txq_id]; 1565 struct iwl_tx_queue *txq = &trans_pcie->txq[txq_id];
@@ -1593,9 +1592,7 @@ static int iwl_trans_pcie_reclaim(struct iwl_trans *trans, int sta_id, int tid,
1593 txq_id, iwl_get_queue_ac(txq), txq->q.read_ptr, 1592 txq_id, iwl_get_queue_ac(txq), txq->q.read_ptr,
1594 tfd_num, ssn); 1593 tfd_num, ssn);
1595 freed = iwl_tx_queue_reclaim(trans, txq_id, tfd_num, skbs); 1594 freed = iwl_tx_queue_reclaim(trans, txq_id, tfd_num, skbs);
1596 if (iwl_queue_space(&txq->q) > txq->q.low_mark && 1595 if (iwl_queue_space(&txq->q) > txq->q.low_mark)
1597 (!txq->sched_retry ||
1598 status != TX_STATUS_FAIL_PASSIVE_NO_RX))
1599 iwl_wake_queue(trans, txq, "Packets reclaimed"); 1596 iwl_wake_queue(trans, txq, "Packets reclaimed");
1600 } 1597 }
1601 1598
@@ -1662,32 +1659,6 @@ static int iwl_trans_pcie_resume(struct iwl_trans *trans)
1662} 1659}
1663#endif /* CONFIG_PM_SLEEP */ 1660#endif /* CONFIG_PM_SLEEP */
1664 1661
1665static void iwl_trans_pcie_wake_any_queue(struct iwl_trans *trans,
1666 enum iwl_rxon_context_id ctx,
1667 const char *msg)
1668{
1669 u8 ac, txq_id;
1670 struct iwl_trans_pcie *trans_pcie =
1671 IWL_TRANS_GET_PCIE_TRANS(trans);
1672
1673 for (ac = 0; ac < AC_NUM; ac++) {
1674 txq_id = trans_pcie->ac_to_queue[ctx][ac];
1675 IWL_DEBUG_TX_QUEUES(trans, "Queue Status: Q[%d] %s\n",
1676 ac,
1677 (atomic_read(&trans_pcie->queue_stop_count[ac]) > 0)
1678 ? "stopped" : "awake");
1679 iwl_wake_queue(trans, &trans_pcie->txq[txq_id], msg);
1680 }
1681}
1682
1683static void iwl_trans_pcie_stop_queue(struct iwl_trans *trans, int txq_id,
1684 const char *msg)
1685{
1686 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1687
1688 iwl_stop_queue(trans, &trans_pcie->txq[txq_id], msg);
1689}
1690
1691#define IWL_FLUSH_WAIT_MS 2000 1662#define IWL_FLUSH_WAIT_MS 2000
1692 1663
1693static int iwl_trans_pcie_wait_tx_queue_empty(struct iwl_trans *trans) 1664static int iwl_trans_pcie_wait_tx_queue_empty(struct iwl_trans *trans)
@@ -2207,8 +2178,6 @@ const struct iwl_trans_ops trans_ops_pcie = {
2207 2178
2208 .wowlan_suspend = iwl_trans_pcie_wowlan_suspend, 2179 .wowlan_suspend = iwl_trans_pcie_wowlan_suspend,
2209 2180
2210 .wake_any_queue = iwl_trans_pcie_wake_any_queue,
2211
2212 .send_cmd = iwl_trans_pcie_send_cmd, 2181 .send_cmd = iwl_trans_pcie_send_cmd,
2213 2182
2214 .tx = iwl_trans_pcie_tx, 2183 .tx = iwl_trans_pcie_tx,
@@ -2219,7 +2188,6 @@ const struct iwl_trans_ops trans_ops_pcie = {
2219 .tx_agg_setup = iwl_trans_pcie_tx_agg_setup, 2188 .tx_agg_setup = iwl_trans_pcie_tx_agg_setup,
2220 2189
2221 .free = iwl_trans_pcie_free, 2190 .free = iwl_trans_pcie_free,
2222 .stop_queue = iwl_trans_pcie_stop_queue,
2223 2191
2224 .dbgfs_register = iwl_trans_pcie_dbgfs_register, 2192 .dbgfs_register = iwl_trans_pcie_dbgfs_register,
2225 2193
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 15bb208ab347..609949f0299c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -289,7 +289,6 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
289 * May sleep 289 * May sleep
290 * @fw_alive: called when the fw sends alive notification 290 * @fw_alive: called when the fw sends alive notification
291 * May sleep 291 * May sleep
292 * @wake_any_queue: wake all the queues of a specfic context IWL_RXON_CTX_*
293 * @stop_device:stops the whole device (embedded CPU put to reset) 292 * @stop_device:stops the whole device (embedded CPU put to reset)
294 * May sleep 293 * May sleep
295 * @wowlan_suspend: put the device into the correct mode for WoWLAN during 294 * @wowlan_suspend: put the device into the correct mode for WoWLAN during
@@ -312,7 +311,6 @@ static inline struct page *rxb_steal_page(struct iwl_rx_cmd_buffer *r)
312 * irq, tasklet etc... From this point on, the device may not issue 311 * irq, tasklet etc... From this point on, the device may not issue
313 * any interrupt (incl. RFKILL). 312 * any interrupt (incl. RFKILL).
314 * May sleep 313 * May sleep
315 * @stop_queue: stop a specific queue
316 * @check_stuck_queue: check if a specific queue is stuck 314 * @check_stuck_queue: check if a specific queue is stuck
317 * @wait_tx_queue_empty: wait until all tx queues are empty 315 * @wait_tx_queue_empty: wait until all tx queues are empty
318 * May sleep 316 * May sleep
@@ -334,18 +332,13 @@ struct iwl_trans_ops {
334 332
335 void (*wowlan_suspend)(struct iwl_trans *trans); 333 void (*wowlan_suspend)(struct iwl_trans *trans);
336 334
337 void (*wake_any_queue)(struct iwl_trans *trans,
338 enum iwl_rxon_context_id ctx,
339 const char *msg);
340
341 int (*send_cmd)(struct iwl_trans *trans, struct iwl_host_cmd *cmd); 335 int (*send_cmd)(struct iwl_trans *trans, struct iwl_host_cmd *cmd);
342 336
343 int (*tx)(struct iwl_trans *trans, struct sk_buff *skb, 337 int (*tx)(struct iwl_trans *trans, struct sk_buff *skb,
344 struct iwl_device_cmd *dev_cmd, enum iwl_rxon_context_id ctx, 338 struct iwl_device_cmd *dev_cmd, enum iwl_rxon_context_id ctx,
345 u8 sta_id, u8 tid); 339 u8 sta_id, u8 tid);
346 int (*reclaim)(struct iwl_trans *trans, int sta_id, int tid, 340 int (*reclaim)(struct iwl_trans *trans, int sta_id, int tid,
347 int txq_id, int ssn, u32 status, 341 int txq_id, int ssn, struct sk_buff_head *skbs);
348 struct sk_buff_head *skbs);
349 342
350 int (*tx_agg_disable)(struct iwl_trans *trans, 343 int (*tx_agg_disable)(struct iwl_trans *trans,
351 int sta_id, int tid); 344 int sta_id, int tid);
@@ -357,8 +350,6 @@ struct iwl_trans_ops {
357 350
358 void (*free)(struct iwl_trans *trans); 351 void (*free)(struct iwl_trans *trans);
359 352
360 void (*stop_queue)(struct iwl_trans *trans, int q, const char *msg);
361
362 int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir); 353 int (*dbgfs_register)(struct iwl_trans *trans, struct dentry* dir);
363 int (*check_stuck_queue)(struct iwl_trans *trans, int q); 354 int (*check_stuck_queue)(struct iwl_trans *trans, int q);
364 int (*wait_tx_queue_empty)(struct iwl_trans *trans); 355 int (*wait_tx_queue_empty)(struct iwl_trans *trans);
@@ -474,17 +465,6 @@ static inline void iwl_trans_wowlan_suspend(struct iwl_trans *trans)
474 trans->ops->wowlan_suspend(trans); 465 trans->ops->wowlan_suspend(trans);
475} 466}
476 467
477static inline void iwl_trans_wake_any_queue(struct iwl_trans *trans,
478 enum iwl_rxon_context_id ctx,
479 const char *msg)
480{
481 if (trans->state != IWL_TRANS_FW_ALIVE)
482 IWL_ERR(trans, "%s bad state = %d", __func__, trans->state);
483
484 trans->ops->wake_any_queue(trans, ctx, msg);
485}
486
487
488static inline int iwl_trans_send_cmd(struct iwl_trans *trans, 468static inline int iwl_trans_send_cmd(struct iwl_trans *trans,
489 struct iwl_host_cmd *cmd) 469 struct iwl_host_cmd *cmd)
490{ 470{
@@ -505,14 +485,13 @@ static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb,
505} 485}
506 486
507static inline int iwl_trans_reclaim(struct iwl_trans *trans, int sta_id, 487static inline int iwl_trans_reclaim(struct iwl_trans *trans, int sta_id,
508 int tid, int txq_id, int ssn, u32 status, 488 int tid, int txq_id, int ssn,
509 struct sk_buff_head *skbs) 489 struct sk_buff_head *skbs)
510{ 490{
511 if (trans->state != IWL_TRANS_FW_ALIVE) 491 if (trans->state != IWL_TRANS_FW_ALIVE)
512 IWL_ERR(trans, "%s bad state = %d", __func__, trans->state); 492 IWL_ERR(trans, "%s bad state = %d", __func__, trans->state);
513 493
514 return trans->ops->reclaim(trans, sta_id, tid, txq_id, ssn, 494 return trans->ops->reclaim(trans, sta_id, tid, txq_id, ssn, skbs);
515 status, skbs);
516} 495}
517 496
518static inline int iwl_trans_tx_agg_disable(struct iwl_trans *trans, 497static inline int iwl_trans_tx_agg_disable(struct iwl_trans *trans,
@@ -554,15 +533,6 @@ static inline void iwl_trans_free(struct iwl_trans *trans)
554 trans->ops->free(trans); 533 trans->ops->free(trans);
555} 534}
556 535
557static inline void iwl_trans_stop_queue(struct iwl_trans *trans, int q,
558 const char *msg)
559{
560 if (trans->state != IWL_TRANS_FW_ALIVE)
561 IWL_ERR(trans, "%s bad state = %d", __func__, trans->state);
562
563 trans->ops->stop_queue(trans, q, msg);
564}
565
566static inline int iwl_trans_wait_tx_queue_empty(struct iwl_trans *trans) 536static inline int iwl_trans_wait_tx_queue_empty(struct iwl_trans *trans)
567{ 537{
568 if (trans->state != IWL_TRANS_FW_ALIVE) 538 if (trans->state != IWL_TRANS_FW_ALIVE)
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c
index 8267dbe869d5..404fd8e7958b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c
@@ -316,7 +316,6 @@ int iwl_send_bt_env(struct iwl_priv *priv, u8 action, u8 type)
316 316
317static int iwl_alive_notify(struct iwl_priv *priv) 317static int iwl_alive_notify(struct iwl_priv *priv)
318{ 318{
319 struct iwl_rxon_context *ctx;
320 int ret; 319 int ret;
321 320
322 if (!priv->tx_cmd_pool) 321 if (!priv->tx_cmd_pool)
@@ -329,8 +328,9 @@ static int iwl_alive_notify(struct iwl_priv *priv)
329 return -ENOMEM; 328 return -ENOMEM;
330 329
331 iwl_trans_fw_alive(trans(priv)); 330 iwl_trans_fw_alive(trans(priv));
332 for_each_context(priv, ctx) 331
333 ctx->last_tx_rejected = false; 332 priv->passive_no_rx = false;
333 priv->transport_queue_stop = 0;
334 334
335 ret = iwl_send_wimax_coex(priv); 335 ret = iwl_send_wimax_coex(priv);
336 if (ret) 336 if (ret)