mirror of
https://github.com/amazingfate/rtl8723ds.git
synced 2026-06-19 02:37:22 +01:00
rtl8723ds: Fix NULL dereference error
The driver is crashing with the following: Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... PC is at cfg80211_scan_done+0x28/0x64 [cfg80211] LR is at cfg80211_rtw_scan+0x724/0x800 [8723ds] The faulty statement is cfg80211_scan_done(request, 0); Sending a simple integer as the second argument of cfg80211_scan_done() is only valid for kernel 4.7 and earlier. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
@@ -2281,6 +2281,11 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
|||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
struct wifidirect_info *pwdinfo;
|
struct wifidirect_info *pwdinfo;
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
|
||||||
|
struct cfg80211_scan_info info = {
|
||||||
|
.aborted = 0
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
|
||||||
wdev = request->wdev;
|
wdev = request->wdev;
|
||||||
@@ -2481,7 +2486,11 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
|||||||
check_need_indicate_scan_done:
|
check_need_indicate_scan_done:
|
||||||
if (_TRUE == need_indicate_scan_done) {
|
if (_TRUE == need_indicate_scan_done) {
|
||||||
_rtw_cfg80211_surveydone_event_callback(padapter, request);
|
_rtw_cfg80211_surveydone_event_callback(padapter, request);
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
|
||||||
|
cfg80211_scan_done(request, &info);
|
||||||
|
#else
|
||||||
cfg80211_scan_done(request, 0);
|
cfg80211_scan_done(request, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel_ps_deny:
|
cancel_ps_deny:
|
||||||
|
|||||||
Reference in New Issue
Block a user