309 lines
12 KiB
Diff
309 lines
12 KiB
Diff
diff --git a/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
index 6b4eac5..47ec44d 100755
|
|
--- a/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -1734,10 +1734,17 @@ enum nl80211_iftype {
|
|
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
|
|
};
|
|
#endif
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
|
+static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|
+ struct net_device *ndev,
|
|
+ enum nl80211_iftype type,
|
|
+ struct vif_params *params)
|
|
+#else
|
|
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|
struct net_device *ndev,
|
|
enum nl80211_iftype type, u32 *flags,
|
|
struct vif_params *params)
|
|
+#endif
|
|
{
|
|
enum nl80211_iftype old_type;
|
|
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType;
|
|
@@ -3699,7 +3706,11 @@ static int
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
|
unsigned char name_assign_type,
|
|
#endif
|
|
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
|
+ enum nl80211_iftype type, struct vif_params *params)
|
|
+ #else
|
|
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
|
|
+ #endif
|
|
{
|
|
int ret = 0;
|
|
struct net_device *ndev = NULL;
|
|
diff --git a/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
index accfaec..8804238 100755
|
|
--- a/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -6193,7 +6193,11 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
|
#endif
|
|
|
|
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
|
- wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
|
+ wiphy->max_sched_scan_reqs = 1;
|
|
+#else
|
|
+ wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
|
+#endif
|
|
#ifdef CONFIG_PNO_SUPPORT
|
|
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
|
|
#endif
|
|
diff --git a/drivers/net/wireless/rtl8723du/include/osdep_service.h b/drivers/net/wireless/rtl8723du/include/osdep_service.h
|
|
old mode 100644
|
|
new mode 100755
|
|
index e3cd85d..5a29641
|
|
--- a/drivers/net/wireless/rtl8723du/include/osdep_service.h
|
|
+++ b/drivers/net/wireless/rtl8723du/include/osdep_service.h
|
|
@@ -32,6 +32,10 @@
|
|
#undef _FALSE
|
|
#define _FALSE 0
|
|
|
|
+#include <linux/version.h>
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
|
+#include <linux/sched/signal.h>
|
|
+#endif
|
|
|
|
#ifdef PLATFORM_FREEBSD
|
|
#include <osdep_service_bsd.h>
|
|
diff --git a/drivers/net/wireless/rtl8723du/include/osdep_service_linux.h b/drivers/net/wireless/rtl8723du/include/osdep_service_linux.h
|
|
old mode 100644
|
|
new mode 100755
|
|
index e951b1b..6f226d6
|
|
--- a/drivers/net/wireless/rtl8723du/include/osdep_service_linux.h
|
|
+++ b/drivers/net/wireless/rtl8723du/include/osdep_service_linux.h
|
|
@@ -28,6 +28,9 @@
|
|
#include <linux/init.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/module.h>
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
|
+ #include <linux/sched/signal.h>
|
|
+#endif
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 5))
|
|
#include <linux/kref.h>
|
|
#endif
|
|
diff --git a/drivers/net/wireless/rtl8812au/include/osdep_service.h b/drivers/net/wireless/rtl8812au/include/osdep_service.h
|
|
old mode 100644
|
|
new mode 100755
|
|
index c2c2905..bebe989
|
|
--- a/drivers/net/wireless/rtl8812au/include/osdep_service.h
|
|
+++ b/drivers/net/wireless/rtl8812au/include/osdep_service.h
|
|
@@ -32,6 +32,10 @@
|
|
#undef _FALSE
|
|
#define _FALSE 0
|
|
|
|
+#include <linux/version.h>
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
|
+#include <linux/sched/signal.h>
|
|
+#endif
|
|
|
|
#ifdef PLATFORM_FREEBSD
|
|
#include <osdep_service_bsd.h>
|
|
diff --git a/drivers/net/wireless/rtl8812au/include/osdep_service_linux.h b/drivers/net/wireless/rtl8812au/include/osdep_service_linux.h
|
|
old mode 100644
|
|
new mode 100755
|
|
index 060dbe6..eaddf77
|
|
--- a/drivers/net/wireless/rtl8812au/include/osdep_service_linux.h
|
|
+++ b/drivers/net/wireless/rtl8812au/include/osdep_service_linux.h
|
|
@@ -28,6 +28,9 @@
|
|
#include <linux/init.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/module.h>
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
|
+ #include <linux/sched/signal.h>
|
|
+#endif
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 5))
|
|
#include <linux/kref.h>
|
|
#endif
|
|
diff --git a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
index 6b4eac5..47ec44d 100755
|
|
--- a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -1734,10 +1734,17 @@ enum nl80211_iftype {
|
|
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
|
|
};
|
|
#endif
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
|
+static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|
+ struct net_device *ndev,
|
|
+ enum nl80211_iftype type,
|
|
+ struct vif_params *params)
|
|
+#else
|
|
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|
struct net_device *ndev,
|
|
enum nl80211_iftype type, u32 *flags,
|
|
struct vif_params *params)
|
|
+#endif
|
|
{
|
|
enum nl80211_iftype old_type;
|
|
NDIS_802_11_NETWORK_INFRASTRUCTURE networkType;
|
|
@@ -3699,7 +3706,11 @@ static int
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
|
unsigned char name_assign_type,
|
|
#endif
|
|
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
|
+ enum nl80211_iftype type, struct vif_params *params)
|
|
+ #else
|
|
enum nl80211_iftype type, u32 *flags, struct vif_params *params)
|
|
+ #endif
|
|
{
|
|
int ret = 0;
|
|
struct net_device *ndev = NULL;
|
|
diff --git a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
index 47ec44d..accfaec 100755
|
|
--- a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -3640,7 +3640,12 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
|
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
|
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
|
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 9))
|
|
+ mon_ndev->needs_free_netdev = false;
|
|
+ mon_ndev->priv_destructor = rtw_ndev_destructor;
|
|
+#else
|
|
mon_ndev->destructor = rtw_ndev_destructor;
|
|
+#endif
|
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29))
|
|
mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
|
|
diff --git a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
index accfaec..8804238 100755
|
|
--- a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -6193,7 +6193,11 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
|
#endif
|
|
|
|
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
|
- wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
|
+ wiphy->max_sched_scan_reqs = 1;
|
|
+#else
|
|
+ wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
|
+#endif
|
|
#ifdef CONFIG_PNO_SUPPORT
|
|
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
|
|
#endif
|
|
diff --git a/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
old mode 100644
|
|
new mode 100755
|
|
index cd8cb08..b31aaea
|
|
--- a/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/drivers/net/wireless/rtl8723du/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -749,22 +749,24 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
|
|
struct ieee80211_channel *notify_channel;
|
|
u32 freq;
|
|
u16 channel = cur_network->network.Configuration.DSConfig;
|
|
+ struct cfg80211_roam_info roam_info = {};
|
|
|
|
freq = rtw_ch2freq(channel);
|
|
notify_channel = ieee80211_get_channel(wiphy, freq);
|
|
#endif
|
|
|
|
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
|
- cfg80211_roamed(padapter->pnetdev
|
|
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
|
- , notify_channel
|
|
- #endif
|
|
- , cur_network->network.MacAddress
|
|
- , pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
|
|
- , pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2
|
|
- , pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
|
|
- , pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
|
|
- , GFP_ATOMIC);
|
|
+ roam_info.channel = notify_channel;
|
|
+ roam_info.bssid = cur_network->network.MacAddress;
|
|
+ roam_info.req_ie =
|
|
+ pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2;
|
|
+ roam_info.req_ie_len =
|
|
+ pmlmepriv->assoc_req_len-sizeof(struct ieee80211_hdr_3addr)-2;
|
|
+ roam_info.resp_ie =
|
|
+ pmlmepriv->assoc_rsp+sizeof(struct ieee80211_hdr_3addr)+6;
|
|
+ roam_info.resp_ie_len =
|
|
+ pmlmepriv->assoc_rsp_len-sizeof(struct ieee80211_hdr_3addr)-6;
|
|
+ cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
|
|
#ifdef CONFIG_RTW_80211R
|
|
if ((rtw_to_roam(padapter) > 0) && rtw_chk_ft_flags(padapter, RTW_FT_SUPPORTED))
|
|
rtw_set_ft_status(padapter, RTW_FT_ASSOCIATED_STA);
|
|
@@ -3652,7 +3654,12 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
|
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
|
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
|
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
|
- mon_ndev->destructor = rtw_ndev_destructor;
|
|
+#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,11,9))
|
|
+ mon_ndev->needs_free_netdev = false;
|
|
+ mon_ndev->priv_destructor = rtw_ndev_destructor;
|
|
+#else
|
|
+ mon_ndev->destructor = rtw_ndev_destructor;
|
|
+#endif
|
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29))
|
|
mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
|
|
@@ -5098,7 +5105,7 @@ static int _cfg80211_rtw_mgmt_tx(_adapter *padapter, u8 tx_ch, const u8 *buf, si
|
|
|
|
if (check_fwstate(&padapter->mlmepriv, _FW_LINKED))
|
|
ext_listen_period = 500;/*500ms*/
|
|
-#ifdef CONFIG_P2P
|
|
+#ifdef CONFIG_P2P
|
|
else
|
|
ext_listen_period = pwdinfo->ext_listen_period;
|
|
|
|
diff --git a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
old mode 100644
|
|
new mode 100755
|
|
index 276c722..6b4eac5
|
|
--- a/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
+++ b/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.c
|
|
@@ -749,22 +749,24 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
|
|
struct ieee80211_channel *notify_channel;
|
|
u32 freq;
|
|
u16 channel = cur_network->network.Configuration.DSConfig;
|
|
+ struct cfg80211_roam_info roam_info = {};
|
|
|
|
freq = rtw_ch2freq(channel);
|
|
notify_channel = ieee80211_get_channel(wiphy, freq);
|
|
#endif
|
|
|
|
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
|
- cfg80211_roamed(padapter->pnetdev
|
|
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
|
- , notify_channel
|
|
- #endif
|
|
- , cur_network->network.MacAddress
|
|
- , pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
|
|
- , pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2
|
|
- , pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
|
|
- , pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
|
|
- , GFP_ATOMIC);
|
|
+ roam_info.channel = notify_channel;
|
|
+ roam_info.bssid = cur_network->network.MacAddress;
|
|
+ roam_info.req_ie =
|
|
+ pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2;
|
|
+ roam_info.req_ie_len =
|
|
+ pmlmepriv->assoc_req_len-sizeof(struct ieee80211_hdr_3addr)-2;
|
|
+ roam_info.resp_ie =
|
|
+ pmlmepriv->assoc_rsp+sizeof(struct ieee80211_hdr_3addr)+6;
|
|
+ roam_info.resp_ie_len =
|
|
+ pmlmepriv->assoc_rsp_len-sizeof(struct ieee80211_hdr_3addr)-6;
|
|
+ cfg80211_roamed(padapter->pnetdev, &roam_info, GFP_ATOMIC);
|
|
} else {
|
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
|
|
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
|
|
@@ -1866,7 +1868,7 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
|
|
{
|
|
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(adapter);
|
|
_irqL irqL;
|
|
-
|
|
+
|
|
struct cfg80211_scan_info info = {
|
|
.aborted = aborted
|
|
};
|
|
@@ -5038,7 +5040,7 @@ static int _cfg80211_rtw_mgmt_tx(_adapter *padapter, u8 tx_ch, const u8 *buf, si
|
|
|
|
if (check_fwstate(&padapter->mlmepriv, _FW_LINKED))
|
|
ext_listen_period = 500;/*500ms*/
|
|
-#ifdef CONFIG_P2P
|
|
+#ifdef CONFIG_P2P
|
|
else
|
|
ext_listen_period = pwdinfo->ext_listen_period;
|
|
|