All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] iwlegacy: small refactoring of il_{stop,wake}_queue
@ 2013-06-12 14:44 Stanislaw Gruszka
  2013-06-12 14:44 ` [PATCH 2/4] iwlegacy: add il_{stop,wake}_queues_by_reason functions Stanislaw Gruszka
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stanislaw Gruszka @ 2013-06-12 14:44 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Jake Edge, Stanislaw Gruszka

Tested-by: Jake Edge <jake@lwn.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlegacy/common.h | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 4caaf52..67da89b 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -2257,6 +2257,19 @@ il_set_swq_id(struct il_tx_queue *txq, u8 ac, u8 hwq)
 }
 
 static inline void
+_il_wake_queue(struct il_priv *il, u8 ac)
+{
+	if (atomic_dec_return(&il->queue_stop_count[ac]) <= 0)
+		ieee80211_wake_queue(il->hw, ac);
+}
+
+static inline void
+_il_stop_queue(struct il_priv *il, u8 ac)
+{
+	if (atomic_inc_return(&il->queue_stop_count[ac]) > 0)
+		ieee80211_stop_queue(il->hw, ac);
+}
+static inline void
 il_wake_queue(struct il_priv *il, struct il_tx_queue *txq)
 {
 	u8 queue = txq->swq_id;
@@ -2264,8 +2277,7 @@ il_wake_queue(struct il_priv *il, struct il_tx_queue *txq)
 	u8 hwq = (queue >> 2) & 0x1f;
 
 	if (test_and_clear_bit(hwq, il->queue_stopped))
-		if (atomic_dec_return(&il->queue_stop_count[ac]) <= 0)
-			ieee80211_wake_queue(il->hw, ac);
+		_il_wake_queue(il, ac);
 }
 
 static inline void
@@ -2276,8 +2288,7 @@ il_stop_queue(struct il_priv *il, struct il_tx_queue *txq)
 	u8 hwq = (queue >> 2) & 0x1f;
 
 	if (!test_and_set_bit(hwq, il->queue_stopped))
-		if (atomic_inc_return(&il->queue_stop_count[ac]) > 0)
-			ieee80211_stop_queue(il->hw, ac);
+		_il_stop_queue(il, ac);
 }
 
 #ifdef ieee80211_stop_queue
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-12 14:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-12 14:44 [PATCH 1/4] iwlegacy: small refactoring of il_{stop,wake}_queue Stanislaw Gruszka
2013-06-12 14:44 ` [PATCH 2/4] iwlegacy: add il_{stop,wake}_queues_by_reason functions Stanislaw Gruszka
2013-06-12 14:44 ` [PATCH 3/4] iwl4965: workaround for firmware frame tx rejection Stanislaw Gruszka
2013-06-12 14:44 ` [PATCH 4/4] iwl3945: " Stanislaw Gruszka
2013-06-12 14:48   ` [PATCH 5/4] Revert "iwl4965: workaround connection regression on passive channel" Stanislaw Gruszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.