linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: refine ieee80211_rx() context requirement
@ 2013-05-08  8:31 Wei.Yang
  2013-05-08  8:36 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Wei.Yang @ 2013-05-08  8:31 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, wei.wyang

From: Wei Yang <Wei.Yang@windriver.com>

In case of RT kernel, the return value of softirq_count() always
equal to 0, we need to use in_serving_softirq to decide whether
the current context is in softirq context.

Signed-off-by: Wei Yang <Wei.Yang@windriver.com>
---
 net/mac80211/rx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index c6844ad..80fac46 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3226,7 +3226,7 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	struct ieee80211_supported_band *sband;
 	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
 
-	WARN_ON_ONCE(softirq_count() == 0);
+	WARN_ON_ONCE(!in_serving_softirq());
 
 	if (WARN_ON(status->band >= IEEE80211_NUM_BANDS))
 		goto drop;
-- 
1.7.9.5


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

end of thread, other threads:[~2013-05-08  8:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-08  8:31 [PATCH] mac80211: refine ieee80211_rx() context requirement Wei.Yang
2013-05-08  8:36 ` Johannes Berg
2013-05-08  8:37   ` Johannes Berg
2013-05-08  8:47     ` wyang1
2013-05-08  8:57       ` Johannes Berg
2013-05-08  8:44   ` wyang1

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).