Commit 753453af authored by Nick Hainke's avatar Nick Hainke Committed by Kalle Valo

mt76: mt7615: mt7622: fix ibss and meshpoint

commit 7f4b7920 ("mt76: mt7615: add ibss support") introduced IBSS
and commit f4ec7fdf ("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 d8d59f66 ("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: d8d59f66 ("mt76: mt7615: support 16 interfaces")
Signed-off-by: default avatarNick Hainke <vincent@systemli.org>
Acked-by: default avatarFelix Fietkau <nbd@nbd.name>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211007225725.2615-1-vincent@systemli.org
parent a88cae72
...@@ -135,8 +135,6 @@ static int get_omac_idx(enum nl80211_iftype type, u64 mask) ...@@ -135,8 +135,6 @@ static int get_omac_idx(enum nl80211_iftype type, u64 mask)
int i; int i;
switch (type) { switch (type) {
case NL80211_IFTYPE_MESH_POINT:
case NL80211_IFTYPE_ADHOC:
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
/* prefer hw bssid slot 1-3 */ /* prefer hw bssid slot 1-3 */
i = get_free_idx(mask, HW_BSSID_1, HW_BSSID_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) ...@@ -160,6 +158,8 @@ static int get_omac_idx(enum nl80211_iftype type, u64 mask)
return HW_BSSID_0; return HW_BSSID_0;
break; break;
case NL80211_IFTYPE_ADHOC:
case NL80211_IFTYPE_MESH_POINT:
case NL80211_IFTYPE_MONITOR: case NL80211_IFTYPE_MONITOR:
case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP:
/* ap uses hw bssid 0 and ext bssid */ /* ap uses hw bssid 0 and ext bssid */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment