When a driver rejects a frame in it's ->tx() callback, it must also stop queues, otherwise mac80211 can go into a loop here. Detect this situation and abort the loop after five retries, warning about the driver bug. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> --- This is a port of the patch to 2.6.26 which seems to suffer from the same problem and could well be the cause of all the mac80211 softlockup warnings on kerneloops.org. Dave, with John on vacation until the 22nd, would you push this to Linus with the next net update instead of it going through John's tree first? Ideally we'd fix the driver bugs, but that'd need an audit and this at least lets the system continue and work, a b43 bugfix was posted too to just drop frames if they come in at inopportune times. net/mac80211/tx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/net/mac80211/tx.c 2008-06-17 08:45:25.096294488 +0200 +++ b/net/mac80211/tx.c 2008-06-17 08:47:02.106291721 +0200 @@ -1132,7 +1132,7 @@ static int ieee80211_tx(struct net_devic ieee80211_tx_handler *handler; struct ieee80211_tx_data tx; ieee80211_tx_result res = TX_DROP, res_prepare; - int ret, i; + int ret, i, retries = 0; WARN_ON(__ieee80211_queue_pending(local, control->queue)); @@ -1216,6 +1216,13 @@ retry: if (!__ieee80211_queue_stopped(local, control->queue)) { clear_bit(IEEE80211_LINK_STATE_PENDING, &local->state[control->queue]); + retries++; + /* + * Driver bug, it's rejecting packets but + * not stopping queues. + */ + if (WARN_ON_ONCE(retries > 5)) + goto drop; goto retry; } memcpy(&store->control, control, -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html