Commit 9a72db41 authored by Chih-Kang Chang's avatar Chih-Kang Chang Committed by Kalle Valo

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: default avatarChih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220809084107.38137-2-pkshih@realtek.com
parent 2eee3db7
...@@ -875,7 +875,9 @@ static int rtw_ops_set_sar_specs(struct ieee80211_hw *hw, ...@@ -875,7 +875,9 @@ static int rtw_ops_set_sar_specs(struct ieee80211_hw *hw,
{ {
struct rtw_dev *rtwdev = hw->priv; struct rtw_dev *rtwdev = hw->priv;
mutex_lock(&rtwdev->mutex);
rtw_set_sar_specs(rtwdev, sar); rtw_set_sar_specs(rtwdev, sar);
mutex_unlock(&rtwdev->mutex);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment