[PATCH v2 2/3][SRU][J][OEM-5.14] mt76: mt7921: not support beacon offload disable command

Chris Chiu chris.chiu at canonical.com
Thu Jun 23 09:03:28 UTC 2022


From: Deren Wu <deren.wu at mediatek.com>

BugLink: https://bugs.launchpad.net/bugs/1979173

Beacon disable flow would be handled in bss stop handler automatically.
Force return -EOPNOTSUPP in disable case.

Fixes: 116c69603b01 ("mt76: mt7921: Add AP mode support")
Reviewed-by: Sean Wang <sean.wang at mediatek.com>
Signed-off-by: Deren Wu <deren.wu at mediatek.com>
(backported from https://patchwork.kernel.org/project/linux-mediatek/patch/9a167f91fc8ea846583a49fa35c5ddb70e5afae4.1654691030.git.deren.wu@mediatek.com/)
[Chris: revise the MCU_UNI_CMD(BSS_INFO_UPDATE) to fix the compatibility issues on 5.14/15]
Signed-off-by: Chris Chiu <chris.chiu at canonical.com>
---
 drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
index 4c3d56639193..3328be2d2c90 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
@@ -1557,8 +1557,11 @@ mt7921_mcu_uni_add_beacon_offload(struct mt7921_dev *dev,
 	};
 	struct sk_buff *skb;
 
+	/* support enable/update process only
+	 * disable flow would be handled in bss stop handler automatically
+	 */
 	if (!enable)
-		goto out;
+		return -EOPNOTSUPP;
 
 	skb = ieee80211_beacon_get_template(mt76_hw(dev), vif, &offs);
 	if (!skb)
@@ -1584,7 +1587,6 @@ mt7921_mcu_uni_add_beacon_offload(struct mt7921_dev *dev,
 	}
 	dev_kfree_skb(skb);
 
-out:
 	return mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD_BSS_INFO_UPDATE,
 				 &req, sizeof(req), true);
 }
-- 
2.25.1




More information about the kernel-team mailing list