diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-03-31 17:59:17 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-04-13 17:32:31 +0300 |
commit | d00800a289c9349bb659a698cbd7bc04521dc927 (patch) | |
tree | 79a5dea4d4d7be07b1e7b1aac8d11d77c669375e /net/mac80211/driver-ops.h | |
parent | 0b75a1b1e42e07ae84e3a11d2368b418546e2bec (diff) | |
download | linux-d00800a289c9349bb659a698cbd7bc04521dc927.tar.xz |
wifi: mac80211: add flush_sta method
Some drivers like iwlwifi might have per-STA queues, so we
may want to flush/drop just those queues rather than all
when removing a station. Add a separate method for that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 0bf208f5bbc5..45d3e53c7383 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -649,6 +649,21 @@ static inline void drv_flush(struct ieee80211_local *local, trace_drv_return_void(local); } +static inline void drv_flush_sta(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct sta_info *sta) +{ + might_sleep(); + + if (sdata && !check_sdata_in_driver(sdata)) + return; + + trace_drv_flush_sta(local, sdata, &sta->sta); + if (local->ops->flush_sta) + local->ops->flush_sta(&local->hw, &sdata->vif, &sta->sta); + trace_drv_return_void(local); +} + static inline void drv_channel_switch(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, struct ieee80211_channel_switch *ch_switch) |