]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mac80211: remove width argument from ieee80211_parse_bitrates
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 8 Jan 2026 13:32:57 +0000 (14:32 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 12 Jan 2026 18:48:41 +0000 (19:48 +0100)
The width parameter in ieee80211_parse_bitrates() is unused. Remove it.
While at it, use the already fetched sband pointer as an argument
instead of dereferencing it once again.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260108143257.d13dbbda93f0.Ie70b24af583e3812883b4004ce227e7af1646855@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c
net/mac80211/parse.c

index 6da32bd4c6c60c98047b9c4d2b285f9a8f93f4ad..fe6be11a7f440ca931b3b4aaa3ca136a08f04242 100644 (file)
@@ -2125,8 +2125,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local,
 
        if (params->supported_rates &&
            params->supported_rates_len &&
-           !ieee80211_parse_bitrates(link->conf->chanreq.oper.width,
-                                     sband, params->supported_rates,
+           !ieee80211_parse_bitrates(sband, params->supported_rates,
                                      params->supported_rates_len,
                                      &link_sta->pub->supp_rates[sband->band]))
                return -EINVAL;
@@ -2987,8 +2986,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
                return -EINVAL;
 
        if (params->basic_rates) {
-               if (!ieee80211_parse_bitrates(link->conf->chanreq.oper.width,
-                                             wiphy->bands[sband->band],
+               if (!ieee80211_parse_bitrates(sband,
                                              params->basic_rates,
                                              params->basic_rates_len,
                                              &link->conf->basic_rates))
index 9d9313eee59f8150734fa3abf1246161cd525621..649ea9d2ae9bd88d6b5d21fde59e36620205ebbe 100644 (file)
@@ -2660,8 +2660,7 @@ u8 ieee80211_ie_len_he_cap(struct ieee80211_sub_if_data *sdata);
 u8 *ieee80211_ie_build_he_oper(u8 *pos, const struct cfg80211_chan_def *chandef);
 u8 *ieee80211_ie_build_eht_oper(u8 *pos, const struct cfg80211_chan_def *chandef,
                                const struct ieee80211_sta_eht_cap *eht_cap);
-int ieee80211_parse_bitrates(enum nl80211_chan_width width,
-                            const struct ieee80211_supported_band *sband,
+int ieee80211_parse_bitrates(const struct ieee80211_supported_band *sband,
                             const u8 *srates, int srates_len, u32 *rates);
 u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo);
 void ieee80211_add_s1g_capab_ie(struct ieee80211_sub_if_data *sdata,
index ad53dedd929c2c577cd95de74d7a51e0e229e04b..ddff090e7dce320c885aebd034cea03cb2b55059 100644 (file)
@@ -1548,7 +1548,7 @@ static void ieee80211_assoc_add_rates(struct ieee80211_local *local,
                 * in the association request (e.g. D-Link DAP 1353 in
                 * b-only mode)...
                 */
-               ieee80211_parse_bitrates(width, sband,
+               ieee80211_parse_bitrates(sband,
                                         assoc_data->supp_rates,
                                         assoc_data->supp_rates_len,
                                         &rates);
index bfc4ecb7a048e18c60ef3423e76fd40946ed9b43..667021bc60c6e4e89738c2ac45e84f3eb711a08c 100644 (file)
@@ -1115,8 +1115,7 @@ ieee802_11_parse_elems_full(struct ieee80211_elems_parse_params *params)
 }
 EXPORT_SYMBOL_IF_KUNIT(ieee802_11_parse_elems_full);
 
-int ieee80211_parse_bitrates(enum nl80211_chan_width width,
-                            const struct ieee80211_supported_band *sband,
+int ieee80211_parse_bitrates(const struct ieee80211_supported_band *sband,
                             const u8 *srates, int srates_len, u32 *rates)
 {
        struct ieee80211_rate *br;