summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-helpers.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-25 23:11:00 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:25:34 -0400
commita0eaad713f6fc1f63fe293ad6ce63cb01e05c03c (patch)
tree72dee57cdee0bfb9e796d6b12159b75eae17f5c7 /drivers/net/wireless/iwlwifi/iwl-helpers.h
parent1f7b6172db86e9ab2b4cd794441bb2c40ab287fc (diff)
downloadop-kernel-dev-a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c.zip
op-kernel-dev-a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c.tar.gz
iwlagn: reclaim the packets in transport layer
The reclaim flow is really transport related. Define a simple API to allow the upper layer to request from the transport layer to reclaim packets until an index written in the Tx response / BA notification. The transport layer prepares a list of the packets that are being freed and passes this list to the upper layer. Between the two layers, the CB of the skb is used to pass a pointer to the context (BSS / PAN) in which the skb was sent. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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/iwl-helpers.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-helpers.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index 09ed7af..f744fdc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -90,6 +90,9 @@ static inline void iwl_wake_queue(struct iwl_priv *priv,
u8 ac = queue & 3;
u8 hwq = (queue >> 2) & 0x1f;
+ if (unlikely(!priv->mac80211_registered))
+ return;
+
if (test_and_clear_bit(hwq, priv->queue_stopped))
if (atomic_dec_return(&priv->queue_stop_count[ac]) <= 0)
ieee80211_wake_queue(priv->hw, ac);
@@ -102,6 +105,9 @@ static inline void iwl_stop_queue(struct iwl_priv *priv,
u8 ac = queue & 3;
u8 hwq = (queue >> 2) & 0x1f;
+ if (unlikely(!priv->mac80211_registered))
+ return;
+
if (!test_and_set_bit(hwq, priv->queue_stopped))
if (atomic_inc_return(&priv->queue_stop_count[ac]) > 0)
ieee80211_stop_queue(priv->hw, ac);
OpenPOWER on IntegriCloud