Skip to content

Commit 731ea9b

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 <chad.monroe@adtran.com> Link: https://patch.msgid.link/20250813121106.81559-2-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f614c33 commit 731ea9b

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
@@ -332,6 +332,7 @@ mt76_tx(struct mt76_phy *phy, struct ieee80211_sta *sta,
332332
struct mt76_wcid *wcid, struct sk_buff *skb)
333333
{
334334
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
335+
struct ieee80211_hdr *hdr = (void *)skb->data;
335336
struct sk_buff_head *head;
336337

337338
if (mt76_testmode_enabled(phy)) {
@@ -349,7 +350,8 @@ mt76_tx(struct mt76_phy *phy, struct ieee80211_sta *sta,
349350
info->hw_queue |= FIELD_PREP(MT_TX_HW_QUEUE_PHY, phy->band_idx);
350351

351352
if ((info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) ||
352-
(info->control.flags & IEEE80211_TX_CTRL_DONT_USE_RATE_MASK))
353+
((info->control.flags & IEEE80211_TX_CTRL_DONT_USE_RATE_MASK) &&
354+
ieee80211_is_probe_req(hdr->frame_control)))
353355
head = &wcid->tx_offchannel;
354356
else
355357
head = &wcid->tx_pending;

0 commit comments

Comments
 (0)