| --- b/include/net/mac80211.h 2021-09-22 21:10:45.803721216 +0800 |
| +++ a/include/net/mac80211.h 2021-09-22 21:19:40.494744637 +0800 |
| @@ -2639,6 +2639,13 @@ |
| } |
| #define ieee80211_hw_set(hw, flg) _ieee80211_hw_set(hw, IEEE80211_HW_##flg) |
| |
| +static inline void _ieee80211_hw_clear(struct ieee80211_hw *hw, |
| + enum ieee80211_hw_flags flg) |
| +{ |
| + return __clear_bit(flg, hw->flags); |
| +} |
| +#define ieee80211_hw_clear(hw, flg) _ieee80211_hw_clear(hw, IEEE80211_HW_##flg) |
| + |
| /** |
| * struct ieee80211_scan_request - hw scan request |
| * |
| @@ -4989,6 +4996,12 @@ |
| void ieee80211_csa_finish(struct ieee80211_vif *vif); |
| |
| /** |
| + * ieee80211_del_all_station - request mac80211 to delete all stations |
| + * @hw: pointer obtained from ieee80211_alloc_hw(). |
| + */ |
| +void ieee80211_del_all_station(struct ieee80211_hw *hw); |
| + |
| +/** |
| * ieee80211_beacon_cntdwn_is_complete - find out if countdown reached 1 |
| * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
| * |
| --- b/net/mac80211/cfg.c 2021-09-22 21:10:45.675720709 +0800 |
| +++ a/net/mac80211/cfg.c 2021-09-22 21:11:23.456352549 +0800 |
| @@ -1718,6 +1718,19 @@ |
| return 0; |
| } |
| |
| +void ieee80211_del_all_station(struct ieee80211_hw *hw) |
| +{ |
| + struct ieee80211_local *local = hw_to_local(hw); |
| + struct sta_info *sta, *tmp; |
| + |
| + mutex_lock(&local->sta_mtx); |
| + list_for_each_entry_safe(sta, tmp, &local->sta_list, list) { |
| + WARN_ON(__sta_info_destroy(sta)); |
| + } |
| + mutex_unlock(&local->sta_mtx); |
| +} |
| +EXPORT_SYMBOL(ieee80211_del_all_station); |
| + |
| static int ieee80211_change_station(struct wiphy *wiphy, |
| struct net_device *dev, const u8 *mac, |
| struct station_parameters *params) |
| --- b/net/mac80211/sta_info.c 2021-09-22 21:10:45.599720409 +0800 |
| +++ a/net/mac80211/sta_info.c 2021-09-22 20:50:39.158775251 +0800 |
| @@ -683,7 +683,8 @@ |
| } |
| |
| /* accept BA sessions now */ |
| - clear_sta_flag(sta, WLAN_STA_BLOCK_BA); |
| + if (ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION)) |
| + clear_sta_flag(sta, WLAN_STA_BLOCK_BA); |
| |
| ieee80211_sta_debugfs_add(sta); |
| rate_control_add_sta_debugfs(sta); |