2bdde1c72f9ad7bb796baa1ce145db1efda57b99
[openwrt/staging/blogic.git] /
1 From 6f092c98dcfa1e4cf37d45f9b8e4d4a3cbeb79d4 Mon Sep 17 00:00:00 2001
2 From: Dmitry Antipov <dmantipov@yandex.ru>
3 Date: Wed, 26 Jul 2023 12:21:02 +0300
4 Subject: [PATCH 2/5] wifi: ath11k: simplify
5 ath11k_mac_validate_vht_he_fixed_rate_settings()
6
7 In ath11k_mac_validate_vht_he_fixed_rate_settings() ar->ab->peers
8 list is not altered so list_for_each_entry() should be safe.
9
10 Compile tested only.
11
12 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
13 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
14 Link: https://lore.kernel.org/r/20230726092113.78794-1-dmantipov@yandex.ru
15 ---
16 drivers/net/wireless/ath/ath11k/mac.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19 --- a/drivers/net/wireless/ath/ath11k/mac.c
20 +++ b/drivers/net/wireless/ath/ath11k/mac.c
21 @@ -8255,7 +8255,7 @@ ath11k_mac_validate_vht_he_fixed_rate_se
22 const struct cfg80211_bitrate_mask *mask)
23 {
24 bool he_fixed_rate = false, vht_fixed_rate = false;
25 - struct ath11k_peer *peer, *tmp;
26 + struct ath11k_peer *peer;
27 const u16 *vht_mcs_mask, *he_mcs_mask;
28 struct ieee80211_link_sta *deflink;
29 u8 vht_nss, he_nss;
30 @@ -8278,7 +8278,7 @@ ath11k_mac_validate_vht_he_fixed_rate_se
31
32 rcu_read_lock();
33 spin_lock_bh(&ar->ab->base_lock);
34 - list_for_each_entry_safe(peer, tmp, &ar->ab->peers, list) {
35 + list_for_each_entry(peer, &ar->ab->peers, list) {
36 if (peer->sta) {
37 deflink = &peer->sta->deflink;
38