external/kernel-drivers
Revisión | 20408ada6ada48a921b0d81833b863ce81c8a912 (tree) |
---|---|
Tiempo | 2020-04-20 17:26:20 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Update rtl8812au driver
From https://github.com/lwfinger/rtl8812au v5.2.6 branch
commit 2f94f88.
@@ -36,76 +36,33 @@ | ||
36 | 36 | #define _FALSE FALSE |
37 | 37 | #endif |
38 | 38 | |
39 | -#ifdef PLATFORM_WINDOWS | |
40 | - | |
41 | - typedef signed char s8; | |
42 | - typedef unsigned char u8; | |
43 | - | |
44 | - typedef signed short s16; | |
45 | - typedef unsigned short u16; | |
46 | - | |
47 | - typedef signed long s32; | |
48 | - typedef unsigned long u32; | |
49 | - | |
50 | - typedef unsigned int uint; | |
51 | - typedef signed int sint; | |
52 | - | |
53 | - | |
54 | - typedef signed long long s64; | |
55 | - typedef unsigned long long u64; | |
56 | - | |
57 | - #ifdef NDIS50_MINIPORT | |
58 | - | |
59 | - #define NDIS_MAJOR_VERSION 5 | |
60 | - #define NDIS_MINOR_VERSION 0 | |
61 | - | |
62 | - #endif | |
63 | - | |
64 | - #ifdef NDIS51_MINIPORT | |
65 | - | |
66 | - #define NDIS_MAJOR_VERSION 5 | |
67 | - #define NDIS_MINOR_VERSION 1 | |
68 | - | |
69 | - #endif | |
70 | - | |
71 | - typedef NDIS_PROC proc_t; | |
72 | - | |
73 | - typedef LONG atomic_t; | |
74 | - | |
39 | +#include <linux/version.h> | |
40 | +#include <linux/types.h> | |
41 | +#include <linux/module.h> | |
42 | +#include <linux/kernel.h> | |
43 | +#include <linux/init.h> | |
44 | +#include <linux/utsname.h> | |
45 | +#define IN | |
46 | +#define OUT | |
47 | +#define NDIS_OID uint | |
48 | +#define NDIS_STATUS uint | |
49 | + | |
50 | +typedef signed int sint; | |
51 | + | |
52 | +#define UCHAR u8 | |
53 | +#define USHORT u16 | |
54 | +#define UINT u32 | |
55 | +#define ULONG u32 | |
56 | + | |
57 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)) | |
58 | + typedef _Bool bool; | |
75 | 59 | #endif |
76 | 60 | |
61 | +typedef void (*proc_t)(void *); | |
77 | 62 | |
78 | -#ifdef PLATFORM_LINUX | |
79 | - #include <linux/version.h> | |
80 | - #include <linux/types.h> | |
81 | - #include <linux/module.h> | |
82 | - #include <linux/kernel.h> | |
83 | - #include <linux/init.h> | |
84 | - #include <linux/utsname.h> | |
85 | - #define IN | |
86 | - #define OUT | |
87 | - #define NDIS_OID uint | |
88 | - #define NDIS_STATUS uint | |
89 | - | |
90 | - typedef signed int sint; | |
91 | - | |
92 | - #define UCHAR u8 | |
93 | - #define USHORT u16 | |
94 | - #define UINT u32 | |
95 | - #define ULONG u32 | |
96 | - | |
97 | - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)) | |
98 | - typedef _Bool bool; | |
99 | - #endif | |
100 | - | |
101 | - typedef void (*proc_t)(void *); | |
102 | - | |
103 | - typedef __kernel_size_t SIZE_T; | |
104 | - typedef __kernel_ssize_t SSIZE_T; | |
105 | - #define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field) | |
106 | - | |
107 | -#endif | |
108 | - | |
63 | +typedef __kernel_size_t SIZE_T; | |
64 | +typedef __kernel_ssize_t SSIZE_T; | |
65 | +#define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field) | |
109 | 66 | |
110 | 67 | #define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T)) |
111 | 68 | #define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1) |
@@ -1,32 +0,0 @@ | ||
1 | -#ifndef __CUSTOM_GPIO_H__ | |
2 | -#define __CUSTOM_GPIO_H___ | |
3 | - | |
4 | -#include <drv_conf.h> | |
5 | -#include <osdep_service.h> | |
6 | - | |
7 | -#ifdef PLATFORM_OS_XP | |
8 | - #include <drv_types_xp.h> | |
9 | -#endif | |
10 | - | |
11 | -#ifdef PLATFORM_OS_CE | |
12 | - #include <drv_types_ce.h> | |
13 | -#endif | |
14 | - | |
15 | -#ifdef PLATFORM_LINUX | |
16 | - #include <drv_types_linux.h> | |
17 | -#endif | |
18 | - | |
19 | -typedef enum cust_gpio_modes { | |
20 | - WLAN_PWDN_ON, | |
21 | - WLAN_PWDN_OFF, | |
22 | - WLAN_POWER_ON, | |
23 | - WLAN_POWER_OFF, | |
24 | - WLAN_BT_PWDN_ON, | |
25 | - WLAN_BT_PWDN_OFF | |
26 | -} cust_gpio_modes_t; | |
27 | - | |
28 | -extern int rtw_wifi_gpio_init(void); | |
29 | -extern int rtw_wifi_gpio_deinit(void); | |
30 | -extern void rtw_wifi_gpio_wlan_ctrl(int onoff); | |
31 | - | |
32 | -#endif |
@@ -22,12 +22,6 @@ | ||
22 | 22 | #include "autoconf.h" |
23 | 23 | #include "hal_ic_cfg.h" |
24 | 24 | |
25 | -#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS) | |
26 | - | |
27 | - #error "Shall be Linux or Windows, but not both!\n" | |
28 | - | |
29 | -#endif | |
30 | - | |
31 | 25 | #if defined(CONFIG_MCC_MODE) && (!defined(CONFIG_CONCURRENT_MODE)) |
32 | 26 | |
33 | 27 | #error "Enable CONCURRENT_MODE before enable MCC MODE\n" |
@@ -38,17 +38,7 @@ | ||
38 | 38 | #include <net/arp.h> |
39 | 39 | #endif |
40 | 40 | |
41 | -#ifdef PLATFORM_OS_XP | |
42 | - #include <drv_types_xp.h> | |
43 | -#endif | |
44 | - | |
45 | -#ifdef PLATFORM_OS_CE | |
46 | - #include <drv_types_ce.h> | |
47 | -#endif | |
48 | - | |
49 | -#ifdef PLATFORM_LINUX | |
50 | - #include <drv_types_linux.h> | |
51 | -#endif | |
41 | +#include <drv_types_linux.h> | |
52 | 42 | |
53 | 43 | enum _NIC_VERSION { |
54 | 44 |
@@ -102,7 +92,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER; | ||
102 | 92 | #include <rtw_io.h> |
103 | 93 | #include <rtw_ioctl.h> |
104 | 94 | #include <rtw_ioctl_set.h> |
105 | -#include <rtw_ioctl_query.h> | |
106 | 95 | #include <rtw_ioctl_rtl.h> |
107 | 96 | #include <osdep_intf.h> |
108 | 97 | #include <rtw_eeprom.h> |
@@ -957,8 +946,6 @@ struct dvobj_priv { | ||
957 | 946 | |
958 | 947 | /*-------- below is for USB INTERFACE --------*/ |
959 | 948 | |
960 | -#ifdef CONFIG_USB_HCI | |
961 | - | |
962 | 949 | u8 usb_speed; /* 1.1, 2.0 or 3.0 */ |
963 | 950 | u8 nr_endpoint; |
964 | 951 | u8 RtNumInPipes; |
@@ -978,92 +965,8 @@ struct dvobj_priv { | ||
978 | 965 | u8 *usb_vendor_req_buf; |
979 | 966 | #endif |
980 | 967 | |
981 | -#ifdef PLATFORM_WINDOWS | |
982 | - /* related device objects */ | |
983 | - PDEVICE_OBJECT pphysdevobj;/* pPhysDevObj; */ | |
984 | - PDEVICE_OBJECT pfuncdevobj;/* pFuncDevObj; */ | |
985 | - PDEVICE_OBJECT pnextdevobj;/* pNextDevObj; */ | |
986 | - | |
987 | - u8 nextdevstacksz;/* unsigned char NextDeviceStackSize; */ /* = (CHAR)CEdevice->pUsbDevObj->StackSize + 1; */ | |
988 | - | |
989 | - /* urb for control diescriptor request */ | |
990 | - | |
991 | -#ifdef PLATFORM_OS_XP | |
992 | - struct _URB_CONTROL_DESCRIPTOR_REQUEST descriptor_urb; | |
993 | - PUSB_CONFIGURATION_DESCRIPTOR pconfig_descriptor;/* UsbConfigurationDescriptor; */ | |
994 | -#endif | |
995 | - | |
996 | -#ifdef PLATFORM_OS_CE | |
997 | - WCHAR active_path[MAX_ACTIVE_REG_PATH]; /* adapter regpath */ | |
998 | - USB_EXTENSION usb_extension; | |
999 | - | |
1000 | - _nic_hdl pipehdls_r8192c[0x10]; | |
1001 | -#endif | |
1002 | - | |
1003 | - u32 config_descriptor_len;/* ULONG UsbConfigurationDescriptorLength; */ | |
1004 | -#endif/* PLATFORM_WINDOWS */ | |
1005 | - | |
1006 | -#ifdef PLATFORM_LINUX | |
1007 | - struct usb_interface *pusbintf; | |
1008 | - struct usb_device *pusbdev; | |
1009 | -#endif/* PLATFORM_LINUX */ | |
1010 | - | |
1011 | -#ifdef PLATFORM_FREEBSD | |
1012 | 968 | struct usb_interface *pusbintf; |
1013 | 969 | struct usb_device *pusbdev; |
1014 | -#endif/* PLATFORM_FREEBSD */ | |
1015 | - | |
1016 | -#endif/* CONFIG_USB_HCI */ | |
1017 | - | |
1018 | - /*-------- below is for PCIE INTERFACE --------*/ | |
1019 | - | |
1020 | -#ifdef CONFIG_PCI_HCI | |
1021 | - | |
1022 | -#ifdef PLATFORM_LINUX | |
1023 | - struct pci_dev *ppcidev; | |
1024 | - | |
1025 | - /* PCI MEM map */ | |
1026 | - unsigned long pci_mem_end; /* shared mem end */ | |
1027 | - unsigned long pci_mem_start; /* shared mem start */ | |
1028 | - | |
1029 | - /* PCI IO map */ | |
1030 | - unsigned long pci_base_addr; /* device I/O address */ | |
1031 | - | |
1032 | -#ifdef RTK_129X_PLATFORM | |
1033 | - unsigned long ctrl_start; | |
1034 | - /* PCI MASK addr */ | |
1035 | - unsigned long mask_addr; | |
1036 | - | |
1037 | - /* PCI TRANSLATE addr */ | |
1038 | - unsigned long tran_addr; | |
1039 | - | |
1040 | - _lock io_reg_lock; | |
1041 | -#endif | |
1042 | - | |
1043 | - /* PciBridge */ | |
1044 | - struct pci_priv pcipriv; | |
1045 | - | |
1046 | - unsigned int irq; /* get from pci_dev.irq, store to net_device.irq */ | |
1047 | - u16 irqline; | |
1048 | - u8 irq_enabled; | |
1049 | - RT_ISR_CONTENT isr_content; | |
1050 | - _lock irq_th_lock; | |
1051 | - | |
1052 | - /* ASPM */ | |
1053 | - u8 const_pci_aspm; | |
1054 | - u8 const_amdpci_aspm; | |
1055 | - u8 const_hwsw_rfoff_d3; | |
1056 | - u8 const_support_pciaspm; | |
1057 | - /* pci-e bridge */ | |
1058 | - u8 const_hostpci_aspm_setting; | |
1059 | - /* pci-e device */ | |
1060 | - u8 const_devicepci_aspm_setting; | |
1061 | - u8 b_support_aspm; /* If it supports ASPM, Offset[560h] = 0x40, otherwise Offset[560h] = 0x00. */ | |
1062 | - u8 b_support_backdoor; | |
1063 | - u8 bdma64; | |
1064 | -#endif/* PLATFORM_LINUX */ | |
1065 | - | |
1066 | -#endif/* CONFIG_PCI_HCI */ | |
1067 | 970 | |
1068 | 971 | #ifdef CONFIG_MCC_MODE |
1069 | 972 | struct mcc_obj_priv mcc_objpriv; |
@@ -1114,27 +1017,12 @@ static inline void dev_clr_drv_stopped(struct dvobj_priv *dvobj) | ||
1114 | 1017 | #define dev_is_surprise_removed(dvobj) (ATOMIC_READ(&dvobj->bSurpriseRemoved) == _TRUE) |
1115 | 1018 | #define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == _TRUE) |
1116 | 1019 | |
1117 | -#ifdef PLATFORM_LINUX | |
1118 | 1020 | static struct device *dvobj_to_dev(struct dvobj_priv *dvobj) |
1119 | 1021 | { |
1120 | 1022 | /* todo: get interface type from dvobj and the return the dev accordingly */ |
1121 | -#ifdef RTW_DVOBJ_CHIP_HW_TYPE | |
1122 | -#endif | |
1123 | 1023 | |
1124 | -#ifdef CONFIG_USB_HCI | |
1125 | 1024 | return &dvobj->pusbintf->dev; |
1126 | -#endif | |
1127 | -#ifdef CONFIG_SDIO_HCI | |
1128 | - return &dvobj->intf_data.func->dev; | |
1129 | -#endif | |
1130 | -#ifdef CONFIG_GSPI_HCI | |
1131 | - return &dvobj->intf_data.func->dev; | |
1132 | -#endif | |
1133 | -#ifdef CONFIG_PCI_HCI | |
1134 | - return &dvobj->ppcidev->dev; | |
1135 | -#endif | |
1136 | 1025 | } |
1137 | -#endif | |
1138 | 1026 | |
1139 | 1027 | _adapter *dvobj_get_port0_adapter(struct dvobj_priv *dvobj); |
1140 | 1028 | _adapter *dvobj_get_unregisterd_adapter(struct dvobj_priv *dvobj); |
@@ -1302,11 +1190,6 @@ struct _ADAPTER { | ||
1302 | 1190 | _thread_hdl_ recvThread; |
1303 | 1191 | |
1304 | 1192 | u8 registered; |
1305 | -#ifndef PLATFORM_LINUX | |
1306 | - NDIS_STATUS(*dvobj_init)(struct dvobj_priv *dvobj); | |
1307 | - void (*dvobj_deinit)(struct dvobj_priv *dvobj); | |
1308 | -#endif | |
1309 | - | |
1310 | 1193 | u32(*intf_init)(struct dvobj_priv *dvobj); |
1311 | 1194 | void (*intf_deinit)(struct dvobj_priv *dvobj); |
1312 | 1195 | int (*intf_alloc_irq)(struct dvobj_priv *dvobj); |
@@ -1316,18 +1199,6 @@ struct _ADAPTER { | ||
1316 | 1199 | void (*intf_start)(_adapter *adapter); |
1317 | 1200 | void (*intf_stop)(_adapter *adapter); |
1318 | 1201 | |
1319 | -#ifdef PLATFORM_WINDOWS | |
1320 | - _nic_hdl hndis_adapter;/* hNdisAdapter(NDISMiniportAdapterHandle); */ | |
1321 | - _nic_hdl hndis_config;/* hNdisConfiguration; */ | |
1322 | - NDIS_STRING fw_img; | |
1323 | - | |
1324 | - u32 NdisPacketFilter; | |
1325 | - u8 MCList[MAX_MCAST_LIST_NUM][6]; | |
1326 | - u32 MCAddrCount; | |
1327 | -#endif /* end of PLATFORM_WINDOWS */ | |
1328 | - | |
1329 | - | |
1330 | -#ifdef PLATFORM_LINUX | |
1331 | 1202 | _nic_hdl pnetdev; |
1332 | 1203 | char old_ifname[IFNAMSIZ]; |
1333 | 1204 |
@@ -1360,13 +1231,6 @@ struct _ADAPTER { | ||
1360 | 1231 | |
1361 | 1232 | #endif /* CONFIG_IOCTL_CFG80211 */ |
1362 | 1233 | |
1363 | -#endif /* PLATFORM_LINUX */ | |
1364 | - | |
1365 | -#ifdef PLATFORM_FREEBSD | |
1366 | - _nic_hdl pifp; | |
1367 | - int bup; | |
1368 | - _lock glock; | |
1369 | -#endif /* PLATFORM_FREEBSD */ | |
1370 | 1234 | u8 mac_addr[ETH_ALEN]; |
1371 | 1235 | int net_closed; |
1372 | 1236 |
@@ -20,16 +20,6 @@ | ||
20 | 20 | #ifndef __IEEE80211_H |
21 | 21 | #define __IEEE80211_H |
22 | 22 | |
23 | - | |
24 | -#ifndef CONFIG_RTL8711FW | |
25 | - | |
26 | - #if defined PLATFORM_OS_XP | |
27 | - #include <ntstrsafe.h> | |
28 | - #endif | |
29 | -#else | |
30 | - | |
31 | -#endif | |
32 | - | |
33 | 23 | #define MGMT_QUEUE_NUM 5 |
34 | 24 | |
35 | 25 | #define ETH_ALEN 6 |
@@ -345,8 +335,6 @@ struct ieee_ibss_seq { | ||
345 | 335 | _list list; |
346 | 336 | }; |
347 | 337 | |
348 | -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) || defined(PLATFORM_FREEBSD) | |
349 | - | |
350 | 338 | struct rtw_ieee80211_hdr { |
351 | 339 | __le16 frame_ctl; |
352 | 340 | __le16 duration_id; |
@@ -395,8 +383,6 @@ struct eapol { | ||
395 | 383 | __le16 length; |
396 | 384 | } __attribute__((packed)); |
397 | 385 | |
398 | -#endif | |
399 | - | |
400 | 386 | enum eap_type { |
401 | 387 | EAP_PACKET = 0, |
402 | 388 | EAPOL_START, |
@@ -505,8 +491,6 @@ enum eap_type { | ||
505 | 491 | |
506 | 492 | #define P80211_OUI_LEN 3 |
507 | 493 | |
508 | -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) || defined(PLATFORM_FREEBSD) | |
509 | - | |
510 | 494 | struct ieee80211_snap_hdr { |
511 | 495 | |
512 | 496 | u8 dsap; /* always 0xAA */ |
@@ -516,24 +500,6 @@ struct ieee80211_snap_hdr { | ||
516 | 500 | |
517 | 501 | } __attribute__((packed)); |
518 | 502 | |
519 | -#endif | |
520 | - | |
521 | -#ifdef PLATFORM_WINDOWS | |
522 | - | |
523 | -#pragma pack(1) | |
524 | -struct ieee80211_snap_hdr { | |
525 | - | |
526 | - u8 dsap; /* always 0xAA */ | |
527 | - u8 ssap; /* always 0xAA */ | |
528 | - u8 ctrl; /* always 0x03 */ | |
529 | - u8 oui[P80211_OUI_LEN]; /* organizational universal id */ | |
530 | - | |
531 | -}; | |
532 | -#pragma pack() | |
533 | - | |
534 | -#endif | |
535 | - | |
536 | - | |
537 | 503 | #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr) |
538 | 504 | |
539 | 505 | #define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE) |
@@ -992,31 +958,6 @@ struct ieee80211_frag_entry { | ||
992 | 958 | u8 dst_addr[ETH_ALEN]; |
993 | 959 | }; |
994 | 960 | |
995 | -#ifndef PLATFORM_FREEBSD /* Baron BSD has already defined */ | |
996 | -struct ieee80211_stats { | |
997 | - uint tx_unicast_frames; | |
998 | - uint tx_multicast_frames; | |
999 | - uint tx_fragments; | |
1000 | - uint tx_unicast_octets; | |
1001 | - uint tx_multicast_octets; | |
1002 | - uint tx_deferred_transmissions; | |
1003 | - uint tx_single_retry_frames; | |
1004 | - uint tx_multiple_retry_frames; | |
1005 | - uint tx_retry_limit_exceeded; | |
1006 | - uint tx_discards; | |
1007 | - uint rx_unicast_frames; | |
1008 | - uint rx_multicast_frames; | |
1009 | - uint rx_fragments; | |
1010 | - uint rx_unicast_octets; | |
1011 | - uint rx_multicast_octets; | |
1012 | - uint rx_fcs_errors; | |
1013 | - uint rx_discards_no_buffer; | |
1014 | - uint tx_discards_wrong_sa; | |
1015 | - uint rx_discards_undecryptable; | |
1016 | - uint rx_message_in_msg_fragments; | |
1017 | - uint rx_message_in_bad_msg_fragments; | |
1018 | -}; | |
1019 | -#endif /* PLATFORM_FREEBSD */ | |
1020 | 961 | struct ieee80211_softmac_stats { |
1021 | 962 | uint rx_ass_ok; |
1022 | 963 | uint rx_ass_err; |
@@ -1061,8 +1002,6 @@ struct ieee80211_softmac_stats { | ||
1061 | 1002 | #define BIP_AAD_SIZE 20 |
1062 | 1003 | #endif /* CONFIG_IEEE80211W */ |
1063 | 1004 | |
1064 | -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) | |
1065 | - | |
1066 | 1005 | struct ieee80211_security { |
1067 | 1006 | u16 active_key:2, |
1068 | 1007 | enabled:1, |
@@ -1075,26 +1014,6 @@ struct ieee80211_security { | ||
1075 | 1014 | __le16 flags; |
1076 | 1015 | } __attribute__((packed)); |
1077 | 1016 | |
1078 | -#endif | |
1079 | - | |
1080 | -#ifdef PLATFORM_WINDOWS | |
1081 | - | |
1082 | -#pragma pack(1) | |
1083 | -struct ieee80211_security { | |
1084 | - u16 active_key:2, | |
1085 | - enabled:1, | |
1086 | - auth_mode:2, | |
1087 | - auth_algo:4, | |
1088 | - unicast_uses_group:1; | |
1089 | - u8 key_sizes[WEP_KEYS]; | |
1090 | - u8 keys[WEP_KEYS][WEP_KEY_LEN]; | |
1091 | - u8 level; | |
1092 | - u16 flags; | |
1093 | -} ; | |
1094 | -#pragma pack() | |
1095 | - | |
1096 | -#endif | |
1097 | - | |
1098 | 1017 | /* |
1099 | 1018 | |
1100 | 1019 | 802.11 data frame from AP |
@@ -1135,8 +1054,6 @@ struct ieee80211_header_data { | ||
1135 | 1054 | #define MFIE_TYPE_RATES_EX 50 |
1136 | 1055 | #define MFIE_TYPE_GENERIC 221 |
1137 | 1056 | |
1138 | -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) | |
1139 | - | |
1140 | 1057 | struct ieee80211_info_element_hdr { |
1141 | 1058 | u8 id; |
1142 | 1059 | u8 len; |
@@ -1147,25 +1064,6 @@ struct ieee80211_info_element { | ||
1147 | 1064 | u8 len; |
1148 | 1065 | u8 data[0]; |
1149 | 1066 | } __attribute__((packed)); |
1150 | -#endif | |
1151 | - | |
1152 | -#ifdef PLATFORM_WINDOWS | |
1153 | - | |
1154 | -#pragma pack(1) | |
1155 | -struct ieee80211_info_element_hdr { | |
1156 | - u8 id; | |
1157 | - u8 len; | |
1158 | -} ; | |
1159 | - | |
1160 | -struct ieee80211_info_element { | |
1161 | - u8 id; | |
1162 | - u8 len; | |
1163 | - u8 data[0]; | |
1164 | -} ; | |
1165 | -#pragma pack() | |
1166 | - | |
1167 | -#endif | |
1168 | - | |
1169 | 1067 | |
1170 | 1068 | /* |
1171 | 1069 | * These are the data types that can make up management packets |
@@ -1187,10 +1085,6 @@ struct ieee80211_info_element { | ||
1187 | 1085 | #define IEEE80211_DEFAULT_TX_ESSID "Penguin" |
1188 | 1086 | #define IEEE80211_DEFAULT_BASIC_RATE 10 |
1189 | 1087 | |
1190 | - | |
1191 | -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) | |
1192 | - | |
1193 | - | |
1194 | 1088 | struct ieee80211_authentication { |
1195 | 1089 | struct ieee80211_header_data header; |
1196 | 1090 | u16 algorithm; |
@@ -1199,7 +1093,6 @@ struct ieee80211_authentication { | ||
1199 | 1093 | /* struct ieee80211_info_element_hdr info_element; */ |
1200 | 1094 | } __attribute__((packed)); |
1201 | 1095 | |
1202 | - | |
1203 | 1096 | struct ieee80211_probe_response { |
1204 | 1097 | struct ieee80211_header_data header; |
1205 | 1098 | u32 time_stamp[2]; |
@@ -1228,58 +1121,6 @@ struct ieee80211_assoc_response_frame { | ||
1228 | 1121 | u16 aid; |
1229 | 1122 | /* struct ieee80211_info_element info_element; supported rates */ |
1230 | 1123 | } __attribute__((packed)); |
1231 | -#endif | |
1232 | - | |
1233 | - | |
1234 | - | |
1235 | -#ifdef PLATFORM_WINDOWS | |
1236 | - | |
1237 | -#pragma pack(1) | |
1238 | - | |
1239 | -struct ieee80211_authentication { | |
1240 | - struct ieee80211_header_data header; | |
1241 | - u16 algorithm; | |
1242 | - u16 transaction; | |
1243 | - u16 status; | |
1244 | - /* struct ieee80211_info_element_hdr info_element; */ | |
1245 | -} ; | |
1246 | - | |
1247 | - | |
1248 | -struct ieee80211_probe_response { | |
1249 | - struct ieee80211_header_data header; | |
1250 | - u32 time_stamp[2]; | |
1251 | - u16 beacon_interval; | |
1252 | - u16 capability; | |
1253 | - struct ieee80211_info_element info_element; | |
1254 | -} ; | |
1255 | - | |
1256 | -struct ieee80211_probe_request { | |
1257 | - struct ieee80211_header_data header; | |
1258 | - /*struct ieee80211_info_element info_element;*/ | |
1259 | -} ; | |
1260 | - | |
1261 | -struct ieee80211_assoc_request_frame { | |
1262 | - struct rtw_ieee80211_hdr_3addr header; | |
1263 | - u16 capability; | |
1264 | - u16 listen_interval; | |
1265 | - /* u8 current_ap[ETH_ALEN]; */ | |
1266 | - struct ieee80211_info_element_hdr info_element; | |
1267 | -} ; | |
1268 | - | |
1269 | -struct ieee80211_assoc_response_frame { | |
1270 | - struct rtw_ieee80211_hdr_3addr header; | |
1271 | - u16 capability; | |
1272 | - u16 status; | |
1273 | - u16 aid; | |
1274 | - /* struct ieee80211_info_element info_element; supported rates */ | |
1275 | -}; | |
1276 | - | |
1277 | -#pragma pack() | |
1278 | - | |
1279 | -#endif | |
1280 | - | |
1281 | - | |
1282 | - | |
1283 | 1124 | |
1284 | 1125 | struct ieee80211_txb { |
1285 | 1126 | u8 nr_frags; |
@@ -1333,8 +1174,6 @@ join_res: | ||
1333 | 1174 | > 0: TID |
1334 | 1175 | */ |
1335 | 1176 | |
1336 | -#ifndef PLATFORM_FREEBSD /* Baron BSD has already defined */ | |
1337 | - | |
1338 | 1177 | enum ieee80211_state { |
1339 | 1178 | |
1340 | 1179 | /* the card is not linked at all */ |
@@ -1373,7 +1212,6 @@ enum ieee80211_state { | ||
1373 | 1212 | IEEE80211_LINKED_SCANNING, |
1374 | 1213 | |
1375 | 1214 | }; |
1376 | -#endif /* PLATFORM_FREEBSD */ | |
1377 | 1215 | |
1378 | 1216 | #define DEFAULT_MAX_SCAN_AGE (15 * HZ) |
1379 | 1217 | #define DEFAULT_FTS 2346 |
@@ -1386,12 +1224,6 @@ enum ieee80211_state { | ||
1386 | 1224 | #define PORT_FMT "%u" |
1387 | 1225 | #define PORT_ARG(x) ntohs(*((__be16 *)(x))) |
1388 | 1226 | |
1389 | -#ifdef PLATFORM_FREEBSD /* Baron change func to macro */ | |
1390 | -#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff)) | |
1391 | -#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \ | |
1392 | - (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ | |
1393 | - (((Addr[5]) & 0xff) == 0xff)) | |
1394 | -#else | |
1395 | 1227 | extern __inline int is_multicast_mac_addr(const u8 *addr) |
1396 | 1228 | { |
1397 | 1229 | return (addr[0] != 0xff) && (0x01 & addr[0]); |
@@ -1408,7 +1240,6 @@ extern __inline int is_zero_mac_addr(const u8 *addr) | ||
1408 | 1240 | return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ |
1409 | 1241 | (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); |
1410 | 1242 | } |
1411 | -#endif /* PLATFORM_FREEBSD */ | |
1412 | 1243 | |
1413 | 1244 | #define CFG_IEEE80211_RESERVE_FCS (1<<0) |
1414 | 1245 | #define CFG_IEEE80211_COMPUTE_FCS (1<<1) |
@@ -1555,9 +1386,7 @@ enum rtw_ieee80211_ft_actioncode { | ||
1555 | 1386 | |
1556 | 1387 | #define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs) |
1557 | 1388 | * 00:50:F2 */ |
1558 | -#ifndef PLATFORM_FREEBSD /* Baron BSD has defined */ | |
1559 | - #define WME_OUI_TYPE 2 | |
1560 | -#endif /* PLATFORM_FREEBSD */ | |
1389 | +#define WME_OUI_TYPE 2 | |
1561 | 1390 | #define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0 |
1562 | 1391 | #define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1 |
1563 | 1392 | #define WME_OUI_SUBTYPE_TSPEC_ELEMENT 2 |
@@ -48,7 +48,6 @@ | ||
48 | 48 | #define PMKID_LEN 16 |
49 | 49 | |
50 | 50 | |
51 | -#ifdef PLATFORM_LINUX | |
52 | 51 | struct wpa_ie_hdr { |
53 | 52 | u8 elem_id; |
54 | 53 | u8 len; |
@@ -102,29 +101,6 @@ struct wme_parameter_element { | ||
102 | 101 | |
103 | 102 | } __attribute__((packed)); |
104 | 103 | |
105 | -#endif | |
106 | - | |
107 | -#ifdef PLATFORM_WINDOWS | |
108 | - | |
109 | -#pragma pack(1) | |
110 | - | |
111 | -struct wpa_ie_hdr { | |
112 | - u8 elem_id; | |
113 | - u8 len; | |
114 | - u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */ | |
115 | - u8 version[2]; /* little endian */ | |
116 | -}; | |
117 | - | |
118 | -struct rsn_ie_hdr { | |
119 | - u8 elem_id; /* WLAN_EID_RSN */ | |
120 | - u8 len; | |
121 | - u8 version[2]; /* little endian */ | |
122 | -}; | |
123 | - | |
124 | -#pragma pack() | |
125 | - | |
126 | -#endif | |
127 | - | |
128 | 104 | #define WPA_PUT_LE16(a, val) \ |
129 | 105 | do { \ |
130 | 106 | (a)[1] = ((u16) (val)) >> 8; \ |
@@ -199,8 +175,6 @@ enum ieee80211_back_parties { | ||
199 | 175 | WLAN_BACK_TIMER = 2, |
200 | 176 | }; |
201 | 177 | |
202 | -#ifdef PLATFORM_LINUX | |
203 | - | |
204 | 178 | struct ieee80211_mgmt { |
205 | 179 | __le16 frame_control; |
206 | 180 | __le16 duration; |
@@ -312,111 +286,7 @@ struct ieee80211_mgmt { | ||
312 | 286 | } __attribute__((packed)) u; |
313 | 287 | } __attribute__((packed)); |
314 | 288 | |
315 | -#endif | |
316 | - | |
317 | - | |
318 | -#ifdef PLATFORM_WINDOWS | |
319 | - | |
320 | -#pragma pack(1) | |
321 | - | |
322 | -struct ieee80211_mgmt { | |
323 | - __le16 frame_control; | |
324 | - __le16 duration; | |
325 | - u8 da[6]; | |
326 | - u8 sa[6]; | |
327 | - u8 bssid[6]; | |
328 | - __le16 seq_ctrl; | |
329 | - union { | |
330 | - struct { | |
331 | - __le16 auth_alg; | |
332 | - __le16 auth_transaction; | |
333 | - __le16 status_code; | |
334 | - /* possibly followed by Challenge text */ | |
335 | - u8 variable[0]; | |
336 | - } auth; | |
337 | - struct { | |
338 | - __le16 reason_code; | |
339 | - } deauth; | |
340 | - struct { | |
341 | - __le16 capab_info; | |
342 | - __le16 listen_interval; | |
343 | - /* followed by SSID and Supported rates */ | |
344 | - u8 variable[0]; | |
345 | - } assoc_req; | |
346 | - struct { | |
347 | - __le16 capab_info; | |
348 | - __le16 status_code; | |
349 | - __le16 aid; | |
350 | - /* followed by Supported rates */ | |
351 | - u8 variable[0]; | |
352 | - } assoc_resp, reassoc_resp; | |
353 | - struct { | |
354 | - __le16 capab_info; | |
355 | - __le16 listen_interval; | |
356 | - u8 current_ap[6]; | |
357 | - /* followed by SSID and Supported rates */ | |
358 | - u8 variable[0]; | |
359 | - } reassoc_req; | |
360 | - struct { | |
361 | - __le16 reason_code; | |
362 | - } disassoc; | |
363 | - struct { | |
364 | - u8 category; | |
365 | - union { | |
366 | - struct { | |
367 | - u8 action_code; | |
368 | - u8 dialog_token; | |
369 | - u8 status_code; | |
370 | - u8 variable[0]; | |
371 | - } wme_action; | |
372 | - struct { | |
373 | - u8 action_code; | |
374 | - u8 dialog_token; | |
375 | - __le16 capab; | |
376 | - __le16 timeout; | |
377 | - __le16 start_seq_num; | |
378 | - } addba_req; | |
379 | - struct { | |
380 | - u8 action_code; | |
381 | - u8 dialog_token; | |
382 | - __le16 status; | |
383 | - __le16 capab; | |
384 | - __leu16 timeout; | |
385 | - } addba_resp; | |
386 | - struct { | |
387 | - u8 action_code; | |
388 | - __le16 params; | |
389 | - __le16 reason_code; | |
390 | - } delba; | |
391 | - struct { | |
392 | - u8 action_code; | |
393 | - /* capab_info for open and confirm, | |
394 | - * reason for close | |
395 | - */ | |
396 | - __le16 aux; | |
397 | - /* Followed in plink_confirm by status | |
398 | - * code, AID and supported rates, | |
399 | - * and directly by supported rates in | |
400 | - * plink_open and plink_close | |
401 | - */ | |
402 | - u8 variable[0]; | |
403 | - } plink_action; | |
404 | - struct { | |
405 | - u8 action_code; | |
406 | - u8 variable[0]; | |
407 | - } mesh_action; | |
408 | - } u; | |
409 | - } action; | |
410 | - } u; | |
411 | -} ; | |
412 | - | |
413 | -#pragma pack() | |
414 | - | |
415 | -#endif | |
416 | - | |
417 | 289 | /* mgmt header + 1 byte category code */ |
418 | 290 | #define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u) |
419 | 291 | |
420 | - | |
421 | - | |
422 | 292 | #endif |
@@ -90,8 +90,6 @@ | ||
90 | 90 | #define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ |
91 | 91 | #define IPOPT_TS_PRESPEC 3 /* specified modules only */ |
92 | 92 | |
93 | -#ifdef PLATFORM_LINUX | |
94 | - | |
95 | 93 | struct ip_options { |
96 | 94 | __u32 faddr; /* Saved first hop address */ |
97 | 95 | unsigned char optlen; |
@@ -113,7 +111,6 @@ struct ip_options { | ||
113 | 111 | }; |
114 | 112 | |
115 | 113 | #define optlength(opt) (sizeof(struct ip_options) + opt->optlen) |
116 | -#endif | |
117 | 114 | |
118 | 115 | struct iphdr { |
119 | 116 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
@@ -20,11 +20,6 @@ | ||
20 | 20 | #ifndef __MLME_OSDEP_H_ |
21 | 21 | #define __MLME_OSDEP_H_ |
22 | 22 | |
23 | - | |
24 | -#if defined(PLATFORM_WINDOWS) || defined(PLATFORM_MPIXEL) | |
25 | - extern int time_after(u32 now, u32 old); | |
26 | -#endif | |
27 | - | |
28 | 23 | extern void rtw_init_mlme_timer(_adapter *padapter); |
29 | 24 | extern void rtw_os_indicate_disconnect(_adapter *adapter, u16 reason, u8 locally_generated); |
30 | 25 | extern void rtw_os_indicate_connect(_adapter *adapter); |
@@ -47,8 +47,6 @@ struct intf_priv { | ||
47 | 47 | |
48 | 48 | _mutex ioctl_mutex; |
49 | 49 | |
50 | - | |
51 | -#ifdef PLATFORM_LINUX | |
52 | 50 | #ifdef CONFIG_USB_HCI |
53 | 51 | /* when in USB, IO is through interrupt in/out endpoints */ |
54 | 52 | struct usb_device *udev; |
@@ -60,31 +58,8 @@ struct intf_priv { | ||
60 | 58 | u8 bio_irp_timeout; |
61 | 59 | u8 bio_timer_cancel; |
62 | 60 | #endif |
63 | -#endif | |
64 | - | |
65 | -#ifdef PLATFORM_OS_XP | |
66 | -#ifdef CONFIG_SDIO_HCI | |
67 | - /* below is for io_rwmem... */ | |
68 | - PMDL pmdl; | |
69 | - PSDBUS_REQUEST_PACKET sdrp; | |
70 | - PSDBUS_REQUEST_PACKET recv_sdrp; | |
71 | - PSDBUS_REQUEST_PACKET xmit_sdrp; | |
72 | - | |
73 | - PIRP piorw_irp; | |
74 | - | |
75 | -#endif | |
76 | -#ifdef CONFIG_USB_HCI | |
77 | - PURB piorw_urb; | |
78 | - PIRP piorw_irp; | |
79 | - u8 io_irp_cnt; | |
80 | - u8 bio_irp_pending; | |
81 | - _sema io_retevt; | |
82 | -#endif | |
83 | -#endif | |
84 | - | |
85 | 61 | }; |
86 | 62 | |
87 | - | |
88 | 63 | #ifdef CONFIG_R871X_TEST |
89 | 64 | int rtw_start_pseudo_adhoc(_adapter *padapter); |
90 | 65 | int rtw_stop_pseudo_adhoc(_adapter *padapter); |
@@ -107,7 +82,6 @@ void rtw_cancel_all_timer(_adapter *padapter); | ||
107 | 82 | |
108 | 83 | uint loadparam(_adapter *adapter); |
109 | 84 | |
110 | -#ifdef PLATFORM_LINUX | |
111 | 85 | int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
112 | 86 | |
113 | 87 | int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname); |
@@ -134,13 +108,6 @@ void rtw_ndev_notifier_unregister(void); | ||
134 | 108 | #include "../os_dep/linux/ioctl_cfg80211.h" |
135 | 109 | #endif /* CONFIG_IOCTL_CFG80211 */ |
136 | 110 | |
137 | -#endif /* PLATFORM_LINUX */ | |
138 | - | |
139 | - | |
140 | -#ifdef PLATFORM_FREEBSD | |
141 | -extern int rtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); | |
142 | -#endif | |
143 | - | |
144 | 111 | void rtw_ips_dev_unload(_adapter *padapter); |
145 | 112 | |
146 | 113 | #ifdef CONFIG_IPS |
@@ -39,25 +39,11 @@ | ||
39 | 39 | #define _FALSE 0 |
40 | 40 | |
41 | 41 | |
42 | -#ifdef PLATFORM_FREEBSD | |
43 | - #include <osdep_service_bsd.h> | |
44 | -#endif | |
45 | - | |
46 | -#ifdef PLATFORM_LINUX | |
47 | - #include <linux/version.h> | |
42 | +#include <linux/version.h> | |
48 | 43 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) |
49 | 44 | #include <linux/sched/signal.h> |
50 | 45 | #endif |
51 | - #include <osdep_service_linux.h> | |
52 | -#endif | |
53 | - | |
54 | -#ifdef PLATFORM_OS_XP | |
55 | - #include <osdep_service_xp.h> | |
56 | -#endif | |
57 | - | |
58 | -#ifdef PLATFORM_OS_CE | |
59 | - #include <osdep_service_ce.h> | |
60 | -#endif | |
46 | +#include <osdep_service_linux.h> | |
61 | 47 | |
62 | 48 | #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl |
63 | 49 | #define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS) |
@@ -108,9 +94,7 @@ | ||
108 | 94 | |
109 | 95 | extern int RTW_STATUS_CODE(int error_code); |
110 | 96 | |
111 | -#ifndef RTK_DMP_PLATFORM | |
112 | - #define CONFIG_USE_VMALLOC | |
113 | -#endif | |
97 | +#define CONFIG_USE_VMALLOC | |
114 | 98 | |
115 | 99 | /* flags used for rtw_mstat_update() */ |
116 | 100 | enum mstat_f { |
@@ -299,9 +283,7 @@ extern void _rtw_init_listhead(_list *list); | ||
299 | 283 | extern u32 rtw_is_list_empty(_list *phead); |
300 | 284 | extern void rtw_list_insert_head(_list *plist, _list *phead); |
301 | 285 | extern void rtw_list_insert_tail(_list *plist, _list *phead); |
302 | -#ifndef PLATFORM_FREEBSD | |
303 | 286 | extern void rtw_list_delete(_list *plist); |
304 | -#endif /* PLATFORM_FREEBSD */ | |
305 | 287 | |
306 | 288 | extern void _rtw_init_sema(_sema *sema, int init_val); |
307 | 289 | extern void _rtw_free_sema(_sema *sema); |
@@ -309,9 +291,7 @@ extern void _rtw_up_sema(_sema *sema); | ||
309 | 291 | extern u32 _rtw_down_sema(_sema *sema); |
310 | 292 | extern void _rtw_mutex_init(_mutex *pmutex); |
311 | 293 | extern void _rtw_mutex_free(_mutex *pmutex); |
312 | -#ifndef PLATFORM_FREEBSD | |
313 | 294 | extern void _rtw_spinlock_init(_lock *plock); |
314 | -#endif /* PLATFORM_FREEBSD */ | |
315 | 295 | extern void _rtw_spinlock_free(_lock *plock); |
316 | 296 | extern void _rtw_spinlock(_lock *plock); |
317 | 297 | extern void _rtw_spinunlock(_lock *plock); |
@@ -355,90 +335,38 @@ extern void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc); | ||
355 | 335 | |
356 | 336 | __inline static unsigned char _cancel_timer_ex(_timer *ptimer) |
357 | 337 | { |
358 | -#ifdef PLATFORM_LINUX | |
359 | 338 | return del_timer_sync(ptimer); |
360 | -#endif | |
361 | -#ifdef PLATFORM_FREEBSD | |
362 | - _cancel_timer(ptimer, 0); | |
363 | - return 0; | |
364 | -#endif | |
365 | -#ifdef PLATFORM_WINDOWS | |
366 | - u8 bcancelled; | |
367 | - | |
368 | - _cancel_timer(ptimer, &bcancelled); | |
369 | - | |
370 | - return bcancelled; | |
371 | -#endif | |
372 | 339 | } |
373 | 340 | |
374 | 341 | static __inline void thread_enter(char *name) |
375 | 342 | { |
376 | -#ifdef PLATFORM_LINUX | |
377 | 343 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)) |
378 | 344 | daemonize("%s", name); |
379 | 345 | #endif |
380 | 346 | allow_signal(SIGTERM); |
381 | -#endif | |
382 | -#ifdef PLATFORM_FREEBSD | |
383 | - printf("%s", "RTKTHREAD_enter"); | |
384 | -#endif | |
385 | 347 | } |
386 | 348 | |
387 | 349 | __inline static void flush_signals_thread(void) |
388 | 350 | { |
389 | -#ifdef PLATFORM_LINUX | |
390 | 351 | if (signal_pending(current)) |
391 | 352 | flush_signals(current); |
392 | -#endif | |
393 | 353 | } |
394 | 354 | |
395 | 355 | __inline static _OS_STATUS res_to_status(sint res) |
396 | 356 | { |
397 | - | |
398 | -#if defined(PLATFORM_LINUX) || defined (PLATFORM_MPIXEL) || defined (PLATFORM_FREEBSD) | |
399 | 357 | return res; |
400 | -#endif | |
401 | - | |
402 | -#ifdef PLATFORM_WINDOWS | |
403 | - | |
404 | - if (res == _SUCCESS) | |
405 | - return NDIS_STATUS_SUCCESS; | |
406 | - else | |
407 | - return NDIS_STATUS_FAILURE; | |
408 | - | |
409 | -#endif | |
410 | - | |
411 | 358 | } |
412 | 359 | |
413 | 360 | __inline static void rtw_dump_stack(void) |
414 | 361 | { |
415 | -#ifdef PLATFORM_LINUX | |
416 | 362 | dump_stack(); |
417 | -#endif | |
418 | 363 | } |
419 | 364 | |
420 | -#ifdef PLATFORM_LINUX | |
421 | 365 | #define rtw_warn_on(condition) WARN_ON(condition) |
422 | -#else | |
423 | -#define rtw_warn_on(condition) do {} while (0) | |
424 | -#endif | |
425 | 366 | |
426 | 367 | __inline static int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4) |
427 | 368 | { |
428 | - int ret = _TRUE; | |
429 | - | |
430 | -#ifdef PLATFORM_WINDOWS | |
431 | - if (((uint)parg1) <= 0x7fffffff || | |
432 | - ((uint)parg2) <= 0x7fffffff || | |
433 | - ((uint)parg3) <= 0x7fffffff || | |
434 | - ((uint)parg4) <= 0x7fffffff) { | |
435 | - ret = _FALSE; | |
436 | - KeBugCheckEx(0x87110000, (ULONG_PTR)parg1, (ULONG_PTR)parg2, (ULONG_PTR)parg3, (ULONG_PTR)parg4); | |
437 | - } | |
438 | -#endif | |
439 | - | |
440 | - return ret; | |
441 | - | |
369 | + return _TRUE; | |
442 | 370 | } |
443 | 371 | |
444 | 372 | #define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r)) |
@@ -566,11 +494,7 @@ extern int rtw_is_file_readable_with_size(const char *path, u32 *sz); | ||
566 | 494 | extern int rtw_retrieve_from_file(const char *path, u8 *buf, u32 sz); |
567 | 495 | extern int rtw_store_to_file(const char *path, u8 *buf, u32 sz); |
568 | 496 | |
569 | - | |
570 | -#ifndef PLATFORM_FREEBSD | |
571 | 497 | extern void rtw_free_netdev(struct net_device *netdev); |
572 | -#endif /* PLATFORM_FREEBSD */ | |
573 | - | |
574 | 498 | |
575 | 499 | extern u64 rtw_modular64(u64 x, u64 y); |
576 | 500 | extern u64 rtw_division64(u64 x, u64 y); |
@@ -696,10 +620,6 @@ char alpha_to_upper(char c); | ||
696 | 620 | /* |
697 | 621 | * Write formatted output to sized buffer |
698 | 622 | */ |
699 | -#ifdef PLATFORM_LINUX | |
700 | 623 | #define rtw_sprintf(buf, size, format, arg...) snprintf(buf, size, format, ##arg) |
701 | -#else /* !PLATFORM_LINUX */ | |
702 | -#error "NOT DEFINE \"rtw_sprintf\"!!" | |
703 | -#endif /* !PLATFORM_LINUX */ | |
704 | 624 | |
705 | 625 | #endif |
@@ -68,13 +68,6 @@ | ||
68 | 68 | #include <linux/limits.h> |
69 | 69 | #endif |
70 | 70 | |
71 | -#ifdef RTK_DMP_PLATFORM | |
72 | - #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 12)) | |
73 | - #include <linux/pageremap.h> | |
74 | - #endif | |
75 | - #include <asm/io.h> | |
76 | -#endif | |
77 | - | |
78 | 71 | #ifdef CONFIG_NET_RADIO |
79 | 72 | #define CONFIG_WIRELESS_EXT |
80 | 73 | #endif |
@@ -57,12 +57,10 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf); | ||
57 | 57 | |
58 | 58 | void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl); |
59 | 59 | |
60 | -#ifdef PLATFORM_LINUX | |
61 | 60 | #ifdef CONFIG_RTW_NAPI |
62 | 61 | #include <linux/netdevice.h> /* struct napi_struct */ |
63 | 62 | |
64 | 63 | int rtw_recv_napi_poll(struct napi_struct *, int budget); |
65 | 64 | #endif /* CONFIG_RTW_NAPI */ |
66 | -#endif /* PLATFORM_LINUX */ | |
67 | 65 | |
68 | 66 | #endif /* */ |
@@ -23,27 +23,14 @@ | ||
23 | 23 | #if defined(CONFIG_USB_HCI) |
24 | 24 | |
25 | 25 | #ifndef MAX_RECVBUF_SZ |
26 | - #ifdef PLATFORM_OS_CE | |
27 | - #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ | |
28 | - #else | |
29 | - #ifndef CONFIG_MINIMAL_MEMORY_USAGE | |
30 | - #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER | |
31 | - #define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/ | |
32 | - #else | |
33 | - #define MAX_RECVBUF_SZ (32768) /*32k*/ | |
34 | - #endif | |
35 | - /* #define MAX_RECVBUF_SZ (24576) */ /* 24k */ | |
36 | - /* #define MAX_RECVBUF_SZ (20480) */ /* 20K */ | |
37 | - /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ | |
38 | - /* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */ | |
39 | - /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ | |
40 | - #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 | |
41 | - #undef MAX_RECVBUF_SZ | |
42 | - #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ | |
43 | - #endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */ | |
26 | + #ifndef CONFIG_MINIMAL_MEMORY_USAGE | |
27 | + #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER | |
28 | + #define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/ | |
44 | 29 | #else |
45 | - #define MAX_RECVBUF_SZ (4000) /* about 4K */ | |
30 | + #define MAX_RECVBUF_SZ (32768) /*32k*/ | |
46 | 31 | #endif |
32 | + #else | |
33 | + #define MAX_RECVBUF_SZ (4000) /* about 4K */ | |
47 | 34 | #endif |
48 | 35 | #endif /* !MAX_RECVBUF_SZ */ |
49 | 36 |
@@ -105,11 +105,7 @@ static void rtw_android_wifictrl_func_del(void) {} | ||
105 | 105 | #endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */ |
106 | 106 | |
107 | 107 | #ifdef CONFIG_GPIO_WAKEUP |
108 | -#ifdef CONFIG_PLATFORM_INTEL_BYT | |
109 | -int wifi_configure_gpio(void); | |
110 | -#endif /* CONFIG_PLATFORM_INTEL_BYT */ | |
111 | 108 | void wifi_free_gpio(unsigned int gpio); |
112 | 109 | #endif /* CONFIG_GPIO_WAKEUP */ |
113 | 110 | |
114 | - | |
115 | 111 | #endif /* __RTW_ANDROID_H__ */ |
@@ -31,11 +31,7 @@ | ||
31 | 31 | #define MAX_RSPSZ 512 |
32 | 32 | #define MAX_EVTSZ 1024 |
33 | 33 | |
34 | -#ifdef PLATFORM_OS_CE | |
35 | - #define CMDBUFF_ALIGN_SZ 4 | |
36 | -#else | |
37 | - #define CMDBUFF_ALIGN_SZ 512 | |
38 | -#endif | |
34 | +#define CMDBUFF_ALIGN_SZ 512 | |
39 | 35 | |
40 | 36 | struct cmd_obj { |
41 | 37 | _adapter *padapter; |
@@ -118,9 +114,6 @@ struct evt_priv { | ||
118 | 114 | #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) |
119 | 115 | u8 *c2h_mem; |
120 | 116 | u8 *allocated_c2h_mem; |
121 | -#ifdef PLATFORM_OS_XP | |
122 | - PMDL pc2h_mdl; | |
123 | -#endif | |
124 | 117 | #endif |
125 | 118 | |
126 | 119 | }; |
@@ -110,12 +110,10 @@ extern void eeprom_read_sz(_adapter *padapter, u16 reg, u8 *data, u32 sz); | ||
110 | 110 | |
111 | 111 | extern void read_eeprom_content_by_attrib(_adapter *padapter); |
112 | 112 | |
113 | -#ifdef PLATFORM_LINUX | |
114 | 113 | #ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE |
115 | 114 | extern int isAdaptorInfoFileValid(void); |
116 | 115 | extern int storeAdaptorInfoFile(char *path, u8 *efuse_data); |
117 | 116 | extern int retriveAdaptorInfoFile(char *path, u8 *efuse_data); |
118 | 117 | #endif /* CONFIG_ADAPTOR_INFO_CACHING_FILE */ |
119 | -#endif /* PLATFORM_LINUX */ | |
120 | 118 | |
121 | 119 | #endif /* __RTL871X_EEPROM_H__ */ |
@@ -234,12 +234,10 @@ extern const u8 _mac_hidden_proto_to_hal_proto_cap[]; | ||
234 | 234 | |
235 | 235 | u8 mac_hidden_wl_func_to_hal_wl_func(u8 func); |
236 | 236 | |
237 | -#ifdef PLATFORM_LINUX | |
238 | 237 | u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len); |
239 | 238 | #ifdef CONFIG_EFUSE_CONFIG_FILE |
240 | 239 | u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size); |
241 | 240 | u32 rtw_read_macaddr_from_file(const char *path, u8 *buf); |
242 | 241 | #endif /* CONFIG_EFUSE_CONFIG_FILE */ |
243 | -#endif /* PLATFORM_LINUX */ | |
244 | 242 | |
245 | 243 | #endif |
@@ -23,16 +23,11 @@ | ||
23 | 23 | |
24 | 24 | #define NUM_IOREQ 8 |
25 | 25 | |
26 | -#ifdef PLATFORM_WINDOWS | |
27 | - #define MAX_PROT_SZ 64 | |
28 | -#endif | |
29 | -#ifdef PLATFORM_LINUX | |
30 | - #define MAX_PROT_SZ (64-16) | |
31 | -#endif | |
26 | +#define MAX_PROT_SZ (64-16) | |
32 | 27 | |
33 | -#define _IOREADY 0 | |
34 | -#define _IO_WAIT_COMPLETE 1 | |
35 | -#define _IO_WAIT_RSP 2 | |
28 | +#define _IOREADY 0 | |
29 | +#define _IO_WAIT_COMPLETE 1 | |
30 | +#define _IO_WAIT_RSP 2 | |
36 | 31 | |
37 | 32 | /* IO COMMAND TYPE */ |
38 | 33 | #define _IOSZ_MASK_ (0x7F) |
@@ -146,27 +141,8 @@ struct io_req { | ||
146 | 141 | u8 *pbuf; |
147 | 142 | _sema sema; |
148 | 143 | |
149 | -#ifdef PLATFORM_OS_CE | |
150 | -#ifdef CONFIG_USB_HCI | |
151 | - /* URB handler for rtw_write_mem */ | |
152 | - USB_TRANSFER usb_transfer_write_mem; | |
153 | -#endif | |
154 | -#endif | |
155 | - | |
156 | 144 | void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt); |
157 | 145 | u8 *cnxt; |
158 | - | |
159 | -#ifdef PLATFORM_OS_XP | |
160 | - PMDL pmdl; | |
161 | - PIRP pirp; | |
162 | - | |
163 | -#ifdef CONFIG_SDIO_HCI | |
164 | - PSDBUS_REQUEST_PACKET sdrp; | |
165 | -#endif | |
166 | - | |
167 | -#endif | |
168 | - | |
169 | - | |
170 | 146 | }; |
171 | 147 | |
172 | 148 | struct intf_hdl { |
@@ -20,7 +20,6 @@ | ||
20 | 20 | #ifndef _RTW_IOCTL_H_ |
21 | 21 | #define _RTW_IOCTL_H_ |
22 | 22 | |
23 | -#ifndef PLATFORM_WINDOWS | |
24 | 23 | /* 00 - Success |
25 | 24 | * 11 - Error */ |
26 | 25 | #define STATUS_SUCCESS (0x00000000L) |
@@ -80,8 +79,6 @@ | ||
80 | 79 | #define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L) /* cause 49 */ |
81 | 80 | #define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L) /* cause 93 */ |
82 | 81 | #define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L) /* cause 3 */ |
83 | -#endif /* #ifndef PLATFORM_WINDOWS */ | |
84 | - | |
85 | 82 | |
86 | 83 | #ifndef OID_802_11_CAPABILITY |
87 | 84 | #define OID_802_11_CAPABILITY 0x0d010122 |
@@ -152,145 +149,14 @@ struct oid_obj_priv { | ||
152 | 149 | NDIS_STATUS(*oidfuns)(struct oid_par_priv *poid_par_priv); |
153 | 150 | }; |
154 | 151 | |
155 | -#if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_)) || \ | |
156 | - (defined(PLATFORM_WINDOWS) && defined(_RTW_IOCTL_RTL_C_)) | |
152 | +#if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_)) | |
157 | 153 | static NDIS_STATUS oid_null_function(struct oid_par_priv *poid_par_priv) |
158 | 154 | { |
159 | 155 | return NDIS_STATUS_SUCCESS; |
160 | 156 | } |
161 | 157 | #endif |
162 | 158 | |
163 | -#ifdef PLATFORM_WINDOWS | |
164 | - | |
165 | -int TranslateNdisPsToRtPs(IN NDIS_802_11_POWER_MODE ndisPsMode); | |
166 | - | |
167 | -/* OID Handler for Segment 1 */ | |
168 | -NDIS_STATUS oid_gen_supported_list_hdl(struct oid_par_priv *poid_par_priv); | |
169 | -NDIS_STATUS oid_gen_hardware_status_hdl(struct oid_par_priv *poid_par_priv); | |
170 | -NDIS_STATUS oid_gen_media_supported_hdl(struct oid_par_priv *poid_par_priv); | |
171 | -NDIS_STATUS oid_gen_media_in_use_hdl(struct oid_par_priv *poid_par_priv); | |
172 | -NDIS_STATUS oid_gen_maximum_lookahead_hdl(struct oid_par_priv *poid_par_priv); | |
173 | -NDIS_STATUS oid_gen_maximum_frame_size_hdl(struct oid_par_priv *poid_par_priv); | |
174 | -NDIS_STATUS oid_gen_link_speed_hdl(struct oid_par_priv *poid_par_priv); | |
175 | -NDIS_STATUS oid_gen_transmit_buffer_space_hdl(struct oid_par_priv *poid_par_priv); | |
176 | -NDIS_STATUS oid_gen_receive_buffer_space_hdl(struct oid_par_priv *poid_par_priv); | |
177 | -NDIS_STATUS oid_gen_transmit_block_size_hdl(struct oid_par_priv *poid_par_priv); | |
178 | -NDIS_STATUS oid_gen_receive_block_size_hdl(struct oid_par_priv *poid_par_priv); | |
179 | -NDIS_STATUS oid_gen_vendor_id_hdl(struct oid_par_priv *poid_par_priv); | |
180 | -NDIS_STATUS oid_gen_vendor_description_hdl(struct oid_par_priv *poid_par_priv); | |
181 | -NDIS_STATUS oid_gen_current_packet_filter_hdl(struct oid_par_priv *poid_par_priv); | |
182 | -NDIS_STATUS oid_gen_current_lookahead_hdl(struct oid_par_priv *poid_par_priv); | |
183 | -NDIS_STATUS oid_gen_driver_version_hdl(struct oid_par_priv *poid_par_priv); | |
184 | -NDIS_STATUS oid_gen_maximum_total_size_hdl(struct oid_par_priv *poid_par_priv); | |
185 | -NDIS_STATUS oid_gen_protocol_options_hdl(struct oid_par_priv *poid_par_priv); | |
186 | -NDIS_STATUS oid_gen_mac_options_hdl(struct oid_par_priv *poid_par_priv); | |
187 | -NDIS_STATUS oid_gen_media_connect_status_hdl(struct oid_par_priv *poid_par_priv); | |
188 | -NDIS_STATUS oid_gen_maximum_send_packets_hdl(struct oid_par_priv *poid_par_priv); | |
189 | -NDIS_STATUS oid_gen_vendor_driver_version_hdl(struct oid_par_priv *poid_par_priv); | |
190 | - | |
191 | - | |
192 | -/* OID Handler for Segment 2 */ | |
193 | -NDIS_STATUS oid_gen_physical_medium_hdl(struct oid_par_priv *poid_par_priv); | |
194 | - | |
195 | -/* OID Handler for Segment 3 */ | |
196 | -NDIS_STATUS oid_gen_xmit_ok_hdl(struct oid_par_priv *poid_par_priv); | |
197 | -NDIS_STATUS oid_gen_rcv_ok_hdl(struct oid_par_priv *poid_par_priv); | |
198 | -NDIS_STATUS oid_gen_xmit_error_hdl(struct oid_par_priv *poid_par_priv); | |
199 | -NDIS_STATUS oid_gen_rcv_error_hdl(struct oid_par_priv *poid_par_priv); | |
200 | -NDIS_STATUS oid_gen_rcv_no_buffer_hdl(struct oid_par_priv *poid_par_priv); | |
201 | - | |
202 | - | |
203 | -/* OID Handler for Segment 4 */ | |
204 | -NDIS_STATUS oid_802_3_permanent_address_hdl(struct oid_par_priv *poid_par_priv); | |
205 | -NDIS_STATUS oid_802_3_current_address_hdl(struct oid_par_priv *poid_par_priv); | |
206 | -NDIS_STATUS oid_802_3_multicast_list_hdl(struct oid_par_priv *poid_par_priv); | |
207 | -NDIS_STATUS oid_802_3_maximum_list_size_hdl(struct oid_par_priv *poid_par_priv); | |
208 | -NDIS_STATUS oid_802_3_mac_options_hdl(struct oid_par_priv *poid_par_priv); | |
209 | - | |
210 | - | |
211 | - | |
212 | -/* OID Handler for Segment 5 */ | |
213 | -NDIS_STATUS oid_802_3_rcv_error_alignment_hdl(struct oid_par_priv *poid_par_priv); | |
214 | -NDIS_STATUS oid_802_3_xmit_one_collision_hdl(struct oid_par_priv *poid_par_priv); | |
215 | -NDIS_STATUS oid_802_3_xmit_more_collisions_hdl(struct oid_par_priv *poid_par_priv); | |
216 | - | |
217 | - | |
218 | -/* OID Handler for Segment 6 */ | |
219 | -NDIS_STATUS oid_802_3_xmit_deferred_hdl(struct oid_par_priv *poid_par_priv); | |
220 | -NDIS_STATUS oid_802_3_xmit_max_collisions_hdl(struct oid_par_priv *poid_par_priv); | |
221 | -NDIS_STATUS oid_802_3_rcv_overrun_hdl(struct oid_par_priv *poid_par_priv); | |
222 | -NDIS_STATUS oid_802_3_xmit_underrun_hdl(struct oid_par_priv *poid_par_priv); | |
223 | -NDIS_STATUS oid_802_3_xmit_heartbeat_failure_hdl(struct oid_par_priv *poid_par_priv); | |
224 | -NDIS_STATUS oid_802_3_xmit_times_crs_lost_hdl(struct oid_par_priv *poid_par_priv); | |
225 | -NDIS_STATUS oid_802_3_xmit_late_collisions_hdl(struct oid_par_priv *poid_par_priv); | |
226 | - | |
227 | - | |
228 | - | |
229 | -/* OID Handler for Segment 7 */ | |
230 | -NDIS_STATUS oid_pnp_capabilities_hdl(struct oid_par_priv *poid_par_priv); | |
231 | -NDIS_STATUS oid_pnp_set_power_hdl(struct oid_par_priv *poid_par_priv); | |
232 | -NDIS_STATUS oid_pnp_query_power_hdl(struct oid_par_priv *poid_par_priv); | |
233 | -NDIS_STATUS oid_pnp_add_wake_up_pattern_hdl(struct oid_par_priv *poid_par_priv); | |
234 | -NDIS_STATUS oid_pnp_remove_wake_up_pattern_hdl(struct oid_par_priv *poid_par_priv); | |
235 | -NDIS_STATUS oid_pnp_wake_up_pattern_list_hdl(struct oid_par_priv *poid_par_priv); | |
236 | -NDIS_STATUS oid_pnp_enable_wake_up_hdl(struct oid_par_priv *poid_par_priv); | |
237 | - | |
238 | - | |
239 | - | |
240 | -/* OID Handler for Segment 8 */ | |
241 | -NDIS_STATUS oid_802_11_bssid_hdl(struct oid_par_priv *poid_par_priv); | |
242 | -NDIS_STATUS oid_802_11_ssid_hdl(struct oid_par_priv *poid_par_priv); | |
243 | -NDIS_STATUS oid_802_11_infrastructure_mode_hdl(struct oid_par_priv *poid_par_priv); | |
244 | -NDIS_STATUS oid_802_11_add_wep_hdl(struct oid_par_priv *poid_par_priv); | |
245 | -NDIS_STATUS oid_802_11_remove_wep_hdl(struct oid_par_priv *poid_par_priv); | |
246 | -NDIS_STATUS oid_802_11_disassociate_hdl(struct oid_par_priv *poid_par_priv); | |
247 | -NDIS_STATUS oid_802_11_authentication_mode_hdl(struct oid_par_priv *poid_par_priv); | |
248 | -NDIS_STATUS oid_802_11_privacy_filter_hdl(struct oid_par_priv *poid_par_priv); | |
249 | -NDIS_STATUS oid_802_11_bssid_list_scan_hdl(struct oid_par_priv *poid_par_priv); | |
250 | -NDIS_STATUS oid_802_11_encryption_status_hdl(struct oid_par_priv *poid_par_priv); | |
251 | -NDIS_STATUS oid_802_11_reload_defaults_hdl(struct oid_par_priv *poid_par_priv); | |
252 | -NDIS_STATUS oid_802_11_add_key_hdl(struct oid_par_priv *poid_par_priv); | |
253 | -NDIS_STATUS oid_802_11_remove_key_hdl(struct oid_par_priv *poid_par_priv); | |
254 | -NDIS_STATUS oid_802_11_association_information_hdl(struct oid_par_priv *poid_par_priv); | |
255 | -NDIS_STATUS oid_802_11_test_hdl(struct oid_par_priv *poid_par_priv); | |
256 | -NDIS_STATUS oid_802_11_media_stream_mode_hdl(struct oid_par_priv *poid_par_priv); | |
257 | -NDIS_STATUS oid_802_11_capability_hdl(struct oid_par_priv *poid_par_priv); | |
258 | -NDIS_STATUS oid_802_11_pmkid_hdl(struct oid_par_priv *poid_par_priv); | |
259 | - | |
260 | - | |
261 | - | |
262 | - | |
263 | - | |
264 | -/* OID Handler for Segment 9 */ | |
265 | -NDIS_STATUS oid_802_11_network_types_supported_hdl(struct oid_par_priv *poid_par_priv); | |
266 | -NDIS_STATUS oid_802_11_network_type_in_use_hdl(struct oid_par_priv *poid_par_priv); | |
267 | -NDIS_STATUS oid_802_11_tx_power_level_hdl(struct oid_par_priv *poid_par_priv); | |
268 | -NDIS_STATUS oid_802_11_rssi_hdl(struct oid_par_priv *poid_par_priv); | |
269 | -NDIS_STATUS oid_802_11_rssi_trigger_hdl(struct oid_par_priv *poid_par_priv); | |
270 | -NDIS_STATUS oid_802_11_fragmentation_threshold_hdl(struct oid_par_priv *poid_par_priv); | |
271 | -NDIS_STATUS oid_802_11_rts_threshold_hdl(struct oid_par_priv *poid_par_priv); | |
272 | -NDIS_STATUS oid_802_11_number_of_antennas_hdl(struct oid_par_priv *poid_par_priv); | |
273 | -NDIS_STATUS oid_802_11_rx_antenna_selected_hdl(struct oid_par_priv *poid_par_priv); | |
274 | -NDIS_STATUS oid_802_11_tx_antenna_selected_hdl(struct oid_par_priv *poid_par_priv); | |
275 | -NDIS_STATUS oid_802_11_supported_rates_hdl(struct oid_par_priv *poid_par_priv); | |
276 | -NDIS_STATUS oid_802_11_desired_rates_hdl(struct oid_par_priv *poid_par_priv); | |
277 | -NDIS_STATUS oid_802_11_configuration_hdl(struct oid_par_priv *poid_par_priv); | |
278 | -NDIS_STATUS oid_802_11_power_mode_hdl(struct oid_par_priv *poid_par_priv); | |
279 | -NDIS_STATUS oid_802_11_bssid_list_hdl(struct oid_par_priv *poid_par_priv); | |
280 | - | |
281 | - | |
282 | -/* OID Handler for Segment 10 */ | |
283 | -NDIS_STATUS oid_802_11_statistics_hdl(struct oid_par_priv *poid_par_priv); | |
284 | - | |
285 | - | |
286 | -/* OID Handler for Segment ED */ | |
287 | -NDIS_STATUS oid_rt_mh_vender_id_hdl(struct oid_par_priv *poid_par_priv); | |
288 | - | |
289 | -void Set_802_3_MULTICAST_LIST(ADAPTER *pAdapter, UCHAR *MCListbuf, ULONG MCListlen, BOOLEAN bAcceptAllMulticast); | |
290 | - | |
291 | -#endif/* end of PLATFORM_WINDOWS */ | |
292 | - | |
293 | -#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT) | |
159 | +#if defined(CONFIG_WIRELESS_EXT) | |
294 | 160 | extern struct iw_handler_def rtw_handlers_def; |
295 | 161 | #endif |
296 | 162 |
@@ -1,30 +0,0 @@ | ||
1 | -/****************************************************************************** | |
2 | - * | |
3 | - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. | |
4 | - * | |
5 | - * This program is free software; you can redistribute it and/or modify it | |
6 | - * under the terms of version 2 of the GNU General Public License as | |
7 | - * published by the Free Software Foundation. | |
8 | - * | |
9 | - * This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | - * more details. | |
13 | - * | |
14 | - * You should have received a copy of the GNU General Public License along with | |
15 | - * this program; if not, write to the Free Software Foundation, Inc., | |
16 | - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA | |
17 | - * | |
18 | - * | |
19 | - ******************************************************************************/ | |
20 | -#ifndef _RTW_IOCTL_QUERY_H_ | |
21 | -#define _RTW_IOCTL_QUERY_H_ | |
22 | - | |
23 | - | |
24 | -#ifdef PLATFORM_WINDOWS | |
25 | -u8 query_802_11_capability(_adapter *padapter, u8 *pucBuf, u32 *pulOutLen); | |
26 | -u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo); | |
27 | -#endif | |
28 | - | |
29 | - | |
30 | -#endif |
@@ -28,29 +28,6 @@ typedef struct _BSSIDInfo { | ||
28 | 28 | NDIS_802_11_PMKID_VALUE PMKID; |
29 | 29 | } BSSIDInfo, *PBSSIDInfo; |
30 | 30 | |
31 | - | |
32 | -#ifdef PLATFORM_OS_XP | |
33 | -typedef struct _NDIS_802_11_PMKID { | |
34 | - u32 Length; | |
35 | - u32 BSSIDInfoCount; | |
36 | - BSSIDInfo BSSIDInfo[1]; | |
37 | -} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID; | |
38 | -#endif | |
39 | - | |
40 | - | |
41 | -#ifdef PLATFORM_WINDOWS | |
42 | -u8 rtw_set_802_11_reload_defaults(_adapter *padapter, NDIS_802_11_RELOAD_DEFAULTS reloadDefaults); | |
43 | -u8 rtw_set_802_11_test(_adapter *padapter, NDIS_802_11_TEST *test); | |
44 | -u8 rtw_set_802_11_pmkid(_adapter *pdapter, NDIS_802_11_PMKID *pmkid); | |
45 | - | |
46 | -u8 rtw_pnp_set_power_sleep(_adapter *padapter); | |
47 | -u8 rtw_pnp_set_power_wakeup(_adapter *padapter); | |
48 | - | |
49 | -void rtw_pnp_resume_wk(void *context); | |
50 | -void rtw_pnp_sleep_wk(void *context); | |
51 | - | |
52 | -#endif | |
53 | - | |
54 | 31 | u8 rtw_set_802_11_add_key(_adapter *padapter, NDIS_802_11_KEY *key); |
55 | 32 | u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode); |
56 | 33 | u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid); |
@@ -24,11 +24,7 @@ | ||
24 | 24 | #include <basic_types.h> |
25 | 25 | #include <osdep_service.h> |
26 | 26 | |
27 | -#ifdef CONFIG_PLATFORM_MSTAR_HIGH | |
28 | - #define MAX_RTKM_RECVBUF_SZ (31744) /* 31k */ | |
29 | -#else | |
30 | - #define MAX_RTKM_RECVBUF_SZ (15360) /* 15k */ | |
31 | -#endif /* CONFIG_PLATFORM_MSTAR_HIGH */ | |
27 | +#define MAX_RTKM_RECVBUF_SZ (15360) /* 15k */ | |
32 | 28 | #define MAX_RTKM_NR_PREALLOC_RECV_SKB 16 |
33 | 29 | |
34 | 30 | u16 rtw_rtkm_get_buff_size(void); |
@@ -802,12 +802,6 @@ struct mlme_priv { | ||
802 | 802 | u32 wfd_assoc_resp_ie_len; |
803 | 803 | #endif |
804 | 804 | |
805 | -#ifdef RTK_DMP_PLATFORM | |
806 | - /* DMP kobject_hotplug function signal need in passive level */ | |
807 | - _workitem Linkup_workitem; | |
808 | - _workitem Linkdown_workitem; | |
809 | -#endif | |
810 | - | |
811 | 805 | #ifdef CONFIG_INTEL_WIDI |
812 | 806 | int widi_state; |
813 | 807 | int listen_state; |
@@ -44,13 +44,7 @@ struct mp_xmit_frame { | ||
44 | 44 | u8 *mem_addr; |
45 | 45 | u32 sz[8]; |
46 | 46 | |
47 | -#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) | |
48 | 47 | PURB pxmit_urb[8]; |
49 | -#endif | |
50 | - | |
51 | -#ifdef PLATFORM_OS_XP | |
52 | - PIRP pxmit_irp[8]; | |
53 | -#endif | |
54 | 48 | |
55 | 49 | u8 bpending[8]; |
56 | 50 | sint ac_tag[8]; |
@@ -71,21 +65,6 @@ struct mp_wiparam { | ||
71 | 65 | |
72 | 66 | typedef void(*wi_act_func)(void *padapter); |
73 | 67 | |
74 | -#ifdef PLATFORM_WINDOWS | |
75 | -struct mp_wi_cntx { | |
76 | - u8 bmpdrv_unload; | |
77 | - | |
78 | - /* Work Item */ | |
79 | - NDIS_WORK_ITEM mp_wi; | |
80 | - NDIS_EVENT mp_wi_evt; | |
81 | - _lock mp_wi_lock; | |
82 | - u8 bmp_wi_progress; | |
83 | - wi_act_func curractfunc; | |
84 | - /* Variable needed in each implementation of CurrActFunc. */ | |
85 | - struct mp_wiparam param; | |
86 | -}; | |
87 | -#endif | |
88 | - | |
89 | 68 | struct mp_tx { |
90 | 69 | u8 stop; |
91 | 70 | u32 count, sended; |
@@ -411,31 +390,6 @@ struct mp_priv { | ||
411 | 390 | struct wlan_network mp_network; |
412 | 391 | NDIS_802_11_MAC_ADDRESS network_macaddr; |
413 | 392 | |
414 | -#ifdef PLATFORM_WINDOWS | |
415 | - u32 rx_testcnt; | |
416 | - u32 rx_testcnt1; | |
417 | - u32 rx_testcnt2; | |
418 | - u32 tx_testcnt; | |
419 | - u32 tx_testcnt1; | |
420 | - | |
421 | - struct mp_wi_cntx wi_cntx; | |
422 | - | |
423 | - u8 h2c_result; | |
424 | - u8 h2c_seqnum; | |
425 | - u16 h2c_cmdcode; | |
426 | - u8 h2c_resp_parambuf[512]; | |
427 | - _lock h2c_lock; | |
428 | - _lock wkitm_lock; | |
429 | - u32 h2c_cmdcnt; | |
430 | - NDIS_EVENT h2c_cmd_evt; | |
431 | - NDIS_EVENT c2h_set; | |
432 | - NDIS_EVENT h2c_clr; | |
433 | - NDIS_EVENT cpwm_int; | |
434 | - | |
435 | - NDIS_EVENT scsir_full_evt; | |
436 | - NDIS_EVENT scsiw_empty_evt; | |
437 | -#endif | |
438 | - | |
439 | 393 | u8 *pallocated_mp_xmitframe_buf; |
440 | 394 | u8 *pmp_xmtframe_buf; |
441 | 395 | _queue free_mp_xmitqueue; |
@@ -71,24 +71,7 @@ typedef struct _DR_VARIABLE_STRUCT_ { | ||
71 | 71 | /* int mp_start_joinbss(_adapter *padapter, NDIS_802_11_SSID *pssid); */ |
72 | 72 | |
73 | 73 | /* void _irqlevel_changed_(_irqL *irqlevel, BOOLEANunsigned char bLower); */ |
74 | -#ifdef PLATFORM_OS_XP | |
75 | -static void _irqlevel_changed_(_irqL *irqlevel, u8 bLower) | |
76 | -{ | |
77 | - | |
78 | - if (bLower == LOWER) { | |
79 | - *irqlevel = KeGetCurrentIrql(); | |
80 | - | |
81 | - if (*irqlevel > PASSIVE_LEVEL) | |
82 | - KeLowerIrql(PASSIVE_LEVEL); | |
83 | - } else { | |
84 | - if (KeGetCurrentIrql() == PASSIVE_LEVEL) | |
85 | - KeRaiseIrql(DISPATCH_LEVEL, irqlevel); | |
86 | - } | |
87 | - | |
88 | -} | |
89 | -#else | |
90 | 74 | #define _irqlevel_changed_(a, b) |
91 | -#endif | |
92 | 75 | |
93 | 76 | /* oid_rtl_seg_81_80_00 */ |
94 | 77 | NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv); |
@@ -46,13 +46,8 @@ | ||
46 | 46 | |
47 | 47 | #ifdef CONFIG_WOWLAN |
48 | 48 | #ifdef CONFIG_DEFAULT_PATTERNS_EN |
49 | - #ifdef CONFIG_PLATFORM_ANDROID_INTEL_X86 | |
50 | - /* TCP/ICMP/UDP multicast with specific IP addr */ | |
51 | - #define DEFAULT_PATTERN_NUM 3 | |
52 | - #else | |
53 | - /* TCP/ICMP */ | |
54 | - #define DEFAULT_PATTERN_NUM 2 | |
55 | - #endif | |
49 | + /* TCP/ICMP */ | |
50 | + #define DEFAULT_PATTERN_NUM 2 | |
56 | 51 | #else |
57 | 52 | #define DEFAULT_PATTERN_NUM 0 |
58 | 53 | #endif /*CONFIG_DEFAULT_PATTERNS_EN*/ |
@@ -20,40 +20,25 @@ | ||
20 | 20 | #ifndef _RTW_RECV_H_ |
21 | 21 | #define _RTW_RECV_H_ |
22 | 22 | |
23 | -#ifdef PLATFORM_OS_XP | |
24 | - #ifdef CONFIG_SDIO_HCI | |
25 | - #define NR_RECVBUFF 1024/* 512 */ /* 128 */ | |
26 | - #else | |
27 | - #define NR_RECVBUFF (16) | |
28 | - #endif | |
29 | -#elif defined(PLATFORM_OS_CE) | |
30 | - #ifdef CONFIG_SDIO_HCI | |
31 | - #define NR_RECVBUFF (128) | |
23 | +#ifdef CONFIG_SINGLE_RECV_BUF | |
24 | + #define NR_RECVBUFF (1) | |
25 | +#else | |
26 | + #if defined(CONFIG_GSPI_HCI) | |
27 | + #define NR_RECVBUFF (32) | |
28 | + #elif defined(CONFIG_SDIO_HCI) | |
29 | + #define NR_RECVBUFF (8) | |
32 | 30 | #else |
33 | - #define NR_RECVBUFF (4) | |
31 | + #define NR_RECVBUFF (8) | |
34 | 32 | #endif |
35 | -#else /* PLATFORM_LINUX /PLATFORM_BSD */ | |
33 | +#endif /* CONFIG_SINGLE_RECV_BUF */ | |
34 | +#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER | |
35 | + #define NR_PREALLOC_RECV_SKB (rtw_rtkm_get_nr_recv_skb()>>1) | |
36 | +#else /*!CONFIG_PREALLOC_RX_SKB_BUFFER */ | |
37 | + #define NR_PREALLOC_RECV_SKB 8 | |
38 | +#endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */ | |
36 | 39 | |
37 | - #ifdef CONFIG_SINGLE_RECV_BUF | |
38 | - #define NR_RECVBUFF (1) | |
39 | - #else | |
40 | - #if defined(CONFIG_GSPI_HCI) | |
41 | - #define NR_RECVBUFF (32) | |
42 | - #elif defined(CONFIG_SDIO_HCI) | |
43 | - #define NR_RECVBUFF (8) | |
44 | - #else | |
45 | - #define NR_RECVBUFF (8) | |
46 | - #endif | |
47 | - #endif /* CONFIG_SINGLE_RECV_BUF */ | |
48 | - #ifdef CONFIG_PREALLOC_RX_SKB_BUFFER | |
49 | - #define NR_PREALLOC_RECV_SKB (rtw_rtkm_get_nr_recv_skb()>>1) | |
50 | - #else /*!CONFIG_PREALLOC_RX_SKB_BUFFER */ | |
51 | - #define NR_PREALLOC_RECV_SKB 8 | |
52 | - #endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */ | |
53 | - | |
54 | - #ifdef CONFIG_RTW_NAPI | |
55 | - #define RTL_NAPI_WEIGHT (32) | |
56 | - #endif | |
40 | +#ifdef CONFIG_RTW_NAPI | |
41 | + #define RTL_NAPI_WEIGHT (32) | |
57 | 42 | #endif |
58 | 43 | |
59 | 44 | #define NR_RECVFRAME 256 |
@@ -326,18 +311,6 @@ struct recv_priv { | ||
326 | 311 | |
327 | 312 | _adapter *adapter; |
328 | 313 | |
329 | -#ifdef PLATFORM_WINDOWS | |
330 | - _nic_hdl RxPktPoolHdl; | |
331 | - _nic_hdl RxBufPoolHdl; | |
332 | - | |
333 | -#ifdef PLATFORM_OS_XP | |
334 | - PMDL pbytecnt_mdl; | |
335 | -#endif | |
336 | - uint counter; /* record the number that up-layer will return to drv; only when counter==0 can we release recv_priv */ | |
337 | - NDIS_EVENT recv_resource_evt ; | |
338 | -#endif | |
339 | - | |
340 | - | |
341 | 314 | u32 is_any_non_be_pkts; |
342 | 315 | |
343 | 316 | u64 rx_bytes; |
@@ -356,22 +329,14 @@ struct recv_priv { | ||
356 | 329 | ATOMIC_T rx_pending_cnt; |
357 | 330 | |
358 | 331 | #ifdef CONFIG_USB_INTERRUPT_IN_PIPE |
359 | -#ifdef PLATFORM_LINUX | |
360 | 332 | PURB int_in_urb; |
361 | -#endif | |
362 | 333 | |
363 | 334 | u8 *int_in_buf; |
364 | 335 | #endif /* CONFIG_USB_INTERRUPT_IN_PIPE */ |
365 | 336 | |
366 | 337 | #endif |
367 | -#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) | |
368 | -#ifdef PLATFORM_FREEBSD | |
369 | - struct task irq_prepare_beacon_tasklet; | |
370 | - struct task recv_tasklet; | |
371 | -#else /* PLATFORM_FREEBSD */ | |
372 | 338 | struct tasklet_struct irq_prepare_beacon_tasklet; |
373 | 339 | struct tasklet_struct recv_tasklet; |
374 | -#endif /* PLATFORM_FREEBSD */ | |
375 | 340 | struct sk_buff_head free_recv_skb_queue; |
376 | 341 | struct sk_buff_head rx_skb_queue; |
377 | 342 | #ifdef CONFIG_RTW_NAPI |
@@ -382,7 +347,6 @@ struct recv_priv { | ||
382 | 347 | struct ifqueue rx_indicate_queue; |
383 | 348 | #endif /* CONFIG_RX_INDICATE_QUEUE */ |
384 | 349 | |
385 | -#endif /* defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) */ | |
386 | 350 | |
387 | 351 | u8 *pallocated_recv_buf; |
388 | 352 | u8 *precv_buf; /* 4 alignment */ |
@@ -471,31 +435,13 @@ struct recv_buf { | ||
471 | 435 | |
472 | 436 | #ifdef CONFIG_USB_HCI |
473 | 437 | |
474 | -#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) | |
475 | 438 | PURB purb; |
476 | 439 | dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ |
477 | 440 | u32 alloc_sz; |
478 | -#endif | |
479 | - | |
480 | -#ifdef PLATFORM_OS_XP | |
481 | - PIRP pirp; | |
482 | -#endif | |
483 | - | |
484 | -#ifdef PLATFORM_OS_CE | |
485 | - USB_TRANSFER usb_transfer_read_port; | |
486 | -#endif | |
487 | - | |
488 | 441 | u8 irp_pending; |
489 | 442 | int transfer_len; |
490 | - | |
491 | 443 | #endif |
492 | - | |
493 | -#ifdef PLATFORM_LINUX | |
494 | 444 | _pkt *pskb; |
495 | -#endif | |
496 | -#ifdef PLATFORM_FREEBSD /* skb solution */ | |
497 | - struct sk_buff *pskb; | |
498 | -#endif /* PLATFORM_FREEBSD */ /* skb solution */ | |
499 | 445 | }; |
500 | 446 | |
501 | 447 |
@@ -745,14 +691,9 @@ __inline static _buffer *get_rxbuf_desc(union recv_frame *precvframe) | ||
745 | 691 | |
746 | 692 | if (precvframe == NULL) |
747 | 693 | return NULL; |
748 | -#ifdef PLATFORM_WINDOWS | |
749 | - NdisQueryPacket(precvframe->u.hdr.pkt, NULL, NULL, &buf_desc, NULL); | |
750 | -#endif | |
751 | - | |
752 | 694 | return buf_desc; |
753 | 695 | } |
754 | 696 | |
755 | - | |
756 | 697 | __inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem) |
757 | 698 | { |
758 | 699 | /* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */ |
@@ -768,13 +709,6 @@ __inline static union recv_frame *pkt_to_recvframe(_pkt *pkt) | ||
768 | 709 | |
769 | 710 | u8 *buf_star; |
770 | 711 | union recv_frame *precv_frame; |
771 | -#ifdef PLATFORM_WINDOWS | |
772 | - _buffer *buf_desc; | |
773 | - uint len; | |
774 | - | |
775 | - NdisQueryPacket(pkt, NULL, NULL, &buf_desc, &len); | |
776 | - NdisQueryBufferSafe(buf_desc, &buf_star, &len, HighPagePriority); | |
777 | -#endif | |
778 | 712 | precv_frame = rxmem_to_recvframe((unsigned char *)buf_star); |
779 | 713 | |
780 | 714 | return precv_frame; |
@@ -187,9 +187,6 @@ struct security_priv { | ||
187 | 187 | u32 ndisencryptstatus; /* NDIS_802_11_ENCRYPTION_STATUS */ |
188 | 188 | |
189 | 189 | NDIS_802_11_WEP ndiswep; |
190 | -#ifdef PLATFORM_WINDOWS | |
191 | - u8 KeyMaterial[16];/* variable length depending on above field. */ | |
192 | -#endif | |
193 | 190 | |
194 | 191 | u8 assoc_info[600]; |
195 | 192 | u8 szofcapability[256]; /* for wpa2 usage */ |
@@ -40,13 +40,7 @@ | ||
40 | 40 | #elif defined (CONFIG_USB_HCI) |
41 | 41 | |
42 | 42 | #ifdef CONFIG_USB_TX_AGGREGATION |
43 | - #if defined(CONFIG_PLATFORM_ARM_SUNxI) || defined(CONFIG_PLATFORM_ARM_SUN6I) || defined(CONFIG_PLATFORM_ARM_SUN7I) || defined(CONFIG_PLATFORM_ARM_SUN8I) || defined(CONFIG_PLATFORM_ARM_SUN50IW1P1) | |
44 | - #define MAX_XMITBUF_SZ (12288) /* 12k 1536*8 */ | |
45 | - #elif defined (CONFIG_PLATFORM_MSTAR) | |
46 | - #define MAX_XMITBUF_SZ 7680 /* 7.5k */ | |
47 | - #else | |
48 | - #define MAX_XMITBUF_SZ (20480) /* 20k */ | |
49 | - #endif | |
43 | + #define MAX_XMITBUF_SZ (20480) /* 20k */ | |
50 | 44 | #else |
51 | 45 | #define MAX_XMITBUF_SZ (2048) |
52 | 46 | #endif |
@@ -65,18 +59,10 @@ | ||
65 | 59 | #define NR_XMITBUFF (128) |
66 | 60 | #endif |
67 | 61 | |
68 | -#ifdef PLATFORM_OS_CE | |
69 | - #define XMITBUF_ALIGN_SZ 4 | |
62 | +#ifdef USB_XMITBUF_ALIGN_SZ | |
63 | + #define XMITBUF_ALIGN_SZ (USB_XMITBUF_ALIGN_SZ) | |
70 | 64 | #else |
71 | - #ifdef CONFIG_PCI_HCI | |
72 | - #define XMITBUF_ALIGN_SZ 4 | |
73 | - #else | |
74 | - #ifdef USB_XMITBUF_ALIGN_SZ | |
75 | - #define XMITBUF_ALIGN_SZ (USB_XMITBUF_ALIGN_SZ) | |
76 | - #else | |
77 | - #define XMITBUF_ALIGN_SZ 512 | |
78 | - #endif | |
79 | - #endif | |
65 | + #define XMITBUF_ALIGN_SZ 512 | |
80 | 66 | #endif |
81 | 67 | |
82 | 68 | /* xmit extension buff defination */ |
@@ -444,9 +430,7 @@ struct submit_ctx { | ||
444 | 430 | u32 submit_time; /* */ |
445 | 431 | u32 timeout_ms; /* <0: not synchronous, 0: wait forever, >0: up to ms waiting */ |
446 | 432 | int status; /* status for operation */ |
447 | -#ifdef PLATFORM_LINUX | |
448 | 433 | struct completion done; |
449 | -#endif | |
450 | 434 | }; |
451 | 435 | |
452 | 436 | enum { |
@@ -491,63 +475,24 @@ struct xmit_buf { | ||
491 | 475 | |
492 | 476 | struct submit_ctx *sctx; |
493 | 477 | |
494 | -#ifdef CONFIG_USB_HCI | |
495 | - | |
496 | 478 | /* u32 sz[8]; */ |
497 | 479 | u32 ff_hwaddr; |
498 | 480 | #ifdef RTW_HALMAC |
499 | 481 | u8 bulkout_id; /* for halmac */ |
500 | 482 | #endif /* RTW_HALMAC */ |
501 | 483 | |
502 | -#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) | |
503 | 484 | PURB pxmit_urb[8]; |
504 | 485 | dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */ |
505 | -#endif | |
506 | - | |
507 | -#ifdef PLATFORM_OS_XP | |
508 | - PIRP pxmit_irp[8]; | |
509 | -#endif | |
510 | - | |
511 | -#ifdef PLATFORM_OS_CE | |
512 | - USB_TRANSFER usb_transfer_write_port; | |
513 | -#endif | |
514 | 486 | |
515 | 487 | u8 bpending[8]; |
516 | 488 | |
517 | 489 | sint last[8]; |
518 | 490 | |
519 | -#endif | |
520 | - | |
521 | -#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) | |
522 | - u8 *phead; | |
523 | - u8 *pdata; | |
524 | - u8 *ptail; | |
525 | - u8 *pend; | |
526 | - u32 ff_hwaddr; | |
527 | - u8 pg_num; | |
528 | - u8 agg_num; | |
529 | -#ifdef PLATFORM_OS_XP | |
530 | - PMDL pxmitbuf_mdl; | |
531 | - PIRP pxmitbuf_irp; | |
532 | - PSDBUS_REQUEST_PACKET pxmitbuf_sdrp; | |
533 | -#endif | |
534 | -#endif | |
535 | - | |
536 | -#ifdef CONFIG_PCI_HCI | |
537 | -#ifdef CONFIG_TRX_BD_ARCH | |
538 | - /*struct tx_buf_desc *buf_desc;*/ | |
539 | -#else | |
540 | - struct tx_desc *desc; | |
541 | -#endif | |
542 | -#endif | |
543 | - | |
544 | 491 | #if defined(DBG_XMIT_BUF) || defined(DBG_XMIT_BUF_EXT) |
545 | 492 | u8 no; |
546 | 493 | #endif |
547 | - | |
548 | 494 | }; |
549 | 495 | |
550 | - | |
551 | 496 | struct xmit_frame { |
552 | 497 | _list list; |
553 | 498 |
@@ -694,43 +639,19 @@ struct xmit_priv { | ||
694 | 639 | |
695 | 640 | u8 wmm_para_seq[4];/* sequence for wmm ac parameter strength from large to small. it's value is 0->vo, 1->vi, 2->be, 3->bk. */ |
696 | 641 | |
697 | -#ifdef CONFIG_USB_HCI | |
698 | 642 | _sema tx_retevt;/* all tx return event; */ |
699 | 643 | u8 txirp_cnt; |
700 | 644 | |
701 | -#ifdef PLATFORM_OS_CE | |
702 | - USB_TRANSFER usb_transfer_write_port; | |
703 | - /* USB_TRANSFER usb_transfer_write_mem; */ | |
704 | -#endif | |
705 | -#ifdef PLATFORM_LINUX | |
706 | 645 | struct tasklet_struct xmit_tasklet; |
707 | -#endif | |
708 | -#ifdef PLATFORM_FREEBSD | |
709 | - struct task xmit_tasklet; | |
710 | -#endif | |
711 | 646 | /* per AC pending irp */ |
712 | 647 | int beq_cnt; |
713 | 648 | int bkq_cnt; |
714 | 649 | int viq_cnt; |
715 | 650 | int voq_cnt; |
716 | 651 | |
717 | -#endif | |
718 | - | |
719 | -#ifdef CONFIG_PCI_HCI | |
720 | - /* Tx */ | |
721 | - struct rtw_tx_ring tx_ring[PCI_MAX_TX_QUEUE_COUNT]; | |
722 | - int txringcount[PCI_MAX_TX_QUEUE_COUNT]; | |
723 | - u8 beaconDMAing; /* flag of indicating beacon is transmiting to HW by DMA */ | |
724 | -#ifdef PLATFORM_LINUX | |
725 | - struct tasklet_struct xmit_tasklet; | |
726 | -#endif | |
727 | -#endif | |
728 | - | |
729 | 652 | #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) |
730 | 653 | #ifdef CONFIG_SDIO_TX_TASKLET |
731 | -#ifdef PLATFORM_LINUX | |
732 | 654 | struct tasklet_struct xmit_tasklet; |
733 | -#endif /* PLATFORM_LINUX */ | |
734 | 655 | #else |
735 | 656 | _thread_hdl_ SdioXmitThread; |
736 | 657 | _sema SdioXmitSema; |
@@ -35,9 +35,7 @@ enum { | ||
35 | 35 | #define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */ |
36 | 36 | #define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT) |
37 | 37 | |
38 | -#ifdef PLATFORM_LINUX | |
39 | 38 | #include <usb_ops_linux.h> |
40 | -#endif /* PLATFORM_LINUX */ | |
41 | 39 | |
42 | 40 | #ifdef CONFIG_RTL8188E |
43 | 41 | void rtl8188eu_set_hw_type(struct dvobj_priv *pdvobj); |
@@ -726,7 +726,6 @@ typedef enum _ELEMENT_ID { | ||
726 | 726 | * This structure refers to "HT BlockAckReq" as |
727 | 727 | * described in 802.11n draft section 7.2.1.7.1 |
728 | 728 | */ |
729 | -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW) | |
730 | 729 | struct rtw_ieee80211_bar { |
731 | 730 | __le16 frame_control; |
732 | 731 | __le16 duration; |
@@ -735,17 +734,11 @@ struct rtw_ieee80211_bar { | ||
735 | 734 | __le16 control; |
736 | 735 | __le16 start_seq_num; |
737 | 736 | } __attribute__((packed)); |
738 | -#endif | |
739 | 737 | |
740 | 738 | /* 802.11 BAR control masks */ |
741 | 739 | #define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 |
742 | 740 | #define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 |
743 | 741 | |
744 | - | |
745 | -#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW) || defined(PLATFORM_FREEBSD) | |
746 | - | |
747 | - | |
748 | - | |
749 | 742 | /** |
750 | 743 | * struct rtw_ieee80211_ht_cap - HT capabilities |
751 | 744 | * |
@@ -776,7 +769,6 @@ struct ieee80211_ht_addt_info { | ||
776 | 769 | unsigned char basic_set[16]; |
777 | 770 | } __attribute__((packed)); |
778 | 771 | |
779 | - | |
780 | 772 | struct HT_caps_element { |
781 | 773 | union { |
782 | 774 | struct { |
@@ -816,77 +808,6 @@ struct ADDBA_request { | ||
816 | 808 | __le16 BA_starting_seqctrl; |
817 | 809 | } __attribute__((packed)); |
818 | 810 | |
819 | - | |
820 | - | |
821 | -#endif | |
822 | - | |
823 | - | |
824 | -#ifdef PLATFORM_WINDOWS | |
825 | - | |
826 | -#pragma pack(1) | |
827 | - | |
828 | -struct rtw_ieee80211_ht_cap { | |
829 | - unsigned short cap_info; | |
830 | - unsigned char ampdu_params_info; | |
831 | - unsigned char supp_mcs_set[16]; | |
832 | - unsigned short extended_ht_cap_info; | |
833 | - unsigned int tx_BF_cap_info; | |
834 | - unsigned char antenna_selection_info; | |
835 | -}; | |
836 | - | |
837 | - | |
838 | -struct ieee80211_ht_addt_info { | |
839 | - unsigned char control_chan; | |
840 | - unsigned char ht_param; | |
841 | - unsigned short operation_mode; | |
842 | - unsigned short stbc_param; | |
843 | - unsigned char basic_set[16]; | |
844 | -}; | |
845 | - | |
846 | -struct HT_caps_element { | |
847 | - union { | |
848 | - struct { | |
849 | - unsigned short HT_caps_info; | |
850 | - unsigned char AMPDU_para; | |
851 | - unsigned char MCS_rate[16]; | |
852 | - unsigned short HT_ext_caps; | |
853 | - unsigned int Beamforming_caps; | |
854 | - unsigned char ASEL_caps; | |
855 | - } HT_cap_element; | |
856 | - unsigned char HT_cap[26]; | |
857 | - }; | |
858 | -}; | |
859 | - | |
860 | -struct HT_info_element { | |
861 | - unsigned char primary_channel; | |
862 | - unsigned char infos[5]; | |
863 | - unsigned char MCS_rate[16]; | |
864 | -}; | |
865 | - | |
866 | -struct AC_param { | |
867 | - unsigned char ACI_AIFSN; | |
868 | - unsigned char CW; | |
869 | - unsigned short TXOP_limit; | |
870 | -}; | |
871 | - | |
872 | -struct WMM_para_element { | |
873 | - unsigned char QoS_info; | |
874 | - unsigned char reserved; | |
875 | - struct AC_param ac_param[4]; | |
876 | -}; | |
877 | - | |
878 | -struct ADDBA_request { | |
879 | - unsigned char dialog_token; | |
880 | - unsigned short BA_para_set; | |
881 | - unsigned short BA_timeout_value; | |
882 | - unsigned short BA_starting_seqctrl; | |
883 | -}; | |
884 | - | |
885 | - | |
886 | -#pragma pack() | |
887 | - | |
888 | -#endif | |
889 | - | |
890 | 811 | typedef enum _HT_CAP_AMPDU_FACTOR { |
891 | 812 | MAX_AMPDU_FACTOR_8K = 0, |
892 | 813 | MAX_AMPDU_FACTOR_16K = 1, |
@@ -24,22 +24,18 @@ | ||
24 | 24 | #define MAX_IE_SZ 768 |
25 | 25 | |
26 | 26 | |
27 | -#ifdef PLATFORM_LINUX | |
28 | - | |
29 | 27 | #define NDIS_802_11_LENGTH_SSID 32 |
30 | 28 | #define NDIS_802_11_LENGTH_RATES 8 |
31 | 29 | #define NDIS_802_11_LENGTH_RATES_EX 16 |
32 | 30 | |
33 | 31 | typedef unsigned char NDIS_802_11_MAC_ADDRESS[6]; |
34 | -typedef long NDIS_802_11_RSSI; /* in dBm */ | |
32 | +typedef long NDIS_802_11_RSSI; /* in dBm */ | |
35 | 33 | typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */ |
36 | 34 | typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */ |
37 | 35 | |
38 | - | |
39 | 36 | typedef ULONG NDIS_802_11_KEY_INDEX; |
40 | 37 | typedef unsigned long long NDIS_802_11_KEY_RSC; |
41 | 38 | |
42 | - | |
43 | 39 | typedef struct _NDIS_802_11_SSID { |
44 | 40 | ULONG SsidLength; |
45 | 41 | UCHAR Ssid[32]; |
@@ -73,8 +69,6 @@ typedef struct _NDIS_802_11_CONFIGURATION { | ||
73 | 69 | NDIS_802_11_CONFIGURATION_FH FHConfig; |
74 | 70 | } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION; |
75 | 71 | |
76 | - | |
77 | - | |
78 | 72 | typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE { |
79 | 73 | Ndis802_11IBSS, |
80 | 74 | Ndis802_11Infrastructure, |
@@ -84,30 +78,19 @@ typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE { | ||
84 | 78 | Ndis802_11Monitor, |
85 | 79 | } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE; |
86 | 80 | |
87 | - | |
88 | - | |
89 | - | |
90 | - | |
91 | 81 | typedef struct _NDIS_802_11_FIXED_IEs { |
92 | 82 | UCHAR Timestamp[8]; |
93 | 83 | USHORT BeaconInterval; |
94 | 84 | USHORT Capabilities; |
95 | 85 | } NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs; |
96 | 86 | |
97 | - | |
98 | - | |
99 | 87 | typedef struct _NDIS_802_11_VARIABLE_IEs { |
100 | 88 | UCHAR ElementID; |
101 | 89 | UCHAR Length; |
102 | 90 | UCHAR data[1]; |
103 | 91 | } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs; |
104 | 92 | |
105 | - | |
106 | - | |
107 | 93 | /* |
108 | - | |
109 | - | |
110 | - | |
111 | 94 | Length is the 4 bytes multiples of the sume of |
112 | 95 | sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG) |
113 | 96 | + sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION) |
@@ -145,231 +128,6 @@ typedef enum _NDIS_802_11_WEP_STATUS { | ||
145 | 128 | } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS, |
146 | 129 | NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS; |
147 | 130 | |
148 | - | |
149 | -#define NDIS_802_11_AI_REQFI_CAPABILITIES 1 | |
150 | -#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2 | |
151 | -#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4 | |
152 | - | |
153 | -#define NDIS_802_11_AI_RESFI_CAPABILITIES 1 | |
154 | -#define NDIS_802_11_AI_RESFI_STATUSCODE 2 | |
155 | -#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4 | |
156 | - | |
157 | -typedef struct _NDIS_802_11_AI_REQFI { | |
158 | - USHORT Capabilities; | |
159 | - USHORT ListenInterval; | |
160 | - NDIS_802_11_MAC_ADDRESS CurrentAPAddress; | |
161 | -} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI; | |
162 | - | |
163 | -typedef struct _NDIS_802_11_AI_RESFI { | |
164 | - USHORT Capabilities; | |
165 | - USHORT StatusCode; | |
166 | - USHORT AssociationId; | |
167 | -} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI; | |
168 | - | |
169 | -typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION { | |
170 | - ULONG Length; | |
171 | - USHORT AvailableRequestFixedIEs; | |
172 | - NDIS_802_11_AI_REQFI RequestFixedIEs; | |
173 | - ULONG RequestIELength; | |
174 | - ULONG OffsetRequestIEs; | |
175 | - USHORT AvailableResponseFixedIEs; | |
176 | - NDIS_802_11_AI_RESFI ResponseFixedIEs; | |
177 | - ULONG ResponseIELength; | |
178 | - ULONG OffsetResponseIEs; | |
179 | -} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; | |
180 | - | |
181 | -typedef enum _NDIS_802_11_RELOAD_DEFAULTS { | |
182 | - Ndis802_11ReloadWEPKeys | |
183 | -} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS; | |
184 | - | |
185 | - | |
186 | -/* Key mapping keys require a BSSID */ | |
187 | -typedef struct _NDIS_802_11_KEY { | |
188 | - ULONG Length; /* Length of this structure */ | |
189 | - ULONG KeyIndex; | |
190 | - ULONG KeyLength; /* length of key in bytes */ | |
191 | - NDIS_802_11_MAC_ADDRESS BSSID; | |
192 | - NDIS_802_11_KEY_RSC KeyRSC; | |
193 | - UCHAR KeyMaterial[32]; /* variable length depending on above field */ | |
194 | -} NDIS_802_11_KEY, *PNDIS_802_11_KEY; | |
195 | - | |
196 | -typedef struct _NDIS_802_11_REMOVE_KEY { | |
197 | - ULONG Length; /* Length of this structure */ | |
198 | - ULONG KeyIndex; | |
199 | - NDIS_802_11_MAC_ADDRESS BSSID; | |
200 | -} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY; | |
201 | - | |
202 | -typedef struct _NDIS_802_11_WEP { | |
203 | - ULONG Length; /* Length of this structure */ | |
204 | - ULONG KeyIndex; /* 0 is the per-client key, 1-N are the global keys */ | |
205 | - ULONG KeyLength; /* length of key in bytes */ | |
206 | - UCHAR KeyMaterial[16];/* variable length depending on above field */ | |
207 | -} NDIS_802_11_WEP, *PNDIS_802_11_WEP; | |
208 | - | |
209 | -typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST { | |
210 | - ULONG Length; /* Length of structure */ | |
211 | - NDIS_802_11_MAC_ADDRESS Bssid; | |
212 | - ULONG Flags; | |
213 | -} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST; | |
214 | - | |
215 | -typedef enum _NDIS_802_11_STATUS_TYPE { | |
216 | - Ndis802_11StatusType_Authentication, | |
217 | - Ndis802_11StatusType_MediaStreamMode, | |
218 | - Ndis802_11StatusType_PMKID_CandidateList, | |
219 | - Ndis802_11StatusTypeMax /* not a real type, defined as an upper bound */ | |
220 | -} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE; | |
221 | - | |
222 | -typedef struct _NDIS_802_11_STATUS_INDICATION { | |
223 | - NDIS_802_11_STATUS_TYPE StatusType; | |
224 | -} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION; | |
225 | - | |
226 | -/* mask for authentication/integrity fields */ | |
227 | -#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f | |
228 | -#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01 | |
229 | -#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02 | |
230 | -#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06 | |
231 | -#define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E | |
232 | - | |
233 | -/* MIC check time, 60 seconds. */ | |
234 | -#define MIC_CHECK_TIME 60000000 | |
235 | - | |
236 | -typedef struct _NDIS_802_11_AUTHENTICATION_EVENT { | |
237 | - NDIS_802_11_STATUS_INDICATION Status; | |
238 | - NDIS_802_11_AUTHENTICATION_REQUEST Request[1]; | |
239 | -} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT; | |
240 | - | |
241 | -typedef struct _NDIS_802_11_TEST { | |
242 | - ULONG Length; | |
243 | - ULONG Type; | |
244 | - union { | |
245 | - NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent; | |
246 | - NDIS_802_11_RSSI RssiTrigger; | |
247 | - } tt; | |
248 | -} NDIS_802_11_TEST, *PNDIS_802_11_TEST; | |
249 | - | |
250 | - | |
251 | -#endif /* end of #ifdef PLATFORM_LINUX */ | |
252 | - | |
253 | -#ifdef PLATFORM_FREEBSD | |
254 | - | |
255 | -#define NDIS_802_11_LENGTH_SSID 32 | |
256 | -#define NDIS_802_11_LENGTH_RATES 8 | |
257 | -#define NDIS_802_11_LENGTH_RATES_EX 16 | |
258 | - | |
259 | -typedef unsigned char NDIS_802_11_MAC_ADDRESS[6]; | |
260 | -typedef long NDIS_802_11_RSSI; /* in dBm */ | |
261 | -typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */ | |
262 | -typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */ | |
263 | - | |
264 | - | |
265 | -typedef ULONG NDIS_802_11_KEY_INDEX; | |
266 | -typedef unsigned long long NDIS_802_11_KEY_RSC; | |
267 | - | |
268 | - | |
269 | -typedef struct _NDIS_802_11_SSID { | |
270 | - ULONG SsidLength; | |
271 | - UCHAR Ssid[32]; | |
272 | -} NDIS_802_11_SSID, *PNDIS_802_11_SSID; | |
273 | - | |
274 | -typedef enum _NDIS_802_11_NETWORK_TYPE { | |
275 | - Ndis802_11FH, | |
276 | - Ndis802_11DS, | |
277 | - Ndis802_11OFDM5, | |
278 | - Ndis802_11OFDM24, | |
279 | - Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */ | |
280 | -} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE; | |
281 | - | |
282 | -typedef struct _NDIS_802_11_CONFIGURATION_FH { | |
283 | - ULONG Length; /* Length of structure */ | |
284 | - ULONG HopPattern; /* As defined by 802.11, MSB set */ | |
285 | - ULONG HopSet; /* to one if non-802.11 */ | |
286 | - ULONG DwellTime; /* units are Kusec */ | |
287 | -} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH; | |
288 | - | |
289 | - | |
290 | -/* | |
291 | - FW will only save the channel number in DSConfig. | |
292 | - ODI Handler will convert the channel number to freq. number. | |
293 | -*/ | |
294 | -typedef struct _NDIS_802_11_CONFIGURATION { | |
295 | - ULONG Length; /* Length of structure */ | |
296 | - ULONG BeaconPeriod; /* units are Kusec */ | |
297 | - ULONG ATIMWindow; /* units are Kusec */ | |
298 | - ULONG DSConfig; /* channel number */ | |
299 | - NDIS_802_11_CONFIGURATION_FH FHConfig; | |
300 | -} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION; | |
301 | - | |
302 | - | |
303 | - | |
304 | -typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE { | |
305 | - Ndis802_11IBSS, | |
306 | - Ndis802_11Infrastructure, | |
307 | - Ndis802_11AutoUnknown, | |
308 | - Ndis802_11InfrastructureMax, /* Not a real value, defined as upper bound */ | |
309 | - Ndis802_11APMode | |
310 | -} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE; | |
311 | - | |
312 | - | |
313 | - | |
314 | - | |
315 | - | |
316 | -typedef struct _NDIS_802_11_FIXED_IEs { | |
317 | - UCHAR Timestamp[8]; | |
318 | - USHORT BeaconInterval; | |
319 | - USHORT Capabilities; | |
320 | -} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs; | |
321 | - | |
322 | - | |
323 | - | |
324 | -typedef struct _NDIS_802_11_VARIABLE_IEs { | |
325 | - UCHAR ElementID; | |
326 | - UCHAR Length; | |
327 | - UCHAR data[1]; | |
328 | -} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs; | |
329 | - | |
330 | - | |
331 | - | |
332 | -/* | |
333 | - | |
334 | - | |
335 | - | |
336 | -Length is the 4 bytes multiples of the sume of | |
337 | - sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG) | |
338 | -+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION) | |
339 | -+ sizeof (NDIS_802_11_RATES_EX) + IELength | |
340 | - | |
341 | -Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the | |
342 | -partial sum. | |
343 | - | |
344 | -*/ | |
345 | - | |
346 | -typedef enum _NDIS_802_11_AUTHENTICATION_MODE { | |
347 | - Ndis802_11AuthModeOpen, | |
348 | - Ndis802_11AuthModeShared, | |
349 | - Ndis802_11AuthModeAutoSwitch, | |
350 | - Ndis802_11AuthModeWPA, | |
351 | - Ndis802_11AuthModeWPAPSK, | |
352 | - Ndis802_11AuthModeWPANone, | |
353 | - Ndis802_11AuthModeMax /* Not a real mode, defined as upper bound */ | |
354 | -} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE; | |
355 | - | |
356 | -typedef enum _NDIS_802_11_WEP_STATUS { | |
357 | - Ndis802_11WEPEnabled, | |
358 | - Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled, | |
359 | - Ndis802_11WEPDisabled, | |
360 | - Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled, | |
361 | - Ndis802_11WEPKeyAbsent, | |
362 | - Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent, | |
363 | - Ndis802_11WEPNotSupported, | |
364 | - Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported, | |
365 | - Ndis802_11Encryption2Enabled, | |
366 | - Ndis802_11Encryption2KeyAbsent, | |
367 | - Ndis802_11Encryption3Enabled, | |
368 | - Ndis802_11Encryption3KeyAbsent | |
369 | -} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS, | |
370 | -NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS; | |
371 | - | |
372 | - | |
373 | 131 | #define NDIS_802_11_AI_REQFI_CAPABILITIES 1 |
374 | 132 | #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2 |
375 | 133 | #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4 |
@@ -406,7 +164,6 @@ typedef enum _NDIS_802_11_RELOAD_DEFAULTS { | ||
406 | 164 | Ndis802_11ReloadWEPKeys |
407 | 165 | } NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS; |
408 | 166 | |
409 | - | |
410 | 167 | /* Key mapping keys require a BSSID */ |
411 | 168 | typedef struct _NDIS_802_11_KEY { |
412 | 169 | ULONG Length; /* Length of this structure */ |
@@ -471,8 +228,6 @@ typedef struct _NDIS_802_11_TEST { | ||
471 | 228 | } tt; |
472 | 229 | } NDIS_802_11_TEST, *PNDIS_802_11_TEST; |
473 | 230 | |
474 | - | |
475 | -#endif /* PLATFORM_FREEBSD */ | |
476 | 231 | #ifndef Ndis802_11APMode |
477 | 232 | #define Ndis802_11APMode (Ndis802_11InfrastructureMax+1) |
478 | 233 | #endif |
@@ -497,13 +252,6 @@ typedef struct _WLAN_BCN_INFO { | ||
497 | 252 | unsigned char ht_info_infos_0; |
498 | 253 | } WLAN_BCN_INFO, *PWLAN_BCN_INFO; |
499 | 254 | |
500 | -/* temporally add #pragma pack for structure alignment issue of | |
501 | -* WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz() | |
502 | -*/ | |
503 | -#ifdef PLATFORM_WINDOWS | |
504 | -#pragma pack(push) | |
505 | -#pragma pack(1) | |
506 | -#endif | |
507 | 255 | typedef struct _WLAN_BSSID_EX { |
508 | 256 | ULONG Length; |
509 | 257 | NDIS_802_11_MAC_ADDRESS MacAddress; |
@@ -519,13 +267,8 @@ typedef struct _WLAN_BSSID_EX { | ||
519 | 267 | ULONG IELength; |
520 | 268 | UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */ |
521 | 269 | } |
522 | -#ifndef PLATFORM_WINDOWS | |
523 | 270 | __attribute__((packed)) |
524 | -#endif | |
525 | 271 | WLAN_BSSID_EX, *PWLAN_BSSID_EX; |
526 | -#ifdef PLATFORM_WINDOWS | |
527 | -#pragma pack(pop) | |
528 | -#endif | |
529 | 272 | |
530 | 273 | #define BSS_EX_IES(bss_ex) ((bss_ex)->IEs) |
531 | 274 | #define BSS_EX_IES_LEN(bss_ex) ((bss_ex)->IELength) |
@@ -547,10 +290,6 @@ struct wlan_network { | ||
547 | 290 | int join_res; |
548 | 291 | WLAN_BSSID_EX network; /* must be the last item */ |
549 | 292 | WLAN_BCN_INFO BcnInfo; |
550 | -#ifdef PLATFORM_WINDOWS | |
551 | - unsigned char iebuf[MAX_IE_SZ]; | |
552 | -#endif | |
553 | - | |
554 | 293 | }; |
555 | 294 | |
556 | 295 | enum VRTL_CARRIER_SENSE { |
@@ -591,7 +330,6 @@ enum UAPSD_MAX_SP { | ||
591 | 330 | * WPA2 |
592 | 331 | */ |
593 | 332 | |
594 | -#ifndef PLATFORM_OS_CE | |
595 | 333 | typedef struct _PMKID_CANDIDATE { |
596 | 334 | NDIS_802_11_MAC_ADDRESS BSSID; |
597 | 335 | ULONG Flags; |
@@ -618,7 +356,5 @@ typedef struct _NDIS_802_11_CAPABILITY { | ||
618 | 356 | NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1]; |
619 | 357 | |
620 | 358 | } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY; |
621 | -#endif | |
622 | - | |
623 | 359 | |
624 | 360 | #endif /* #ifndef WLAN_BSSDEF_H_ */ |
@@ -30,39 +30,6 @@ struct pkt_file { | ||
30 | 30 | SIZE_T buf_len; |
31 | 31 | }; |
32 | 32 | |
33 | -#ifdef PLATFORM_WINDOWS | |
34 | - | |
35 | -#ifdef PLATFORM_OS_XP | |
36 | -#ifdef CONFIG_USB_HCI | |
37 | -#include <usb.h> | |
38 | -#include <usbdlib.h> | |
39 | -#include <usbioctl.h> | |
40 | -#endif | |
41 | -#endif | |
42 | - | |
43 | -#ifdef CONFIG_GSPI_HCI | |
44 | - #define NR_XMITFRAME 64 | |
45 | -#else | |
46 | - #define NR_XMITFRAME 128 | |
47 | -#endif | |
48 | - | |
49 | -#define ETH_ALEN 6 | |
50 | - | |
51 | -extern NDIS_STATUS rtw_xmit_entry( | |
52 | - IN _nic_hdl cnxt, | |
53 | - IN NDIS_PACKET *pkt, | |
54 | - IN UINT flags | |
55 | -); | |
56 | - | |
57 | -#endif /* PLATFORM_WINDOWS */ | |
58 | - | |
59 | -#ifdef PLATFORM_FREEBSD | |
60 | -#define NR_XMITFRAME 256 | |
61 | -extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); | |
62 | -extern void rtw_xmit_entry_wrap(struct ifnet *pifp); | |
63 | -#endif /* PLATFORM_FREEBSD */ | |
64 | - | |
65 | -#ifdef PLATFORM_LINUX | |
66 | 33 | |
67 | 34 | #define NR_XMITFRAME 256 |
68 | 35 |
@@ -75,8 +42,6 @@ struct xmit_buf; | ||
75 | 42 | extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); |
76 | 43 | extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); |
77 | 44 | |
78 | -#endif /* PLATFORM_LINUX */ | |
79 | - | |
80 | 45 | void rtw_os_xmit_schedule(_adapter *padapter); |
81 | 46 | |
82 | 47 | int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag); |
@@ -1152,7 +1152,9 @@ static unsigned int rtw_classify8021d(struct sk_buff *skb) | ||
1152 | 1152 | |
1153 | 1153 | |
1154 | 1154 | static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb |
1155 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)) | |
1155 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0)) | |
1156 | + ,struct net_device *sb_dev | |
1157 | +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)) | |
1156 | 1158 | ,struct net_device *sb_dev |
1157 | 1159 | ,select_queue_fallback_t fallback |
1158 | 1160 | #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0) |
@@ -626,7 +626,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) | ||
626 | 626 | goto exit; |
627 | 627 | } |
628 | 628 | |
629 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) | |
630 | + if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) { | |
631 | +#else | |
629 | 632 | if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) { |
633 | +#endif | |
630 | 634 | RTW_INFO("%s: failed to access memory\n", __FUNCTION__); |
631 | 635 | ret = -EFAULT; |
632 | 636 | goto exit; |
@@ -2009,7 +2009,7 @@ static int isFileReadable(const char *path, u32 *sz) | ||
2009 | 2009 | ret = PTR_ERR(fp); |
2010 | 2010 | else { |
2011 | 2011 | oldfs = get_fs(); |
2012 | - set_fs(get_ds()); | |
2012 | + set_fs(KERNEL_DS); | |
2013 | 2013 | |
2014 | 2014 | if (1 != readFile(fp, &buf, 1)) |
2015 | 2015 | ret = PTR_ERR(fp); |
@@ -2047,7 +2047,7 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz) | ||
2047 | 2047 | RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp); |
2048 | 2048 | |
2049 | 2049 | oldfs = get_fs(); |
2050 | - set_fs(get_ds()); | |
2050 | + set_fs(KERNEL_DS); | |
2051 | 2051 | ret = readFile(fp, buf, sz); |
2052 | 2052 | set_fs(oldfs); |
2053 | 2053 | closeFile(fp); |
@@ -2082,7 +2082,7 @@ static int storeToFile(const char *path, u8 *buf, u32 sz) | ||
2082 | 2082 | RTW_INFO("%s openFile path:%s fp=%p\n", __FUNCTION__, path , fp); |
2083 | 2083 | |
2084 | 2084 | oldfs = get_fs(); |
2085 | - set_fs(get_ds()); | |
2085 | + set_fs(KERNEL_DS); | |
2086 | 2086 | ret = writeFile(fp, buf, sz); |
2087 | 2087 | set_fs(oldfs); |
2088 | 2088 | closeFile(fp); |