Skip to content

Commit

Permalink
mac80211: fix ieee80211_xmit call context
Browse files Browse the repository at this point in the history
ieee80211_xmit() cannot be called with tasklets enabled
because it is normally called from within a tasklet.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 24, 2009
1 parent 72bce62 commit 3d34deb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2241,5 +2241,12 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
if (!encrypt)
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;

/*
* The other path calling ieee80211_xmit is from the tasklet,
* and while we can handle concurrent transmissions locking
* requirements are that we do not come into tx with bhs on.
*/
local_bh_disable();
ieee80211_xmit(sdata, skb);
local_bh_enable();
}

0 comments on commit 3d34deb

Please sign in to comment.