developer | 5a71084 | 2022-09-21 16:07:09 -0700 | [diff] [blame] | 1 | --- b/include/net/mac80211.h 2021-09-22 21:10:45.803721216 +0800 |
| 2 | +++ a/include/net/mac80211.h 2021-09-22 21:19:40.494744637 +0800 |
| 3 | @@ -2639,6 +2639,13 @@ |
| 4 | } |
| 5 | #define ieee80211_hw_set(hw, flg) _ieee80211_hw_set(hw, IEEE80211_HW_##flg) |
| 6 | |
| 7 | +static inline void _ieee80211_hw_clear(struct ieee80211_hw *hw, |
| 8 | + enum ieee80211_hw_flags flg) |
| 9 | +{ |
| 10 | + return __clear_bit(flg, hw->flags); |
| 11 | +} |
| 12 | +#define ieee80211_hw_clear(hw, flg) _ieee80211_hw_clear(hw, IEEE80211_HW_##flg) |
| 13 | + |
| 14 | /** |
| 15 | * struct ieee80211_scan_request - hw scan request |
| 16 | * |
| 17 | @@ -4989,6 +4996,12 @@ |
| 18 | void ieee80211_csa_finish(struct ieee80211_vif *vif); |
| 19 | |
| 20 | /** |
| 21 | + * ieee80211_del_all_station - request mac80211 to delete all stations |
| 22 | + * @hw: pointer obtained from ieee80211_alloc_hw(). |
| 23 | + */ |
| 24 | +void ieee80211_del_all_station(struct ieee80211_hw *hw); |
| 25 | + |
| 26 | +/** |
| 27 | * ieee80211_beacon_cntdwn_is_complete - find out if countdown reached 1 |
| 28 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
| 29 | * |
| 30 | --- b/net/mac80211/cfg.c 2021-09-22 21:10:45.675720709 +0800 |
| 31 | +++ a/net/mac80211/cfg.c 2021-09-22 21:11:23.456352549 +0800 |
| 32 | @@ -1718,6 +1718,19 @@ |
| 33 | return 0; |
| 34 | } |
| 35 | |
| 36 | +void ieee80211_del_all_station(struct ieee80211_hw *hw) |
| 37 | +{ |
| 38 | + struct ieee80211_local *local = hw_to_local(hw); |
| 39 | + struct sta_info *sta, *tmp; |
| 40 | + |
| 41 | + mutex_lock(&local->sta_mtx); |
| 42 | + list_for_each_entry_safe(sta, tmp, &local->sta_list, list) { |
| 43 | + WARN_ON(__sta_info_destroy(sta)); |
| 44 | + } |
| 45 | + mutex_unlock(&local->sta_mtx); |
| 46 | +} |
| 47 | +EXPORT_SYMBOL(ieee80211_del_all_station); |
| 48 | + |
| 49 | static int ieee80211_change_station(struct wiphy *wiphy, |
| 50 | struct net_device *dev, const u8 *mac, |
| 51 | struct station_parameters *params) |
| 52 | --- b/net/mac80211/sta_info.c 2021-09-22 21:10:45.599720409 +0800 |
| 53 | +++ a/net/mac80211/sta_info.c 2021-09-22 20:50:39.158775251 +0800 |
| 54 | @@ -683,7 +683,8 @@ |
| 55 | } |
| 56 | |
| 57 | /* accept BA sessions now */ |
| 58 | - clear_sta_flag(sta, WLAN_STA_BLOCK_BA); |
| 59 | + if (ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION)) |
| 60 | + clear_sta_flag(sta, WLAN_STA_BLOCK_BA); |
| 61 | |
| 62 | ieee80211_sta_debugfs_add(sta); |
| 63 | rate_control_add_sta_debugfs(sta); |