From: greearb@candelatech.com
To: linux-wireless@vger.kernel.org
Cc: Ben Greear <greearb@candelatech.com>
Subject: [PATCH v2 1/2] wireless: mac80211: Relax flags check in bw-change logic.
Date: Wed, 8 Mar 2023 15:41:57 -0800 [thread overview]
Message-ID: <20230308234158.2732682-1-greearb@candelatech.com> (raw)
From: Ben Greear <greearb@candelatech.com>
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
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
net/mac80211/mlme.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 85741e8b2787..0efca23be69b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -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;
--
2.39.1
next reply other threads:[~2023-03-08 23:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 23:41 greearb [this message]
2023-03-08 23:41 ` [PATCH v2 2/2] wireless: mac80211: fix ath10k wave-2 in 80mhz mode in config_bw logic greearb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230308234158.2732682-1-greearb@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).