diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-26 08:11:00 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-29 21:25:34 +0200 |
commit | a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c (patch) | |
tree | 72dee57cdee0bfb9e796d6b12159b75eae17f5c7 /drivers/net/wireless/iwlwifi/iwl-helpers.h | |
parent | iwlagn: move isr_statistics to transport layer (diff) | |
download | linux-a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c.tar.xz linux-a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c.zip |
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.h | 6 |
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 09ed7af19889..f744fdc39a4d 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); |