Ver código fonte

Fixed not defined KERNEL_DS

This problem can cause error during compile. Some custom generated kernels may not defined KERNEL_DS.

This KERNEL_DS is defined after kernel 4.x. For just making sure for define KERNEL_DS
Suleyman Poyraz 4 anos atrás
pai
commit
b694a4d1fd

+ 6 - 0
core/rtw_btcoex.c

@@ -17,6 +17,12 @@
 #ifdef CONFIG_BT_COEXIST
 #include <hal_btcoex.h>
 
+#ifdef PLATFORM_LINUX
+	#ifndef KERNEL_DS
+		#define KERNEL_DS   MAKE_MM_SEG(-1UL)   // <----- 0xffffffffffffffff
+	#endif
+#endif
+
 void rtw_btcoex_Initialize(PADAPTER padapter)
 {
 	hal_btcoex_Initialize(padapter);

+ 5 - 0
core/rtw_ieee80211.c

@@ -19,6 +19,11 @@
 #endif
 #include <drv_types.h>
 
+#ifdef PLATFORM_LINUX
+	#ifndef KERNEL_DS
+		#define KERNEL_DS   MAKE_MM_SEG(-1UL)   // <----- 0xffffffffffffffff
+	#endif
+#endif
 
 u8 RTW_WPA_OUI_TYPE[] = { 0x00, 0x50, 0xf2, 1 };
 u16 RTW_WPA_VERSION = 1;

+ 6 - 0
core/rtw_wlan_util.c

@@ -26,6 +26,12 @@
 	#define IPv6_PROTOCOL_OFFSET	20
 #endif
 
+#ifdef PLATFORM_LINUX
+	#ifndef KERNEL_DS
+		#define KERNEL_DS   MAKE_MM_SEG(-1UL)   // <----- 0xffffffffffffffff
+	#endif
+#endif
+
 unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
 unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
 

+ 5 - 0
os_dep/linux/os_intfs.c

@@ -23,6 +23,11 @@
 
 #endif
 
+#ifdef PLATFORM_LINUX
+	#ifndef KERNEL_DS
+		#define KERNEL_DS   MAKE_MM_SEG(-1UL)   // <----- 0xffffffffffffffff
+	#endif
+#endif
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek Wireless Lan Driver");

+ 3 - 0
os_dep/osdep_service.c

@@ -24,6 +24,9 @@
 #ifdef PLATFORM_LINUX
 atomic_t _malloc_cnt = ATOMIC_INIT(0);
 atomic_t _malloc_size = ATOMIC_INIT(0);
+#ifndef KERNEL_DS
+#define KERNEL_DS   MAKE_MM_SEG(-1UL)   // <----- 0xffffffffffffffff
+#endif
 #endif
 #endif /* DBG_MEMORY_LEAK */