All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7921: fix UC entry is being overwritten
@ 2021-05-20  7:22 ` sean.wang
  0 siblings, 0 replies; 6+ messages in thread
From: sean.wang @ 2021-05-20  7:22 UTC (permalink / raw)
  To: nbd, lorenzo.bianconi
  Cc: sean.wang, Soul.Huang, YN.Chen, Leon.Yen, Eric-SY.Chang,
	Deren.Wu, km.lin, robin.chiu, ch.yeh, posh.sun, Eric.Liang,
	Stella.Chang, jemele, yenlinlai, linux-wireless, linux-mediatek,
	Deren Wu, YN Chen

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

Fix UC entry is being overwritten by BC entry

Fixes: 36fcc8cff592 ("mt76: mt7921: introduce mt7921_mcu_sta_add routine")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: YN Chen <yn.chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index 73359defa176..f3decc59a6fe 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -875,10 +875,13 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy,
 	if (IS_ERR(skb))
 		return PTR_ERR(skb);
 
-	mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, info->enable);
-	if (info->enable && info->sta)
-		mt76_connac_mcu_sta_tlv(phy, skb, info->sta, info->vif,
-					info->rcpi);
+	if (info->sta) {
+		mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta,
+					      info->enable);
+		if (info->enable)
+			mt76_connac_mcu_sta_tlv(phy, skb, info->sta,
+						info->vif, info->rcpi);
+	}
 
 	sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,
 					   sizeof(struct tlv));
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mt76: mt7921: fix UC entry is being overwritten
@ 2021-05-20  7:22 ` sean.wang
  0 siblings, 0 replies; 6+ messages in thread
From: sean.wang @ 2021-05-20  7:22 UTC (permalink / raw)
  To: nbd, lorenzo.bianconi
  Cc: sean.wang, Soul.Huang, YN.Chen, Leon.Yen, Eric-SY.Chang,
	Deren.Wu, km.lin, robin.chiu, ch.yeh, posh.sun, Eric.Liang,
	Stella.Chang, jemele, yenlinlai, linux-wireless, linux-mediatek,
	Deren Wu, YN Chen

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

Fix UC entry is being overwritten by BC entry

Fixes: 36fcc8cff592 ("mt76: mt7921: introduce mt7921_mcu_sta_add routine")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: YN Chen <yn.chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index 73359defa176..f3decc59a6fe 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -875,10 +875,13 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy,
 	if (IS_ERR(skb))
 		return PTR_ERR(skb);
 
-	mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, info->enable);
-	if (info->enable && info->sta)
-		mt76_connac_mcu_sta_tlv(phy, skb, info->sta, info->vif,
-					info->rcpi);
+	if (info->sta) {
+		mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta,
+					      info->enable);
+		if (info->enable)
+			mt76_connac_mcu_sta_tlv(phy, skb, info->sta,
+						info->vif, info->rcpi);
+	}
 
 	sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,
 					   sizeof(struct tlv));
-- 
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7921: fix UC entry is being overwritten
  2021-05-20  7:22 ` sean.wang
@ 2021-05-23 21:18   ` Lorenzo Bianconi
  -1 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2021-05-23 21:18 UTC (permalink / raw)
  To: sean.wang
  Cc: nbd, lorenzo.bianconi, Soul.Huang, YN.Chen, Leon.Yen,
	Eric-SY.Chang, Deren.Wu, km.lin, robin.chiu, ch.yeh, posh.sun,
	Eric.Liang, Stella.Chang, jemele, yenlinlai, linux-wireless,
	linux-mediatek

[-- Attachment #1: Type: text/plain, Size: 1701 bytes --]

> From: Deren Wu <deren.wu@mediatek.com>
> 
> Fix UC entry is being overwritten by BC entry
> 
> Fixes: 36fcc8cff592 ("mt76: mt7921: introduce mt7921_mcu_sta_add routine")
> Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> Signed-off-by: YN Chen <yn.chen@mediatek.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> index 73359defa176..f3decc59a6fe 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> @@ -875,10 +875,13 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy,
>  	if (IS_ERR(skb))
>  		return PTR_ERR(skb);
>  
> -	mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, info->enable);
> -	if (info->enable && info->sta)
> -		mt76_connac_mcu_sta_tlv(phy, skb, info->sta, info->vif,
> -					info->rcpi);
> +	if (info->sta) {
> +		mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta,
> +					      info->enable);
> +		if (info->enable)
> +			mt76_connac_mcu_sta_tlv(phy, skb, info->sta,
> +						info->vif, info->rcpi);
> +	}

with this patch we are changing the mt7663 behaviour since we run
mt76_connac_mcu_add_sta_cmd() in mt7615_remove_interface() with
enable = false and sta = NULL. Can you please confirm you are
not introducing any regression in mt7663?

Regards,
Lorenzo

>  
>  	sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,
>  					   sizeof(struct tlv));
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7921: fix UC entry is being overwritten
@ 2021-05-23 21:18   ` Lorenzo Bianconi
  0 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2021-05-23 21:18 UTC (permalink / raw)
  To: sean.wang
  Cc: nbd, lorenzo.bianconi, Soul.Huang, YN.Chen, Leon.Yen,
	Eric-SY.Chang, Deren.Wu, km.lin, robin.chiu, ch.yeh, posh.sun,
	Eric.Liang, Stella.Chang, jemele, yenlinlai, linux-wireless,
	linux-mediatek


[-- Attachment #1.1: Type: text/plain, Size: 1701 bytes --]

> From: Deren Wu <deren.wu@mediatek.com>
> 
> Fix UC entry is being overwritten by BC entry
> 
> Fixes: 36fcc8cff592 ("mt76: mt7921: introduce mt7921_mcu_sta_add routine")
> Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> Signed-off-by: YN Chen <yn.chen@mediatek.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> index 73359defa176..f3decc59a6fe 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> @@ -875,10 +875,13 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy,
>  	if (IS_ERR(skb))
>  		return PTR_ERR(skb);
>  
> -	mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, info->enable);
> -	if (info->enable && info->sta)
> -		mt76_connac_mcu_sta_tlv(phy, skb, info->sta, info->vif,
> -					info->rcpi);
> +	if (info->sta) {
> +		mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta,
> +					      info->enable);
> +		if (info->enable)
> +			mt76_connac_mcu_sta_tlv(phy, skb, info->sta,
> +						info->vif, info->rcpi);
> +	}

with this patch we are changing the mt7663 behaviour since we run
mt76_connac_mcu_add_sta_cmd() in mt7615_remove_interface() with
enable = false and sta = NULL. Can you please confirm you are
not introducing any regression in mt7663?

Regards,
Lorenzo

>  
>  	sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,
>  					   sizeof(struct tlv));
> -- 
> 2.25.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7921: fix UC entry is being overwritten
  2021-05-23 21:18   ` Lorenzo Bianconi
@ 2021-05-24 17:52     ` Ryder Lee
  -1 siblings, 0 replies; 6+ messages in thread
From: Ryder Lee @ 2021-05-24 17:52 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: sean.wang, nbd, lorenzo.bianconi, Soul.Huang, YN.Chen, Leon.Yen,
	Eric-SY.Chang, Deren.Wu, km.lin, robin.chiu, ch.yeh, posh.sun,
	Eric.Liang, Stella.Chang, jemele, yenlinlai, linux-wireless,
	linux-mediatek

On Sun, 2021-05-23 at 23:18 +0200, Lorenzo Bianconi wrote:
> > From: Deren Wu <deren.wu@mediatek.com>
> > 
> > Fix UC entry is being overwritten by BC entry
> > 
> > Fixes: 36fcc8cff592 ("mt76: mt7921: introduce mt7921_mcu_sta_add routine")
> > Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> > Signed-off-by: YN Chen <yn.chen@mediatek.com>
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > ---
> >  drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 11 +++++++----
> >  1 file changed, 7 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> > index 73359defa176..f3decc59a6fe 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> > @@ -875,10 +875,13 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy,
> >  	if (IS_ERR(skb))
> >  		return PTR_ERR(skb);
> >  
> > -	mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, info->enable);
> > -	if (info->enable && info->sta)
> > -		mt76_connac_mcu_sta_tlv(phy, skb, info->sta, info->vif,
> > -					info->rcpi);
> > +	if (info->sta) {
> > +		mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta,
> > +					      info->enable);
> > +		if (info->enable)
> > +			mt76_connac_mcu_sta_tlv(phy, skb, info->sta,
> > +						info->vif, info->rcpi);
> > +	}
> 
> with this patch we are changing the mt7663 behaviour since we run
> mt76_connac_mcu_add_sta_cmd() in mt7615_remove_interface() with
> enable = false and sta = NULL. Can you please confirm you are
> not introducing any regression in mt7663?

I think this also breaks mt7622, so please double check.

> Regards,
> Lorenzo
> 
> >  
> >  	sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,
> >  					   sizeof(struct tlv));
> > -- 
> > 2.25.1
> > 
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: mt7921: fix UC entry is being overwritten
@ 2021-05-24 17:52     ` Ryder Lee
  0 siblings, 0 replies; 6+ messages in thread
From: Ryder Lee @ 2021-05-24 17:52 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: sean.wang, nbd, lorenzo.bianconi, Soul.Huang, YN.Chen, Leon.Yen,
	Eric-SY.Chang, Deren.Wu, km.lin, robin.chiu, ch.yeh, posh.sun,
	Eric.Liang, Stella.Chang, jemele, yenlinlai, linux-wireless,
	linux-mediatek

On Sun, 2021-05-23 at 23:18 +0200, Lorenzo Bianconi wrote:
> > From: Deren Wu <deren.wu@mediatek.com>
> > 
> > Fix UC entry is being overwritten by BC entry
> > 
> > Fixes: 36fcc8cff592 ("mt76: mt7921: introduce mt7921_mcu_sta_add routine")
> > Signed-off-by: Deren Wu <deren.wu@mediatek.com>
> > Signed-off-by: YN Chen <yn.chen@mediatek.com>
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > ---
> >  drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 11 +++++++----
> >  1 file changed, 7 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> > index 73359defa176..f3decc59a6fe 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> > @@ -875,10 +875,13 @@ int mt76_connac_mcu_add_sta_cmd(struct mt76_phy *phy,
> >  	if (IS_ERR(skb))
> >  		return PTR_ERR(skb);
> >  
> > -	mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta, info->enable);
> > -	if (info->enable && info->sta)
> > -		mt76_connac_mcu_sta_tlv(phy, skb, info->sta, info->vif,
> > -					info->rcpi);
> > +	if (info->sta) {
> > +		mt76_connac_mcu_sta_basic_tlv(skb, info->vif, info->sta,
> > +					      info->enable);
> > +		if (info->enable)
> > +			mt76_connac_mcu_sta_tlv(phy, skb, info->sta,
> > +						info->vif, info->rcpi);
> > +	}
> 
> with this patch we are changing the mt7663 behaviour since we run
> mt76_connac_mcu_add_sta_cmd() in mt7615_remove_interface() with
> enable = false and sta = NULL. Can you please confirm you are
> not introducing any regression in mt7663?

I think this also breaks mt7622, so please double check.

> Regards,
> Lorenzo
> 
> >  
> >  	sta_wtbl = mt76_connac_mcu_add_tlv(skb, STA_REC_WTBL,
> >  					   sizeof(struct tlv));
> > -- 
> > 2.25.1
> > 
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-25  0:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20  7:22 [PATCH] mt76: mt7921: fix UC entry is being overwritten sean.wang
2021-05-20  7:22 ` sean.wang
2021-05-23 21:18 ` Lorenzo Bianconi
2021-05-23 21:18   ` Lorenzo Bianconi
2021-05-24 17:52   ` Ryder Lee
2021-05-24 17:52     ` Ryder Lee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.