Skip to content

Commit 8fbfb14

Browse files
masapSergei Makarenkov
authored andcommitted
Add support for kernels >= 4.8
This patch fix compilation failure caused by modification of cfg80211_scan_done() prototype. Signed-off-by: Masashi Honma <[email protected]>
1 parent e903a54 commit 8fbfb14

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

os_dep/linux/ioctl_cfg80211.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,6 +2010,9 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
20102010
{
20112011
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(adapter);
20122012
_irqL irqL;
2013+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
2014+
struct cfg80211_scan_info info;
2015+
#endif // (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
20132016

20142017
_enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
20152018
if (pwdev_priv->scan_request != NULL) {
@@ -2024,7 +2027,13 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
20242027
}
20252028
else
20262029
{
2030+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
2031+
memset(&info, 0, sizeof(info));
2032+
info.aborted = aborted;
2033+
cfg80211_scan_done(pwdev_priv->scan_request, &info);
2034+
#else // (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
20272035
cfg80211_scan_done(pwdev_priv->scan_request, aborted);
2036+
#endif // (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0))
20282037
}
20292038

20302039
pwdev_priv->scan_request = NULL;

0 commit comments

Comments
 (0)