From a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Thu, 25 Aug 2011 23:11:00 -0700 Subject: 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 Signed-off-by: Wey-Yi Guy Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-helpers.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/net/wireless/iwlwifi/iwl-helpers.h') 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); -- cgit v1.1