diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-07-22 00:07:29 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-22 14:28:45 +0200 |
commit | 45b12570a4bb3ed6fc364a4b1514911a3a4df177 (patch) | |
tree | e3d96ee6cdff75ae6f15f444351a9eea5ac5cd59 /net/mac80211 | |
parent | 4ca04ed36478e21b037fc379a7e6f52d0e6d8d52 (diff) |
wifi: mac80211: remove erroneous sband/link validation
In sta_apply_parameters(), we really no longer need to
check that the link or sband exists, in fact, that's
harmful if link 0 doesn't exist, since then this will
fail.
Just remove this check, it was added for validation of
the sband where used, but it's not used here, it's now
only used in sta_link_apply_parameters() which has an
own lookup and check.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index f519d9cf6e23..a4f6971b7a19 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1684,21 +1684,9 @@ static int sta_apply_parameters(struct ieee80211_local *local, struct sta_info *sta, struct station_parameters *params) { - int ret = 0; - struct ieee80211_supported_band *sband; struct ieee80211_sub_if_data *sdata = sta->sdata; - u32 link_id = params->link_sta_params.link_id < 0 ? - 0 : params->link_sta_params.link_id; - struct ieee80211_link_data *link; u32 mask, set; - - link = sdata_dereference(sdata->link[link_id], sdata); - if (!link) - return -ENOLINK; - - sband = ieee80211_get_link_sband(link); - if (!sband) - return -EINVAL; + int ret = 0; mask = params->sta_flags_mask; set = params->sta_flags_set; |