[packages/rtl8812au] - fix building with linux 4.0 - rel 8

baggins baggins at pld-linux.org
Sat Apr 18 20:44:00 CEST 2015


commit 6a1f820b9f0c42980b2c52546e8fe29106ae3458
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Apr 18 20:43:46 2015 +0200

    - fix building with linux 4.0
    - rel 8

 linux-4.0.patch | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 rtl8812au.spec  |  4 +++-
 2 files changed, 62 insertions(+), 1 deletion(-)
---
diff --git a/rtl8812au.spec b/rtl8812au.spec
index ef8a1cc..b1f9422 100644
--- a/rtl8812au.spec
+++ b/rtl8812au.spec
@@ -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}
diff --git a/linux-4.0.patch b/linux-4.0.patch
new file mode 100644
index 0000000..f6ce0c3
--- /dev/null
+++ b/linux-4.0.patch
@@ -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;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rtl8812au.git/commitdiff/6a1f820b9f0c42980b2c52546e8fe29106ae3458



More information about the pld-cvs-commit mailing list