mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-11-22 05:25:03 +00:00
Merge pull request #47 from CGarces/fix_4.12
Fix build with Linux Kernel 4.12
This commit is contained in:
commit
e049740008
1
Makefile
1
Makefile
@ -17,6 +17,7 @@ EXTRA_CFLAGS += -Wno-unused
|
|||||||
EXTRA_CFLAGS += -Wno-date-time
|
EXTRA_CFLAGS += -Wno-date-time
|
||||||
|
|
||||||
#EXTRA_CFLAGS += -Wno-uninitialized
|
#EXTRA_CFLAGS += -Wno-uninitialized
|
||||||
|
EXTRA_CFLAGS += -Wno-incompatible-pointer-types
|
||||||
#EXTRA_CFLAGS += -Wno-error=date-time # Fix compile error on gcc 4.9 and later
|
#EXTRA_CFLAGS += -Wno-error=date-time # Fix compile error on gcc 4.9 and later
|
||||||
|
|
||||||
EXTRA_CFLAGS += -I$(src)/include
|
EXTRA_CFLAGS += -I$(src)/include
|
||||||
|
@ -803,13 +803,29 @@ check_bss:
|
|||||||
struct wiphy *wiphy = pwdev->wiphy;
|
struct wiphy *wiphy = pwdev->wiphy;
|
||||||
struct ieee80211_channel *notify_channel;
|
struct ieee80211_channel *notify_channel;
|
||||||
u32 freq;
|
u32 freq;
|
||||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
struct cfg80211_roam_info roam_info = {};
|
||||||
|
#endif
|
||||||
|
|
||||||
freq = rtw_ch2freq(channel);
|
freq = rtw_ch2freq(channel);
|
||||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
{
|
||||||
|
struct cfg80211_roam_info roam_info = {
|
||||||
|
.channel = notify_channel,
|
||||||
|
.bssid = cur_network->network.MacAddress,
|
||||||
|
.req_ie = pmlmepriv->assoc_req+sizeof(struct rtw_ieee80211_hdr_3addr)+2,
|
||||||
|
.req_ie_len = pmlmepriv->assoc_req_len-sizeof(struct rtw_ieee80211_hdr_3addr)-2,
|
||||||
|
.resp_ie = pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6,
|
||||||
|
.resp_ie_len = pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6,
|
||||||
|
};
|
||||||
|
cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
|
||||||
|
}
|
||||||
|
#else
|
||||||
cfg80211_roamed(padapter->pnetdev
|
cfg80211_roamed(padapter->pnetdev
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
||||||
, notify_channel
|
, notify_channel
|
||||||
@ -820,6 +836,7 @@ check_bss:
|
|||||||
, pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6
|
, pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6
|
||||||
, pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6
|
, pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6
|
||||||
, GFP_ATOMIC);
|
, GFP_ATOMIC);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -6537,7 +6554,11 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
||||||
|
wiphy->max_sched_scan_reqs = 1;
|
||||||
|
#else
|
||||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_PNO_SUPPORT
|
#ifdef CONFIG_PNO_SUPPORT
|
||||||
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
|
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user