wifi: mac80211: simplify ieee80211_config_bw() prototype
authorJohannes Berg <johannes.berg@intel.com>
Thu, 11 Jan 2024 16:17:40 +0000 (18:17 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 26 Jan 2024 08:39:50 +0000 (09:39 +0100)
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>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240111181514.f0653cd5e7dd.I8bd5ee848074029a9f0495c95e4339546ad8fe15@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 576ba6b25db9f4d4d5e24d5cb5b138187f557652..6fa69ad3ad4f89c3d23409a9abd6d03fef43143f 100644 (file)
@@ -489,15 +489,15 @@ out:
 }
 
 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;
@@ -6433,11 +6433,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);