diff options
author | Chih-Kang Chang <gary.chang@realtek.com> | 2022-08-09 16:41:01 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2022-08-10 08:48:45 +0300 |
commit | 9a72db41338564040b6469342cfddd46568c7380 (patch) | |
tree | cc97fb3f2262bfe429b8ff4076662de1f7b32f88 /drivers/net/wireless/realtek/rtw88/mac80211.c | |
parent | 2eee3db784a045289ebc62fc3bdbe0eb36b73a3d (diff) |
wifi: rtw88: add mutex when set SAR
Applying SAR will access hal data, it should hold rtwdev::mutex
to avoid hal data changed during setting flow.
Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220809084107.38137-2-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/mac80211.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/mac80211.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c index b6af199ae5e1..fa6a920fa805 100644 --- a/drivers/net/wireless/realtek/rtw88/mac80211.c +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c @@ -875,7 +875,9 @@ static int rtw_ops_set_sar_specs(struct ieee80211_hw *hw, { struct rtw_dev *rtwdev = hw->priv; + mutex_lock(&rtwdev->mutex); rtw_set_sar_specs(rtwdev, sar); + mutex_unlock(&rtwdev->mutex); return 0; } |