All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7921: fix kernel warning when reset on vif is not sta
@ 2021-06-15 21:31 ` sean.wang
  0 siblings, 0 replies; 6+ messages in thread
From: sean.wang @ 2021-06-15 21:31 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

From: Sean Wang <sean.wang@mediatek.com>

ieee80211_disconnect is only called for the staton mode.

[  714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787
ieee80211_disconnect+0x108/0x118 [mac80211]
[  714.116704] Hardware name: MediaTek Asurada rev1 board (DT)
[  714.122303] Workqueue: mt76 mt7921_mac_reset_work [mt7921e]
[  714.127877] pstate: 20c00009 (nzCv daif +PAN +UAO)
[  714.132761] pc : ieee80211_disconnect+0x108/0x118 [mac80211]
[  714.138430] lr : mt7921_vif_connect_iter+0x28/0x54 [mt7921e]
[  714.144083] sp : ffffffc0107cbbd0
[  714.147394] x29: ffffffc0107cbbd0 x28: ffffffb26c9cb928
[  714.152706] x27: ffffffb26c9cbd98 x26: 0000000000000000
[  714.158017] x25: 0000000000000003 x24: ffffffb26c9c9c38
[  714.163328] x23: ffffffb26c9c9c38 x22: ffffffb26c9c8860
[  714.168639] x21: ffffffb23b940000 x20: ffffffb26c9c8860
[  714.173950] x19: 0000000000000001 x18: 000000000000b67e
[  714.179261] x17: 00000000064dd409 x16: ffffffd739cb28f0
[  714.184571] x15: 0000000000000000 x14: 0000000000000227
[  714.189881] x13: 0000000000000400 x12: ffffffd73a4eb060
[  714.195191] x11: 0000000000000000 x10: 0000000000000000
[  714.200502] x9 : ffffffd703a0a000 x8 : 0000000000000006
[  714.205812] x7 : 2828282828282828 x6 : ffffffb200440396
[  714.211122] x5 : 0000000000000000 x4 : 0000000000000004
[  714.216432] x3 : 0000000000000000 x2 : ffffffb23b940c90
[  714.221743] x1 : 0000000000000001 x0 : ffffffb23b940c90
[  714.227054] Call trace:
[  714.229594]  ieee80211_disconnect+0x108/0x118 [mac80211]
[  714.234913]  mt7921_vif_connect_iter+0x28/0x54 [mt7921e]
[  714.240313]  __iterate_interfaces+0xc4/0xdc [mac80211]
[  714.245541]  ieee80211_iterate_interfaces+0x4c/0x68 [mac80211]
[  714.251381]  mt7921_mac_reset_work+0x410/0x468 [mt7921e]
[  714.256696]  process_one_work+0x208/0x3c8
[  714.260706]  worker_thread+0x23c/0x3e8
[  714.264456]  kthread+0x140/0x17c
[  714.267685]  ret_from_fork+0x10/0x18

Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
index fb4de73df701..0a2df295596a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
@@ -1269,7 +1269,8 @@ mt7921_vif_connect_iter(void *priv, u8 *mac,
 	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
 	struct mt7921_dev *dev = mvif->phy->dev;
 
-	ieee80211_disconnect(vif, true);
+	if (vif->type == NL80211_IFTYPE_STATION)
+		ieee80211_disconnect(vif, true);
 
 	mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, true);
 	mt7921_mcu_set_tx(dev, vif);
-- 
2.25.1


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

* [PATCH] mt76: mt7921: fix kernel warning when reset on vif is not sta
@ 2021-06-15 21:31 ` sean.wang
  0 siblings, 0 replies; 6+ messages in thread
From: sean.wang @ 2021-06-15 21:31 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

From: Sean Wang <sean.wang@mediatek.com>

ieee80211_disconnect is only called for the staton mode.

[  714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787
ieee80211_disconnect+0x108/0x118 [mac80211]
[  714.116704] Hardware name: MediaTek Asurada rev1 board (DT)
[  714.122303] Workqueue: mt76 mt7921_mac_reset_work [mt7921e]
[  714.127877] pstate: 20c00009 (nzCv daif +PAN +UAO)
[  714.132761] pc : ieee80211_disconnect+0x108/0x118 [mac80211]
[  714.138430] lr : mt7921_vif_connect_iter+0x28/0x54 [mt7921e]
[  714.144083] sp : ffffffc0107cbbd0
[  714.147394] x29: ffffffc0107cbbd0 x28: ffffffb26c9cb928
[  714.152706] x27: ffffffb26c9cbd98 x26: 0000000000000000
[  714.158017] x25: 0000000000000003 x24: ffffffb26c9c9c38
[  714.163328] x23: ffffffb26c9c9c38 x22: ffffffb26c9c8860
[  714.168639] x21: ffffffb23b940000 x20: ffffffb26c9c8860
[  714.173950] x19: 0000000000000001 x18: 000000000000b67e
[  714.179261] x17: 00000000064dd409 x16: ffffffd739cb28f0
[  714.184571] x15: 0000000000000000 x14: 0000000000000227
[  714.189881] x13: 0000000000000400 x12: ffffffd73a4eb060
[  714.195191] x11: 0000000000000000 x10: 0000000000000000
[  714.200502] x9 : ffffffd703a0a000 x8 : 0000000000000006
[  714.205812] x7 : 2828282828282828 x6 : ffffffb200440396
[  714.211122] x5 : 0000000000000000 x4 : 0000000000000004
[  714.216432] x3 : 0000000000000000 x2 : ffffffb23b940c90
[  714.221743] x1 : 0000000000000001 x0 : ffffffb23b940c90
[  714.227054] Call trace:
[  714.229594]  ieee80211_disconnect+0x108/0x118 [mac80211]
[  714.234913]  mt7921_vif_connect_iter+0x28/0x54 [mt7921e]
[  714.240313]  __iterate_interfaces+0xc4/0xdc [mac80211]
[  714.245541]  ieee80211_iterate_interfaces+0x4c/0x68 [mac80211]
[  714.251381]  mt7921_mac_reset_work+0x410/0x468 [mt7921e]
[  714.256696]  process_one_work+0x208/0x3c8
[  714.260706]  worker_thread+0x23c/0x3e8
[  714.264456]  kthread+0x140/0x17c
[  714.267685]  ret_from_fork+0x10/0x18

Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
index fb4de73df701..0a2df295596a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
@@ -1269,7 +1269,8 @@ mt7921_vif_connect_iter(void *priv, u8 *mac,
 	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
 	struct mt7921_dev *dev = mvif->phy->dev;
 
-	ieee80211_disconnect(vif, true);
+	if (vif->type == NL80211_IFTYPE_STATION)
+		ieee80211_disconnect(vif, true);
 
 	mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, true);
 	mt7921_mcu_set_tx(dev, vif);
-- 
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 kernel warning when reset on vif is not sta
  2021-06-15 21:31 ` sean.wang
@ 2021-06-15 21:35   ` Lorenzo Bianconi
  -1 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2021-06-15 21:35 UTC (permalink / raw)
  To: sean.wang
  Cc: nbd, 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: 3148 bytes --]

> From: Sean Wang <sean.wang@mediatek.com>
> 
> ieee80211_disconnect is only called for the staton mode.
> 
> [  714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787
> ieee80211_disconnect+0x108/0x118 [mac80211]
> [  714.116704] Hardware name: MediaTek Asurada rev1 board (DT)
> [  714.122303] Workqueue: mt76 mt7921_mac_reset_work [mt7921e]
> [  714.127877] pstate: 20c00009 (nzCv daif +PAN +UAO)
> [  714.132761] pc : ieee80211_disconnect+0x108/0x118 [mac80211]
> [  714.138430] lr : mt7921_vif_connect_iter+0x28/0x54 [mt7921e]
> [  714.144083] sp : ffffffc0107cbbd0
> [  714.147394] x29: ffffffc0107cbbd0 x28: ffffffb26c9cb928
> [  714.152706] x27: ffffffb26c9cbd98 x26: 0000000000000000
> [  714.158017] x25: 0000000000000003 x24: ffffffb26c9c9c38
> [  714.163328] x23: ffffffb26c9c9c38 x22: ffffffb26c9c8860
> [  714.168639] x21: ffffffb23b940000 x20: ffffffb26c9c8860
> [  714.173950] x19: 0000000000000001 x18: 000000000000b67e
> [  714.179261] x17: 00000000064dd409 x16: ffffffd739cb28f0
> [  714.184571] x15: 0000000000000000 x14: 0000000000000227
> [  714.189881] x13: 0000000000000400 x12: ffffffd73a4eb060
> [  714.195191] x11: 0000000000000000 x10: 0000000000000000
> [  714.200502] x9 : ffffffd703a0a000 x8 : 0000000000000006
> [  714.205812] x7 : 2828282828282828 x6 : ffffffb200440396
> [  714.211122] x5 : 0000000000000000 x4 : 0000000000000004
> [  714.216432] x3 : 0000000000000000 x2 : ffffffb23b940c90
> [  714.221743] x1 : 0000000000000001 x0 : ffffffb23b940c90
> [  714.227054] Call trace:
> [  714.229594]  ieee80211_disconnect+0x108/0x118 [mac80211]
> [  714.234913]  mt7921_vif_connect_iter+0x28/0x54 [mt7921e]
> [  714.240313]  __iterate_interfaces+0xc4/0xdc [mac80211]
> [  714.245541]  ieee80211_iterate_interfaces+0x4c/0x68 [mac80211]
> [  714.251381]  mt7921_mac_reset_work+0x410/0x468 [mt7921e]
> [  714.256696]  process_one_work+0x208/0x3c8
> [  714.260706]  worker_thread+0x23c/0x3e8
> [  714.264456]  kthread+0x140/0x17c
> [  714.267685]  ret_from_fork+0x10/0x18
> 
> Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support")
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

I am fine with this patch but I guess you are not using an update tree since
mt7921 supports just sta mode so far.

Regards,
Lorenzo

> ---
>  drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
> index fb4de73df701..0a2df295596a 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
> @@ -1269,7 +1269,8 @@ mt7921_vif_connect_iter(void *priv, u8 *mac,
>  	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
>  	struct mt7921_dev *dev = mvif->phy->dev;
>  
> -	ieee80211_disconnect(vif, true);
> +	if (vif->type == NL80211_IFTYPE_STATION)
> +		ieee80211_disconnect(vif, true);
>  
>  	mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, true);
>  	mt7921_mcu_set_tx(dev, vif);
> -- 
> 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 kernel warning when reset on vif is not sta
@ 2021-06-15 21:35   ` Lorenzo Bianconi
  0 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Bianconi @ 2021-06-15 21:35 UTC (permalink / raw)
  To: sean.wang
  Cc: nbd, 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: 3148 bytes --]

> From: Sean Wang <sean.wang@mediatek.com>
> 
> ieee80211_disconnect is only called for the staton mode.
> 
> [  714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787
> ieee80211_disconnect+0x108/0x118 [mac80211]
> [  714.116704] Hardware name: MediaTek Asurada rev1 board (DT)
> [  714.122303] Workqueue: mt76 mt7921_mac_reset_work [mt7921e]
> [  714.127877] pstate: 20c00009 (nzCv daif +PAN +UAO)
> [  714.132761] pc : ieee80211_disconnect+0x108/0x118 [mac80211]
> [  714.138430] lr : mt7921_vif_connect_iter+0x28/0x54 [mt7921e]
> [  714.144083] sp : ffffffc0107cbbd0
> [  714.147394] x29: ffffffc0107cbbd0 x28: ffffffb26c9cb928
> [  714.152706] x27: ffffffb26c9cbd98 x26: 0000000000000000
> [  714.158017] x25: 0000000000000003 x24: ffffffb26c9c9c38
> [  714.163328] x23: ffffffb26c9c9c38 x22: ffffffb26c9c8860
> [  714.168639] x21: ffffffb23b940000 x20: ffffffb26c9c8860
> [  714.173950] x19: 0000000000000001 x18: 000000000000b67e
> [  714.179261] x17: 00000000064dd409 x16: ffffffd739cb28f0
> [  714.184571] x15: 0000000000000000 x14: 0000000000000227
> [  714.189881] x13: 0000000000000400 x12: ffffffd73a4eb060
> [  714.195191] x11: 0000000000000000 x10: 0000000000000000
> [  714.200502] x9 : ffffffd703a0a000 x8 : 0000000000000006
> [  714.205812] x7 : 2828282828282828 x6 : ffffffb200440396
> [  714.211122] x5 : 0000000000000000 x4 : 0000000000000004
> [  714.216432] x3 : 0000000000000000 x2 : ffffffb23b940c90
> [  714.221743] x1 : 0000000000000001 x0 : ffffffb23b940c90
> [  714.227054] Call trace:
> [  714.229594]  ieee80211_disconnect+0x108/0x118 [mac80211]
> [  714.234913]  mt7921_vif_connect_iter+0x28/0x54 [mt7921e]
> [  714.240313]  __iterate_interfaces+0xc4/0xdc [mac80211]
> [  714.245541]  ieee80211_iterate_interfaces+0x4c/0x68 [mac80211]
> [  714.251381]  mt7921_mac_reset_work+0x410/0x468 [mt7921e]
> [  714.256696]  process_one_work+0x208/0x3c8
> [  714.260706]  worker_thread+0x23c/0x3e8
> [  714.264456]  kthread+0x140/0x17c
> [  714.267685]  ret_from_fork+0x10/0x18
> 
> Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support")
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

I am fine with this patch but I guess you are not using an update tree since
mt7921 supports just sta mode so far.

Regards,
Lorenzo

> ---
>  drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
> index fb4de73df701..0a2df295596a 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
> @@ -1269,7 +1269,8 @@ mt7921_vif_connect_iter(void *priv, u8 *mac,
>  	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
>  	struct mt7921_dev *dev = mvif->phy->dev;
>  
> -	ieee80211_disconnect(vif, true);
> +	if (vif->type == NL80211_IFTYPE_STATION)
> +		ieee80211_disconnect(vif, true);
>  
>  	mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, true);
>  	mt7921_mcu_set_tx(dev, vif);
> -- 
> 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 kernel warning when reset on vif is not sta
       [not found] <YMkdKFpia2XqdqrX@lore-desk--annotate>
@ 2021-06-15 22:24   ` sean.wang
  0 siblings, 0 replies; 6+ messages in thread
From: sean.wang @ 2021-06-15 22:24 UTC (permalink / raw)
  To: lorenzo.bianconi
  Cc: nbd, sean.wang, Soul.Huang, YN.Chen, Leon.Yen, Deren.Wu, km.lin,
	robin.chiu, ch.yeh, posh.sun, Eric.Liang, Stella.Chang, jemele,
	yenlinlai, linux-wireless, linux-mediatek

From: Sean Wang <sean.wang@mediatek.com>

>> From: Sean Wang <sean.wang@mediatek.com>
>>
>> ieee80211_disconnect is only called for the staton mode.
>>
>> [  714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787
>> ieee80211_disconnect+0x108/0x118 [mac80211] [  714.116704] Hardware
>> name: MediaTek Asurada rev1 board (DT) [  714.122303] Workqueue: mt76
>> mt7921_mac_reset_work [mt7921e] [  714.127877] pstate: 20c00009 (nzCv
>> daif +PAN +UAO) [  714.132761] pc : ieee80211_disconnect+0x108/0x118
>> [mac80211] [  714.138430] lr : mt7921_vif_connect_iter+0x28/0x54
>> [mt7921e] [  714.144083] sp : ffffffc0107cbbd0 [  714.147394] x29:
>> ffffffc0107cbbd0 x28: ffffffb26c9cb928 [  714.152706] x27:
>> ffffffb26c9cbd98 x26: 0000000000000000 [  714.158017] x25:
>> 0000000000000003 x24: ffffffb26c9c9c38 [  714.163328] x23:
>> ffffffb26c9c9c38 x22: ffffffb26c9c8860 [  714.168639] x21:
>> ffffffb23b940000 x20: ffffffb26c9c8860 [  714.173950] x19:
>> 0000000000000001 x18: 000000000000b67e [  714.179261] x17:
>> 00000000064dd409 x16: ffffffd739cb28f0 [  714.184571] x15:
>> 0000000000000000 x14: 0000000000000227 [  714.189881] x13:
>> 0000000000000400 x12: ffffffd73a4eb060 [  714.195191] x11:
>> 0000000000000000 x10: 0000000000000000 [  714.200502] x9 :
>> ffffffd703a0a000 x8 : 0000000000000006 [  714.205812] x7 :
>> 2828282828282828 x6 : ffffffb200440396 [  714.211122] x5 :
>> 0000000000000000 x4 : 0000000000000004 [  714.216432] x3 :
>> 0000000000000000 x2 : ffffffb23b940c90 [  714.221743] x1 :
>> 0000000000000001 x0 : ffffffb23b940c90 [  714.227054] Call trace:
>> [  714.229594]  ieee80211_disconnect+0x108/0x118 [mac80211] [
>> 714.234913]  mt7921_vif_connect_iter+0x28/0x54 [mt7921e] [
>> 714.240313]  __iterate_interfaces+0xc4/0xdc [mac80211] [  714.245541]
>> ieee80211_iterate_interfaces+0x4c/0x68 [mac80211] [  714.251381]
>> mt7921_mac_reset_work+0x410/0x468 [mt7921e] [  714.256696]
>> process_one_work+0x208/0x3c8 [  714.260706]  worker_thread+0x23c/0x3e8
>> [  714.264456]  kthread+0x140/0x17c [  714.267685]
>> ret_from_fork+0x10/0x18
>>
>> Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support")
>> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>
>I am fine with this patch but I guess you are not using an update tree since
>mt7921 supports just sta mode so far.
>

mt7921 can support monitor mode too.

the kernel warning is reproduced when reset mt7921 running with active monitor mode.

>Regards,
>Lorenzo
>
>> ---
>>  drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
>> b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
>> index fb4de73df701..0a2df295596a 100644
>> --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
>> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
>> @@ -1269,7 +1269,8 @@ mt7921_vif_connect_iter(void *priv, u8 *mac,
>>	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
>>	struct mt7921_dev *dev = mvif->phy->dev;
>>
>> -	ieee80211_disconnect(vif, true);
>> +	if (vif->type == NL80211_IFTYPE_STATION)
>> +		ieee80211_disconnect(vif, true);
>>
>>	mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, true);
>>	mt7921_mcu_set_tx(dev, vif);
>> --
>> 2.25.1
>>
>>
>

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

* Re: [PATCH] mt76: mt7921: fix kernel warning when reset on vif is not sta
@ 2021-06-15 22:24   ` sean.wang
  0 siblings, 0 replies; 6+ messages in thread
From: sean.wang @ 2021-06-15 22:24 UTC (permalink / raw)
  To: lorenzo.bianconi
  Cc: nbd, sean.wang, Soul.Huang, YN.Chen, Leon.Yen, Deren.Wu, km.lin,
	robin.chiu, ch.yeh, posh.sun, Eric.Liang, Stella.Chang, jemele,
	yenlinlai, linux-wireless, linux-mediatek

From: Sean Wang <sean.wang@mediatek.com>

>> From: Sean Wang <sean.wang@mediatek.com>
>>
>> ieee80211_disconnect is only called for the staton mode.
>>
>> [  714.050429] WARNING: CPU: 1 PID: 382 at net/mac80211/mlme.c:2787
>> ieee80211_disconnect+0x108/0x118 [mac80211] [  714.116704] Hardware
>> name: MediaTek Asurada rev1 board (DT) [  714.122303] Workqueue: mt76
>> mt7921_mac_reset_work [mt7921e] [  714.127877] pstate: 20c00009 (nzCv
>> daif +PAN +UAO) [  714.132761] pc : ieee80211_disconnect+0x108/0x118
>> [mac80211] [  714.138430] lr : mt7921_vif_connect_iter+0x28/0x54
>> [mt7921e] [  714.144083] sp : ffffffc0107cbbd0 [  714.147394] x29:
>> ffffffc0107cbbd0 x28: ffffffb26c9cb928 [  714.152706] x27:
>> ffffffb26c9cbd98 x26: 0000000000000000 [  714.158017] x25:
>> 0000000000000003 x24: ffffffb26c9c9c38 [  714.163328] x23:
>> ffffffb26c9c9c38 x22: ffffffb26c9c8860 [  714.168639] x21:
>> ffffffb23b940000 x20: ffffffb26c9c8860 [  714.173950] x19:
>> 0000000000000001 x18: 000000000000b67e [  714.179261] x17:
>> 00000000064dd409 x16: ffffffd739cb28f0 [  714.184571] x15:
>> 0000000000000000 x14: 0000000000000227 [  714.189881] x13:
>> 0000000000000400 x12: ffffffd73a4eb060 [  714.195191] x11:
>> 0000000000000000 x10: 0000000000000000 [  714.200502] x9 :
>> ffffffd703a0a000 x8 : 0000000000000006 [  714.205812] x7 :
>> 2828282828282828 x6 : ffffffb200440396 [  714.211122] x5 :
>> 0000000000000000 x4 : 0000000000000004 [  714.216432] x3 :
>> 0000000000000000 x2 : ffffffb23b940c90 [  714.221743] x1 :
>> 0000000000000001 x0 : ffffffb23b940c90 [  714.227054] Call trace:
>> [  714.229594]  ieee80211_disconnect+0x108/0x118 [mac80211] [
>> 714.234913]  mt7921_vif_connect_iter+0x28/0x54 [mt7921e] [
>> 714.240313]  __iterate_interfaces+0xc4/0xdc [mac80211] [  714.245541]
>> ieee80211_iterate_interfaces+0x4c/0x68 [mac80211] [  714.251381]
>> mt7921_mac_reset_work+0x410/0x468 [mt7921e] [  714.256696]
>> process_one_work+0x208/0x3c8 [  714.260706]  worker_thread+0x23c/0x3e8
>> [  714.264456]  kthread+0x140/0x17c [  714.267685]
>> ret_from_fork+0x10/0x18
>>
>> Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support")
>> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>
>I am fine with this patch but I guess you are not using an update tree since
>mt7921 supports just sta mode so far.
>

mt7921 can support monitor mode too.

the kernel warning is reproduced when reset mt7921 running with active monitor mode.

>Regards,
>Lorenzo
>
>> ---
>>  drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
>> b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
>> index fb4de73df701..0a2df295596a 100644
>> --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
>> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
>> @@ -1269,7 +1269,8 @@ mt7921_vif_connect_iter(void *priv, u8 *mac,
>>	struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
>>	struct mt7921_dev *dev = mvif->phy->dev;
>>
>> -	ieee80211_disconnect(vif, true);
>> +	if (vif->type == NL80211_IFTYPE_STATION)
>> +		ieee80211_disconnect(vif, true);
>>
>>	mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, true);
>>	mt7921_mcu_set_tx(dev, vif);
>> --
>> 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

end of thread, other threads:[~2021-06-15 23:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 21:31 [PATCH] mt76: mt7921: fix kernel warning when reset on vif is not sta sean.wang
2021-06-15 21:31 ` sean.wang
2021-06-15 21:35 ` Lorenzo Bianconi
2021-06-15 21:35   ` Lorenzo Bianconi
     [not found] <YMkdKFpia2XqdqrX@lore-desk--annotate>
2021-06-15 22:24 ` sean.wang
2021-06-15 22:24   ` sean.wang

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.