mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-31 19:21:43 +00:00
Merge patch and patch fix
This commit is contained in:
parent
73a6443407
commit
e8b0e6442a
2 changed files with 624 additions and 721 deletions
|
@ -22169,7 +22169,7 @@ index 0000000..e83c090
|
||||||
+
|
+
|
||||||
diff --git a/drivers/net/wireless/rtl8189es/core/rtw_ieee80211.c b/drivers/net/wireless/rtl8189es/core/rtw_ieee80211.c
|
diff --git a/drivers/net/wireless/rtl8189es/core/rtw_ieee80211.c b/drivers/net/wireless/rtl8189es/core/rtw_ieee80211.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..6834fd5
|
index 0000000..2ad3de5
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/net/wireless/rtl8189es/core/rtw_ieee80211.c
|
+++ b/drivers/net/wireless/rtl8189es/core/rtw_ieee80211.c
|
||||||
@@ -0,0 +1,2583 @@
|
@@ -0,0 +1,2583 @@
|
||||||
|
@ -316929,11 +316929,11 @@ index 0000000..418d793
|
||||||
+}
|
+}
|
||||||
+#endif //CONFIG_PLATFORM_SPRD
|
+#endif //CONFIG_PLATFORM_SPRD
|
||||||
diff --git a/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c
|
diff --git a/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c
|
||||||
new file mode 100644
|
new file mode 100755
|
||||||
index 0000000..ae3ea89
|
index 0000000..621d32c
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c
|
+++ b/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c
|
||||||
@@ -0,0 +1,6750 @@
|
@@ -0,0 +1,6788 @@
|
||||||
+/******************************************************************************
|
+/******************************************************************************
|
||||||
+ *
|
+ *
|
||||||
+ * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
|
+ * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
|
||||||
|
@ -317630,7 +317630,7 @@ index 0000000..ae3ea89
|
||||||
+ else
|
+ else
|
||||||
+ {
|
+ {
|
||||||
+ if(scanned == NULL)
|
+ if(scanned == NULL)
|
||||||
+ rtw_warn_on(1);
|
+ return;
|
||||||
+
|
+
|
||||||
+ if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE
|
+ if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE
|
||||||
+ && _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE
|
+ && _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE
|
||||||
|
@ -317732,11 +317732,30 @@ index 0000000..ae3ea89
|
||||||
+ 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)
|
||||||
|
+ roam_info.channel = notify_channel;
|
||||||
|
+ roam_info.bssid = cur_network->network.MacAddress;
|
||||||
|
+ roam_info.req_ie =
|
||||||
|
+ pmlmepriv->assoc_req+sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
|
||||||
|
+ roam_info.req_ie_len =
|
||||||
|
+ pmlmepriv->assoc_req_len+sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
|
||||||
|
+ roam_info.resp_ie =
|
||||||
|
+ pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
|
||||||
|
+ roam_info.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
|
||||||
|
@ -317747,6 +317766,7 @@ index 0000000..ae3ea89
|
||||||
+ , 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
|
||||||
+ {
|
+ {
|
||||||
|
@ -318166,7 +318186,7 @@ index 0000000..ae3ea89
|
||||||
+ {
|
+ {
|
||||||
+ if (param->u.crypt.idx >= WEP_KEYS
|
+ if (param->u.crypt.idx >= WEP_KEYS
|
||||||
+#ifdef CONFIG_IEEE80211W
|
+#ifdef CONFIG_IEEE80211W
|
||||||
+ && param->u.crypt.idx > BIP_MAX_KEYID
|
+ || param->u.crypt.idx >= BIP_MAX_KEYID
|
||||||
+#endif //CONFIG_IEEE80211W
|
+#endif //CONFIG_IEEE80211W
|
||||||
+ )
|
+ )
|
||||||
+ {
|
+ {
|
||||||
|
@ -318191,7 +318211,7 @@ index 0000000..ae3ea89
|
||||||
+ wep_key_idx = param->u.crypt.idx;
|
+ wep_key_idx = param->u.crypt.idx;
|
||||||
+ wep_key_len = param->u.crypt.key_len;
|
+ wep_key_len = param->u.crypt.key_len;
|
||||||
+
|
+
|
||||||
+ if ((wep_key_idx > WEP_KEYS) || (wep_key_len <= 0))
|
+ if ((wep_key_idx >= WEP_KEYS) || (wep_key_len <= 0))
|
||||||
+ {
|
+ {
|
||||||
+ ret = -EINVAL;
|
+ ret = -EINVAL;
|
||||||
+ goto exit;
|
+ goto exit;
|
||||||
|
@ -318804,7 +318824,10 @@ index 0000000..ae3ea89
|
||||||
+*/
|
+*/
|
||||||
+static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
+static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||||
+ struct net_device *ndev,
|
+ struct net_device *ndev,
|
||||||
+ enum nl80211_iftype type, u32 *flags,
|
+ enum nl80211_iftype type,
|
||||||
|
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
|
||||||
|
+ u32 *flags,
|
||||||
|
+ #endif
|
||||||
+ struct vif_params *params)
|
+ struct vif_params *params)
|
||||||
+{
|
+{
|
||||||
+ enum nl80211_iftype old_type;
|
+ enum nl80211_iftype old_type;
|
||||||
|
@ -320645,8 +320668,10 @@ index 0000000..ae3ea89
|
||||||
+
|
+
|
||||||
+ DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
+ DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||||
+
|
+
|
||||||
+ if (skb)
|
+ if (!skb)
|
||||||
+ rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
|
+ goto fail;
|
||||||
|
+
|
||||||
|
+ rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
|
||||||
+
|
+
|
||||||
+ if (unlikely(skb->len < sizeof(struct ieee80211_radiotap_header)))
|
+ if (unlikely(skb->len < sizeof(struct ieee80211_radiotap_header)))
|
||||||
+ goto fail;
|
+ goto fail;
|
||||||
|
@ -320849,7 +320874,12 @@ index 0000000..ae3ea89
|
||||||
+ mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
+ mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||||
+ strncpy(mon_ndev->name, name, IFNAMSIZ);
|
+ strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||||
+ mon_ndev->name[IFNAMSIZ - 1] = 0;
|
+ 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))
|
+#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
|
||||||
+ mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
|
+ mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
|
||||||
|
@ -320916,7 +320946,11 @@ index 0000000..ae3ea89
|
||||||
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
|
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
|
||||||
+ unsigned char name_assign_type,
|
+ unsigned char name_assign_type,
|
||||||
+ #endif
|
+ #endif
|
||||||
+ enum nl80211_iftype type, u32 *flags, struct vif_params *params)
|
+ enum nl80211_iftype type,
|
||||||
|
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
|
||||||
|
+ u32 *flags,
|
||||||
|
+ #endif
|
||||||
|
+ struct vif_params *params)
|
||||||
+{
|
+{
|
||||||
+ int ret = 0;
|
+ int ret = 0;
|
||||||
+ struct net_device* ndev = NULL;
|
+ struct net_device* ndev = NULL;
|
||||||
|
@ -323310,7 +323344,11 @@ index 0000000..ae3ea89
|
||||||
+#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))
|
||||||
+ wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
|
||||||
|
+ wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
||||||
|
+#else //kernel >=4.12
|
||||||
|
+ wiphy->max_sched_scan_reqs = 1;
|
||||||
|
+#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
|
||||||
|
|
|
@ -1,135 +0,0 @@
|
||||||
diff --git a/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c
|
|
||||||
index ae3ea89..f16ad19
|
|
||||||
--- a/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c
|
|
||||||
+++ b/drivers/net/wireless/rtl8189es/os_dep/linux/ioctl_cfg80211.c
|
|
||||||
@@ -694,7 +694,7 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(scanned == NULL)
|
|
||||||
- rtw_warn_on(1);
|
|
||||||
+ return;
|
|
||||||
|
|
||||||
if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE
|
|
||||||
&& _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE
|
|
||||||
@@ -796,11 +796,30 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
|
|
||||||
u32 freq;
|
|
||||||
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);
|
|
||||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
|
||||||
+
|
|
||||||
+ #if LINUX_VERSION_CODE>=KERNEL_VERSION(4,12,0)
|
|
||||||
+ roam_info.channel = notify_channel;
|
|
||||||
+ roam_info.bssid = cur_network->network.MacAddress;
|
|
||||||
+ roam_info.req_ie =
|
|
||||||
+ pmlmepriv->assoc_req+sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
|
|
||||||
+ roam_info.req_ie_len =
|
|
||||||
+ pmlmepriv->assoc_req_len+sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
|
|
||||||
+ roam_info.resp_ie =
|
|
||||||
+ pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
|
|
||||||
+ roam_info.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
|
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
|
||||||
, notify_channel
|
|
||||||
@@ -811,6 +830,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
|
|
||||||
, pmlmepriv->assoc_rsp+sizeof(struct rtw_ieee80211_hdr_3addr)+6
|
|
||||||
, pmlmepriv->assoc_rsp_len-sizeof(struct rtw_ieee80211_hdr_3addr)-6
|
|
||||||
, GFP_ATOMIC);
|
|
||||||
+ #endif
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@@ -1230,7 +1250,7 @@ _func_enter_;
|
|
||||||
{
|
|
||||||
if (param->u.crypt.idx >= WEP_KEYS
|
|
||||||
#ifdef CONFIG_IEEE80211W
|
|
||||||
- && param->u.crypt.idx > BIP_MAX_KEYID
|
|
||||||
+ || param->u.crypt.idx >= BIP_MAX_KEYID
|
|
||||||
#endif //CONFIG_IEEE80211W
|
|
||||||
)
|
|
||||||
{
|
|
||||||
@@ -1255,7 +1275,7 @@ _func_enter_;
|
|
||||||
wep_key_idx = param->u.crypt.idx;
|
|
||||||
wep_key_len = param->u.crypt.key_len;
|
|
||||||
|
|
||||||
- if ((wep_key_idx > WEP_KEYS) || (wep_key_len <= 0))
|
|
||||||
+ if ((wep_key_idx >= WEP_KEYS) || (wep_key_len <= 0))
|
|
||||||
{
|
|
||||||
ret = -EINVAL;
|
|
||||||
goto exit;
|
|
||||||
@@ -1868,7 +1888,10 @@ enum nl80211_iftype {
|
|
||||||
*/
|
|
||||||
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|
||||||
struct net_device *ndev,
|
|
||||||
- enum nl80211_iftype type, u32 *flags,
|
|
||||||
+ enum nl80211_iftype type,
|
|
||||||
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
|
|
||||||
+ u32 *flags,
|
|
||||||
+ #endif
|
|
||||||
struct vif_params *params)
|
|
||||||
{
|
|
||||||
enum nl80211_iftype old_type;
|
|
||||||
@@ -3709,8 +3732,10 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
|
|
||||||
|
|
||||||
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
|
||||||
|
|
||||||
- if (skb)
|
|
||||||
- rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
|
|
||||||
+ if (!skb)
|
|
||||||
+ goto fail;
|
|
||||||
+
|
|
||||||
+ rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
|
|
||||||
|
|
||||||
if (unlikely(skb->len < sizeof(struct ieee80211_radiotap_header)))
|
|
||||||
goto fail;
|
|
||||||
@@ -3913,7 +3938,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;
|
|
||||||
@@ -3980,7 +4010,11 @@ static int
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
|
|
||||||
unsigned char name_assign_type,
|
|
||||||
#endif
|
|
||||||
- enum nl80211_iftype type, u32 *flags, struct vif_params *params)
|
|
||||||
+ enum nl80211_iftype type,
|
|
||||||
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0))
|
|
||||||
+ u32 *flags,
|
|
||||||
+ #endif
|
|
||||||
+ struct vif_params *params)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
struct net_device* ndev = NULL;
|
|
||||||
@@ -6374,7 +6408,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->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
|
||||||
+#else //kernel >=4.12
|
|
||||||
+ wiphy->max_sched_scan_reqs = 1;
|
|
||||||
+#endif
|
|
||||||
#ifdef CONFIG_PNO_SUPPORT
|
|
||||||
wiphy->max_sched_scan_ssids = MAX_PNO_LIST_COUNT;
|
|
||||||
#endif
|
|
Loading…
Add table
Reference in a new issue