Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: always send multicast on CAB queue

If the driver advertised support for a CAB queue, then we
should put all multicast frames there, otherwise sending
them can be racy with clients going to sleep while we TX
a frame. To avoid this, always TX multicast frames on the
multicast queue.

It seems like even drivers not using the queue framework
might want to do this which would mean also moving the
IEEE80211_TX_CTL_SEND_AFTER_DTIM flag assignment, but it
also seems that drivers behave differently here so that
just moving it wouldn't be a good idea. It'd be better to
modify those drivers to use the queue framework.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+3 -2
+3 -2
net/mac80211/tx.c
··· 398 398 if (ieee80211_has_order(hdr->frame_control)) 399 399 return TX_CONTINUE; 400 400 401 + if (tx->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) 402 + info->hw_queue = tx->sdata->vif.cab_queue; 403 + 401 404 /* no stations in PS mode */ 402 405 if (!atomic_read(&ps->num_sta_ps)) 403 406 return TX_CONTINUE; 404 407 405 408 info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM; 406 - if (tx->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) 407 - info->hw_queue = tx->sdata->vif.cab_queue; 408 409 409 410 /* device releases frame after DTIM beacon */ 410 411 if (!(tx->local->hw.flags & IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING))