netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
@ 2021-10-07 22:57 Nick Hainke
  2021-10-09  8:32 ` Kalle Valo
  2021-10-23  7:30 ` [RFC,v2] " Kalle Valo
  0 siblings, 2 replies; 12+ messages in thread
From: Nick Hainke @ 2021-10-07 22:57 UTC (permalink / raw)
  To: nbd, lorenzo.bianconi83, ryder.lee, kvalo, davem, kuba,
	matthias.bgg, sean.wang, shayne.chen, linux-wireless, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Robert Foss, Nick Hainke

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(-)

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 */
-- 
2.33.0


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

* Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-07 22:57 [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint Nick Hainke
@ 2021-10-09  8:32 ` Kalle Valo
  2021-10-09 10:37   ` Nick
  2021-10-18 10:16   ` Felix Fietkau
  2021-10-23  7:30 ` [RFC,v2] " Kalle Valo
  1 sibling, 2 replies; 12+ messages in thread
From: Kalle Valo @ 2021-10-09  8:32 UTC (permalink / raw)
  To: Nick Hainke
  Cc: nbd, lorenzo.bianconi83, ryder.lee, davem, kuba, matthias.bgg,
	sean.wang, shayne.chen, linux-wireless, netdev, linux-arm-kernel,
	linux-mediatek, linux-kernel, Robert Foss

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?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-09  8:32 ` Kalle Valo
@ 2021-10-09 10:37   ` Nick
  2021-10-09 13:22     ` Daniel Golle
  2021-10-18 10:16   ` Felix Fietkau
  1 sibling, 1 reply; 12+ messages in thread
From: Nick @ 2021-10-09 10:37 UTC (permalink / raw)
  To: Kalle Valo
  Cc: nbd, lorenzo.bianconi83, ryder.lee, davem, kuba, matthias.bgg,
	sean.wang, shayne.chen, linux-wireless, netdev, linux-arm-kernel,
	linux-mediatek, linux-kernel, Robert Foss

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


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

* Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-09 10:37   ` Nick
@ 2021-10-09 13:22     ` Daniel Golle
  2021-10-11  9:12       ` Nick
  2021-10-17 12:28       ` Aw: " Frank Wunderlich
  0 siblings, 2 replies; 12+ messages in thread
From: Daniel Golle @ 2021-10-09 13:22 UTC (permalink / raw)
  To: Nick
  Cc: Kalle Valo, nbd, lorenzo.bianconi83, ryder.lee, davem, kuba,
	matthias.bgg, sean.wang, shayne.chen, linux-wireless, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel, Robert Foss

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?

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

* Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-09 13:22     ` Daniel Golle
@ 2021-10-11  9:12       ` Nick
  2021-10-17 12:28       ` Aw: " Frank Wunderlich
  1 sibling, 0 replies; 12+ messages in thread
From: Nick @ 2021-10-11  9:12 UTC (permalink / raw)
  To: Daniel Golle
  Cc: Kalle Valo, nbd, lorenzo.bianconi83, ryder.lee, davem, kuba,
	matthias.bgg, sean.wang, shayne.chen, linux-wireless, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel, Robert Foss

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?

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

* Aw: Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-09 13:22     ` Daniel Golle
  2021-10-11  9:12       ` Nick
@ 2021-10-17 12:28       ` Frank Wunderlich
  2021-10-17 13:52         ` Daniel Golle
  1 sibling, 1 reply; 12+ messages in thread
From: Frank Wunderlich @ 2021-10-17 12:28 UTC (permalink / raw)
  To: Daniel Golle
  Cc: Nick, Kalle Valo, nbd, lorenzo.bianconi83, ryder.lee, davem,
	kuba, matthias.bgg, sean.wang, shayne.chen, linux-wireless,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel,
	Robert Foss

> 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

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

* Re: Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-17 12:28       ` Aw: " Frank Wunderlich
@ 2021-10-17 13:52         ` Daniel Golle
  2021-10-18 10:11           ` Nick
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Golle @ 2021-10-17 13:52 UTC (permalink / raw)
  To: Frank Wunderlich
  Cc: Nick, Kalle Valo, nbd, lorenzo.bianconi83, ryder.lee, davem,
	kuba, matthias.bgg, sean.wang, shayne.chen, linux-wireless,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel,
	Robert Foss

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)

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

* Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-17 13:52         ` Daniel Golle
@ 2021-10-18 10:11           ` Nick
  2021-10-18 10:13             ` Nick
  0 siblings, 1 reply; 12+ messages in thread
From: Nick @ 2021-10-18 10:11 UTC (permalink / raw)
  To: Daniel Golle, Frank Wunderlich
  Cc: Kalle Valo, nbd, lorenzo.bianconi83, ryder.lee, davem, kuba,
	matthias.bgg, sean.wang, shayne.chen, linux-wireless, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel, Robert Foss

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


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

* Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-18 10:11           ` Nick
@ 2021-10-18 10:13             ` Nick
  0 siblings, 0 replies; 12+ messages in thread
From: Nick @ 2021-10-18 10:13 UTC (permalink / raw)
  To: Daniel Golle, Frank Wunderlich
  Cc: Kalle Valo, nbd, lorenzo.bianconi83, ryder.lee, davem, kuba,
	matthias.bgg, sean.wang, shayne.chen, linux-wireless, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel, Robert Foss

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
>

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

* Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-09  8:32 ` Kalle Valo
  2021-10-09 10:37   ` Nick
@ 2021-10-18 10:16   ` Felix Fietkau
  2021-10-19  7:19     ` Kalle Valo
  1 sibling, 1 reply; 12+ messages in thread
From: Felix Fietkau @ 2021-10-18 10:16 UTC (permalink / raw)
  To: Kalle Valo, Nick Hainke
  Cc: lorenzo.bianconi83, ryder.lee, davem, kuba, matthias.bgg,
	sean.wang, shayne.chen, linux-wireless, netdev, linux-arm-kernel,
	linux-mediatek, linux-kernel, Robert Foss

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>

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

* Re: [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-18 10:16   ` Felix Fietkau
@ 2021-10-19  7:19     ` Kalle Valo
  0 siblings, 0 replies; 12+ messages in thread
From: Kalle Valo @ 2021-10-19  7:19 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Nick Hainke, lorenzo.bianconi83, ryder.lee, davem, kuba,
	matthias.bgg, sean.wang, shayne.chen, linux-wireless, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel, Robert Foss

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.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [RFC,v2] mt76: mt7615: mt7622: fix ibss and meshpoint
  2021-10-07 22:57 [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint Nick Hainke
  2021-10-09  8:32 ` Kalle Valo
@ 2021-10-23  7:30 ` Kalle Valo
  1 sibling, 0 replies; 12+ messages in thread
From: Kalle Valo @ 2021-10-23  7:30 UTC (permalink / raw)
  To: Nick Hainke
  Cc: nbd, lorenzo.bianconi83, ryder.lee, davem, kuba, matthias.bgg,
	sean.wang, shayne.chen, linux-wireless, netdev, linux-arm-kernel,
	linux-mediatek, linux-kernel, Robert Foss, Nick Hainke

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

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211007225725.2615-1-vincent@systemli.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 22:57 [RFC v2] mt76: mt7615: mt7622: fix ibss and meshpoint Nick Hainke
2021-10-09  8:32 ` Kalle Valo
2021-10-09 10:37   ` Nick
2021-10-09 13:22     ` Daniel Golle
2021-10-11  9:12       ` Nick
2021-10-17 12:28       ` Aw: " Frank Wunderlich
2021-10-17 13:52         ` Daniel Golle
2021-10-18 10:11           ` Nick
2021-10-18 10:13             ` Nick
2021-10-18 10:16   ` Felix Fietkau
2021-10-19  7:19     ` Kalle Valo
2021-10-23  7:30 ` [RFC,v2] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).