diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-06-27 22:09:50 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-15 11:43:16 +0200 |
commit | f662d2f4e22e5d5a9215e9c881875a4769494ef6 (patch) | |
tree | 6b9a35f888b28b4eaedb7fd0fa2d3bfd9bd2331f /net/mac80211 | |
parent | 8f6e0dfc2245d8ca1a3335a06a1219c56df04bb8 (diff) | |
download | linux-f662d2f4e22e5d5a9215e9c881875a4769494ef6.tar.bz2 |
wifi: cfg80211: prepare association failure APIs for MLO
For MLO, we need the ability to report back multiple BSS
structures to release, as well as the AP MLD address (if
attempting to make an MLO connection).
Unify cfg80211_assoc_timeout() and cfg80211_abandon_assoc()
into a new cfg80211_assoc_failure() that gets a structure
parameter with the necessary data.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/mlme.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a2b4536c3a24..e1c4a4dcfc70 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3027,8 +3027,13 @@ static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata, ieee80211_link_release_channel(&sdata->deflink); mutex_unlock(&sdata->local->mtx); - if (abandon) - cfg80211_abandon_assoc(sdata->dev, assoc_data->bss); + if (abandon) { + struct cfg80211_assoc_failure data = { + .bss[0] = assoc_data->bss, + }; + + cfg80211_assoc_failure(sdata->dev, &data); + } } kfree(assoc_data); @@ -3956,8 +3961,12 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, } else { if (!ieee80211_assoc_success(sdata, cbss, mgmt, len, elems)) { /* oops -- internal error -- send timeout for now */ + struct cfg80211_assoc_failure data = { + .timeout = true, + .bss[0] = cbss, + }; ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, cbss); + cfg80211_assoc_failure(sdata->dev, &data); goto notify_driver; } event.u.mlme.status = MLME_SUCCESS; @@ -4833,9 +4842,13 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) .u.mlme.data = ASSOC_EVENT, .u.mlme.status = MLME_TIMEOUT, }; + struct cfg80211_assoc_failure data = { + .bss[0] = bss, + .timeout = true, + }; ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, bss); + cfg80211_assoc_failure(sdata->dev, &data); drv_event_callback(sdata->local, sdata, &event); } } else if (ifmgd->assoc_data && ifmgd->assoc_data->timeout_started) @@ -6468,8 +6481,13 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) sdata_lock(sdata); if (ifmgd->assoc_data) { struct cfg80211_bss *bss = ifmgd->assoc_data->bss; + struct cfg80211_assoc_failure data = { + .bss[0] = bss, + .timeout = true, + }; + ieee80211_destroy_assoc_data(sdata, false, false); - cfg80211_assoc_timeout(sdata->dev, bss); + cfg80211_assoc_failure(sdata->dev, &data); } if (ifmgd->auth_data) ieee80211_destroy_auth_data(sdata, false); |