aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 24a11b8f73bc..a709d05c5868 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -539,7 +539,14 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
539 unsigned long flags; 539 unsigned long flags;
540 bool is_agg = false; 540 bool is_agg = false;
541 541
542 if (info->control.vif) 542 /*
543 * If the frame needs to go out off-channel, then
544 * we'll have put the PAN context to that channel,
545 * so make the frame go out there.
546 */
547 if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)
548 ctx = &priv->contexts[IWL_RXON_CTX_PAN];
549 else if (info->control.vif)
543 ctx = iwl_rxon_ctx_from_vif(info->control.vif); 550 ctx = iwl_rxon_ctx_from_vif(info->control.vif);
544 551
545 spin_lock_irqsave(&priv->lock, flags); 552 spin_lock_irqsave(&priv->lock, flags);
@@ -940,7 +947,7 @@ void iwlagn_txq_ctx_reset(struct iwl_priv *priv)
940 */ 947 */
941void iwlagn_txq_ctx_stop(struct iwl_priv *priv) 948void iwlagn_txq_ctx_stop(struct iwl_priv *priv)
942{ 949{
943 int ch; 950 int ch, txq_id;
944 unsigned long flags; 951 unsigned long flags;
945 952
946 /* Turn off all Tx DMA fifos */ 953 /* Turn off all Tx DMA fifos */
@@ -959,6 +966,16 @@ void iwlagn_txq_ctx_stop(struct iwl_priv *priv)
959 iwl_read_direct32(priv, FH_TSSR_TX_STATUS_REG)); 966 iwl_read_direct32(priv, FH_TSSR_TX_STATUS_REG));
960 } 967 }
961 spin_unlock_irqrestore(&priv->lock, flags); 968 spin_unlock_irqrestore(&priv->lock, flags);
969
970 if (!priv->txq)
971 return;
972
973 /* Unmap DMA from host system and free skb's */
974 for (txq_id = 0; txq_id < priv->hw_params.max_txq_num; txq_id++)
975 if (txq_id == priv->cmd_queue)
976 iwl_cmd_queue_unmap(priv);
977 else
978 iwl_tx_queue_unmap(priv, txq_id);
962} 979}
963 980
964/* 981/*