mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
wifi: rtw89: fix null pointer access when abort scan
[ Upstream commit 7e11a2966f
]
During cancel scan we might use vif that weren't scanning.
Fix this by using the actual scanning vif.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240119081501.25223-6-pkshih@realtek.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
15df1981f0
commit
b34d64e9aa
1 changed files with 2 additions and 2 deletions
|
@ -422,7 +422,7 @@ static void rtw89_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||||
* when disconnected by peer
|
* when disconnected by peer
|
||||||
*/
|
*/
|
||||||
if (rtwdev->scanning)
|
if (rtwdev->scanning)
|
||||||
rtw89_hw_scan_abort(rtwdev, vif);
|
rtw89_hw_scan_abort(rtwdev, rtwdev->scan_info.scanning_vif);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -971,7 +971,7 @@ static int rtw89_ops_remain_on_channel(struct ieee80211_hw *hw,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtwdev->scanning)
|
if (rtwdev->scanning)
|
||||||
rtw89_hw_scan_abort(rtwdev, vif);
|
rtw89_hw_scan_abort(rtwdev, rtwdev->scan_info.scanning_vif);
|
||||||
|
|
||||||
if (type == IEEE80211_ROC_TYPE_MGMT_TX)
|
if (type == IEEE80211_ROC_TYPE_MGMT_TX)
|
||||||
roc->state = RTW89_ROC_MGMT;
|
roc->state = RTW89_ROC_MGMT;
|
||||||
|
|
Loading…
Reference in a new issue