From 8ffb5c001a6d1ef142ef550861e0b97e291f6469 Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Fri, 15 Feb 2013 10:18:34 -0500 Subject: [PATCH] mac80211: enable vif.cab_queue for mesh Since mesh powersaving was added, pending bcast/mcast frames may go out the CAB queue now. Unfortunately, the queue was only set up for AP mode, so we would try to tx on the IEEE80211_INVAL_HW_QUEUE. Allow cab_queue for mesh interfaces as well. Fixes the following warning (or crash without MAC80211_VERBOSE_DEBUG): WARNING: at net/mac80211/tx.c:1223 __ieee80211_tx+0x162/0x35f [mac80211]() Modules linked in: mac80211_hwsim mac80211 cfg80211 [...] Pid: 3085, comm: avahi-daemon Tainted: G W 3.8.0-rc1+ #377 Call Trace: [] warn_slowpath_common+0x83/0x9c [] warn_slowpath_null+0x1a/0x1c [] __ieee80211_tx+0x162/0x35f [mac80211] [] ieee80211_tx+0xd3/0xf9 [mac80211] [] ieee80211_xmit+0xcc/0xd5 [mac80211] [] ieee80211_subif_start_xmit+0xc53/0xcd8 [mac80211] [] dev_hard_start_xmit+0x259/0x3ce [] sch_direct_xmit+0x74/0x17d [] dev_queue_xmit+0x230/0x414 [] ip_finish_output2+0x348/0x3aa [] ip_finish_output+0x6c/0x71 [] NF_HOOK_COND.constprop.44+0x18/0x58 [] ip_mc_output+0x134/0x13c [] dst_output+0x18/0x1c [] ip_local_out+0x20/0x24 [] ip_send_skb+0x16/0x3c [] udp_send_skb+0x254/0x2b9 [] udp_sendmsg+0x5a8/0x7d4 Signed-off-by: Bob Copeland Signed-off-by: Johannes Berg --- net/mac80211/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 86c8308..a1f7194 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -294,7 +294,8 @@ static int ieee80211_check_queues(struct ieee80211_sub_if_data *sdata) } } - if ((sdata->vif.type != NL80211_IFTYPE_AP) || + if ((sdata->vif.type != NL80211_IFTYPE_AP && + sdata->vif.type != NL80211_IFTYPE_MESH_POINT) || !(sdata->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)) { sdata->vif.cab_queue = IEEE80211_INVAL_HW_QUEUE; return 0; -- 2.7.4