mirror of
https://github.com/amazingfate/rtl8723ds.git
synced 2026-06-18 18:29:01 +01:00
rtl8723ds: Remove PLATFORM_LINUX symbol - it is the only one supported
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
@@ -30,9 +30,6 @@
|
||||
#endif
|
||||
#define CONFIG_SDIO_HCI
|
||||
|
||||
#define PLATFORM_LINUX
|
||||
|
||||
|
||||
/*
|
||||
* Wi-Fi Functions Config
|
||||
*/
|
||||
|
||||
+31
-33
@@ -36,43 +36,41 @@
|
||||
#define _FALSE FALSE
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/utsname.h>
|
||||
#define IN
|
||||
#define OUT
|
||||
#define VOID void
|
||||
#define NDIS_OID uint
|
||||
#define NDIS_STATUS uint
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/utsname.h>
|
||||
#define IN
|
||||
#define OUT
|
||||
#define VOID void
|
||||
#define NDIS_OID uint
|
||||
#define NDIS_STATUS uint
|
||||
|
||||
typedef signed int sint;
|
||||
|
||||
#ifndef PVOID
|
||||
typedef void *PVOID;
|
||||
/* #define PVOID (void *) */
|
||||
#endif
|
||||
|
||||
#define UCHAR u8
|
||||
#define USHORT u16
|
||||
#define UINT u32
|
||||
#define ULONG u32
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19))
|
||||
typedef _Bool bool;
|
||||
#endif
|
||||
|
||||
typedef void (*proc_t)(void *);
|
||||
|
||||
typedef __kernel_size_t SIZE_T;
|
||||
typedef __kernel_ssize_t SSIZE_T;
|
||||
#define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field)
|
||||
typedef signed int sint;
|
||||
|
||||
#ifndef PVOID
|
||||
typedef void *PVOID;
|
||||
/* #define PVOID (void *) */
|
||||
#endif
|
||||
|
||||
#define UCHAR u8
|
||||
#define USHORT u16
|
||||
#define UINT u32
|
||||
#define ULONG u32
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19))
|
||||
typedef _Bool bool;
|
||||
#endif
|
||||
|
||||
typedef void (*proc_t)(void *);
|
||||
|
||||
typedef __kernel_size_t SIZE_T;
|
||||
typedef __kernel_ssize_t SSIZE_T;
|
||||
#define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field)
|
||||
|
||||
|
||||
|
||||
#define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T))
|
||||
#define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1)
|
||||
|
||||
+46
-60
@@ -97,50 +97,46 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
/*
|
||||
* inside the kernel, we can use nicknames;
|
||||
* outside of it, we must avoid POSIX namespace pollution...
|
||||
*/
|
||||
#define cpu_to_le64 __cpu_to_le64
|
||||
#define le64_to_cpu __le64_to_cpu
|
||||
#define cpu_to_le32 __cpu_to_le32
|
||||
#define le32_to_cpu __le32_to_cpu
|
||||
#define cpu_to_le16 __cpu_to_le16
|
||||
#define le16_to_cpu __le16_to_cpu
|
||||
#define cpu_to_be64 __cpu_to_be64
|
||||
#define be64_to_cpu __be64_to_cpu
|
||||
#define cpu_to_be32 __cpu_to_be32
|
||||
#define be32_to_cpu __be32_to_cpu
|
||||
#define cpu_to_be16 __cpu_to_be16
|
||||
#define be16_to_cpu __be16_to_cpu
|
||||
#define cpu_to_le64p __cpu_to_le64p
|
||||
#define le64_to_cpup __le64_to_cpup
|
||||
#define cpu_to_le32p __cpu_to_le32p
|
||||
#define le32_to_cpup __le32_to_cpup
|
||||
#define cpu_to_le16p __cpu_to_le16p
|
||||
#define le16_to_cpup __le16_to_cpup
|
||||
#define cpu_to_be64p __cpu_to_be64p
|
||||
#define be64_to_cpup __be64_to_cpup
|
||||
#define cpu_to_be32p __cpu_to_be32p
|
||||
#define be32_to_cpup __be32_to_cpup
|
||||
#define cpu_to_be16p __cpu_to_be16p
|
||||
#define be16_to_cpup __be16_to_cpup
|
||||
#define cpu_to_le64s __cpu_to_le64s
|
||||
#define le64_to_cpus __le64_to_cpus
|
||||
#define cpu_to_le32s __cpu_to_le32s
|
||||
#define le32_to_cpus __le32_to_cpus
|
||||
#define cpu_to_le16s __cpu_to_le16s
|
||||
#define le16_to_cpus __le16_to_cpus
|
||||
#define cpu_to_be64s __cpu_to_be64s
|
||||
#define be64_to_cpus __be64_to_cpus
|
||||
#define cpu_to_be32s __cpu_to_be32s
|
||||
#define be32_to_cpus __be32_to_cpus
|
||||
#define cpu_to_be16s __cpu_to_be16s
|
||||
#define be16_to_cpus __be16_to_cpus
|
||||
#endif
|
||||
|
||||
/*
|
||||
* inside the kernel, we can use nicknames;
|
||||
* outside of it, we must avoid POSIX namespace pollution...
|
||||
*/
|
||||
#define cpu_to_le64 __cpu_to_le64
|
||||
#define le64_to_cpu __le64_to_cpu
|
||||
#define cpu_to_le32 __cpu_to_le32
|
||||
#define le32_to_cpu __le32_to_cpu
|
||||
#define cpu_to_le16 __cpu_to_le16
|
||||
#define le16_to_cpu __le16_to_cpu
|
||||
#define cpu_to_be64 __cpu_to_be64
|
||||
#define be64_to_cpu __be64_to_cpu
|
||||
#define cpu_to_be32 __cpu_to_be32
|
||||
#define be32_to_cpu __be32_to_cpu
|
||||
#define cpu_to_be16 __cpu_to_be16
|
||||
#define be16_to_cpu __be16_to_cpu
|
||||
#define cpu_to_le64p __cpu_to_le64p
|
||||
#define le64_to_cpup __le64_to_cpup
|
||||
#define cpu_to_le32p __cpu_to_le32p
|
||||
#define le32_to_cpup __le32_to_cpup
|
||||
#define cpu_to_le16p __cpu_to_le16p
|
||||
#define le16_to_cpup __le16_to_cpup
|
||||
#define cpu_to_be64p __cpu_to_be64p
|
||||
#define be64_to_cpup __be64_to_cpup
|
||||
#define cpu_to_be32p __cpu_to_be32p
|
||||
#define be32_to_cpup __be32_to_cpup
|
||||
#define cpu_to_be16p __cpu_to_be16p
|
||||
#define be16_to_cpup __be16_to_cpup
|
||||
#define cpu_to_le64s __cpu_to_le64s
|
||||
#define le64_to_cpus __le64_to_cpus
|
||||
#define cpu_to_le32s __cpu_to_le32s
|
||||
#define le32_to_cpus __le32_to_cpus
|
||||
#define cpu_to_le16s __cpu_to_le16s
|
||||
#define le16_to_cpus __le16_to_cpus
|
||||
#define cpu_to_be64s __cpu_to_be64s
|
||||
#define be64_to_cpus __be64_to_cpus
|
||||
#define cpu_to_be32s __cpu_to_be32s
|
||||
#define be32_to_cpus __be32_to_cpus
|
||||
#define cpu_to_be16s __cpu_to_be16s
|
||||
#define be16_to_cpus __be16_to_cpus
|
||||
|
||||
/*
|
||||
* Handle ntohl and suches. These have various compatibility
|
||||
@@ -165,15 +161,10 @@
|
||||
* Do the prototypes. Somebody might want to take the
|
||||
* address or some such sick thing..
|
||||
*/
|
||||
#if defined(PLATFORM_LINUX) || (defined(__GLIBC__) && __GLIBC__ >= 2)
|
||||
extern __u32 ntohl(__u32);
|
||||
extern __u32 htonl(__u32);
|
||||
#else /* defined(PLATFORM_LINUX) || (defined (__GLIBC__) && __GLIBC__ >= 2) */
|
||||
extern unsigned long int ntohl(unsigned long int);
|
||||
extern unsigned long int htonl(unsigned long int);
|
||||
#endif
|
||||
extern unsigned short int ntohs(unsigned short int);
|
||||
extern unsigned short int htons(unsigned short int);
|
||||
extern __u32 ntohl(__u32);
|
||||
extern __u32 htonl(__u32);
|
||||
extern unsigned short int ntohs(unsigned short int);
|
||||
extern unsigned short int htons(unsigned short int);
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) || defined(PLATFORM_MPIXEL)
|
||||
|
||||
@@ -182,13 +173,8 @@
|
||||
#define ___ntohl(x) __be32_to_cpu(x)
|
||||
#define ___ntohs(x) __be16_to_cpu(x)
|
||||
|
||||
#if defined(PLATFORM_LINUX) || (defined(__GLIBC__) && __GLIBC__ >= 2)
|
||||
#define htonl(x) ___htonl(x)
|
||||
#define ntohl(x) ___ntohl(x)
|
||||
#else
|
||||
#define htonl(x) ((unsigned long)___htonl(x))
|
||||
#define ntohl(x) ((unsigned long)___ntohl(x))
|
||||
#endif
|
||||
#define htonl(x) ___htonl(x)
|
||||
#define ntohl(x) ___ntohl(x)
|
||||
#define htons(x) ___htons(x)
|
||||
#define ntohs(x) ___ntohs(x)
|
||||
|
||||
|
||||
@@ -118,16 +118,14 @@ __inline static const __u32 __fswab32(__u32 x)
|
||||
return __arch__swab32(x);
|
||||
}
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
#define swab16 __swab16
|
||||
#define swab32 __swab32
|
||||
#define swab64 __swab64
|
||||
#define swab16p __swab16p
|
||||
#define swab32p __swab32p
|
||||
#define swab64p __swab64p
|
||||
#define swab16s __swab16s
|
||||
#define swab32s __swab32s
|
||||
#define swab64s __swab64s
|
||||
#endif
|
||||
#define swab16 __swab16
|
||||
#define swab32 __swab32
|
||||
#define swab64 __swab64
|
||||
#define swab16p __swab16p
|
||||
#define swab32p __swab32p
|
||||
#define swab64p __swab64p
|
||||
#define swab16s __swab16s
|
||||
#define swab32s __swab32s
|
||||
#define swab64s __swab64s
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_SWAB_H */
|
||||
|
||||
@@ -144,13 +144,11 @@ __inline static__ void __swahb32s(__u32 *addr)
|
||||
*/
|
||||
#endif /* __BYTEORDER_HAS_U64__ */
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
#define swahw32 __swahw32
|
||||
#define swahb32 __swahb32
|
||||
#define swahw32p __swahw32p
|
||||
#define swahb32p __swahb32p
|
||||
#define swahw32s __swahw32s
|
||||
#define swahb32s __swahb32s
|
||||
#endif
|
||||
#define swahw32 __swahw32
|
||||
#define swahb32 __swahb32
|
||||
#define swahw32p __swahw32p
|
||||
#define swahb32p __swahb32p
|
||||
#define swahw32s __swahw32s
|
||||
#define swahb32s __swahb32s
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_SWABB_H */
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <drv_types_linux.h>
|
||||
#endif
|
||||
#include <drv_types_linux.h>
|
||||
|
||||
typedef enum cust_gpio_modes {
|
||||
WLAN_PWDN_ON,
|
||||
|
||||
@@ -39,9 +39,7 @@
|
||||
#include <net/arp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <drv_types_linux.h>
|
||||
#endif
|
||||
|
||||
#ifndef is_compat_task
|
||||
#define is_compat_task() 0
|
||||
@@ -968,10 +966,8 @@ struct dvobj_priv {
|
||||
u8 *usb_vendor_req_buf;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct usb_interface *pusbintf;
|
||||
struct usb_device *pusbdev;
|
||||
#endif/* PLATFORM_LINUX */
|
||||
|
||||
#endif/* CONFIG_USB_HCI */
|
||||
|
||||
@@ -979,7 +975,6 @@ struct dvobj_priv {
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct pci_dev *ppcidev;
|
||||
|
||||
/* PCI MEM map */
|
||||
@@ -1020,7 +1015,6 @@ struct dvobj_priv {
|
||||
u8 b_support_aspm; /* If it supports ASPM, Offset[560h] = 0x40, otherwise Offset[560h] = 0x00. */
|
||||
u8 b_support_backdoor;
|
||||
u8 bdma64;
|
||||
#endif/* PLATFORM_LINUX */
|
||||
|
||||
#endif/* CONFIG_PCI_HCI */
|
||||
|
||||
@@ -1073,12 +1067,9 @@ static inline void dev_clr_drv_stopped(struct dvobj_priv *dvobj)
|
||||
#define dev_is_surprise_removed(dvobj) (ATOMIC_READ(&dvobj->bSurpriseRemoved) == _TRUE)
|
||||
#define dev_is_drv_stopped(dvobj) (ATOMIC_READ(&dvobj->bDriverStopped) == _TRUE)
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
||||
{
|
||||
/* todo: get interface type from dvobj and the return the dev accordingly */
|
||||
#ifdef RTW_DVOBJ_CHIP_HW_TYPE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
return &dvobj->pusbintf->dev;
|
||||
@@ -1093,7 +1084,6 @@ static struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
||||
return &dvobj->ppcidev->dev;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
_adapter *dvobj_get_port0_adapter(struct dvobj_priv *dvobj);
|
||||
_adapter *dvobj_get_unregisterd_adapter(struct dvobj_priv *dvobj);
|
||||
@@ -1261,11 +1251,6 @@ struct _ADAPTER {
|
||||
_thread_hdl_ recvThread;
|
||||
|
||||
u8 registered;
|
||||
#ifndef PLATFORM_LINUX
|
||||
NDIS_STATUS(*dvobj_init)(struct dvobj_priv *dvobj);
|
||||
void (*dvobj_deinit)(struct dvobj_priv *dvobj);
|
||||
#endif
|
||||
|
||||
u32(*intf_init)(struct dvobj_priv *dvobj);
|
||||
void (*intf_deinit)(struct dvobj_priv *dvobj);
|
||||
int (*intf_alloc_irq)(struct dvobj_priv *dvobj);
|
||||
@@ -1275,7 +1260,6 @@ struct _ADAPTER {
|
||||
void (*intf_start)(_adapter *adapter);
|
||||
void (*intf_stop)(_adapter *adapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_nic_hdl pnetdev;
|
||||
char old_ifname[IFNAMSIZ];
|
||||
|
||||
@@ -1308,8 +1292,6 @@ struct _ADAPTER {
|
||||
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
int net_closed;
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define __DRV_TYPES_GSPI_H__
|
||||
|
||||
/* SPI Header Files */
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/gpio.h>
|
||||
@@ -33,7 +32,6 @@
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/irqs.h>
|
||||
#include <custom_gpio.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct gspi_data {
|
||||
@@ -43,12 +41,10 @@ typedef struct gspi_data {
|
||||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct spi_device *func;
|
||||
|
||||
struct workqueue_struct *priv_wq;
|
||||
struct delayed_work irq_work;
|
||||
#endif
|
||||
} GSPI_DATA, *PGSPI_DATA;
|
||||
|
||||
#endif /* #ifndef __DRV_TYPES_GSPI_H__ */
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
#define __DRV_TYPES_PCI_H__
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/pci.h>
|
||||
#endif
|
||||
#include <linux/pci.h>
|
||||
|
||||
|
||||
#define INTEL_VENDOR_ID 0x8086
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define __DRV_TYPES_SDIO_H__
|
||||
|
||||
/* SDIO Header Files */
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
#include <linux/mmc/sdio_ids.h>
|
||||
#include <linux/mmc/host.h>
|
||||
@@ -31,7 +30,6 @@
|
||||
#include <linux/gpio.h>
|
||||
#include <custom_gpio.h>
|
||||
#endif /* CONFIG_PLATFORM_SPRD */
|
||||
#endif
|
||||
|
||||
typedef struct sdio_data {
|
||||
u8 func_number;
|
||||
@@ -40,12 +38,9 @@ typedef struct sdio_data {
|
||||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct sdio_func *func;
|
||||
_thread_hdl_ sys_sdio_irq_thd;
|
||||
unsigned int clock;
|
||||
#endif
|
||||
|
||||
} SDIO_DATA, *PSDIO_DATA;
|
||||
|
||||
#define dvobj_to_sdio_func(d) ((d)->intf_data.func)
|
||||
|
||||
@@ -333,8 +333,6 @@ struct ieee_ibss_seq {
|
||||
_list list;
|
||||
};
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
struct rtw_ieee80211_hdr {
|
||||
u16 frame_ctl;
|
||||
u16 duration_id;
|
||||
@@ -384,8 +382,6 @@ struct eapol {
|
||||
u16 length;
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
enum eap_type {
|
||||
EAP_PACKET = 0,
|
||||
EAPOL_START,
|
||||
@@ -494,8 +490,6 @@ enum eap_type {
|
||||
|
||||
#define P80211_OUI_LEN 3
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
struct ieee80211_snap_hdr {
|
||||
|
||||
u8 dsap; /* always 0xAA */
|
||||
@@ -505,8 +499,6 @@ struct ieee80211_snap_hdr {
|
||||
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
||||
|
||||
#define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE)
|
||||
@@ -1033,8 +1025,6 @@ struct ieee80211_softmac_stats {
|
||||
#define BIP_AAD_SIZE 20
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
struct ieee80211_security {
|
||||
u16 active_key:2,
|
||||
enabled:1,
|
||||
@@ -1047,8 +1037,6 @@ struct ieee80211_security {
|
||||
u16 flags;
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
802.11 data frame from AP
|
||||
@@ -1089,8 +1077,6 @@ struct ieee80211_header_data {
|
||||
#define MFIE_TYPE_RATES_EX 50
|
||||
#define MFIE_TYPE_GENERIC 221
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
struct ieee80211_info_element_hdr {
|
||||
u8 id;
|
||||
u8 len;
|
||||
@@ -1101,7 +1087,6 @@ struct ieee80211_info_element {
|
||||
u8 len;
|
||||
u8 data[0];
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* These are the data types that can make up management packets
|
||||
@@ -1123,10 +1108,6 @@ struct ieee80211_info_element {
|
||||
#define IEEE80211_DEFAULT_TX_ESSID "Penguin"
|
||||
#define IEEE80211_DEFAULT_BASIC_RATE 10
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)
|
||||
|
||||
|
||||
struct ieee80211_authentication {
|
||||
struct ieee80211_header_data header;
|
||||
u16 algorithm;
|
||||
@@ -1135,7 +1116,6 @@ struct ieee80211_authentication {
|
||||
/* struct ieee80211_info_element_hdr info_element; */
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
struct ieee80211_probe_response {
|
||||
struct ieee80211_header_data header;
|
||||
u32 time_stamp[2];
|
||||
@@ -1164,7 +1144,6 @@ struct ieee80211_assoc_response_frame {
|
||||
u16 aid;
|
||||
/* struct ieee80211_info_element info_element; supported rates */
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
struct ieee80211_txb {
|
||||
u8 nr_frags;
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
#define PMKID_LEN 16
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
@@ -103,8 +102,6 @@ struct wme_parameter_element {
|
||||
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(a)[1] = ((u16) (val)) >> 8; \
|
||||
@@ -179,8 +176,6 @@ enum ieee80211_back_parties {
|
||||
WLAN_BACK_TIMER = 2,
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
@@ -307,8 +302,6 @@ struct ieee80211_mgmt {
|
||||
} __attribute__((packed)) u;
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
/* mgmt header + 1 byte category code */
|
||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
||||
|
||||
|
||||
@@ -90,8 +90,6 @@
|
||||
#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
|
||||
#define IPOPT_TS_PRESPEC 3 /* specified modules only */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ip_options {
|
||||
__u32 faddr; /* Saved first hop address */
|
||||
unsigned char optlen;
|
||||
@@ -113,7 +111,6 @@ struct ip_options {
|
||||
};
|
||||
|
||||
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
|
||||
#endif
|
||||
|
||||
struct iphdr {
|
||||
#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
|
||||
@@ -48,7 +48,6 @@ struct intf_priv {
|
||||
_mutex ioctl_mutex;
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_USB_HCI
|
||||
/* when in USB, IO is through interrupt in/out endpoints */
|
||||
struct usb_device *udev;
|
||||
@@ -60,7 +59,6 @@ struct intf_priv {
|
||||
u8 bio_irp_timeout;
|
||||
u8 bio_timer_cancel;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -86,7 +84,6 @@ void rtw_cancel_all_timer(_adapter *padapter);
|
||||
|
||||
uint loadparam(_adapter *adapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
|
||||
|
||||
int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname);
|
||||
@@ -113,8 +110,6 @@ void rtw_ndev_notifier_unregister(void);
|
||||
#include "../os_dep/linux/ioctl_cfg80211.h"
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
void rtw_ips_dev_unload(_adapter *padapter);
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
|
||||
+1
-23
@@ -32,10 +32,7 @@
|
||||
#undef _FALSE
|
||||
#define _FALSE 0
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <osdep_service_linux.h>
|
||||
#endif
|
||||
#include <osdep_service_linux.h>
|
||||
|
||||
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
|
||||
#define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
|
||||
@@ -328,49 +325,34 @@ extern void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc);
|
||||
|
||||
__inline static unsigned char _cancel_timer_ex(_timer *ptimer)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
return del_timer_sync(ptimer);
|
||||
#endif
|
||||
}
|
||||
|
||||
static __inline void thread_enter(char *name)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
|
||||
daemonize("%s", name);
|
||||
#endif
|
||||
allow_signal(SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
__inline static void flush_signals_thread(void)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
if (signal_pending(current))
|
||||
flush_signals(current);
|
||||
#endif
|
||||
}
|
||||
|
||||
__inline static _OS_STATUS res_to_status(sint res)
|
||||
{
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined (PLATFORM_MPIXEL)
|
||||
return res;
|
||||
#endif
|
||||
}
|
||||
|
||||
__inline static void rtw_dump_stack(void)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
dump_stack();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define rtw_warn_on(condition) WARN_ON(condition)
|
||||
#else
|
||||
#define rtw_warn_on(condition) do {} while (0)
|
||||
#endif
|
||||
|
||||
__inline static int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4)
|
||||
{
|
||||
@@ -630,10 +612,6 @@ char alpha_to_upper(char c);
|
||||
/*
|
||||
* Write formatted output to sized buffer
|
||||
*/
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define rtw_sprintf(buf, size, format, arg...) snprintf(buf, size, format, ##arg)
|
||||
#else /* !PLATFORM_LINUX */
|
||||
#error "NOT DEFINE \"rtw_sprintf\"!!"
|
||||
#endif /* !PLATFORM_LINUX */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,12 +57,10 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf);
|
||||
|
||||
void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
#include <linux/netdevice.h> /* struct napi_struct */
|
||||
|
||||
int rtw_recv_napi_poll(struct napi_struct *, int budget);
|
||||
#endif /* CONFIG_RTW_NAPI */
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#endif /* */
|
||||
|
||||
+2
-4
@@ -63,10 +63,8 @@ enum {
|
||||
#undef _dbgdump
|
||||
#undef _seqdump
|
||||
|
||||
#if defined PLATFORM_LINUX
|
||||
#define _dbgdump printk
|
||||
#define _seqdump seq_printf
|
||||
#endif
|
||||
#define _dbgdump printk
|
||||
#define _seqdump seq_printf
|
||||
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
|
||||
|
||||
@@ -110,12 +110,10 @@ extern void eeprom_read_sz(_adapter *padapter, u16 reg, u8 *data, u32 sz);
|
||||
|
||||
extern void read_eeprom_content_by_attrib(_adapter *padapter);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
extern int isAdaptorInfoFileValid(void);
|
||||
extern int storeAdaptorInfoFile(char *path, u8 *efuse_data);
|
||||
extern int retriveAdaptorInfoFile(char *path, u8 *efuse_data);
|
||||
#endif /* CONFIG_ADAPTOR_INFO_CACHING_FILE */
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#endif /* __RTL871X_EEPROM_H__ */
|
||||
|
||||
@@ -233,12 +233,10 @@ extern const u8 _mac_hidden_proto_to_hal_proto_cap[];
|
||||
|
||||
u8 mac_hidden_wl_func_to_hal_wl_func(u8 func);
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
u8 rtw_efuse_file_read(PADAPTER padapter, u8 *filepatch, u8 *buf, u32 len);
|
||||
#ifdef CONFIG_EFUSE_CONFIG_FILE
|
||||
u32 rtw_read_efuse_from_file(const char *path, u8 *buf, int map_size);
|
||||
u32 rtw_read_macaddr_from_file(const char *path, u8 *buf);
|
||||
#endif /* CONFIG_EFUSE_CONFIG_FILE */
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#endif
|
||||
|
||||
+1
-3
@@ -23,9 +23,7 @@
|
||||
|
||||
#define NUM_IOREQ 8
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define MAX_PROT_SZ (64-16)
|
||||
#endif
|
||||
#define MAX_PROT_SZ (64-16)
|
||||
|
||||
#define _IOREADY 0
|
||||
#define _IO_WAIT_COMPLETE 1
|
||||
|
||||
+1
-1
@@ -157,7 +157,7 @@ static NDIS_STATUS oid_null_function(struct oid_par_priv *poid_par_priv)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT)
|
||||
#if defined(CONFIG_WIRELESS_EXT)
|
||||
extern struct iw_handler_def rtw_handlers_def;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -44,9 +44,7 @@ struct mp_xmit_frame {
|
||||
u8 *mem_addr;
|
||||
u32 sz[8];
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
PURB pxmit_urb[8];
|
||||
#endif
|
||||
u8 bpending[8];
|
||||
sint ac_tag[8];
|
||||
sint last[8];
|
||||
|
||||
@@ -390,15 +390,12 @@ struct recv_priv {
|
||||
ATOMIC_T rx_pending_cnt;
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
PURB int_in_urb;
|
||||
#endif
|
||||
|
||||
u8 *int_in_buf;
|
||||
#endif /* CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
|
||||
#endif
|
||||
#if defined(PLATFORM_LINUX)
|
||||
struct tasklet_struct irq_prepare_beacon_tasklet;
|
||||
struct tasklet_struct recv_tasklet;
|
||||
struct sk_buff_head free_recv_skb_queue;
|
||||
@@ -411,8 +408,6 @@ struct recv_priv {
|
||||
struct ifqueue rx_indicate_queue;
|
||||
#endif /* CONFIG_RX_INDICATE_QUEUE */
|
||||
|
||||
#endif /* defined(PLATFORM_LINUX) */
|
||||
|
||||
u8 *pallocated_recv_buf;
|
||||
u8 *precv_buf; /* 4 alignment */
|
||||
_queue free_recv_buf_queue;
|
||||
@@ -500,20 +495,13 @@ struct recv_buf {
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
PURB purb;
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
u32 alloc_sz;
|
||||
#endif
|
||||
|
||||
u8 irp_pending;
|
||||
int transfer_len;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_pkt *pskb;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -474,9 +474,7 @@ struct submit_ctx {
|
||||
u32 submit_time; /* */
|
||||
u32 timeout_ms; /* <0: not synchronous, 0: wait forever, >0: up to ms waiting */
|
||||
int status; /* status for operation */
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct completion done;
|
||||
#endif
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -529,10 +527,8 @@ struct xmit_buf {
|
||||
u8 bulkout_id; /* for halmac */
|
||||
#endif /* RTW_HALMAC */
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
PURB pxmit_urb[8];
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
#endif
|
||||
|
||||
u8 bpending[8];
|
||||
|
||||
@@ -715,9 +711,7 @@ struct xmit_priv {
|
||||
_sema tx_retevt;/* all tx return event; */
|
||||
u8 txirp_cnt;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif
|
||||
/* per AC pending irp */
|
||||
int beq_cnt;
|
||||
int bkq_cnt;
|
||||
@@ -731,16 +725,12 @@ struct xmit_priv {
|
||||
struct rtw_tx_ring tx_ring[PCI_MAX_TX_QUEUE_COUNT];
|
||||
int txringcount[PCI_MAX_TX_QUEUE_COUNT];
|
||||
u8 beaconDMAing; /* flag of indicating beacon is transmiting to HW by DMA */
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
#ifdef CONFIG_SDIO_TX_TASKLET
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif /* PLATFORM_LINUX */
|
||||
#else
|
||||
_thread_hdl_ SdioXmitThread;
|
||||
_sema SdioXmitSema;
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
#define SDIO_ERR_VAL16 0xFFFF
|
||||
#define SDIO_ERR_VAL32 0xFFFFFFFF
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <sdio_ops_linux.h>
|
||||
#endif
|
||||
|
||||
extern void sdio_set_intf_ops(_adapter *padapter, struct _io_ops *pops);
|
||||
|
||||
|
||||
@@ -35,9 +35,7 @@ enum {
|
||||
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <usb_ops_linux.h>
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
void rtl8188eu_set_hw_type(struct dvobj_priv *pdvobj);
|
||||
|
||||
@@ -769,7 +769,6 @@ typedef enum _ELEMENT_ID {
|
||||
* This structure refers to "HT BlockAckReq" as
|
||||
* described in 802.11n draft section 7.2.1.7.1
|
||||
*/
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW)
|
||||
struct rtw_ieee80211_bar {
|
||||
unsigned short frame_control;
|
||||
unsigned short duration;
|
||||
@@ -778,17 +777,11 @@ struct rtw_ieee80211_bar {
|
||||
unsigned short control;
|
||||
unsigned short start_seq_num;
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
/* 802.11 BAR control masks */
|
||||
#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
|
||||
#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* struct rtw_ieee80211_ht_cap - HT capabilities
|
||||
*
|
||||
@@ -859,8 +852,6 @@ struct ADDBA_request {
|
||||
unsigned short BA_starting_seqctrl;
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_FACTOR {
|
||||
MAX_AMPDU_FACTOR_8K = 0,
|
||||
MAX_AMPDU_FACTOR_16K = 1,
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
|
||||
#define MAX_IE_SZ 768
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NDIS_802_11_LENGTH_SSID 32
|
||||
#define NDIS_802_11_LENGTH_RATES 8
|
||||
#define NDIS_802_11_LENGTH_RATES_EX 16
|
||||
@@ -270,9 +267,6 @@ typedef struct _NDIS_802_11_TEST {
|
||||
} tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
|
||||
|
||||
#endif /* end of #ifdef PLATFORM_LINUX */
|
||||
|
||||
#ifndef Ndis802_11APMode
|
||||
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
||||
#endif
|
||||
|
||||
@@ -30,8 +30,6 @@ struct pkt_file {
|
||||
SIZE_T buf_len;
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NR_XMITFRAME 256
|
||||
|
||||
struct xmit_priv;
|
||||
@@ -43,8 +41,6 @@ struct xmit_buf;
|
||||
extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
void rtw_os_xmit_schedule(_adapter *padapter);
|
||||
|
||||
int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag);
|
||||
|
||||
Reference in New Issue
Block a user