Message ID | 20211007225725.2615-1-vincent@systemli.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RFC,v2] mt76: mt7615: mt7622: fix ibss and meshpoint | expand |
Nick Hainke <vincent@systemli.org> writes: > 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. > 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. > > Signed-off-by: Nick Hainke <vincent@systemli.org> Felix, can I take this to wireless-drivers? Ack?
On 10/9/21 10:32, Kalle Valo wrote: > Nick Hainke <vincent@systemli.org> writes: > >> 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? | > |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
On Sat, Oct 09, 2021 at 12:37:53PM +0200, Nick wrote: > On 10/9/21 10:32, Kalle Valo wrote: > > > Nick Hainke <vincent@systemli.org> writes: > > > > > 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 On 10/9/21 15:22, Daniel Golle wrote: > On Sat, Oct 09, 2021 at 12:37:53PM +0200, Nick wrote: >> On 10/9/21 10:32, Kalle Valo wrote: >> >>> Nick Hainke <vincent@systemli.org> writes: >>> >>>> 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?
> Gesendet: Samstag, 09. Oktober 2021 um 15:22 Uhr > Von: "Daniel Golle" <daniel@makrotopia.org> > 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
On Sun, Oct 17, 2021 at 02:28:16PM +0200, Frank Wunderlich wrote: > > Gesendet: Samstag, 09. Oktober 2021 um 15:22 Uhr > > Von: "Daniel Golle" <daniel@makrotopia.org> > > > 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)
On 10/17/21 15:52, Daniel Golle wrote:
> 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 On 10/18/21 12:11, Nick wrote: > On 10/17/21 15:52, Daniel Golle wrote: > >> 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 >
On 2021-10-09 10:32, Kalle Valo wrote: > Nick Hainke <vincent@systemli.org> writes: > >> 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. > >> 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. >> >> Signed-off-by: Nick Hainke <vincent@systemli.org> > > Felix, can I take this to wireless-drivers? Ack? Acked-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau <nbd@nbd.name> writes: > On 2021-10-09 10:32, Kalle Valo wrote: >> Nick Hainke <vincent@systemli.org> writes: >> >>> 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. >> >>> 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. >>> >>> Signed-off-by: Nick Hainke <vincent@systemli.org> >> >> Felix, can I take this to wireless-drivers? Ack? > > Acked-by: Felix Fietkau <nbd@nbd.name> 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.
Nick Hainke <vincent@systemli.org> wrote: > 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. > > Fixes: d8d59f66d136 ("mt76: mt7615: support 16 interfaces") > Signed-off-by: Nick Hainke <vincent@systemli.org> > Acked-by: Felix Fietkau <nbd@nbd.name> Patch applied to wireless-drivers-next.git, thanks. 753453afacc0 mt76: mt7615: mt7622: fix ibss and meshpoint
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c index dada43d6d879..51260a669d16 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c @@ -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 */
Fixes: d8d59f66d136 ("mt76: mt7615: support 16 interfaces"). 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. Signed-off-by: Nick Hainke <vincent@systemli.org> --- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)