[PATCH v2 01/37] wifi: mt76: mt7925: update mt76_connac_mcu_uni_add_dev for MLO

Felix Fietkau nbd at nbd.name
Sat Jul 6 05:30:02 PDT 2024


On 06.07.24 10:27, sean.wang at kernel.org wrote:
> From: Sean Wang <sean.wang at mediatek.com>
> 
> 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 at mediatek.com>
> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
> Co-developed-by: Deren Wu <deren.wu at mediatek.com>
> Signed-off-by: Deren Wu <deren.wu at mediatek.com>
> Signed-off-by: Sean Wang <sean.wang at mediatek.com>
> ---
>   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 {

mt76_connac must not rely on mt792x functions, since it is also used by 
the mt7615 driver. I've reverted this patch to the old version and 
applied the rest. Please find a different solution for this issue and 
send a follow-up patch separately.

- Felix



More information about the Linux-mediatek mailing list