Patch "wifi: mt76: mt7921: fix wrong command to set STA channel" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: mt76: mt7921: fix wrong command to set STA channel

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-mt76-mt7921-fix-wrong-command-to-set-sta-channe.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 01b376bc4a164dcd6e42e23b10d08526d0282220
Author: Deren Wu <deren.wu@xxxxxxxxxxxx>
Date:   Sat Feb 11 09:01:58 2023 +0800

    wifi: mt76: mt7921: fix wrong command to set STA channel
    
    [ Upstream commit fcc51acfebb85dbc3ab1bea3ce4997d7c0a3a38d ]
    
    Should not use AND operator to check vif type NL80211_IFTYPE_MONITOR, and
    that will cause we go into sniffer command for both STA and MONITOR
    mode. However, the sniffer command would set channel properly (with some
    extra options), the STA mode still works even if using the wrong
    command.
    
    Fix vif type check to make sure we using the right command to update
    channel.
    
    Fixes: 914189af23b8 ("wifi: mt76: mt7921: fix channel switch fail in monitor mode")
    Signed-off-by: Deren Wu <deren.wu@xxxxxxxxxxxx>
    Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index 744382be36f8b..b2366efd74ea5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -1705,7 +1705,7 @@ static void mt7921_ctx_iter(void *priv, u8 *mac,
 	if (ctx != mvif->ctx)
 		return;
 
-	if (vif->type & NL80211_IFTYPE_MONITOR)
+	if (vif->type == NL80211_IFTYPE_MONITOR)
 		mt7921_mcu_config_sniffer(mvif, ctx);
 	else
 		mt76_connac_mcu_uni_set_chctx(mvif->phy->mt76, &mvif->mt76, ctx);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux