]> git.pld-linux.org Git - packages/rtl8812au.git/commitdiff
- fix building with linux 4.0 auto/th/rtl8812au-4.3.2_11100.20140411-0.20140901.8
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 18 Apr 2015 18:43:46 +0000 (20:43 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 18 Apr 2015 18:43:46 +0000 (20:43 +0200)
- rel 8

linux-4.0.patch [new file with mode: 0644]
rtl8812au.spec

diff --git a/linux-4.0.patch b/linux-4.0.patch
new file mode 100644 (file)
index 0000000..f6ce0c3
--- /dev/null
@@ -0,0 +1,59 @@
+--- rtl8812au_linux-master/os_dep/linux/ioctl_cfg80211.c.orig  2015-04-18 20:34:59.846186483 +0200
++++ rtl8812au_linux-master/os_dep/linux/ioctl_cfg80211.c       2015-04-18 20:36:51.399524482 +0200
+@@ -1736,16 +1736,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;
+       }
+@@ -3425,7 +3425,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);
+--- rtl8812au_linux-master/os_dep/linux/rtw_android.c~ 2014-07-21 15:06:45.000000000 +0200
++++ rtl8812au_linux-master/os_dep/linux/rtw_android.c  2015-04-18 20:42:32.736205424 +0200
+@@ -342,7 +342,11 @@
+ {
+       int cmd_num;
+       for(cmd_num=0 ; cmd_num<ANDROID_WIFI_CMD_MAX; cmd_num++)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
++              if(0 == 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;
index ef8a1cc6eb77fcc55e30887e31c0c135d83c5015..b1f9422be3a221f797b1c7829d8c83e65d205711 100644 (file)
@@ -4,7 +4,7 @@
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
-%define                rel     7
+%define                rel     8
 %define                snap    20140901
 %define                pname   rtl8812au
 Summary:       Driver for AC1200 (802.11ac) Wireless Dual-Band USB Adapter
@@ -26,6 +26,7 @@ Patch3:               update-cfg80211-support.patch
 Patch4:                warnings.patch
 Patch5:                gcc-4.9.patch
 Patch6:                linux-3.18.patch
+Patch7:                linux-4.0.patch
 BuildRequires: rpmbuild(macros) >= 1.701
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRoot:     %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
@@ -74,6 +75,7 @@ Driver for AC1200 (802.11ac) Wireless Dual-Band USB Adapter\
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 %build
 %{expand:%build_kernel_packages}
This page took 0.129495 seconds and 4 git commands to generate.