Skip to content

Commit

Permalink
Add kernel-4.7 and 4.8 compatibility
Browse files Browse the repository at this point in the history
Conflicts:
	os_dep/linux/ioctl_cfg80211.c
	os_dep/linux/wifi_regd.c
  • Loading branch information
CGarces committed May 7, 2017
1 parent e9ff163 commit 104f6a6
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions os_dep/linux/ioctl_cfg80211.c
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
#define STATION_INFO_TX_PACKETS BIT(NL80211_STA_INFO_TX_PACKETS)
#define STATION_INFO_ASSOC_REQ_IES 0
#endif /* Linux kernel >= 4.0.0 */

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
enum ieee80211_band {
IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ,
IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ,
IEEE80211_BAND_60GHZ = NL80211_BAND_60GHZ,

/* keep last */
IEEE80211_NUM_BANDS
};
#endif /* Linux kernel >= 4.7.0 */

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0))
enum ieee80211_band {
IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ,
IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ,
IEEE80211_BAND_60GHZ = NL80211_BAND_60GHZ,

/* keep last */
IEEE80211_NUM_BANDS
};
#endif /* Linux kernel >= 4.7.0 */

#include <rtw_wifi_regd.h>

Expand Down Expand Up @@ -2062,7 +2062,14 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
}
else
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
struct cfg80211_scan_info info = {
.aborted = aborted
};
cfg80211_scan_done(pwdev_priv->scan_request, &info);
#else
cfg80211_scan_done(pwdev_priv->scan_request, aborted);
#endif
}

pwdev_priv->scan_request = NULL;
Expand Down

0 comments on commit 104f6a6

Please sign in to comment.