diff --git a/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-kernel-4.0.patch b/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-kernel-4.0.patch new file mode 100644 index 0000000000..fffc9eb224 --- /dev/null +++ b/packages/linux-drivers/RTL8812AU/patches/RTL8812AU-kernel-4.0.patch @@ -0,0 +1,69 @@ +diff -Naur RTL8812AU-b22cbdf/os_dep/linux/ioctl_cfg80211.c RTL8812AU-b22cbdf.patch/os_dep/linux/ioctl_cfg80211.c +--- RTL8812AU-b22cbdf/os_dep/linux/ioctl_cfg80211.c 2014-04-12 01:49:09.000000000 +0200 ++++ RTL8812AU-b22cbdf.patch/os_dep/linux/ioctl_cfg80211.c 2015-04-04 22:08:57.188321228 +0200 +@@ -20,6 +20,7 @@ + #define _IOCTL_CFG80211_C_ + + #include ++#include + + #ifdef CONFIG_IOCTL_CFG80211 + +@@ -1422,16 +1423,32 @@ + goto exit; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) ++ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL); ++#else + sinfo->filled |= STATION_INFO_SIGNAL; ++#endif + sinfo->signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) ++ sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE); ++#else + sinfo->filled |= STATION_INFO_TX_BITRATE; ++#endif + sinfo->txrate.legacy = rtw_get_cur_max_rate(padapter); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) ++ sinfo->filled |= BIT(NL80211_STA_INFO_RX_PACKETS); ++#else + sinfo->filled |= STATION_INFO_RX_PACKETS; ++#endif + sinfo->rx_packets = sta_rx_data_pkts(psta); + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) ++ sinfo->filled |= BIT(NL80211_STA_INFO_TX_PACKETS); ++#else + sinfo->filled |= STATION_INFO_TX_PACKETS; ++#endif + sinfo->tx_packets = psta->sta_stats.tx_pkts; + + } +@@ -3019,7 +3036,9 @@ + ie_offset = _REASOCREQ_IE_OFFSET_; + + sinfo.filled = 0; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) + sinfo.filled = STATION_INFO_ASSOC_REQ_IES; ++#endif + sinfo.assoc_req_ies = pmgmt_frame + WLAN_HDR_A3_LEN + ie_offset; + sinfo.assoc_req_ies_len = frame_len - WLAN_HDR_A3_LEN - ie_offset; + cfg80211_new_sta(ndev, GetAddr2Ptr(pmgmt_frame), &sinfo, GFP_ATOMIC); +diff -Naur RTL8812AU-b22cbdf/os_dep/linux/rtw_android.c RTL8812AU-b22cbdf.patch/os_dep/linux/rtw_android.c +--- RTL8812AU-b22cbdf/os_dep/linux/rtw_android.c 2014-04-12 01:49:09.000000000 +0200 ++++ RTL8812AU-b22cbdf.patch/os_dep/linux/rtw_android.c 2015-04-04 20:30:01.213141833 +0200 +@@ -224,7 +224,11 @@ + { + int cmd_num; + for(cmd_num=0 ; cmd_num= KERNEL_VERSION(4, 0, 0)) ++ if(!strncasecmp(cmdstr , android_wifi_cmd_str[cmd_num], strlen(android_wifi_cmd_str[cmd_num])) ) ++#else + if(0 == strnicmp(cmdstr , android_wifi_cmd_str[cmd_num], strlen(android_wifi_cmd_str[cmd_num])) ) ++#endif + break; + + return cmd_num;