mt76: mt7615: mt7622: fix ibss and meshpoint
RFC v2 1/1 mt76: mt7615: mt7622: fix ibss and meshpoint
commit 7f4b7920318b ("mt76: mt7615: add ibss support") introduced IBSS and commit f4ec7fdf7f83 ("mt76: mt7615: enable support for mesh") meshpoint support.
Both used in the "get_omac_idx"-function:
if (~mask & BIT(HW_BSSID_0)) return HW_BSSID_0;
With commit d8d59f66d136 ("mt76: mt7615: support 16 interfaces") the ibss and meshpoint mode should "prefer hw bssid slot 1-3". However, with that change the ibss or meshpoint mode will not send any beacon on the mt7622 wifi anymore. Devices were still able to exchange data but only if a bssid already existed. Two mt7622 devices will never be able to communicate.
This commits reverts the preferation of slot 1-3 for ibss and meshpoint. Only NL80211_IFTYPE_STATION will still prefer slot 1-3.
Tested on Banana Pi R64.
--- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/main.c +2 -2
@@ -135,8 +135,6 @@ static int get_omac_idx(enum nl80211_iftype type, u64 mask)int i;switch (type) { -case NL80211_IFTYPE_MESH_POINT : -case NL80211_IFTYPE_ADHOC :case NL80211_IFTYPE_STATION :/* prefer hw bssid slot 1-3 */ i =get_free_idx (mask,HW_BSSID_1 ,HW_BSSID_3 );
@@ -160,6 +158,8 @@ static int get_omac_idx(enum nl80211_iftype type, u64 mask)return HW_BSSID_0 ;break ; +case NL80211_IFTYPE_ADHOC : +case NL80211_IFTYPE_MESH_POINT :case NL80211_IFTYPE_MONITOR :case NL80211_IFTYPE_AP :/* ap uses hw bssid 0 and ext bssid */
Signature · 1 line
2.33.0
Quoted 1 line · Nick Hainke
Fixes d8d59f66d136 ("mt76: mt7615: support 16 interfaces").
The fixes tag should be in the end, before Signed-off-by tags. But I can fix that during commit.
Quoted 16 lines
commit
7f4b7920318b("mt76: mt7615: add ibss support") introduced IBSS and commitf4ec7fdf7f83("mt76: mt7615: enable support for mesh") meshpoint support.Both used in the "get_omac_idx"-function:
if (~mask & BIT(HW_BSSID_0)) return HW_BSSID_0;With commit
d8d59f66d136("mt76: mt7615: support 16 interfaces") the ibss and meshpoint mode should "prefer hw bssid slot 1-3". However, with that change the ibss or meshpoint mode will not send any beacon on the mt7622 wifi anymore. Devices were still able to exchange data but only if a bssid already existed. Two mt7622 devices will never be able to communicate.
Quoted 6 lines
This commits reverts the preferation of slot 1-3 for ibss and meshpoint. Only
NL80211_IFTYPE_STATIONwill still prefer slot 1-3.Tested on Banana Pi R64.
Signed-off-by Nick Hainke <[email protected]>
Felix, can I take this to wireless-drivers? Ack?
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 5 lines · Kalle Valo
Quoted 1 line · Nick Hainke
Fixes d8d59f66d136 ("mt76: mt7615: support 16 interfaces").The fixes tag should be in the end, before Signed-off-by tags. But I can fix that during commit.
Thanks for feedback. Already changed that locally but I did not want to spam you with another RFC v3. :)
I was able to organize me a BPI-MT7615 PCIE Express Card. With and without this patch beacons were sent on the mt7615 pcie, so the patch did not make any difference. However, the mt7622 wifi will only work with my patch.
OpenWrt buildroot says that the chips are almost the same?
|
Quoted 1 line
|This adds support for the built-in WMAC on MT7622 SoC devices which has the same feature set as a MT7615, but limited to 2.4 GHz only.||
I also did a version where I check for "is_mt7622(dev)", so it will only affect the internal banana pi r64 wifi. I'm happy to insert your feedback into my patch.
Bests
Nick
Quoted 4 lines · Nick
Quoted 2 lines · Kalle Valo
Nick Hainke <[email protected]> writes:
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Fixes d8d59f66d136 ("mt76: mt7615: support 16 interfaces").The fixes tag should be in the end, before Signed-off-by tags. But I can fix that during commit.
Thanks for feedback. Already changed that locally but I did not want to spam you with another RFC v3. :)
I was able to organize me a BPI-MT7615 PCIE Express Card. With and without this patch beacons were sent on the mt7615 pcie, so the patch did not make any difference. However, the mt7622 wifi will only work with my patch.
Does Mesh+AP or Ad-Hoc+AP also work on MT7622 and does it still work on MT7615E card with your patch applied?
My tests on todays OpenWrt Trunk with my and without my patch showed:
- MT7622: AP + AdHoc (only AP is working, in every case)
- BPI-MT7615: AP + AdHoc (with and without my patch still works).
I thought something would change if I apply my patch with the HW-Addresses. However everything stays the same:
With my patch:
AdHoc: Shenzhen_4e:4b:dd (38:83:9a:4e:4b:dd)
AP: address: 3a:83:9a:4e:4b:dd (3a:83:9a:4e:4b:dd)
Without my patch:
AdHoc: Shenzhen_4e:4b:dd (38:83:9a:4e:4b:dd)
AP: 3a:83:9a:4e:4b:dd (3a:83:9a:4e:4b:dd)
Bests
Nick
Quoted 15 lines · Daniel Golle
Quoted 4 lines · Nick
Quoted 2 lines · Kalle Valo
Nick Hainke <[email protected]> writes:
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Fixes d8d59f66d136 ("mt76: mt7615: support 16 interfaces").The fixes tag should be in the end, before Signed-off-by tags. But I can fix that during commit.
Thanks for feedback. Already changed that locally but I did not want to spam you with another RFC v3. :)
I was able to organize me a BPI-MT7615 PCIE Express Card. With and without this patch beacons were sent on the mt7615 pcie, so the patch did not make any difference. However, the mt7622 wifi will only work with my patch.Does Mesh+AP or Ad-Hoc+AP also work on MT7622 and does it still work on MT7615E card with your patch applied?
Quoted 5 lines
Gesendet: Samstag, 09. Oktober 2021 um 15:22 Uhr
Von: "Daniel Golle" <[email protected]>Does Mesh+AP or Ad-Hoc+AP also work on MT7622 and does it still work on MT7615E card with your patch applied?
tested bananapi-r2 with mt7615 and bananapi-r64 with internal mt7622-wmac
ibss/ad-hoc: working
AP-Mode: still working
regards Frank
Quoted 10 lines · Frank Wunderlich
Quoted 5 lines
Gesendet: Samstag, 09. Oktober 2021 um 15:22 Uhr
Von: "Daniel Golle" <[email protected]>Does Mesh+AP or Ad-Hoc+AP also work on MT7622 and does it still work on MT7615E card with your patch applied?
tested bananapi-r2 with mt7615 and bananapi-r64 with internal mt7622-wmac
ibss/ad-hoc: working
AP-Mode: still working
Independently of each other or simultanously?
What I meant was to ask if **simultanous** Mesh+AP or Ad-Hoc+AP still works on MT7615E (you can only test that with OpenWrt-patched hostapd or by using wpa_supplicant to setup the AP as well as mesh/ad-hoc interface by settings in wpa_supplicant.conf)
Quoted 1 line · Daniel Golle
Independently of each other or simultanously?
My tests were done simultanously. The "plus" means to the same time with my post. However, simultanously AP and AdHoc was never be possible with the patch, nor without the patch.
Bests
Nick
Sorry, I should have added, that the simultanously mode was not working on the mt7622 with and without patch. With mt7615e it was working.
Bests
Nick
Quoted 9 lines · Nick
Quoted 1 line · Daniel Golle
Independently of each other or simultanously?
My tests were done simultanously. The "plus" means to the same time with my post. However, simultanously AP and AdHoc was never be possible with the patch, nor without the patch.
Bests
Nick
_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Quoted 23 lines · Kalle Valo
Quoted 1 line · Nick Hainke
Fixes d8d59f66d136 ("mt76: mt7615: support 16 interfaces").The fixes tag should be in the end, before Signed-off-by tags. But I can fix that during commit.
Quoted 16 lines
commit
7f4b7920318b("mt76: mt7615: add ibss support") introduced IBSS and commitf4ec7fdf7f83("mt76: mt7615: enable support for mesh") meshpoint support.Both used in the "get_omac_idx"-function:
if (~mask & BIT(HW_BSSID_0)) return HW_BSSID_0;With commit
d8d59f66d136("mt76: mt7615: support 16 interfaces") the ibss and meshpoint mode should "prefer hw bssid slot 1-3". However, with that change the ibss or meshpoint mode will not send any beacon on the mt7622 wifi anymore. Devices were still able to exchange data but only if a bssid already existed. Two mt7622 devices will never be able to communicate.
Quoted 8 lines
Quoted 6 lines
This commits reverts the preferation of slot 1-3 for ibss and meshpoint. Only
NL80211_IFTYPE_STATIONwill still prefer slot 1-3.Tested on Banana Pi R64.
Signed-off-by Nick Hainke <[email protected]>Felix, can I take this to wireless-drivers? Ack?
Quoted 27 lines · Felix Fietkau
Quoted 26 lines · Kalle Valo
Quoted 1 line · Nick Hainke
Fixes d8d59f66d136 ("mt76: mt7615: support 16 interfaces").The fixes tag should be in the end, before Signed-off-by tags. But I can fix that during commit.
Quoted 19 lines
commit
7f4b7920318b("mt76: mt7615: add ibss support") introduced IBSS and commitf4ec7fdf7f83("mt76: mt7615: enable support for mesh") meshpoint support.Both used in the "get_omac_idx"-function:
if (~mask & BIT(HW_BSSID_0)) return HW_BSSID_0;With commit
d8d59f66d136("mt76: mt7615: support 16 interfaces") the ibss and meshpoint mode should "prefer hw bssid slot 1-3". However, with that change the ibss or meshpoint mode will not send any beacon on the mt7622 wifi anymore. Devices were still able to exchange data but only if a bssid already existed. Two mt7622 devices will never be able to communicate.This commits reverts the preferation of slot 1-3 for ibss and meshpoint. Only
NL80211_IFTYPE_STATIONwill still prefer slot 1-3.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Tested on Banana Pi R64.
Signed-off-by Nick Hainke <[email protected]>Felix, can I take this to wireless-drivers? Ack?
Acked-by Felix Fietkau <[email protected]>
Thanks. We are in -rc6 now and I'm not planning to send any more fixes to v5.15 (unless very critical), so I'll take this to wireless-drivers-next instead.
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 16 lines · Nick Hainke
commit
7f4b7920318b("mt76: mt7615: add ibss support") introduced IBSS and commitf4ec7fdf7f83("mt76: mt7615: enable support for mesh") meshpoint support.Both used in the "get_omac_idx"-function:
if (~mask & BIT(HW_BSSID_0)) return HW_BSSID_0;With commit
d8d59f66d136("mt76: mt7615: support 16 interfaces") the ibss and meshpoint mode should "prefer hw bssid slot 1-3". However, with that change the ibss or meshpoint mode will not send any beacon on the mt7622 wifi anymore. Devices were still able to exchange data but only if a bssid already existed. Two mt7622 devices will never be able to communicate.
Quoted 8 lines
This commits reverts the preferation of slot 1-3 for ibss and meshpoint. Only
NL80211_IFTYPE_STATIONwill still prefer slot 1-3.Tested on Banana Pi R64.
Fixes d8d59f66d136 ("mt76: mt7615: support 16 interfaces")Signed-off-by Nick Hainke <[email protected]>Acked-by Felix Fietkau <[email protected]>
Patch applied to wireless-drivers-next.git, thanks.
753453afacc0 mt76: mt7615: mt7622: fix ibss and meshpoint
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches