diff mbox series

[2/2] wifi: ath10k: Removed atomic iteration in bitrate mask clear.

Message ID 20240806004024.2014080-3-rory@candelatech.com
State New
Headers show
Series wifi: ath10k: Fixed locking bug when setting bitrates. | expand

Commit Message

Rory Little Aug. 6, 2024, 12:40 a.m. UTC
This operation requires some blocking calls, which causes issues when
attempting to guard this iteration's critical section with an RCU lock.
Instead, we will take advantage of the held wiphy mutex to protect this
operation.

Signed-off-by: Rory Little <rory@candelatech.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 7579a1cd7d15..a1a13b9ad465 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -9502,9 +9502,9 @@  static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
 			     ar->normal_mode_fw.fw_file.fw_features);
 	if (allow_pfr) {
 		mutex_lock(&ar->conf_mutex);
-		ieee80211_iterate_stations_atomic(ar->hw,
-						  ath10k_mac_clr_bitrate_mask_iter,
-						  arvif);
+		ieee80211_iterate_stations_mtx(ar->hw,
+					       ath10k_mac_clr_bitrate_mask_iter,
+					       arvif);
 		mutex_unlock(&ar->conf_mutex);
 	}