Commit 4c233458 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

wifi: mt76: prevent non-offchannel mgmt tx during scan/roc



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: 0b3be9d1 ("wifi: mt76: add separate tx scheduling queue for off-channel tx")
Reported-by: default avatarChad Monroe <chad.monroe@adtran.com>
Link: https://patch.msgid.link/20250813121106.81559-2-nbd@nbd.name


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent dd6e89ca
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@ mt76_tx(struct mt76_phy *phy, struct ieee80211_sta *sta,
	struct mt76_wcid *wcid, struct sk_buff *skb)
{
	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
	struct ieee80211_hdr *hdr = (void *)skb->data;
	struct sk_buff_head *head;

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

	if ((info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) ||
	    (info->control.flags & IEEE80211_TX_CTRL_DONT_USE_RATE_MASK))
	    ((info->control.flags & IEEE80211_TX_CTRL_DONT_USE_RATE_MASK) &&
	     ieee80211_is_probe_req(hdr->frame_control)))
		head = &wcid->tx_offchannel;
	else
		head = &wcid->tx_pending;