Skip to content

Commit

Permalink
wifi: rtw88: add mutex when set SAR
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Chih-Kang Chang authored and Kalle Valo committed Aug 10, 2022
1 parent 2eee3db commit 9a72db4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/realtek/rtw88/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9a72db4

Please sign in to comment.