wireless: mac80211: Relax flags check in bw-change logic.
PATCH v2 1/2 wireless: mac80211: Relax flags check in bw-change logic.
From: Ben Greear <[email protected]>
A failure was seen where AP requested change to 40Mhz, and it failed because 160Mhz and 80P80 were disabled in ifmgd->flags.
Add check for this case so that it will not fail.
Debugging logs from the failure:
sta0001: AP 90:3c:b3:6c:41:11 changed bandwidth, new config is 5180.000 MHz, width 2 (5190.000/0 MHz) ifmgd-flags: 0x3b044 eht-oper: 0000000000000000
sta0001: AP 90:3c:b3:6c:41:11 changed caps/bw in a way we can't support (0x30000/0x3b044) - disconnect
sta0001: chandef-valid: 1 bw: 2 ifmgd->flags mask: 0x33000
--- net/mac80211/mlme.c | 8 ++++++++ 1 file changed, 8 insertions(+)
net/mac80211/mlme.c +8 -0
@@ -497,6 +497,14 @@ static int ieee80211_config_bw(struct ieee80211_link_data *link, chandef.width > NL80211_CHAN_WIDTH_20) flags |=ieee80211_chandef_downgrade (&chandef); +/* Relax check for implicit disabled. */ +if (link->u.mgd.conn_flags &IEEE80211_CONN_DISABLE_160MHZ && + chandef.width !=NL80211_CHAN_WIDTH_160 ) + flags |=IEEE80211_CONN_DISABLE_160MHZ ; +if (link->u.mgd.conn_flags &IEEE80211_CONN_DISABLE_80P80MHZ && + chandef.width !=NL80211_CHAN_WIDTH_80P80 ) + flags |=IEEE80211_CONN_DISABLE_80P80MHZ ; +if (cfg80211_chandef_identical (&chandef, &link->conf->chandef))return 0 ;
Signature · 1 line
2.39.1
PATCH v2 2/2 wireless: mac80211: fix ath10k wave-2 in 80mhz mode in config_bw logic.
From: Ben Greear <[email protected]>
It was complaining about the 'DISABLE_HE' flag mismatch, so ensure that if ifmgd has DISABLE_HE set, then 'flags' also will have that flag set.
--- net/mac80211/mlme.c | 4 ++++ 1 file changed, 4 insertions(+)
net/mac80211/mlme.c +4 -0
@@ -505,6 +505,10 @@ static int ieee80211_config_bw(struct ieee80211_link_data *link, chandef.width != NL80211_CHAN_WIDTH_80P80) flags |=IEEE80211_CONN_DISABLE_80P80MHZ ; +/* if ifmgd has HE disabled, then we cannot re-enable that here. */ +if (link->u.mgd.conn_flags &IEEE80211_CONN_DISABLE_HE ) + flags |=IEEE80211_CONN_DISABLE_HE ; +if (cfg80211_chandef_identical (&chandef, &link->conf->chandef))return 0 ;
Signature · 1 line
2.39.1