Message ID | 20220713084758.41654-2-pkshih@realtek.com |
---|---|
State | Superseded |
Headers | show |
Series | wifi: rtw88: add proper mutex lock to safely access channel | expand |
Ping-Ke Shih <pkshih@realtek.com> wrote: > From: Chih-Kang Chang <gary.chang@realtek.com> > > 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> Failed to apply, please rebase. error: sha1 information is lacking or useless (drivers/net/wireless/realtek/rtw88/main.c). error: could not build fake ancestor hint: Use 'git am --show-current-patch=diff' to see the failed patch Applying: wifi: rtw88: add the update channel flow to support setting by parameters Patch failed at 0001 wifi: rtw88: add the update channel flow to support setting by parameters 7 patches set to Changes Requested. 12916288 [1/7] wifi: rtw88: add mutex when set SAR 12916289 [2/7] wifi: rtw88: add mutex when set regulatory and get Tx power table 12916291 [3/7] wifi: rtw88: add the update channel flow to support setting by parameters 12916293 [4/7] wifi: rtw88: fix WARNING:rtw_get_tx_power_params() during HW scan 12916294 [5/7] wifi: rtw88: add flushing queue before HW scan 12916292 [6/7] wifi: rtw88: add flag check before enter or leave IPS 12916295 [7/7] wifi: rtw88: prohibit enter IPS during HW scan
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c index e0fdb34217000..2fa94c3024417 100644 --- a/drivers/net/wireless/realtek/rtw88/mac80211.c +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c @@ -873,7 +873,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; }