Skip to content

Commit eb8352e

Browse files
leon-yennbd168
authored andcommitted
wifi: mt76: mt792x: Limit the concurrent STA and SoftAP to operate on the same channel
Due to the lack of NoA(Notice of Absence) mechanism in SoftAP mode, it is inappropriate to allow concurrent SoftAP and STA to operate on the different channels. This patch restricts the concurrent SoftAP and STA to be setup on the same channel only. Signed-off-by: Leon Yen <[email protected]> Signed-off-by: Ming Yen Hsieh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
1 parent 03ee8f7 commit eb8352e

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

drivers/net/wireless/mediatek/mt76/mt792x_core.c

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,31 @@ static const struct ieee80211_iface_combination if_comb[] = {
2828
},
2929
};
3030

31-
static const struct ieee80211_iface_limit if_limits_chanctx[] = {
31+
static const struct ieee80211_iface_limit if_limits_chanctx_mcc[] = {
3232
{
3333
.max = 2,
3434
.types = BIT(NL80211_IFTYPE_STATION) |
3535
BIT(NL80211_IFTYPE_P2P_CLIENT)
3636
},
3737
{
3838
.max = 1,
39-
.types = BIT(NL80211_IFTYPE_AP) |
40-
BIT(NL80211_IFTYPE_P2P_GO)
39+
.types = BIT(NL80211_IFTYPE_P2P_GO)
40+
},
41+
{
42+
.max = 1,
43+
.types = BIT(NL80211_IFTYPE_P2P_DEVICE)
44+
}
45+
};
46+
47+
static const struct ieee80211_iface_limit if_limits_chanctx_scc[] = {
48+
{
49+
.max = 2,
50+
.types = BIT(NL80211_IFTYPE_STATION) |
51+
BIT(NL80211_IFTYPE_P2P_CLIENT)
52+
},
53+
{
54+
.max = 1,
55+
.types = BIT(NL80211_IFTYPE_AP)
4156
},
4257
{
4358
.max = 1,
@@ -47,11 +62,18 @@ static const struct ieee80211_iface_limit if_limits_chanctx[] = {
4762

4863
static const struct ieee80211_iface_combination if_comb_chanctx[] = {
4964
{
50-
.limits = if_limits_chanctx,
51-
.n_limits = ARRAY_SIZE(if_limits_chanctx),
65+
.limits = if_limits_chanctx_mcc,
66+
.n_limits = ARRAY_SIZE(if_limits_chanctx_mcc),
5267
.max_interfaces = 3,
5368
.num_different_channels = 2,
5469
.beacon_int_infra_match = false,
70+
},
71+
{
72+
.limits = if_limits_chanctx_scc,
73+
.n_limits = ARRAY_SIZE(if_limits_chanctx_scc),
74+
.max_interfaces = 3,
75+
.num_different_channels = 1,
76+
.beacon_int_infra_match = false,
5577
}
5678
};
5779

0 commit comments

Comments
 (0)