From: Sean Wang <sean.wang@xxxxxxxxxxxx> Set OMAC address with the per-link BSS. The change remains compatible with the non-MLO mode and the older firmware. Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@xxxxxxxxxxxx> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@xxxxxxxxxxxx> Co-developed-by: Deren Wu <deren.wu@xxxxxxxxxxxx> Signed-off-by: Deren Wu <deren.wu@xxxxxxxxxxxx> Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx> --- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 4e3c8af98fe7..18801aaf6764 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -4,6 +4,7 @@ #include <linux/firmware.h> #include "mt76_connac2_mac.h" #include "mt76_connac_mcu.h" +#include "mt792x.h" int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option) { @@ -1141,7 +1142,8 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy, struct mt76_wcid *wcid, bool enable) { - struct mt76_vif *mvif = (struct mt76_vif *)bss_conf->vif->drv_priv; + struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(bss_conf); + struct mt76_vif *mvif = &mconf->mt76; struct mt76_dev *dev = phy->dev; struct { struct { @@ -1214,7 +1216,7 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy, idx = mvif->omac_idx > EXT_BSSID_START ? HW_BSSID_0 : mvif->omac_idx; basic_req.basic.hw_bss_idx = idx; - memcpy(dev_req.tlv.omac_addr, bss_conf->vif->addr, ETH_ALEN); + memcpy(dev_req.tlv.omac_addr, bss_conf->addr, ETH_ALEN); cmd = enable ? MCU_UNI_CMD(DEV_INFO_UPDATE) : MCU_UNI_CMD(BSS_INFO_UPDATE); data = enable ? (void *)&dev_req : (void *)&basic_req; -- 2.25.1