From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: [RFC PATCH v2 01/13] wifi: mac80211: simplify ieee80211_config_bw() prototype
Date: Thu, 23 Nov 2023 23:14:38 +0100 [thread overview]
Message-ID: <20231123231436.d16617c03e0f.I8bd5ee848074029a9f0495c95e4339546ad8fe15@changeid> (raw)
In-Reply-To: <20231123221436.143254-14-johannes@sipsolutions.net>
From: Johannes Berg <johannes.berg@intel.com>
The only user of this function passes a lot of pointers
directly from the parsed elements, so it's simpler to
just pass the entire elements parsing struct. This also
shows that the ht_cap is actually unused.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/mlme.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 887b496f2b81..778eef2f06f1 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -481,15 +481,15 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata,
}
static int ieee80211_config_bw(struct ieee80211_link_data *link,
- const struct ieee80211_ht_cap *ht_cap,
- const struct ieee80211_vht_cap *vht_cap,
- const struct ieee80211_ht_operation *ht_oper,
- const struct ieee80211_vht_operation *vht_oper,
- const struct ieee80211_he_operation *he_oper,
- const struct ieee80211_eht_operation *eht_oper,
- const struct ieee80211_s1g_oper_ie *s1g_oper,
+ struct ieee802_11_elems *elems,
const u8 *bssid, u64 *changed)
{
+ const struct ieee80211_vht_cap *vht_cap = elems->vht_cap_elem;
+ const struct ieee80211_ht_operation *ht_oper = elems->ht_operation;
+ const struct ieee80211_vht_operation *vht_oper = elems->vht_operation;
+ const struct ieee80211_he_operation *he_oper = elems->he_operation;
+ const struct ieee80211_eht_operation *eht_oper = elems->eht_operation;
+ const struct ieee80211_s1g_oper_ie *s1g_oper = elems->s1g_oper;
struct ieee80211_sub_if_data *sdata = link->sdata;
struct ieee80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -6340,11 +6340,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link,
changed |= ieee80211_recalc_twt_req(sdata, sband, link, link_sta, elems);
- if (ieee80211_config_bw(link, elems->ht_cap_elem,
- elems->vht_cap_elem, elems->ht_operation,
- elems->vht_operation, elems->he_operation,
- elems->eht_operation,
- elems->s1g_oper, bssid, &changed)) {
+ if (ieee80211_config_bw(link, elems, bssid, &changed)) {
sdata_info(sdata,
"failed to follow AP %pM bandwidth change, disconnect\n",
bssid);
--
2.42.0
next prev parent reply other threads:[~2023-11-23 22:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 22:14 [RFC PATCH v2 00/13] refactor and wider-BW OFDMA support Johannes Berg
2023-11-23 22:14 ` Johannes Berg [this message]
2023-11-23 22:14 ` [RFC PATCH v2 02/13] wifi: mac80211: take EML capa/delay from assoc response Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 03/13] wifi: mac80211: remove extra element parsing Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 04/13] wifi: mac80211: simplify HE capability access Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 05/13] wifi: mac80211_hwsim: support HE 40 MHz Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 06/13] wifi: mac80211: disallow drivers with HT wider than HE Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 07/13] wifi: mac80211: clean up connection process Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 08/13] wifi: mac80211: workaround for tests that drop capabilities during CSA Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 09/13] wifi: mac80211: simplify non-chanctx drivers Johannes Berg
2023-11-23 22:32 ` Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 10/13] wifi: mac80211: chan: chandef is non-NULL for reserved Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 11/13] wifi: mac80211: introduce 'channel request' Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 12/13] wifi: mac80211: add and use a link iteration macro Johannes Berg
2023-11-23 22:14 ` [RFC PATCH v2 13/13] wifi: mac80211: support wider bandwidth OFDMA config Johannes Berg
2023-11-23 22:38 ` Johannes Berg
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=20231123231436.d16617c03e0f.I8bd5ee848074029a9f0495c95e4339546ad8fe15@changeid \
--to=johannes@sipsolutions.net \
--cc=johannes.berg@intel.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).