Skip to content

Commit 1fb26fd

Browse files
nbd168gregkh
authored andcommitted
wifi: mt76: prevent non-offchannel mgmt tx during scan/roc
[ Upstream commit 4c23345 ] Only put probe request packets in the offchannel queue if IEEE80211_TX_CTRL_DONT_USE_RATE_MASK is set and IEEE80211_TX_CTL_TX_OFFCHAN is unset. Fixes: 0b3be9d ("wifi: mt76: add separate tx scheduling queue for off-channel tx") Reported-by: Chad Monroe <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent d9f2fb6 commit 1fb26fd

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/wireless/mediatek/mt76

1 file changed

+3
-1
lines changed

drivers/net/wireless/mediatek/mt76/tx.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ mt76_tx(struct mt76_phy *phy, struct ieee80211_sta *sta,
334334
struct mt76_wcid *wcid, struct sk_buff *skb)
335335
{
336336
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
337+
struct ieee80211_hdr *hdr = (void *)skb->data;
337338
struct sk_buff_head *head;
338339

339340
if (mt76_testmode_enabled(phy)) {
@@ -351,7 +352,8 @@ mt76_tx(struct mt76_phy *phy, struct ieee80211_sta *sta,
351352
info->hw_queue |= FIELD_PREP(MT_TX_HW_QUEUE_PHY, phy->band_idx);
352353

353354
if ((info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) ||
354-
(info->control.flags & IEEE80211_TX_CTRL_DONT_USE_RATE_MASK))
355+
((info->control.flags & IEEE80211_TX_CTRL_DONT_USE_RATE_MASK) &&
356+
ieee80211_is_probe_req(hdr->frame_control)))
355357
head = &wcid->tx_offchannel;
356358
else
357359
head = &wcid->tx_pending;

0 commit comments

Comments
 (0)