mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-22 21:34:37 +00:00
Cleaned out some Windows & FreeBSD code
This commit is contained in:
parent
74fe3d427b
commit
c215cafcaa
@ -1,5 +1,5 @@
|
||||
PACKAGE_NAME="realtek-rtl88xxau"
|
||||
PACKAGE_VERSION="5.6.4.1~20190817"
|
||||
PACKAGE_VERSION="5.6.4.1~20190824"
|
||||
CLEAN="'make' clean"
|
||||
BUILT_MODULE_NAME[0]=88XXau
|
||||
PROCS_NUM=`nproc`
|
||||
|
@ -34,15 +34,12 @@
|
||||
#define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
|
||||
#define WPA_KEY_MGMT_WPA_NONE BIT(4)
|
||||
|
||||
|
||||
#define WPA_CAPABILITY_PREAUTH BIT(0)
|
||||
#define WPA_CAPABILITY_MGMT_FRAME_PROTECTION BIT(6)
|
||||
#define WPA_CAPABILITY_PEERKEY_ENABLED BIT(9)
|
||||
|
||||
|
||||
#define PMKID_LEN 16
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
@ -98,27 +95,6 @@ struct wme_parameter_element {
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
||||
u8 version[2]; /* little endian */
|
||||
};
|
||||
|
||||
struct rsn_ie_hdr {
|
||||
u8 elem_id; /* WLAN_EID_RSN */
|
||||
u8 len;
|
||||
u8 version[2]; /* little endian */
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(a)[1] = ((u16) (val)) >> 8; \
|
||||
@ -144,8 +120,6 @@ struct rsn_ie_hdr {
|
||||
#define RSN_SELECTOR_PUT(a, val) WPA_PUT_BE32((u8 *) (a), (val))
|
||||
/* #define RSN_SELECTOR_PUT(a, val) WPA_PUT_LE32((u8 *) (a), (val)) */
|
||||
|
||||
|
||||
|
||||
/* Action category code */
|
||||
enum ieee80211_category {
|
||||
WLAN_CATEGORY_SPECTRUM_MGMT = 0,
|
||||
@ -323,147 +297,7 @@ struct ieee80211_mgmt {
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
u8 da[6];
|
||||
u8 sa[6];
|
||||
u8 bssid[6];
|
||||
u16 seq_ctrl;
|
||||
union {
|
||||
struct {
|
||||
u16 auth_alg;
|
||||
u16 auth_transaction;
|
||||
u16 status_code;
|
||||
/* possibly followed by Challenge text */
|
||||
u8 variable[0];
|
||||
} auth;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} deauth;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} assoc_req;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 status_code;
|
||||
u16 aid;
|
||||
/* followed by Supported rates */
|
||||
u8 variable[0];
|
||||
} assoc_resp, reassoc_resp;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
u8 current_ap[6];
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} reassoc_req;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} disassoc;
|
||||
#if 0
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
u16 capab_info;
|
||||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
||||
u8 variable[0];
|
||||
} beacon;
|
||||
struct {
|
||||
/* only variable items: SSID, Supported rates */
|
||||
u8 variable[0];
|
||||
} probe_req;
|
||||
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
u16 capab_info;
|
||||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params */
|
||||
u8 variable[0];
|
||||
} probe_resp;
|
||||
#endif
|
||||
struct {
|
||||
u8 category;
|
||||
union {
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} wme_action;
|
||||
#if 0
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 element_id;
|
||||
u8 length;
|
||||
struct ieee80211_channel_sw_ie sw_elem;
|
||||
} chan_switch;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 element_id;
|
||||
u8 length;
|
||||
struct ieee80211_msrment_ie msr_elem;
|
||||
} measurement;
|
||||
#endif
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
u16 start_seq_num;
|
||||
} addba_req;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 status;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
} addba_resp;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u16 params;
|
||||
u16 reason_code;
|
||||
} delba;
|
||||
struct {
|
||||
u8 action_code;
|
||||
/* capab_info for open and confirm,
|
||||
* reason for close
|
||||
*/
|
||||
u16 aux;
|
||||
/* Followed in plink_confirm by status
|
||||
* code, AID and supported rates,
|
||||
* and directly by supported rates in
|
||||
* plink_open and plink_close
|
||||
*/
|
||||
u8 variable[0];
|
||||
} plink_action;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 variable[0];
|
||||
} mesh_action;
|
||||
} u;
|
||||
} action;
|
||||
} u;
|
||||
} ;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
/* mgmt header + 1 byte category code */
|
||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -40,11 +40,6 @@
|
||||
#undef _FALSE
|
||||
#define _FALSE 0
|
||||
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
#include <osdep_service_bsd.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/version.h>
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
|
||||
@ -54,14 +49,6 @@
|
||||
#include <osdep_service_linux.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <osdep_service_xp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <osdep_service_ce.h>
|
||||
#endif
|
||||
|
||||
/* #include <rtw_byteorder.h> */
|
||||
|
||||
#ifndef BIT
|
||||
@ -312,9 +299,7 @@ void rtw_list_splice(_list *list, _list *head);
|
||||
void rtw_list_splice_init(_list *list, _list *head);
|
||||
void rtw_list_splice_tail(_list *list, _list *head);
|
||||
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void rtw_list_delete(_list *plist);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
void rtw_hlist_head_init(rtw_hlist_head *h);
|
||||
void rtw_hlist_add_head(rtw_hlist_node *n, rtw_hlist_head *h);
|
||||
@ -328,9 +313,7 @@ extern void _rtw_up_sema(_sema *sema);
|
||||
extern u32 _rtw_down_sema(_sema *sema);
|
||||
extern void _rtw_mutex_init(_mutex *pmutex);
|
||||
extern void _rtw_mutex_free(_mutex *pmutex);
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void _rtw_spinlock_init(_lock *plock);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
extern void _rtw_spinlock_free(_lock *plock);
|
||||
extern void _rtw_spinlock(_lock *plock);
|
||||
extern void _rtw_spinunlock(_lock *plock);
|
||||
@ -392,10 +375,8 @@ extern void rtw_udelay_os(int us);
|
||||
|
||||
extern void rtw_yield_os(void);
|
||||
|
||||
|
||||
extern void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc, void *ctx);
|
||||
|
||||
|
||||
__inline static unsigned char _cancel_timer_ex(_timer *ptimer)
|
||||
{
|
||||
u8 bcancelled;
|
||||
@ -407,9 +388,6 @@ __inline static unsigned char _cancel_timer_ex(_timer *ptimer)
|
||||
|
||||
static __inline void thread_enter(char *name)
|
||||
{
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
printf("%s", "RTKTHREAD_enter");
|
||||
#endif
|
||||
}
|
||||
void thread_exit(_completion *comp);
|
||||
void _rtw_init_completion(_completion *comp);
|
||||
@ -448,7 +426,7 @@ __inline static void flush_signals_thread(void)
|
||||
__inline static _OS_STATUS res_to_status(sint res)
|
||||
{
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined (PLATFORM_MPIXEL) || defined (PLATFORM_FREEBSD)
|
||||
#if defined(PLATFORM_LINUX) || defined (PLATFORM_MPIXEL)
|
||||
return res;
|
||||
#endif
|
||||
|
||||
@ -608,11 +586,7 @@ extern int rtw_is_file_readable_with_size(const char *path, u32 *sz);
|
||||
extern int rtw_retrieve_from_file(const char *path, u8 *buf, u32 sz);
|
||||
extern int rtw_store_to_file(const char *path, u8 *buf, u32 sz);
|
||||
|
||||
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void rtw_free_netdev(struct net_device *netdev);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
|
||||
extern u64 rtw_modular64(u64 x, u64 y);
|
||||
extern u64 rtw_division64(u64 x, u64 y);
|
||||
|
@ -1,756 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __OSDEP_BSD_SERVICE_H_
|
||||
#define __OSDEP_BSD_SERVICE_H_
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sockio.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/endian.h>
|
||||
#include <sys/kdb.h>
|
||||
#include <sys/kthread.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/time.h>
|
||||
#include <machine/atomic.h>
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
||||
#include <net/bpf.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_media.h>
|
||||
#include <net/if_types.h>
|
||||
#include <net/route.h>
|
||||
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in_var.h>
|
||||
#include <netinet/if_ether.h>
|
||||
#include <if_ether.h>
|
||||
|
||||
#include <net80211/ieee80211_var.h>
|
||||
#include <net80211/ieee80211_regdomain.h>
|
||||
#include <net80211/ieee80211_radiotap.h>
|
||||
#include <net80211/ieee80211_ratectl.h>
|
||||
|
||||
#include <dev/usb/usb.h>
|
||||
#include <dev/usb/usbdi.h>
|
||||
#include "usbdevs.h"
|
||||
|
||||
#define USB_DEBUG_VAR rum_debug
|
||||
#include <dev/usb/usb_debug.h>
|
||||
|
||||
#if 1 //Baron porting from linux, it's all temp solution, needs to check again
|
||||
#include <sys/sema.h>
|
||||
#include <sys/pcpu.h> /* XXX for PCPU_GET */
|
||||
// typedef struct semaphore _sema;
|
||||
typedef struct sema _sema;
|
||||
// typedef spinlock_t _lock;
|
||||
typedef struct mtx _lock;
|
||||
typedef struct mtx _mutex;
|
||||
typedef struct rtw_timer_list _timer;
|
||||
struct list_head {
|
||||
struct list_head *next, *prev;
|
||||
};
|
||||
struct __queue {
|
||||
struct list_head queue;
|
||||
_lock lock;
|
||||
};
|
||||
|
||||
typedef struct mbuf _pkt;
|
||||
typedef struct mbuf _buffer;
|
||||
|
||||
typedef struct __queue _queue;
|
||||
typedef struct list_head _list;
|
||||
typedef int _OS_STATUS;
|
||||
//typedef u32 _irqL;
|
||||
typedef unsigned long _irqL;
|
||||
typedef struct ifnet * _nic_hdl;
|
||||
|
||||
typedef pid_t _thread_hdl_;
|
||||
// typedef struct thread _thread_hdl_;
|
||||
typedef void thread_return;
|
||||
typedef void* thread_context;
|
||||
|
||||
typedef void timer_hdl_return;
|
||||
typedef void* timer_hdl_context;
|
||||
typedef struct work_struct _workitem;
|
||||
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
/* emulate a modern version */
|
||||
#define LINUX_VERSION_CODE KERNEL_VERSION(2, 6, 35)
|
||||
|
||||
#define WIRELESS_EXT -1
|
||||
#define HZ hz
|
||||
#define spin_lock_irqsave mtx_lock_irqsave
|
||||
#define spin_lock_bh mtx_lock_irqsave
|
||||
#define mtx_lock_irqsave(lock, x) mtx_lock(lock)//{local_irq_save((x)); mtx_lock_spin((lock));}
|
||||
//#define IFT_RTW 0xf9 //ifnet allocate type for RTW
|
||||
#define free_netdev if_free
|
||||
#define LIST_CONTAINOR(ptr, type, member) \
|
||||
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
|
||||
#define container_of(p,t,n) (t*)((p)-&(((t*)0)->n))
|
||||
/*
|
||||
* Linux timers are emulated using FreeBSD callout functions
|
||||
* (and taskqueue functionality).
|
||||
*
|
||||
* Currently no timer stats functionality.
|
||||
*
|
||||
* See (linux_compat) processes.c
|
||||
*
|
||||
*/
|
||||
struct rtw_timer_list {
|
||||
struct callout callout;
|
||||
void (*function)(void *);
|
||||
void *arg;
|
||||
};
|
||||
|
||||
struct workqueue_struct;
|
||||
struct work_struct;
|
||||
typedef void (*work_func_t)(struct work_struct *work);
|
||||
/* Values for the state of an item of work (work_struct) */
|
||||
typedef enum work_state {
|
||||
WORK_STATE_UNSET = 0,
|
||||
WORK_STATE_CALLOUT_PENDING = 1,
|
||||
WORK_STATE_TASK_PENDING = 2,
|
||||
WORK_STATE_WORK_CANCELLED = 3
|
||||
} work_state_t;
|
||||
|
||||
struct work_struct {
|
||||
struct task task; /* FreeBSD task */
|
||||
work_state_t state; /* the pending or otherwise state of work. */
|
||||
work_func_t func;
|
||||
};
|
||||
#define spin_unlock_irqrestore mtx_unlock_irqrestore
|
||||
#define spin_unlock_bh mtx_unlock_irqrestore
|
||||
#define mtx_unlock_irqrestore(lock,x) mtx_unlock(lock);
|
||||
extern void _rtw_spinlock_init(_lock *plock);
|
||||
|
||||
//modify private structure to match freebsd
|
||||
#define BITS_PER_LONG 32
|
||||
union ktime {
|
||||
s64 tv64;
|
||||
#if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR)
|
||||
struct {
|
||||
#ifdef __BIG_ENDIAN
|
||||
s32 sec, nsec;
|
||||
#else
|
||||
s32 nsec, sec;
|
||||
#endif
|
||||
} tv;
|
||||
#endif
|
||||
};
|
||||
#define kmemcheck_bitfield_begin(name)
|
||||
#define kmemcheck_bitfield_end(name)
|
||||
#define CHECKSUM_NONE 0
|
||||
typedef unsigned char *sk_buff_data_t;
|
||||
typedef union ktime ktime_t; /* Kill this */
|
||||
|
||||
void rtw_mtx_lock(_lock *plock);
|
||||
|
||||
void rtw_mtx_unlock(_lock *plock);
|
||||
|
||||
/**
|
||||
* struct sk_buff - socket buffer
|
||||
* @next: Next buffer in list
|
||||
* @prev: Previous buffer in list
|
||||
* @sk: Socket we are owned by
|
||||
* @tstamp: Time we arrived
|
||||
* @dev: Device we arrived on/are leaving by
|
||||
* @transport_header: Transport layer header
|
||||
* @network_header: Network layer header
|
||||
* @mac_header: Link layer header
|
||||
* @_skb_refdst: destination entry (with norefcount bit)
|
||||
* @sp: the security path, used for xfrm
|
||||
* @cb: Control buffer. Free for use by every layer. Put private vars here
|
||||
* @len: Length of actual data
|
||||
* @data_len: Data length
|
||||
* @mac_len: Length of link layer header
|
||||
* @hdr_len: writable header length of cloned skb
|
||||
* @csum: Checksum (must include start/offset pair)
|
||||
* @csum_start: Offset from skb->head where checksumming should start
|
||||
* @csum_offset: Offset from csum_start where checksum should be stored
|
||||
* @local_df: allow local fragmentation
|
||||
* @cloned: Head may be cloned (check refcnt to be sure)
|
||||
* @nohdr: Payload reference only, must not modify header
|
||||
* @pkt_type: Packet class
|
||||
* @fclone: skbuff clone status
|
||||
* @ip_summed: Driver fed us an IP checksum
|
||||
* @priority: Packet queueing priority
|
||||
* @users: User count - see {datagram,tcp}.c
|
||||
* @protocol: Packet protocol from driver
|
||||
* @truesize: Buffer size
|
||||
* @head: Head of buffer
|
||||
* @data: Data head pointer
|
||||
* @tail: Tail pointer
|
||||
* @end: End pointer
|
||||
* @destructor: Destruct function
|
||||
* @mark: Generic packet mark
|
||||
* @nfct: Associated connection, if any
|
||||
* @ipvs_property: skbuff is owned by ipvs
|
||||
* @peeked: this packet has been seen already, so stats have been
|
||||
* done for it, don't do them again
|
||||
* @nf_trace: netfilter packet trace flag
|
||||
* @nfctinfo: Relationship of this skb to the connection
|
||||
* @nfct_reasm: netfilter conntrack re-assembly pointer
|
||||
* @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
|
||||
* @skb_iif: ifindex of device we arrived on
|
||||
* @rxhash: the packet hash computed on receive
|
||||
* @queue_mapping: Queue mapping for multiqueue devices
|
||||
* @tc_index: Traffic control index
|
||||
* @tc_verd: traffic control verdict
|
||||
* @ndisc_nodetype: router type (from link layer)
|
||||
* @dma_cookie: a cookie to one of several possible DMA operations
|
||||
* done by skb DMA functions
|
||||
* @secmark: security marking
|
||||
* @vlan_tci: vlan tag control information
|
||||
*/
|
||||
|
||||
struct sk_buff {
|
||||
/* These two members must be first. */
|
||||
struct sk_buff *next;
|
||||
struct sk_buff *prev;
|
||||
|
||||
ktime_t tstamp;
|
||||
|
||||
struct sock *sk;
|
||||
//struct net_device *dev;
|
||||
struct ifnet *dev;
|
||||
|
||||
/*
|
||||
* This is the control buffer. It is free to use for every
|
||||
* layer. Please put your private variables there. If you
|
||||
* want to keep them across layers you have to do a skb_clone()
|
||||
* first. This is owned by whoever has the skb queued ATM.
|
||||
*/
|
||||
char cb[48] __aligned(8);
|
||||
|
||||
unsigned long _skb_refdst;
|
||||
#ifdef CONFIG_XFRM
|
||||
struct sec_path *sp;
|
||||
#endif
|
||||
unsigned int len,
|
||||
data_len;
|
||||
u16 mac_len,
|
||||
hdr_len;
|
||||
union {
|
||||
u32 csum;
|
||||
struct {
|
||||
u16 csum_start;
|
||||
u16 csum_offset;
|
||||
}smbol2;
|
||||
}smbol1;
|
||||
u32 priority;
|
||||
kmemcheck_bitfield_begin(flags1);
|
||||
u8 local_df:1,
|
||||
cloned:1,
|
||||
ip_summed:2,
|
||||
nohdr:1,
|
||||
nfctinfo:3;
|
||||
u8 pkt_type:3,
|
||||
fclone:2,
|
||||
ipvs_property:1,
|
||||
peeked:1,
|
||||
nf_trace:1;
|
||||
kmemcheck_bitfield_end(flags1);
|
||||
u16 protocol;
|
||||
|
||||
void (*destructor)(struct sk_buff *skb);
|
||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
||||
struct nf_conntrack *nfct;
|
||||
struct sk_buff *nfct_reasm;
|
||||
#endif
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
struct nf_bridge_info *nf_bridge;
|
||||
#endif
|
||||
|
||||
int skb_iif;
|
||||
#ifdef CONFIG_NET_SCHED
|
||||
u16 tc_index; /* traffic control index */
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
u16 tc_verd; /* traffic control verdict */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
u32 rxhash;
|
||||
|
||||
kmemcheck_bitfield_begin(flags2);
|
||||
u16 queue_mapping:16;
|
||||
#ifdef CONFIG_IPV6_NDISC_NODETYPE
|
||||
u8 ndisc_nodetype:2,
|
||||
deliver_no_wcard:1;
|
||||
#else
|
||||
u8 deliver_no_wcard:1;
|
||||
#endif
|
||||
kmemcheck_bitfield_end(flags2);
|
||||
|
||||
/* 0/14 bit hole */
|
||||
|
||||
#ifdef CONFIG_NET_DMA
|
||||
dma_cookie_t dma_cookie;
|
||||
#endif
|
||||
#ifdef CONFIG_NETWORK_SECMARK
|
||||
u32 secmark;
|
||||
#endif
|
||||
union {
|
||||
u32 mark;
|
||||
u32 dropcount;
|
||||
}symbol3;
|
||||
|
||||
u16 vlan_tci;
|
||||
|
||||
sk_buff_data_t transport_header;
|
||||
sk_buff_data_t network_header;
|
||||
sk_buff_data_t mac_header;
|
||||
/* These elements must be at the end, see alloc_skb() for details. */
|
||||
sk_buff_data_t tail;
|
||||
sk_buff_data_t end;
|
||||
unsigned char *head,
|
||||
*data;
|
||||
unsigned int truesize;
|
||||
atomic_t users;
|
||||
};
|
||||
struct sk_buff_head {
|
||||
/* These two members must be first. */
|
||||
struct sk_buff *next;
|
||||
struct sk_buff *prev;
|
||||
|
||||
u32 qlen;
|
||||
_lock lock;
|
||||
};
|
||||
#define skb_tail_pointer(skb) skb->tail
|
||||
static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
unsigned char *tmp = skb_tail_pointer(skb);
|
||||
//SKB_LINEAR_ASSERT(skb);
|
||||
skb->tail += len;
|
||||
skb->len += len;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
skb->len -= len;
|
||||
if(skb->len < skb->data_len)
|
||||
printf("%s(),%d,error!\n",__FUNCTION__,__LINE__);
|
||||
return skb->data += len;
|
||||
}
|
||||
static inline unsigned char *skb_pull(struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
return __skb_pull(skb, len);
|
||||
#else
|
||||
return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len);
|
||||
#endif //PLATFORM_FREEBSD
|
||||
}
|
||||
static inline u32 skb_queue_len(const struct sk_buff_head *list_)
|
||||
{
|
||||
return list_->qlen;
|
||||
}
|
||||
static inline void __skb_insert(struct sk_buff *newsk,
|
||||
struct sk_buff *prev, struct sk_buff *next,
|
||||
struct sk_buff_head *list)
|
||||
{
|
||||
newsk->next = next;
|
||||
newsk->prev = prev;
|
||||
next->prev = prev->next = newsk;
|
||||
list->qlen++;
|
||||
}
|
||||
static inline void __skb_queue_before(struct sk_buff_head *list,
|
||||
struct sk_buff *next,
|
||||
struct sk_buff *newsk)
|
||||
{
|
||||
__skb_insert(newsk, next->prev, next, list);
|
||||
}
|
||||
static inline void skb_queue_tail(struct sk_buff_head *list,
|
||||
struct sk_buff *newsk)
|
||||
{
|
||||
mtx_lock(&list->lock);
|
||||
__skb_queue_before(list, (struct sk_buff *)list, newsk);
|
||||
mtx_unlock(&list->lock);
|
||||
}
|
||||
static inline struct sk_buff *skb_peek(struct sk_buff_head *list_)
|
||||
{
|
||||
struct sk_buff *list = ((struct sk_buff *)list_)->next;
|
||||
if (list == (struct sk_buff *)list_)
|
||||
list = NULL;
|
||||
return list;
|
||||
}
|
||||
static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
|
||||
{
|
||||
struct sk_buff *next, *prev;
|
||||
|
||||
list->qlen--;
|
||||
next = skb->next;
|
||||
prev = skb->prev;
|
||||
skb->next = skb->prev = NULL;
|
||||
next->prev = prev;
|
||||
prev->next = next;
|
||||
}
|
||||
|
||||
static inline struct sk_buff *skb_dequeue(struct sk_buff_head *list)
|
||||
{
|
||||
mtx_lock(&list->lock);
|
||||
|
||||
struct sk_buff *skb = skb_peek(list);
|
||||
if (skb)
|
||||
__skb_unlink(skb, list);
|
||||
|
||||
mtx_unlock(&list->lock);
|
||||
|
||||
return skb;
|
||||
}
|
||||
static inline void skb_reserve(struct sk_buff *skb, int len)
|
||||
{
|
||||
skb->data += len;
|
||||
skb->tail += len;
|
||||
}
|
||||
static inline void __skb_queue_head_init(struct sk_buff_head *list)
|
||||
{
|
||||
list->prev = list->next = (struct sk_buff *)list;
|
||||
list->qlen = 0;
|
||||
}
|
||||
/*
|
||||
* This function creates a split out lock class for each invocation;
|
||||
* this is needed for now since a whole lot of users of the skb-queue
|
||||
* infrastructure in drivers have different locking usage (in hardirq)
|
||||
* than the networking core (in softirq only). In the long run either the
|
||||
* network layer or drivers should need annotation to consolidate the
|
||||
* main types of usage into 3 classes.
|
||||
*/
|
||||
static inline void skb_queue_head_init(struct sk_buff_head *list)
|
||||
{
|
||||
_rtw_spinlock_init(&list->lock);
|
||||
__skb_queue_head_init(list);
|
||||
}
|
||||
unsigned long copy_from_user(void *to, const void *from, unsigned long n);
|
||||
unsigned long copy_to_user(void *to, const void *from, unsigned long n);
|
||||
struct sk_buff * dev_alloc_skb(unsigned int size);
|
||||
struct sk_buff *skb_clone(const struct sk_buff *skb);
|
||||
void dev_kfree_skb_any(struct sk_buff *skb);
|
||||
#endif //Baron porting from linux, it's all temp solution, needs to check again
|
||||
|
||||
|
||||
#if 1 // kenny add Linux compatibility code for Linux USB driver
|
||||
#include <dev/usb/usb_compat_linux.h>
|
||||
|
||||
#define __init // __attribute ((constructor))
|
||||
#define __exit // __attribute ((destructor))
|
||||
|
||||
/*
|
||||
* Definitions for module_init and module_exit macros.
|
||||
*
|
||||
* These macros will use the SYSINIT framework to call a specified
|
||||
* function (with no arguments) on module loading or unloading.
|
||||
*
|
||||
*/
|
||||
|
||||
void module_init_exit_wrapper(void *arg);
|
||||
|
||||
#define module_init(initfn) \
|
||||
SYSINIT(mod_init_ ## initfn, \
|
||||
SI_SUB_KLD, SI_ORDER_FIRST, \
|
||||
module_init_exit_wrapper, initfn)
|
||||
|
||||
#define module_exit(exitfn) \
|
||||
SYSUNINIT(mod_exit_ ## exitfn, \
|
||||
SI_SUB_KLD, SI_ORDER_ANY, \
|
||||
module_init_exit_wrapper, exitfn)
|
||||
|
||||
/*
|
||||
* The usb_register and usb_deregister functions are used to register
|
||||
* usb drivers with the usb subsystem.
|
||||
*/
|
||||
int usb_register(struct usb_driver *driver);
|
||||
int usb_deregister(struct usb_driver *driver);
|
||||
|
||||
/*
|
||||
* usb_get_dev and usb_put_dev - increment/decrement the reference count
|
||||
* of the usb device structure.
|
||||
*
|
||||
* Original body of usb_get_dev:
|
||||
*
|
||||
* if (dev)
|
||||
* get_device(&dev->dev);
|
||||
* return dev;
|
||||
*
|
||||
* Reference counts are not currently used in this compatibility
|
||||
* layer. So these functions will do nothing.
|
||||
*/
|
||||
static inline struct usb_device *
|
||||
usb_get_dev(struct usb_device *dev)
|
||||
{
|
||||
return dev;
|
||||
}
|
||||
|
||||
static inline void
|
||||
usb_put_dev(struct usb_device *dev)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// rtw_usb_compat_linux
|
||||
int rtw_usb_submit_urb(struct urb *urb, uint16_t mem_flags);
|
||||
int rtw_usb_unlink_urb(struct urb *urb);
|
||||
int rtw_usb_clear_halt(struct usb_device *dev, struct usb_host_endpoint *uhe);
|
||||
int rtw_usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *uhe,
|
||||
uint8_t request, uint8_t requesttype,
|
||||
uint16_t value, uint16_t index, void *data,
|
||||
uint16_t size, usb_timeout_t timeout);
|
||||
int rtw_usb_set_interface(struct usb_device *dev, uint8_t iface_no, uint8_t alt_index);
|
||||
int rtw_usb_setup_endpoint(struct usb_device *dev,
|
||||
struct usb_host_endpoint *uhe, usb_size_t bufsize);
|
||||
struct urb *rtw_usb_alloc_urb(uint16_t iso_packets, uint16_t mem_flags);
|
||||
struct usb_host_endpoint *rtw_usb_find_host_endpoint(struct usb_device *dev, uint8_t type, uint8_t ep);
|
||||
struct usb_host_interface *rtw_usb_altnum_to_altsetting(const struct usb_interface *intf, uint8_t alt_index);
|
||||
struct usb_interface *rtw_usb_ifnum_to_if(struct usb_device *dev, uint8_t iface_no);
|
||||
void *rtw_usbd_get_intfdata(struct usb_interface *intf);
|
||||
void rtw_usb_linux_register(void *arg);
|
||||
void rtw_usb_linux_deregister(void *arg);
|
||||
void rtw_usb_linux_free_device(struct usb_device *dev);
|
||||
void rtw_usb_free_urb(struct urb *urb);
|
||||
void rtw_usb_init_urb(struct urb *urb);
|
||||
void rtw_usb_kill_urb(struct urb *urb);
|
||||
void rtw_usb_set_intfdata(struct usb_interface *intf, void *data);
|
||||
void rtw_usb_fill_bulk_urb(struct urb *urb, struct usb_device *udev,
|
||||
struct usb_host_endpoint *uhe, void *buf,
|
||||
int length, usb_complete_t callback, void *arg);
|
||||
int rtw_usb_bulk_msg(struct usb_device *udev, struct usb_host_endpoint *uhe,
|
||||
void *data, int len, uint16_t *pactlen, usb_timeout_t timeout);
|
||||
void *usb_get_intfdata(struct usb_interface *intf);
|
||||
int usb_linux_init_endpoints(struct usb_device *udev);
|
||||
|
||||
|
||||
|
||||
typedef struct urb * PURB;
|
||||
|
||||
typedef unsigned gfp_t;
|
||||
#define __GFP_WAIT ((gfp_t)0x10u) /* Can wait and reschedule? */
|
||||
#define __GFP_HIGH ((gfp_t)0x20u) /* Should access emergency pools? */
|
||||
#define __GFP_IO ((gfp_t)0x40u) /* Can start physical IO? */
|
||||
#define __GFP_FS ((gfp_t)0x80u) /* Can call down to low-level FS? */
|
||||
#define __GFP_COLD ((gfp_t)0x100u) /* Cache-cold page required */
|
||||
#define __GFP_NOWARN ((gfp_t)0x200u) /* Suppress page allocation failure warning */
|
||||
#define __GFP_REPEAT ((gfp_t)0x400u) /* Retry the allocation. Might fail */
|
||||
#define __GFP_NOFAIL ((gfp_t)0x800u) /* Retry for ever. Cannot fail */
|
||||
#define __GFP_NORETRY ((gfp_t)0x1000u)/* Do not retry. Might fail */
|
||||
#define __GFP_NO_GROW ((gfp_t)0x2000u)/* Slab internal usage */
|
||||
#define __GFP_COMP ((gfp_t)0x4000u)/* Add compound page metadata */
|
||||
#define __GFP_ZERO ((gfp_t)0x8000u)/* Return zeroed page on success */
|
||||
#define __GFP_NOMEMALLOC ((gfp_t)0x10000u) /* Don't use emergency reserves */
|
||||
#define __GFP_HARDWALL ((gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */
|
||||
|
||||
/* This equals 0, but use constants in case they ever change */
|
||||
#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
|
||||
/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */
|
||||
#define GFP_ATOMIC (__GFP_HIGH)
|
||||
#define GFP_NOIO (__GFP_WAIT)
|
||||
#define GFP_NOFS (__GFP_WAIT | __GFP_IO)
|
||||
#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS)
|
||||
#define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL)
|
||||
#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \
|
||||
__GFP_HIGHMEM)
|
||||
|
||||
|
||||
#endif // kenny add Linux compatibility code for Linux USB
|
||||
|
||||
__inline static _list *get_next(_list *list)
|
||||
{
|
||||
return list->next;
|
||||
}
|
||||
|
||||
__inline static _list *get_list_head(_queue *queue)
|
||||
{
|
||||
return (&(queue->queue));
|
||||
}
|
||||
|
||||
|
||||
#define LIST_CONTAINOR(ptr, type, member) \
|
||||
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
|
||||
|
||||
|
||||
__inline static void _enter_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
spin_lock_irqsave(plock, *pirqL);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
spin_unlock_irqrestore(plock, *pirqL);
|
||||
}
|
||||
|
||||
__inline static void _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
spin_lock_irqsave(plock, *pirqL);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
spin_unlock_irqrestore(plock, *pirqL);
|
||||
}
|
||||
|
||||
__inline static void _enter_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
spin_lock_bh(plock, *pirqL);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
spin_unlock_bh(plock, *pirqL);
|
||||
}
|
||||
|
||||
__inline static void _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
|
||||
mtx_lock(pmutex);
|
||||
|
||||
}
|
||||
|
||||
|
||||
__inline static void _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
|
||||
mtx_unlock(pmutex);
|
||||
|
||||
}
|
||||
static inline void __list_del(struct list_head * prev, struct list_head * next)
|
||||
{
|
||||
next->prev = prev;
|
||||
prev->next = next;
|
||||
}
|
||||
static inline void INIT_LIST_HEAD(struct list_head *list)
|
||||
{
|
||||
list->next = list;
|
||||
list->prev = list;
|
||||
}
|
||||
__inline static void rtw_list_delete(_list *plist)
|
||||
{
|
||||
__list_del(plist->prev, plist->next);
|
||||
INIT_LIST_HEAD(plist);
|
||||
}
|
||||
|
||||
static inline void timer_hdl(void *ctx)
|
||||
{
|
||||
_timer *timer = (_timer *)ctx;
|
||||
|
||||
rtw_mtx_lock(NULL);
|
||||
if (callout_pending(&timer->callout)) {
|
||||
/* callout was reset */
|
||||
rtw_mtx_unlock(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!callout_active(&timer->callout)) {
|
||||
/* callout was stopped */
|
||||
rtw_mtx_unlock(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
callout_deactivate(&timer->callout);
|
||||
|
||||
timer->function(timer->arg);
|
||||
|
||||
rtw_mtx_unlock(NULL);
|
||||
}
|
||||
|
||||
static inline void _init_timer(_timer *ptimer, _nic_hdl padapter, void *pfunc, void *cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->arg = cntx;
|
||||
callout_init(&ptimer->callout, CALLOUT_MPSAFE);
|
||||
}
|
||||
|
||||
__inline static void _set_timer(_timer *ptimer,u32 delay_time)
|
||||
{
|
||||
if (ptimer->function && ptimer->arg) {
|
||||
rtw_mtx_lock(NULL);
|
||||
callout_reset(&ptimer->callout, delay_time, timer_hdl, ptimer);
|
||||
rtw_mtx_unlock(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
__inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
|
||||
{
|
||||
rtw_mtx_lock(NULL);
|
||||
callout_drain(&ptimer->callout);
|
||||
rtw_mtx_unlock(NULL);
|
||||
*bcancelled = 1; /* assume an pending timer to be canceled */
|
||||
}
|
||||
|
||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
||||
{
|
||||
printf("%s Not implement yet! \n",__FUNCTION__);
|
||||
}
|
||||
|
||||
__inline static void _set_workitem(_workitem *pwork)
|
||||
{
|
||||
printf("%s Not implement yet! \n",__FUNCTION__);
|
||||
// schedule_work(pwork);
|
||||
}
|
||||
|
||||
//
|
||||
// Global Mutex: can only be used at PASSIVE level.
|
||||
//
|
||||
|
||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
}
|
||||
|
||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
}
|
||||
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
|
||||
static __inline void thread_enter(char *name);
|
||||
|
||||
//Atomic integer operations
|
||||
typedef uint32_t ATOMIC_T ;
|
||||
|
||||
#define rtw_netdev_priv(netdev) (((struct ifnet *)netdev)->if_softc)
|
||||
|
||||
#define rtw_free_netdev(netdev) if_free((netdev))
|
||||
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ""
|
||||
#define ADPT_FMT "%s"
|
||||
#define ADPT_ARG(adapter) ""
|
||||
#define FUNC_NDEV_FMT "%s"
|
||||
#define FUNC_NDEV_ARG(ndev) __func__
|
||||
#define FUNC_ADPT_FMT "%s"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__
|
||||
|
||||
#define STRUCT_PACKED
|
||||
|
||||
#endif
|
||||
|
@ -1,200 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __OSDEP_CE_SERVICE_H_
|
||||
#define __OSDEP_CE_SERVICE_H_
|
||||
|
||||
|
||||
#include <ndis.h>
|
||||
#include <ntddndis.h>
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#include "SDCardDDK.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usbdi.h>
|
||||
#endif
|
||||
|
||||
typedef HANDLE _sema;
|
||||
typedef LIST_ENTRY _list;
|
||||
typedef NDIS_STATUS _OS_STATUS;
|
||||
|
||||
typedef NDIS_SPIN_LOCK _lock;
|
||||
|
||||
typedef HANDLE _rwlock; //Mutex
|
||||
|
||||
typedef u32 _irqL;
|
||||
|
||||
typedef NDIS_HANDLE _nic_hdl;
|
||||
|
||||
struct rtw_timer_list {
|
||||
NDIS_MINIPORT_TIMER ndis_timer;
|
||||
void (*function)(void *);
|
||||
void *arg;
|
||||
};
|
||||
|
||||
struct __queue {
|
||||
LIST_ENTRY queue;
|
||||
_lock lock;
|
||||
};
|
||||
|
||||
typedef NDIS_PACKET _pkt;
|
||||
typedef NDIS_BUFFER _buffer;
|
||||
typedef struct __queue _queue;
|
||||
|
||||
typedef HANDLE _thread_hdl_;
|
||||
typedef DWORD thread_return;
|
||||
typedef void* thread_context;
|
||||
typedef NDIS_WORK_ITEM _workitem;
|
||||
|
||||
|
||||
|
||||
#define SEMA_UPBND (0x7FFFFFFF) //8192
|
||||
|
||||
__inline static _list *get_prev(_list *list)
|
||||
{
|
||||
return list->Blink;
|
||||
}
|
||||
|
||||
__inline static _list *get_next(_list *list)
|
||||
{
|
||||
return list->Flink;
|
||||
}
|
||||
|
||||
__inline static _list *get_list_head(_queue *queue)
|
||||
{
|
||||
return (&(queue->queue));
|
||||
}
|
||||
|
||||
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
|
||||
|
||||
__inline static void _enter_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
|
||||
__inline static void _enter_hwio_critical(_rwlock *prwlock, _irqL *pirqL)
|
||||
{
|
||||
WaitForSingleObject(*prwlock, INFINITE );
|
||||
|
||||
}
|
||||
|
||||
__inline static void _exit_hwio_critical(_rwlock *prwlock, _irqL *pirqL)
|
||||
{
|
||||
ReleaseMutex(*prwlock);
|
||||
}
|
||||
|
||||
__inline static void rtw_list_delete(_list *plist)
|
||||
{
|
||||
RemoveEntryList(plist);
|
||||
InitializeListHead(plist);
|
||||
}
|
||||
|
||||
static inline void timer_hdl(
|
||||
IN PVOID SystemSpecific1,
|
||||
IN PVOID FunctionContext,
|
||||
IN PVOID SystemSpecific2,
|
||||
IN PVOID SystemSpecific3)
|
||||
{
|
||||
_timer *timer = (_timer *)FunctionContext;
|
||||
|
||||
timer->function(timer->arg);
|
||||
}
|
||||
|
||||
static inline void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc, void *cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->arg = cntx;
|
||||
NdisMInitializeTimer(&ptimer->ndis_timer, nic_hdl, timer_hdl, ptimer);
|
||||
}
|
||||
|
||||
static inline void _set_timer(_timer *ptimer, u32 delay_time)
|
||||
{
|
||||
NdisMSetTimer(ptimer, delay_time);
|
||||
}
|
||||
|
||||
static inline void _cancel_timer(_timer *ptimer, u8 *bcancelled)
|
||||
{
|
||||
NdisMCancelTimer(ptimer, bcancelled);
|
||||
}
|
||||
|
||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
||||
{
|
||||
|
||||
NdisInitializeWorkItem(pwork, pfunc, cntx);
|
||||
}
|
||||
|
||||
__inline static void _set_workitem(_workitem *pwork)
|
||||
{
|
||||
NdisScheduleWorkItem(pwork);
|
||||
}
|
||||
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
|
||||
//
|
||||
// Global Mutex: can only be used at PASSIVE level.
|
||||
//
|
||||
|
||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
while (NdisInterlockedIncrement((PULONG)&(_MutexCounter)) != 1)\
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
NdisMSleep(10000); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
}
|
||||
|
||||
// limitation of path length
|
||||
#define PATH_LENGTH_MAX MAX_PATH
|
||||
|
||||
//Atomic integer operations
|
||||
#define ATOMIC_T LONG
|
||||
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ""
|
||||
#define ADPT_FMT "%s"
|
||||
#define ADPT_ARG(adapter) ""
|
||||
#define FUNC_NDEV_FMT "%s"
|
||||
#define FUNC_NDEV_ARG(ndev) __func__
|
||||
#define FUNC_ADPT_FMT "%s"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__
|
||||
|
||||
#define STRUCT_PACKED
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,210 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __OSDEP_LINUX_SERVICE_H_
|
||||
#define __OSDEP_LINUX_SERVICE_H_
|
||||
|
||||
#include <ndis.h>
|
||||
#include <ntddk.h>
|
||||
#include <ntddndis.h>
|
||||
#include <ntdef.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb.h>
|
||||
#include <usbioctl.h>
|
||||
#include <usbdlib.h>
|
||||
#endif
|
||||
|
||||
typedef KSEMAPHORE _sema;
|
||||
typedef LIST_ENTRY _list;
|
||||
typedef NDIS_STATUS _OS_STATUS;
|
||||
|
||||
|
||||
typedef NDIS_SPIN_LOCK _lock;
|
||||
|
||||
typedef KMUTEX _mutex;
|
||||
|
||||
typedef KIRQL _irqL;
|
||||
|
||||
// USB_PIPE for WINCE , but handle can be use just integer under windows
|
||||
typedef NDIS_HANDLE _nic_hdl;
|
||||
|
||||
struct rtw_timer_list {
|
||||
NDIS_MINIPORT_TIMER ndis_timer;
|
||||
void (*function)(void *);
|
||||
void *arg;
|
||||
};
|
||||
|
||||
struct __queue {
|
||||
LIST_ENTRY queue;
|
||||
_lock lock;
|
||||
};
|
||||
|
||||
typedef NDIS_PACKET _pkt;
|
||||
typedef NDIS_BUFFER _buffer;
|
||||
typedef struct __queue _queue;
|
||||
|
||||
typedef PKTHREAD _thread_hdl_;
|
||||
typedef void thread_return;
|
||||
typedef void* thread_context;
|
||||
|
||||
typedef NDIS_WORK_ITEM _workitem;
|
||||
|
||||
|
||||
#define HZ 10000000
|
||||
#define SEMA_UPBND (0x7FFFFFFF) //8192
|
||||
|
||||
__inline static _list *get_next(_list *list)
|
||||
{
|
||||
return list->Flink;
|
||||
}
|
||||
|
||||
__inline static _list *get_list_head(_queue *queue)
|
||||
{
|
||||
return (&(queue->queue));
|
||||
}
|
||||
|
||||
|
||||
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
|
||||
|
||||
|
||||
__inline static _enter_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
|
||||
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _enter_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
KeWaitForSingleObject(pmutex, Executive, KernelMode, FALSE, NULL);
|
||||
}
|
||||
|
||||
|
||||
__inline static _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
KeReleaseMutex(pmutex, FALSE);
|
||||
}
|
||||
|
||||
|
||||
__inline static void rtw_list_delete(_list *plist)
|
||||
{
|
||||
RemoveEntryList(plist);
|
||||
InitializeListHead(plist);
|
||||
}
|
||||
|
||||
static inline void timer_hdl(
|
||||
IN PVOID SystemSpecific1,
|
||||
IN PVOID FunctionContext,
|
||||
IN PVOID SystemSpecific2,
|
||||
IN PVOID SystemSpecific3)
|
||||
{
|
||||
_timer *timer = (_timer *)FunctionContext;
|
||||
|
||||
timer->function(timer->arg);
|
||||
}
|
||||
|
||||
static inline void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc, void *cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->arg = cntx;
|
||||
NdisMInitializeTimer(&ptimer->ndis_timer, nic_hdl, timer_hdl, ptimer);
|
||||
}
|
||||
|
||||
static inline void _set_timer(_timer *ptimer, u32 delay_time)
|
||||
{
|
||||
NdisMSetTimer(ptimer, delay_time);
|
||||
}
|
||||
|
||||
static inline void _cancel_timer(_timer *ptimer, u8 *bcancelled)
|
||||
{
|
||||
NdisMCancelTimer(ptimer, bcancelled);
|
||||
}
|
||||
|
||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
||||
{
|
||||
|
||||
NdisInitializeWorkItem(pwork, pfunc, cntx);
|
||||
}
|
||||
|
||||
__inline static void _set_workitem(_workitem *pwork)
|
||||
{
|
||||
NdisScheduleWorkItem(pwork);
|
||||
}
|
||||
|
||||
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
|
||||
//
|
||||
// Global Mutex: can only be used at PASSIVE level.
|
||||
//
|
||||
|
||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
while (NdisInterlockedIncrement((PULONG)&(_MutexCounter)) != 1)\
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
NdisMSleep(10000); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
}
|
||||
|
||||
// limitation of path length
|
||||
#define PATH_LENGTH_MAX MAX_PATH
|
||||
|
||||
//Atomic integer operations
|
||||
#define ATOMIC_T LONG
|
||||
|
||||
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ""
|
||||
#define ADPT_FMT "%s"
|
||||
#define ADPT_ARG(adapter) ""
|
||||
#define FUNC_NDEV_FMT "%s"
|
||||
#define FUNC_NDEV_ARG(ndev) __func__
|
||||
#define FUNC_ADPT_FMT "%s"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__
|
||||
|
||||
#define STRUCT_PACKED
|
||||
|
||||
#endif
|
||||
|
@ -28,37 +28,18 @@ enum {
|
||||
|
||||
#define DRIVER_PREFIX "RTW: "
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
extern void rtl871x_cedbg(const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define RTW_PRINT do {} while (0)
|
||||
#define RTW_ERR do {} while (0)
|
||||
#define RTW_WARN do {} while (0)
|
||||
#define RTW_INFO do {} while (0)
|
||||
#define RTW_DBG do {} while (0)
|
||||
#define RTW_PRINT_SEL do {} while (0)
|
||||
#define _RTW_PRINT do {} while (0)
|
||||
#define _RTW_ERR do {} while (0)
|
||||
#define _RTW_WARN do {} while (0)
|
||||
#define _RTW_INFO do {} while (0)
|
||||
#define _RTW_DBG do {} while (0)
|
||||
#define _RTW_PRINT_SEL do {} while (0)
|
||||
#else
|
||||
#define RTW_PRINT(x, ...) do {} while (0)
|
||||
#define RTW_ERR(x, ...) do {} while (0)
|
||||
#define RTW_WARN(x,...) do {} while (0)
|
||||
#define RTW_INFO(x,...) do {} while (0)
|
||||
#define RTW_DBG(x,...) do {} while (0)
|
||||
#define RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#define _RTW_PRINT(x, ...) do {} while (0)
|
||||
#define _RTW_ERR(x, ...) do {} while (0)
|
||||
#define _RTW_WARN(x,...) do {} while (0)
|
||||
#define _RTW_INFO(x,...) do {} while (0)
|
||||
#define _RTW_DBG(x,...) do {} while (0)
|
||||
#define _RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#endif
|
||||
#define RTW_PRINT(x, ...) do {} while (0)
|
||||
#define RTW_ERR(x, ...) do {} while (0)
|
||||
#define RTW_WARN(x,...) do {} while (0)
|
||||
#define RTW_INFO(x,...) do {} while (0)
|
||||
#define RTW_DBG(x,...) do {} while (0)
|
||||
#define RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#define _RTW_PRINT(x, ...) do {} while (0)
|
||||
#define _RTW_ERR(x, ...) do {} while (0)
|
||||
#define _RTW_WARN(x,...) do {} while (0)
|
||||
#define _RTW_INFO(x,...) do {} while (0)
|
||||
#define _RTW_DBG(x,...) do {} while (0)
|
||||
#define _RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
|
||||
#define RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
|
||||
#define RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
|
||||
@ -68,36 +49,19 @@ extern void rtl871x_cedbg(const char *fmt, ...);
|
||||
|
||||
#define RTW_DBGDUMP 0 /* 'stream' for _dbgdump */
|
||||
|
||||
|
||||
|
||||
#undef _dbgdump
|
||||
#undef _seqdump
|
||||
|
||||
#if defined(PLATFORM_WINDOWS) && defined(PLATFORM_OS_XP)
|
||||
#define _dbgdump DbgPrint
|
||||
#define KERN_CONT
|
||||
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
|
||||
#elif defined(PLATFORM_WINDOWS) && defined(PLATFORM_OS_CE)
|
||||
#define _dbgdump rtl871x_cedbg
|
||||
#define KERN_CONT
|
||||
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
|
||||
#elif defined PLATFORM_LINUX
|
||||
#if defined PLATFORM_LINUX
|
||||
#define _dbgdump printk
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
|
||||
#define KERN_CONT
|
||||
#endif
|
||||
#define _seqdump seq_printf
|
||||
#elif defined PLATFORM_FREEBSD
|
||||
#define _dbgdump printf
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
|
||||
#define KERN_CONT
|
||||
#endif
|
||||
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
|
||||
#endif
|
||||
|
||||
void RTW_BUF_DUMP_SEL(uint _loglevel, void *sel, u8 *_titlestring,
|
||||
bool _idx_show, const u8 *_hexdata, int _hexdatalen);
|
||||
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
|
||||
#ifndef _OS_INTFS_C_
|
||||
@ -123,7 +87,6 @@ extern uint rtw_drv_log_level;
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#undef RTW_WARN
|
||||
#define RTW_WARN(fmt, arg...) \
|
||||
do {\
|
||||
@ -179,7 +142,6 @@ extern uint rtw_drv_log_level;
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#undef _RTW_WARN
|
||||
#define _RTW_WARN(fmt, arg...) \
|
||||
do {\
|
||||
@ -204,7 +166,6 @@ extern uint rtw_drv_log_level;
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* other debug APIs */
|
||||
#undef RTW_DBG_EXPR
|
||||
#define RTW_DBG_EXPR(EXPR) do { if (_DRV_DEBUG_ <= rtw_drv_log_level) EXPR; } while (0)
|
||||
@ -212,7 +173,6 @@ extern uint rtw_drv_log_level;
|
||||
#endif /* defined(_dbgdump) */
|
||||
#endif /* CONFIG_RTW_DEBUG */
|
||||
|
||||
|
||||
#if defined(_seqdump)
|
||||
/* dump message to selected 'stream' with driver-defined prefix */
|
||||
#undef RTW_PRINT_SEL
|
||||
@ -245,7 +205,6 @@ extern uint rtw_drv_log_level;
|
||||
RTW_BUF_DUMP_SEL(_DRV_ALWAYS_, sel, _TitleString, _TRUE, _HexData, _HexDataLen)
|
||||
#endif /* defined(_seqdump) */
|
||||
|
||||
|
||||
#ifdef CONFIG_DBG_COUNTER
|
||||
#define DBG_COUNTER(counter) counter++
|
||||
#else
|
||||
@ -473,7 +432,6 @@ ssize_t proc_set_pci_conf_space(struct file *file, const char __user *buffer, si
|
||||
int proc_get_pci_bridge_conf_space(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_pci_bridge_conf_space(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
||||
|
||||
#ifdef DBG_TXBD_DESC_DUMP
|
||||
int proc_get_tx_ring_ext(struct seq_file *m, void *v);
|
||||
ssize_t proc_set_tx_ring_ext(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data);
|
||||
|
@ -18,9 +18,6 @@
|
||||
|
||||
#define NUM_IOREQ 8
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define MAX_PROT_SZ 64
|
||||
#endif
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define MAX_PROT_SZ (64-16)
|
||||
#endif
|
||||
@ -40,20 +37,16 @@
|
||||
#define _IO_SYNC_ BIT(13)
|
||||
#define _IO_CMDMASK_ (0x1F80)
|
||||
|
||||
|
||||
/*
|
||||
For prompt mode accessing, caller shall free io_req
|
||||
Otherwise, io_handler will free io_req
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* IO STATUS TYPE */
|
||||
#define _IO_ERR_ BIT(2)
|
||||
#define _IO_SUCCESS_ BIT(1)
|
||||
#define _IO_DONE_ BIT(0)
|
||||
|
||||
|
||||
#define IO_RD32 (_IO_SYNC_ | _IO_WORD_)
|
||||
#define IO_RD16 (_IO_SYNC_ | _IO_HW_)
|
||||
#define IO_RD8 (_IO_SYNC_ | _IO_BYTE_)
|
||||
@ -71,16 +64,12 @@
|
||||
#define IO_WR8_ASYNC (_IO_WRITE_ | _IO_BYTE_)
|
||||
|
||||
/*
|
||||
|
||||
Only Sync. burst accessing is provided.
|
||||
|
||||
*/
|
||||
|
||||
#define IO_WR_BURST(x) (_IO_WRITE_ | _IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_))
|
||||
#define IO_RD_BURST(x) (_IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_))
|
||||
|
||||
|
||||
|
||||
/* below is for the intf_option bit defition... */
|
||||
|
||||
#define _INTF_ASYNC_ BIT(0) /* support async io */
|
||||
@ -141,27 +130,13 @@ struct io_req {
|
||||
u8 *pbuf;
|
||||
_sema sema;
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#ifdef CONFIG_USB_HCI
|
||||
/* URB handler for rtw_write_mem */
|
||||
USB_TRANSFER usb_transfer_write_mem;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt);
|
||||
u8 *cnxt;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pmdl;
|
||||
PIRP pirp;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct intf_hdl {
|
||||
@ -214,7 +189,6 @@ struct reg_protocol_rd {
|
||||
/* u32 Value; */
|
||||
#else
|
||||
|
||||
|
||||
/* DW1 */
|
||||
u32 Reserved1:4;
|
||||
u32 NumOfTrans:4;
|
||||
@ -225,7 +199,6 @@ struct reg_protocol_rd {
|
||||
u32 WriteEnable:1;
|
||||
u32 ByteCount:7;
|
||||
|
||||
|
||||
u32 Reserved3:3;
|
||||
u32 Byte4Access:1;
|
||||
|
||||
@ -246,10 +219,8 @@ struct reg_protocol_rd {
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct reg_protocol_wt {
|
||||
|
||||
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
|
||||
/* DW1 */
|
||||
@ -319,13 +290,11 @@ struct reg_protocol_wt {
|
||||
#define MAX_CONTINUAL_IO_ERR SD_IO_TRY_CNT
|
||||
#endif
|
||||
|
||||
|
||||
int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj);
|
||||
void rtw_reset_continual_io_error(struct dvobj_priv *dvobj);
|
||||
|
||||
/*
|
||||
Below is the data structure used by _io_handler
|
||||
|
||||
*/
|
||||
|
||||
struct io_queue {
|
||||
@ -350,7 +319,6 @@ extern uint ioreq_flush(_adapter *adapter, struct io_queue *ioqueue);
|
||||
extern void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue);
|
||||
extern uint sync_ioreq_flush(_adapter *adapter, struct io_queue *ioqueue);
|
||||
|
||||
|
||||
extern uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue);
|
||||
extern struct io_req *alloc_ioreq(struct io_queue *pio_q);
|
||||
|
||||
@ -367,7 +335,6 @@ extern void _rtw_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
extern void _rtw_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
extern void _rtw_read_port_cancel(_adapter *adapter);
|
||||
|
||||
|
||||
extern int _rtw_write8(_adapter *adapter, u32 addr, u8 val);
|
||||
extern int _rtw_write16(_adapter *adapter, u32 addr, u16 val);
|
||||
extern int _rtw_write32(_adapter *adapter, u32 addr, u32 val);
|
||||
@ -502,7 +469,6 @@ extern void ioreq_write8(_adapter *adapter, u32 addr, u8 val);
|
||||
extern void ioreq_write16(_adapter *adapter, u32 addr, u16 val);
|
||||
extern void ioreq_write32(_adapter *adapter, u32 addr, u32 val);
|
||||
|
||||
|
||||
extern uint async_read8(_adapter *adapter, u32 addr, u8 *pbuff,
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
|
||||
extern uint async_read16(_adapter *adapter, u32 addr, u8 *pbuff,
|
||||
@ -523,10 +489,8 @@ extern void async_write32(_adapter *adapter, u32 addr, u32 val,
|
||||
extern void async_write_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
extern void async_write_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
|
||||
|
||||
int rtw_init_io_priv(_adapter *padapter, void (*set_intf_ops)(_adapter *padapter, struct _io_ops *pops));
|
||||
|
||||
|
||||
extern uint alloc_io_queue(_adapter *adapter);
|
||||
extern void free_io_queue(_adapter *adapter);
|
||||
extern void async_bus_io(struct io_queue *pio_q);
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef _RTW_IOCTL_H_
|
||||
#define _RTW_IOCTL_H_
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
/* 00 - Success
|
||||
* 11 - Error */
|
||||
#define STATUS_SUCCESS (0x00000000L)
|
||||
@ -75,8 +74,6 @@
|
||||
#define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L) /* cause 49 */
|
||||
#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L) /* cause 93 */
|
||||
#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L) /* cause 3 */
|
||||
#endif /* #ifndef PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
#ifndef OID_802_11_CAPABILITY
|
||||
#define OID_802_11_CAPABILITY 0x0d010122
|
||||
@ -86,7 +83,6 @@
|
||||
#define OID_802_11_PMKID 0x0d010123
|
||||
#endif
|
||||
|
||||
|
||||
/* For DDK-defined OIDs */
|
||||
#define OID_NDIS_SEG1 0x00010100
|
||||
#define OID_NDIS_SEG2 0x00010200
|
||||
@ -147,144 +143,13 @@ struct oid_obj_priv {
|
||||
NDIS_STATUS(*oidfuns)(struct oid_par_priv *poid_par_priv);
|
||||
};
|
||||
|
||||
#if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_)) || \
|
||||
(defined(PLATFORM_WINDOWS) && defined(_RTW_IOCTL_RTL_C_))
|
||||
#if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_))
|
||||
static NDIS_STATUS oid_null_function(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
int TranslateNdisPsToRtPs(IN NDIS_802_11_POWER_MODE ndisPsMode);
|
||||
|
||||
/* OID Handler for Segment 1 */
|
||||
NDIS_STATUS oid_gen_supported_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_hardware_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_supported_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_in_use_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_lookahead_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_frame_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_link_speed_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_transmit_buffer_space_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_receive_buffer_space_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_transmit_block_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_receive_block_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_id_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_description_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_current_packet_filter_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_current_lookahead_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_driver_version_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_total_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_protocol_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_mac_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_connect_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_send_packets_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_driver_version_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 2 */
|
||||
NDIS_STATUS oid_gen_physical_medium_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
/* OID Handler for Segment 3 */
|
||||
NDIS_STATUS oid_gen_xmit_ok_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_ok_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_xmit_error_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_error_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_no_buffer_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 4 */
|
||||
NDIS_STATUS oid_802_3_permanent_address_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_current_address_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_multicast_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_maximum_list_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_mac_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 5 */
|
||||
NDIS_STATUS oid_802_3_rcv_error_alignment_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_one_collision_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_more_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 6 */
|
||||
NDIS_STATUS oid_802_3_xmit_deferred_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_max_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_rcv_overrun_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_underrun_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_heartbeat_failure_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_times_crs_lost_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_late_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 7 */
|
||||
NDIS_STATUS oid_pnp_capabilities_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_set_power_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_query_power_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_add_wake_up_pattern_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_remove_wake_up_pattern_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_wake_up_pattern_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_enable_wake_up_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 8 */
|
||||
NDIS_STATUS oid_802_11_bssid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_ssid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_infrastructure_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_add_wep_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_remove_wep_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_disassociate_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_authentication_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_privacy_filter_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_bssid_list_scan_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_encryption_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_reload_defaults_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_add_key_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_remove_key_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_association_information_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_test_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_media_stream_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_capability_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_pmkid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 9 */
|
||||
NDIS_STATUS oid_802_11_network_types_supported_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_network_type_in_use_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_tx_power_level_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rssi_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rssi_trigger_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_fragmentation_threshold_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rts_threshold_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_number_of_antennas_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rx_antenna_selected_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_tx_antenna_selected_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_supported_rates_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_desired_rates_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_configuration_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_power_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_bssid_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 10 */
|
||||
NDIS_STATUS oid_802_11_statistics_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment ED */
|
||||
NDIS_STATUS oid_rt_mh_vender_id_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
void Set_802_3_MULTICAST_LIST(ADAPTER *pAdapter, UCHAR *MCListbuf, ULONG MCListlen, BOOLEAN bAcceptAllMulticast);
|
||||
|
||||
#endif/* end of PLATFORM_WINDOWS */
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT)
|
||||
extern struct iw_handler_def rtw_handlers_def;
|
||||
#endif
|
||||
|
@ -15,11 +15,4 @@
|
||||
#ifndef _RTW_IOCTL_QUERY_H_
|
||||
#define _RTW_IOCTL_QUERY_H_
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 query_802_11_capability(_adapter *padapter, u8 *pucBuf, u32 *pulOutLen);
|
||||
u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef __RTW_IOCTL_SET_H_
|
||||
#define __RTW_IOCTL_SET_H_
|
||||
|
||||
|
||||
typedef u8 NDIS_802_11_PMKID_VALUE[16];
|
||||
|
||||
typedef struct _BSSIDInfo {
|
||||
@ -23,29 +22,6 @@ typedef struct _BSSIDInfo {
|
||||
NDIS_802_11_PMKID_VALUE PMKID;
|
||||
} BSSIDInfo, *PBSSIDInfo;
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
typedef struct _NDIS_802_11_PMKID {
|
||||
u32 Length;
|
||||
u32 BSSIDInfoCount;
|
||||
BSSIDInfo BSSIDInfo[1];
|
||||
} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 rtw_set_802_11_reload_defaults(_adapter *padapter, NDIS_802_11_RELOAD_DEFAULTS reloadDefaults);
|
||||
u8 rtw_set_802_11_test(_adapter *padapter, NDIS_802_11_TEST *test);
|
||||
u8 rtw_set_802_11_pmkid(_adapter *pdapter, NDIS_802_11_PMKID *pmkid);
|
||||
|
||||
u8 rtw_pnp_set_power_sleep(_adapter *padapter);
|
||||
u8 rtw_pnp_set_power_wakeup(_adapter *padapter);
|
||||
|
||||
void rtw_pnp_resume_wk(void *context);
|
||||
void rtw_pnp_sleep_wk(void *context);
|
||||
|
||||
#endif
|
||||
|
||||
u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode);
|
||||
u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid);
|
||||
u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep);
|
||||
|
@ -39,14 +39,10 @@ struct mp_xmit_frame {
|
||||
u8 *mem_addr;
|
||||
u32 sz[8];
|
||||
|
||||
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX)
|
||||
#if defined(PLATFORM_LINUX)
|
||||
PURB pxmit_urb[8];
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pxmit_irp[8];
|
||||
#endif
|
||||
|
||||
u8 bpending[8];
|
||||
sint ac_tag[8];
|
||||
sint last[8];
|
||||
@ -66,21 +62,6 @@ struct mp_wiparam {
|
||||
|
||||
typedef void(*wi_act_func)(void *padapter);
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
struct mp_wi_cntx {
|
||||
u8 bmpdrv_unload;
|
||||
|
||||
/* Work Item */
|
||||
NDIS_WORK_ITEM mp_wi;
|
||||
NDIS_EVENT mp_wi_evt;
|
||||
_lock mp_wi_lock;
|
||||
u8 bmp_wi_progress;
|
||||
wi_act_func curractfunc;
|
||||
/* Variable needed in each implementation of CurrActFunc. */
|
||||
struct mp_wiparam param;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct mp_tx {
|
||||
u8 stop;
|
||||
u32 count, sended;
|
||||
@ -98,7 +79,6 @@ struct mp_tx {
|
||||
#define MP_MAX_LINES 1000
|
||||
#define MP_MAX_LINES_BYTES 256
|
||||
|
||||
|
||||
typedef struct _RT_PMAC_PKT_INFO {
|
||||
UCHAR MCS;
|
||||
UCHAR Nss;
|
||||
@ -139,7 +119,6 @@ typedef struct _RT_PMAC_TX_INFO {
|
||||
u8 MacAddress[6];
|
||||
} RT_PMAC_TX_INFO, *PRT_PMAC_TX_INFO;
|
||||
|
||||
|
||||
typedef VOID (*MPT_WORK_ITEM_HANDLER)(IN PVOID Adapter);
|
||||
typedef struct _MPT_CONTEXT {
|
||||
/* Indicate if we have started Mass Production Test. */
|
||||
@ -183,7 +162,6 @@ typedef struct _MPT_CONTEXT {
|
||||
|
||||
ULONG mpt_rf_path;
|
||||
|
||||
|
||||
WIRELESS_MODE MptWirelessModeToSw; /* Wireless mode to switch. */
|
||||
u8 MptChannelToSw; /* Channel to switch. */
|
||||
u8 MptInitGainToSet; /* Initial gain to set. */
|
||||
@ -223,7 +201,6 @@ typedef struct _MPT_CONTEXT {
|
||||
|
||||
BOOLEAN is_single_tone;
|
||||
|
||||
|
||||
/* ACK counter asked by K.Y.. */
|
||||
BOOLEAN bMptEnableAckCounter;
|
||||
ULONG MptAckCounter;
|
||||
@ -260,7 +237,6 @@ typedef struct _MPT_CONTEXT {
|
||||
} MPT_CONTEXT, *PMPT_CONTEXT;
|
||||
/* #endif */
|
||||
|
||||
|
||||
/* #define RTPRIV_IOCTL_MP ( SIOCIWFIRSTPRIV + 0x17) */
|
||||
enum {
|
||||
WRITE_REG = 1,
|
||||
@ -383,31 +359,6 @@ struct mp_priv {
|
||||
struct wlan_network mp_network;
|
||||
NDIS_802_11_MAC_ADDRESS network_macaddr;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u32 rx_testcnt;
|
||||
u32 rx_testcnt1;
|
||||
u32 rx_testcnt2;
|
||||
u32 tx_testcnt;
|
||||
u32 tx_testcnt1;
|
||||
|
||||
struct mp_wi_cntx wi_cntx;
|
||||
|
||||
u8 h2c_result;
|
||||
u8 h2c_seqnum;
|
||||
u16 h2c_cmdcode;
|
||||
u8 h2c_resp_parambuf[512];
|
||||
_lock h2c_lock;
|
||||
_lock wkitm_lock;
|
||||
u32 h2c_cmdcnt;
|
||||
NDIS_EVENT h2c_cmd_evt;
|
||||
NDIS_EVENT c2h_set;
|
||||
NDIS_EVENT h2c_clr;
|
||||
NDIS_EVENT cpwm_int;
|
||||
|
||||
NDIS_EVENT scsir_full_evt;
|
||||
NDIS_EVENT scsiw_empty_evt;
|
||||
#endif
|
||||
|
||||
u8 *pallocated_mp_xmitframe_buf;
|
||||
u8 *pmp_xmtframe_buf;
|
||||
_queue free_mp_xmitqueue;
|
||||
@ -421,7 +372,6 @@ struct mp_priv {
|
||||
|
||||
MPT_CONTEXT mpt_ctx;
|
||||
|
||||
|
||||
u8 *TXradomBuffer;
|
||||
u8 CureFuseBTCoex;
|
||||
};
|
||||
@ -453,9 +403,6 @@ typedef struct _MP_FIRMWARE {
|
||||
u32 ulFwLength;
|
||||
} RT_MP_FIRMWARE, *PRT_MP_FIRMWARE;
|
||||
|
||||
|
||||
|
||||
|
||||
/* *********************************************************************** */
|
||||
|
||||
#define LOWER _TRUE
|
||||
@ -507,7 +454,6 @@ typedef enum _TEST_MODE {
|
||||
CCK_Carrier_Suppression_TX
|
||||
} TEST_MODE;
|
||||
|
||||
|
||||
typedef enum _MPT_BANDWIDTH {
|
||||
MPT_BW_20MHZ = 0,
|
||||
MPT_BW_40MHZ_DUPLICATE = 1,
|
||||
@ -525,7 +471,6 @@ typedef enum _MPT_BANDWIDTH {
|
||||
|
||||
#define MAX_RF_PATH_NUMS RF_PATH_MAX
|
||||
|
||||
|
||||
extern u8 mpdatarate[NumRates];
|
||||
|
||||
/* MP set force data rate base on the definition. */
|
||||
@ -659,7 +604,6 @@ typedef enum _OFDM_TX_MODE {
|
||||
OFDM_SingleTone = 4,
|
||||
} OFDM_TX_MODE;
|
||||
|
||||
|
||||
#define RX_PKT_BROADCAST 1
|
||||
#define RX_PKT_DEST_ADDR 2
|
||||
#define RX_PKT_PHY_MATCH 3
|
||||
@ -679,7 +623,6 @@ typedef enum _MPT_TXPWR_DEF {
|
||||
MPT_VHT
|
||||
} MPT_TXPWR_DEF;
|
||||
|
||||
|
||||
#define IS_MPT_HT_RATE(_rate) (_rate >= MPT_RATE_MCS0 && _rate <= MPT_RATE_MCS31)
|
||||
#define IS_MPT_VHT_RATE(_rate) (_rate >= MPT_RATE_VHT1SS_MCS0 && _rate <= MPT_RATE_VHT4SS_MCS9)
|
||||
#define IS_MPT_CCK_RATE(_rate) (_rate >= MPT_RATE_1M && _rate <= MPT_RATE_11M)
|
||||
|
@ -55,13 +55,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RTL8821C) && defined(CONFIG_SDIO_HCI) && defined(CONFIG_RECV_THREAD_MODE)
|
||||
#ifdef NR_RECVBUFF
|
||||
#undef NR_RECVBUFF
|
||||
#define NR_RECVBUFF (32)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define NR_RECVFRAME 256
|
||||
|
||||
#define RXFRAME_ALIGN 8
|
||||
@ -77,7 +70,6 @@
|
||||
#define PHY_RSSI_SLID_WIN_MAX 100
|
||||
#define PHY_LINKQUALITY_SLID_WIN_MAX 20
|
||||
|
||||
|
||||
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
||||
|
||||
#define RX_MPDU_QUEUE 0
|
||||
@ -127,7 +119,6 @@ struct stainfo_rxcache {
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
struct smooth_rssi_data {
|
||||
u32 elements[100]; /* array to store values */
|
||||
u32 index; /* index to current array to store */
|
||||
@ -154,7 +145,6 @@ struct rx_raw_rssi {
|
||||
u8 ofdm_snr[4];
|
||||
};
|
||||
|
||||
|
||||
#include "cmn_info/rtw_sta_info.h"
|
||||
|
||||
struct rx_pkt_attrib {
|
||||
@ -307,8 +297,6 @@ struct rtw_rx_ring {
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
accesser of recv_priv: rtw_recv_entry(dispatch / passive level); recv_thread(passive) ; returnpkt(dispatch)
|
||||
; halt(passive) ;
|
||||
@ -333,7 +321,6 @@ struct recv_priv {
|
||||
_queue recv_pending_queue;
|
||||
_queue uc_swdec_pending_queue;
|
||||
|
||||
|
||||
u8 *pallocated_frame_buf;
|
||||
u8 *precv_frame_buf;
|
||||
|
||||
@ -352,18 +339,6 @@ struct recv_priv {
|
||||
|
||||
_adapter *adapter;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
_nic_hdl RxPktPoolHdl;
|
||||
_nic_hdl RxBufPoolHdl;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pbytecnt_mdl;
|
||||
#endif
|
||||
uint counter; /* record the number that up-layer will return to drv; only when counter==0 can we release recv_priv */
|
||||
NDIS_EVENT recv_resource_evt ;
|
||||
#endif
|
||||
|
||||
|
||||
u32 is_any_non_be_pkts;
|
||||
|
||||
u64 rx_bytes;
|
||||
@ -447,7 +422,6 @@ struct recv_priv {
|
||||
/* s8 RxRssi[2]; */
|
||||
/* int FalseAlmCnt_all; */
|
||||
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
_timer signal_stat_timer;
|
||||
u32 signal_stat_sampling_interval;
|
||||
@ -510,7 +484,6 @@ struct sta_recv_priv {
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct recv_buf {
|
||||
_list list;
|
||||
|
||||
@ -537,14 +510,6 @@ struct recv_buf {
|
||||
u32 alloc_sz;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pirp;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
USB_TRANSFER usb_transfer_read_port;
|
||||
#endif
|
||||
|
||||
u8 irp_pending;
|
||||
int transfer_len;
|
||||
|
||||
@ -560,14 +525,9 @@ struct recv_buf {
|
||||
|
||||
/*
|
||||
head ----->
|
||||
|
||||
data ----->
|
||||
|
||||
payload
|
||||
|
||||
tail ----->
|
||||
|
||||
|
||||
end ----->
|
||||
|
||||
len = (unsigned int )(tail - data);
|
||||
@ -593,7 +553,6 @@ struct recv_frame_hdr {
|
||||
|
||||
void *precvbuf;
|
||||
|
||||
|
||||
/* */
|
||||
struct sta_info *psta;
|
||||
|
||||
@ -610,7 +569,6 @@ struct recv_frame_hdr {
|
||||
|
||||
};
|
||||
|
||||
|
||||
union recv_frame {
|
||||
|
||||
union {
|
||||
@ -701,7 +659,6 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz)
|
||||
if (precvframe == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
precvframe->u.hdr.rx_data -= sz ;
|
||||
if (precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) {
|
||||
precvframe->u.hdr.rx_data += sz ;
|
||||
@ -714,18 +671,15 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz)
|
||||
|
||||
}
|
||||
|
||||
|
||||
__inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
|
||||
{
|
||||
/* rx_data += sz; move rx_data sz bytes hereafter */
|
||||
|
||||
/* used for extract sz bytes from rx_data, update rx_data and return the updated rx_data to the caller */
|
||||
|
||||
|
||||
if (precvframe == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
precvframe->u.hdr.rx_data += sz;
|
||||
|
||||
if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail) {
|
||||
@ -767,8 +721,6 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
||||
{
|
||||
/* rmv data from rx_tail (by yitsen) */
|
||||
@ -792,8 +744,6 @@ __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
__inline static _buffer *get_rxbuf_desc(union recv_frame *precvframe)
|
||||
{
|
||||
_buffer *buf_desc;
|
||||
@ -807,7 +757,6 @@ __inline static _buffer *get_rxbuf_desc(union recv_frame *precvframe)
|
||||
return buf_desc;
|
||||
}
|
||||
|
||||
|
||||
__inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
||||
{
|
||||
/* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */
|
||||
@ -855,13 +804,11 @@ __inline static u8 *pkt_to_recvdata(_pkt *pkt)
|
||||
|
||||
}
|
||||
|
||||
|
||||
__inline static sint get_recvframe_len(union recv_frame *precvframe)
|
||||
{
|
||||
return precvframe->u.hdr.len;
|
||||
}
|
||||
|
||||
|
||||
__inline static s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
|
||||
{
|
||||
s32 SignalPower; /* in dBm. */
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef __RTW_SECURITY_H_
|
||||
#define __RTW_SECURITY_H_
|
||||
|
||||
|
||||
#define _NO_PRIVACY_ 0x0
|
||||
#define _WEP40_ 0x1
|
||||
#define _TKIP_ 0x2
|
||||
@ -61,7 +60,6 @@ typedef enum {
|
||||
ENCRYP_PROTOCOL_MAX
|
||||
} ENCRYP_PROTOCOL_E;
|
||||
|
||||
|
||||
#ifndef Ndis802_11AuthModeWPA2
|
||||
#define Ndis802_11AuthModeWPA2 (Ndis802_11AuthModeWPANone + 1)
|
||||
#endif
|
||||
@ -109,7 +107,6 @@ union Keytype {
|
||||
u32 lkey[4];
|
||||
};
|
||||
|
||||
|
||||
typedef struct _RT_PMKID_LIST {
|
||||
u8 bUsed;
|
||||
u8 Bssid[6];
|
||||
@ -119,7 +116,6 @@ typedef struct _RT_PMKID_LIST {
|
||||
u16 ssid_length;
|
||||
} RT_PMKID_LIST, *PRT_PMKID_LIST;
|
||||
|
||||
|
||||
struct security_priv {
|
||||
u32 dot11AuthAlgrthm; /* 802.11 auth, could be open, shared, 8021x and authswitch */
|
||||
u32 dot11PrivacyAlgrthm; /* This specify the privacy for shared auth. algorithm. */
|
||||
@ -164,7 +160,6 @@ struct security_priv {
|
||||
u8 wps_ie[MAX_WPS_IE_LEN];/* added in assoc req */
|
||||
int wps_ie_len;
|
||||
|
||||
|
||||
u8 binstallGrpkey;
|
||||
#ifdef CONFIG_GTK_OL
|
||||
u8 binstallKCK_KEK;
|
||||
@ -186,15 +181,11 @@ struct security_priv {
|
||||
|
||||
s32 hw_decrypted;/* if the rx packets is hw_decrypted==_FALSE, it means the hw has not been ready. */
|
||||
|
||||
|
||||
/* keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc) */
|
||||
u32 ndisauthtype; /* NDIS_802_11_AUTHENTICATION_MODE */
|
||||
u32 ndisencryptstatus; /* NDIS_802_11_ENCRYPTION_STATUS */
|
||||
|
||||
NDIS_802_11_WEP ndiswep;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 KeyMaterial[16];/* variable length depending on above field. */
|
||||
#endif
|
||||
|
||||
u8 assoc_info[600];
|
||||
u8 szofcapability[256]; /* for wpa2 usage */
|
||||
@ -202,7 +193,6 @@ struct security_priv {
|
||||
u8 authenticator_ie[256]; /* store ap security information element */
|
||||
u8 supplicant_ie[256]; /* store sta security information element */
|
||||
|
||||
|
||||
/* for tkip countermeasure */
|
||||
systime last_mic_err_time;
|
||||
u8 btkip_countermeasure;
|
||||
@ -307,7 +297,6 @@ struct sha256_state {
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define GET_TKIP_PN(iv, dot11txpn)\
|
||||
do {\
|
||||
dot11txpn._byte_.TSC0 = iv[2];\
|
||||
@ -318,7 +307,6 @@ struct sha256_state {
|
||||
dot11txpn._byte_.TSC5 = iv[7];\
|
||||
} while (0)
|
||||
|
||||
|
||||
#define ROL32(A, n) (((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1)))
|
||||
#define ROR32(A, n) ROL32((A), 32-(n))
|
||||
|
||||
@ -430,7 +418,6 @@ static const unsigned long K[64] = {
|
||||
0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
|
||||
};
|
||||
|
||||
|
||||
/* Various logical functions */
|
||||
#define RORc(x, y) \
|
||||
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> (unsigned long) ((y) & 31)) | \
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef __SDIO_OPS_H__
|
||||
#define __SDIO_OPS_H__
|
||||
|
||||
|
||||
/* Follow mac team suggestion, default I/O fail return value is 0xFF */
|
||||
#define SDIO_ERR_VAL8 0xFF
|
||||
#define SDIO_ERR_VAL16 0xFFFF
|
||||
@ -25,25 +24,6 @@
|
||||
#include <sdio_ops_linux.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <sdio_ops_xp.h>
|
||||
struct async_context {
|
||||
PMDL pmdl;
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
unsigned char *r_buf;
|
||||
unsigned char *padapter;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdio_ops_ce.h>
|
||||
#endif
|
||||
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
extern void sdio_set_intf_ops(_adapter *padapter, struct _io_ops *pops);
|
||||
void dump_sdio_card_info(void *sel, struct dvobj_priv *dvobj);
|
||||
|
||||
@ -69,16 +49,6 @@ s32 _sdio_write32(PADAPTER padapter, u32 addr, u32 val);
|
||||
extern void sd_int_hdl(PADAPTER padapter);
|
||||
extern u8 CheckIPSStatus(PADAPTER padapter);
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
extern void InitInterrupt8188ESdio(PADAPTER padapter);
|
||||
extern void EnableInterrupt8188ESdio(PADAPTER padapter);
|
||||
extern void DisableInterrupt8188ESdio(PADAPTER padapter);
|
||||
extern void UpdateInterruptMask8188ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
|
||||
extern u8 HalQueryTxBufferStatus8189ESdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxOQTBufferStatus8189ESdio(PADAPTER padapter);
|
||||
extern void ClearInterrupt8188ESdio(PADAPTER padapter);
|
||||
#endif /* CONFIG_RTL8188E */
|
||||
|
||||
#ifdef CONFIG_RTL8821A
|
||||
extern void InitInterrupt8821AS(PADAPTER padapter);
|
||||
extern void EnableInterrupt8821AS(PADAPTER padapter);
|
||||
@ -90,102 +60,6 @@ void ClearInterrupt8821AS(PADAPTER padapter);
|
||||
#endif /* defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) */
|
||||
#endif /* CONFIG_RTL8821A */
|
||||
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
#if defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8822B)
|
||||
u8 rtw_hal_enable_cpwm2(_adapter *adapter);
|
||||
#endif
|
||||
extern u8 RecvOnePkt(PADAPTER padapter);
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
#ifdef CONFIG_RTL8723B
|
||||
extern void InitInterrupt8723BSdio(PADAPTER padapter);
|
||||
extern void InitSysInterrupt8723BSdio(PADAPTER padapter);
|
||||
extern void EnableInterrupt8723BSdio(PADAPTER padapter);
|
||||
extern void DisableInterrupt8723BSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxBufferStatus8723BSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxOQTBufferStatus8723BSdio(PADAPTER padapter);
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
extern void DisableInterruptButCpwm28723BSdio(PADAPTER padapter);
|
||||
extern void ClearInterrupt8723BSdio(PADAPTER padapter);
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_RTL8192E
|
||||
extern void InitInterrupt8192ESdio(PADAPTER padapter);
|
||||
extern void EnableInterrupt8192ESdio(PADAPTER padapter);
|
||||
extern void DisableInterrupt8192ESdio(PADAPTER padapter);
|
||||
extern void UpdateInterruptMask8192ESdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
|
||||
extern u8 HalQueryTxBufferStatus8192ESdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxOQTBufferStatus8192ESdio(PADAPTER padapter);
|
||||
extern void ClearInterrupt8192ESdio(PADAPTER padapter);
|
||||
#endif /* CONFIG_RTL8192E */
|
||||
|
||||
#ifdef CONFIG_RTL8703B
|
||||
extern void InitInterrupt8703BSdio(PADAPTER padapter);
|
||||
extern void InitSysInterrupt8703BSdio(PADAPTER padapter);
|
||||
extern void EnableInterrupt8703BSdio(PADAPTER padapter);
|
||||
extern void DisableInterrupt8703BSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxBufferStatus8703BSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxOQTBufferStatus8703BSdio(PADAPTER padapter);
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
extern void DisableInterruptButCpwm28703BSdio(PADAPTER padapter);
|
||||
extern void ClearInterrupt8703BSdio(PADAPTER padapter);
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8723D
|
||||
extern void InitInterrupt8723DSdio(PADAPTER padapter);
|
||||
extern void InitSysInterrupt8723DSdio(PADAPTER padapter);
|
||||
extern void EnableInterrupt8723DSdio(PADAPTER padapter);
|
||||
extern void DisableInterrupt8723DSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxBufferStatus8723DSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxOQTBufferStatus8723DSdio(PADAPTER padapter);
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
extern void DisableInterruptButCpwm28723dSdio(PADAPTER padapter);
|
||||
extern void ClearInterrupt8723DSdio(PADAPTER padapter);
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8192F
|
||||
extern void InitInterrupt8192FSdio(PADAPTER padapter);
|
||||
extern void InitSysInterrupt8192FSdio(PADAPTER padapter);
|
||||
extern void EnableInterrupt8192FSdio(PADAPTER padapter);
|
||||
extern void DisableInterrupt8192FSdio(PADAPTER padapter);
|
||||
extern void UpdateInterruptMask8192FSdio(PADAPTER padapter, u32 AddMSR, u32 RemoveMSR);
|
||||
extern u8 HalQueryTxBufferStatus8192FSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxOQTBufferStatus8192FSdio(PADAPTER padapter);
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
extern void DisableInterruptButCpwm2192fSdio(PADAPTER padapter);
|
||||
extern void ClearInterrupt8192FSdio(PADAPTER padapter);
|
||||
#endif /* CONFIG_WOWLAN */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8188F
|
||||
extern void InitInterrupt8188FSdio(PADAPTER padapter);
|
||||
extern void InitSysInterrupt8188FSdio(PADAPTER padapter);
|
||||
extern void EnableInterrupt8188FSdio(PADAPTER padapter);
|
||||
extern void DisableInterrupt8188FSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxBufferStatus8188FSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxOQTBufferStatus8188FSdio(PADAPTER padapter);
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
extern void DisableInterruptButCpwm28188FSdio(PADAPTER padapter);
|
||||
extern void ClearInterrupt8188FSdio(PADAPTER padapter);
|
||||
#endif /* defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RTL8188GTV
|
||||
extern void InitInterrupt8188GTVSdio(PADAPTER padapter);
|
||||
extern void InitSysInterrupt8188GTVSdio(PADAPTER padapter);
|
||||
extern void EnableInterrupt8188GTVSdio(PADAPTER padapter);
|
||||
extern void DisableInterrupt8188GTVSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxBufferStatus8188GTVSdio(PADAPTER padapter);
|
||||
extern u8 HalQueryTxOQTBufferStatus8188GTVSdio(PADAPTER padapter);
|
||||
#if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
|
||||
extern void DisableInterruptButCpwm28188GTVSdio(PADAPTER padapter);
|
||||
extern void ClearInterrupt8188GTVSdio(PADAPTER padapter);
|
||||
#endif /* defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* rtw_sdio_get_block_size() - Get block size of SDIO transfer
|
||||
* @d struct dvobj_priv*
|
||||
@ -213,7 +87,6 @@ static inline size_t rtw_sdio_cmd53_align_size(struct dvobj_priv *d, size_t len)
|
||||
{
|
||||
u32 blk_sz;
|
||||
|
||||
|
||||
blk_sz = rtw_sdio_get_block_size(d);
|
||||
if (len <= blk_sz)
|
||||
return len;
|
||||
|
@ -15,12 +15,10 @@
|
||||
#ifndef _WIFI_H_
|
||||
#define _WIFI_H_
|
||||
|
||||
|
||||
#ifndef BIT
|
||||
#define BIT(x) (1 << (x))
|
||||
#endif
|
||||
|
||||
|
||||
#define WLAN_ETHHDR_LEN 14
|
||||
#define WLAN_ETHADDR_LEN 6
|
||||
#define WLAN_IEEE_OUI_LEN 3
|
||||
@ -407,7 +405,6 @@ enum WIFI_REG_DOMAIN {
|
||||
*(unsigned short *)((SIZE_PTR)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/* QoS control field */
|
||||
#define SetPriority(qc, tid) SET_BITS_TO_LE_2BYTE(((u8 *)(qc)), 0, 4, tid)
|
||||
#define SetEOSP(qc, eosp) SET_BITS_TO_LE_2BYTE(((u8 *)(qc)), 4, 1, eosp)
|
||||
@ -428,7 +425,6 @@ enum WIFI_REG_DOMAIN {
|
||||
#define get_mps_lv(qc) LE_BITS_TO_2BYTE(((u8 *)(qc)), 9, 1)
|
||||
#define get_rspi(qc) LE_BITS_TO_2BYTE(((u8 *)(qc)), 10, 1)
|
||||
|
||||
|
||||
#define GetAid(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 2)) & 0x3fff)
|
||||
|
||||
#define GetTid(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + (((GetToDs(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? 30 : 24))) & 0x000f)
|
||||
@ -441,7 +437,6 @@ enum WIFI_REG_DOMAIN {
|
||||
|
||||
#define GetAddr4Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 24))
|
||||
|
||||
|
||||
#define MacAddr_isBcst(addr) \
|
||||
(\
|
||||
((addr[0] == 0xff) && (addr[1] == 0xff) && \
|
||||
@ -542,7 +537,6 @@ __inline static unsigned char *get_hdr_bssid(unsigned char *pframe)
|
||||
return sa;
|
||||
}
|
||||
|
||||
|
||||
__inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
||||
{
|
||||
if (WIFI_CTRL_TYPE == GetFrameType(pframe))
|
||||
@ -565,7 +559,6 @@ static inline int IsFrameTypeData(unsigned char *pframe)
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
Below is for the security related definition
|
||||
------------------------------------------------------------------------------*/
|
||||
@ -620,7 +613,6 @@ static inline int IsFrameTypeData(unsigned char *pframe)
|
||||
#define _WAPI_IE_ 68
|
||||
#define _EID_RRM_EN_CAP_IE_ 70
|
||||
|
||||
|
||||
/* #define EID_BSSCoexistence 72 */ /* 20/40 BSS Coexistence
|
||||
* #define EID_BSSIntolerantChlReport 73 */
|
||||
#define _RIC_Descriptor_IE_ 75
|
||||
@ -769,7 +761,6 @@ typedef enum _ELEMENT_ID {
|
||||
#define _WMM_IE_Length_ 7 /* for WMM STA */
|
||||
#define _WMM_Para_Element_Length_ 24
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
Below is the definition for 802.11n
|
||||
------------------------------------------------------------------------------*/
|
||||
@ -781,8 +772,6 @@ typedef enum _ELEMENT_ID {
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_ORDER_); \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
||||
#define GetOrderBit(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
|
||||
|
||||
#define ACT_CAT_VENDOR 0x7F/* 127 */
|
||||
@ -808,10 +797,7 @@ struct rtw_ieee80211_bar {
|
||||
#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
|
||||
#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW) || defined(PLATFORM_FREEBSD)
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW)
|
||||
|
||||
/**
|
||||
* struct rtw_ieee80211_ht_cap - HT capabilities
|
||||
@ -883,76 +869,6 @@ struct ADDBA_request {
|
||||
unsigned short BA_timeout_value;
|
||||
unsigned short BA_starting_seqctrl;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct rtw_ieee80211_ht_cap {
|
||||
unsigned short cap_info;
|
||||
unsigned char ampdu_params_info;
|
||||
unsigned char supp_mcs_set[16];
|
||||
unsigned short extended_ht_cap_info;
|
||||
unsigned int tx_BF_cap_info;
|
||||
unsigned char antenna_selection_info;
|
||||
};
|
||||
|
||||
|
||||
struct ieee80211_ht_addt_info {
|
||||
unsigned char control_chan;
|
||||
unsigned char ht_param;
|
||||
unsigned short operation_mode;
|
||||
unsigned short stbc_param;
|
||||
unsigned char basic_set[16];
|
||||
};
|
||||
|
||||
struct HT_caps_element {
|
||||
union {
|
||||
struct {
|
||||
unsigned short HT_caps_info;
|
||||
unsigned char AMPDU_para;
|
||||
unsigned char MCS_rate[16];
|
||||
unsigned short HT_ext_caps;
|
||||
unsigned int Beamforming_caps;
|
||||
unsigned char ASEL_caps;
|
||||
} HT_cap_element;
|
||||
unsigned char HT_cap[26];
|
||||
};
|
||||
};
|
||||
|
||||
struct HT_info_element {
|
||||
unsigned char primary_channel;
|
||||
unsigned char infos[5];
|
||||
unsigned char MCS_rate[16];
|
||||
};
|
||||
|
||||
struct AC_param {
|
||||
unsigned char ACI_AIFSN;
|
||||
unsigned char CW;
|
||||
unsigned short TXOP_limit;
|
||||
};
|
||||
|
||||
struct WMM_para_element {
|
||||
unsigned char QoS_info;
|
||||
unsigned char reserved;
|
||||
struct AC_param ac_param[4];
|
||||
};
|
||||
|
||||
struct ADDBA_request {
|
||||
unsigned char dialog_token;
|
||||
unsigned short BA_para_set;
|
||||
unsigned short BA_timeout_value;
|
||||
unsigned short BA_starting_seqctrl;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_FACTOR {
|
||||
@ -969,7 +885,6 @@ typedef enum _VHT_CAP_AMPDU_FACTOR {
|
||||
MAX_AMPDU_FACTOR_1M = 7,
|
||||
} VHT_CAP_AMPDU_FACTOR;
|
||||
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
AMPDU_DENSITY_VALUE_0 = 0 , /* For no restriction */
|
||||
AMPDU_DENSITY_VALUE_1 = 1 , /* For 1/4 us */
|
||||
@ -1037,14 +952,12 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
#define IEEE80211_MIN_AMPDU_BUF 0x8
|
||||
#define IEEE80211_MAX_AMPDU_BUF_HT 0x40
|
||||
|
||||
|
||||
/* Spatial Multiplexing Power Save Modes */
|
||||
#define WLAN_HT_CAP_SM_PS_STATIC 0
|
||||
#define WLAN_HT_CAP_SM_PS_DYNAMIC 1
|
||||
#define WLAN_HT_CAP_SM_PS_INVALID 2
|
||||
#define WLAN_HT_CAP_SM_PS_DISABLED 3
|
||||
|
||||
|
||||
#define OP_MODE_PURE 0
|
||||
#define OP_MODE_MAY_BE_LEGACY_STAS 1
|
||||
#define OP_MODE_20MHZ_HT_STA_ASSOCED 2
|
||||
@ -1072,8 +985,6 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
#define HT_INFO_STBC_PARAM_PCO_ACTIVE ((u16) BIT(10))
|
||||
#define HT_INFO_STBC_PARAM_PCO_PHASE ((u16) BIT(11))
|
||||
|
||||
|
||||
|
||||
/* #endif */
|
||||
|
||||
/* ===============WPS Section=============== */
|
||||
@ -1251,7 +1162,6 @@ typedef enum _HT_CAP_AMPDU_DENSITY {
|
||||
#define P2P_PRESENCE_RESPONSE 2
|
||||
#define P2P_GO_DISC_REQUEST 3
|
||||
|
||||
|
||||
#define P2P_MAX_PERSISTENT_GROUP_NUM 10
|
||||
|
||||
#define P2P_PROVISIONING_SCAN_CNT 3
|
||||
|
@ -15,10 +15,8 @@
|
||||
#ifndef __WLAN_BSSDEF_H__
|
||||
#define __WLAN_BSSDEF_H__
|
||||
|
||||
|
||||
#define MAX_IE_SZ 768
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NDIS_802_11_LENGTH_SSID 32
|
||||
@ -30,11 +28,9 @@ typedef long NDIS_802_11_RSSI; /* in dBm */
|
||||
typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */
|
||||
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
|
||||
|
||||
|
||||
typedef ULONG NDIS_802_11_KEY_INDEX;
|
||||
typedef unsigned long long NDIS_802_11_KEY_RSC;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_SSID {
|
||||
ULONG SsidLength;
|
||||
UCHAR Ssid[32];
|
||||
@ -55,7 +51,6 @@ typedef struct _NDIS_802_11_CONFIGURATION_FH {
|
||||
ULONG DwellTime; /* units are Kusec */
|
||||
} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
|
||||
|
||||
|
||||
/*
|
||||
FW will only save the channel number in DSConfig.
|
||||
ODI Handler will convert the channel number to freq. number.
|
||||
@ -68,8 +63,6 @@ typedef struct _NDIS_802_11_CONFIGURATION {
|
||||
NDIS_802_11_CONFIGURATION_FH FHConfig;
|
||||
} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
|
||||
|
||||
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
|
||||
Ndis802_11IBSS,
|
||||
Ndis802_11Infrastructure,
|
||||
@ -80,30 +73,19 @@ typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
|
||||
Ndis802_11_mesh,
|
||||
} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_FIXED_IEs {
|
||||
UCHAR Timestamp[8];
|
||||
USHORT BeaconInterval;
|
||||
USHORT Capabilities;
|
||||
} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_VARIABLE_IEs {
|
||||
UCHAR ElementID;
|
||||
UCHAR Length;
|
||||
UCHAR data[1];
|
||||
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
Length is the 4 bytes multiples of the sume of
|
||||
sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
|
||||
+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
|
||||
@ -111,8 +93,8 @@ Length is the 4 bytes multiples of the sume of
|
||||
|
||||
Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the
|
||||
partial sum.
|
||||
|
||||
*/
|
||||
|
||||
#if 0
|
||||
typedef struct _NDIS_WLAN_BSSID_EX {
|
||||
ULONG Length;
|
||||
@ -129,7 +111,6 @@ typedef struct _NDIS_WLAN_BSSID_EX {
|
||||
UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
|
||||
} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_BSSID_LIST_EX {
|
||||
ULONG NumberOfItems;
|
||||
NDIS_WLAN_BSSID_EX Bssid[1];
|
||||
@ -164,7 +145,6 @@ typedef enum _NDIS_802_11_WEP_STATUS {
|
||||
} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
|
||||
NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
|
||||
|
||||
|
||||
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
|
||||
#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
|
||||
@ -201,7 +181,6 @@ typedef enum _NDIS_802_11_RELOAD_DEFAULTS {
|
||||
Ndis802_11ReloadWEPKeys
|
||||
} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
|
||||
|
||||
|
||||
/* Key mapping keys require a BSSID */
|
||||
typedef struct _NDIS_802_11_KEY {
|
||||
ULONG Length; /* Length of this structure */
|
||||
@ -266,254 +245,8 @@ typedef struct _NDIS_802_11_TEST {
|
||||
} tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
|
||||
|
||||
#endif /* end of #ifdef PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
|
||||
#define NDIS_802_11_LENGTH_SSID 32
|
||||
#define NDIS_802_11_LENGTH_RATES 8
|
||||
#define NDIS_802_11_LENGTH_RATES_EX 16
|
||||
|
||||
typedef unsigned char NDIS_802_11_MAC_ADDRESS[ETH_ALEN];
|
||||
typedef long NDIS_802_11_RSSI; /* in dBm */
|
||||
typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */
|
||||
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
|
||||
|
||||
|
||||
typedef ULONG NDIS_802_11_KEY_INDEX;
|
||||
typedef unsigned long long NDIS_802_11_KEY_RSC;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_SSID {
|
||||
ULONG SsidLength;
|
||||
UCHAR Ssid[32];
|
||||
} NDIS_802_11_SSID, *PNDIS_802_11_SSID;
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_TYPE {
|
||||
Ndis802_11FH,
|
||||
Ndis802_11DS,
|
||||
Ndis802_11OFDM5,
|
||||
Ndis802_11OFDM24,
|
||||
Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */
|
||||
} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
|
||||
|
||||
typedef struct _NDIS_802_11_CONFIGURATION_FH {
|
||||
ULONG Length; /* Length of structure */
|
||||
ULONG HopPattern; /* As defined by 802.11, MSB set */
|
||||
ULONG HopSet; /* to one if non-802.11 */
|
||||
ULONG DwellTime; /* units are Kusec */
|
||||
} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
|
||||
|
||||
|
||||
/*
|
||||
FW will only save the channel number in DSConfig.
|
||||
ODI Handler will convert the channel number to freq. number.
|
||||
*/
|
||||
typedef struct _NDIS_802_11_CONFIGURATION {
|
||||
ULONG Length; /* Length of structure */
|
||||
ULONG BeaconPeriod; /* units are Kusec */
|
||||
ULONG ATIMWindow; /* units are Kusec */
|
||||
ULONG DSConfig; /* channel number */
|
||||
NDIS_802_11_CONFIGURATION_FH FHConfig;
|
||||
} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
|
||||
|
||||
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
|
||||
Ndis802_11IBSS,
|
||||
Ndis802_11Infrastructure,
|
||||
Ndis802_11AutoUnknown,
|
||||
Ndis802_11InfrastructureMax, /* Not a real value, defined as upper bound */
|
||||
Ndis802_11APMode
|
||||
} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_FIXED_IEs {
|
||||
UCHAR Timestamp[8];
|
||||
USHORT BeaconInterval;
|
||||
USHORT Capabilities;
|
||||
} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_VARIABLE_IEs {
|
||||
UCHAR ElementID;
|
||||
UCHAR Length;
|
||||
UCHAR data[1];
|
||||
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
Length is the 4 bytes multiples of the sume of
|
||||
sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
|
||||
+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
|
||||
+ sizeof (NDIS_802_11_RATES_EX) + IELength
|
||||
|
||||
Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the
|
||||
partial sum.
|
||||
|
||||
*/
|
||||
#if 0
|
||||
typedef struct _NDIS_WLAN_BSSID_EX {
|
||||
ULONG Length;
|
||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
||||
UCHAR Reserved[2];/* [0]: IS beacon frame, [1]:optimum_antenna=>For antenna diversity; */
|
||||
NDIS_802_11_SSID Ssid;
|
||||
ULONG Privacy;
|
||||
NDIS_802_11_RSSI Rssi;
|
||||
NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
||||
NDIS_802_11_CONFIGURATION Configuration;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
|
||||
NDIS_802_11_RATES_EX SupportedRates;
|
||||
ULONG IELength;
|
||||
UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
|
||||
} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_BSSID_LIST_EX {
|
||||
ULONG NumberOfItems;
|
||||
NDIS_WLAN_BSSID_EX Bssid[1];
|
||||
} NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
|
||||
#endif
|
||||
|
||||
typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
|
||||
Ndis802_11AuthModeOpen,
|
||||
Ndis802_11AuthModeShared,
|
||||
Ndis802_11AuthModeAutoSwitch,
|
||||
Ndis802_11AuthModeWPA,
|
||||
Ndis802_11AuthModeWPAPSK,
|
||||
Ndis802_11AuthModeWPANone,
|
||||
Ndis802_11AuthModeMax /* Not a real mode, defined as upper bound */
|
||||
} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
|
||||
|
||||
typedef enum _NDIS_802_11_WEP_STATUS {
|
||||
Ndis802_11WEPEnabled,
|
||||
Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
|
||||
Ndis802_11WEPDisabled,
|
||||
Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
|
||||
Ndis802_11WEPKeyAbsent,
|
||||
Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
|
||||
Ndis802_11WEPNotSupported,
|
||||
Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
|
||||
Ndis802_11Encryption2Enabled,
|
||||
Ndis802_11Encryption2KeyAbsent,
|
||||
Ndis802_11Encryption3Enabled,
|
||||
Ndis802_11Encryption3KeyAbsent
|
||||
} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
|
||||
NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
|
||||
|
||||
|
||||
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
|
||||
#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
|
||||
|
||||
#define NDIS_802_11_AI_RESFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_RESFI_STATUSCODE 2
|
||||
#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
|
||||
|
||||
typedef struct _NDIS_802_11_AI_REQFI {
|
||||
USHORT Capabilities;
|
||||
USHORT ListenInterval;
|
||||
NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
|
||||
} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
|
||||
|
||||
typedef struct _NDIS_802_11_AI_RESFI {
|
||||
USHORT Capabilities;
|
||||
USHORT StatusCode;
|
||||
USHORT AssociationId;
|
||||
} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
|
||||
|
||||
typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION {
|
||||
ULONG Length;
|
||||
USHORT AvailableRequestFixedIEs;
|
||||
NDIS_802_11_AI_REQFI RequestFixedIEs;
|
||||
ULONG RequestIELength;
|
||||
ULONG OffsetRequestIEs;
|
||||
USHORT AvailableResponseFixedIEs;
|
||||
NDIS_802_11_AI_RESFI ResponseFixedIEs;
|
||||
ULONG ResponseIELength;
|
||||
ULONG OffsetResponseIEs;
|
||||
} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
|
||||
|
||||
typedef enum _NDIS_802_11_RELOAD_DEFAULTS {
|
||||
Ndis802_11ReloadWEPKeys
|
||||
} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
|
||||
|
||||
|
||||
/* Key mapping keys require a BSSID */
|
||||
typedef struct _NDIS_802_11_KEY {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex;
|
||||
ULONG KeyLength; /* length of key in bytes */
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
NDIS_802_11_KEY_RSC KeyRSC;
|
||||
UCHAR KeyMaterial[32]; /* variable length depending on above field */
|
||||
} NDIS_802_11_KEY, *PNDIS_802_11_KEY;
|
||||
|
||||
typedef struct _NDIS_802_11_REMOVE_KEY {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex;
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
|
||||
|
||||
typedef struct _NDIS_802_11_WEP {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex; /* 0 is the per-client key, 1-N are the global keys */
|
||||
ULONG KeyLength; /* length of key in bytes */
|
||||
UCHAR KeyMaterial[16];/* variable length depending on above field */
|
||||
} NDIS_802_11_WEP, *PNDIS_802_11_WEP;
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST {
|
||||
ULONG Length; /* Length of structure */
|
||||
NDIS_802_11_MAC_ADDRESS Bssid;
|
||||
ULONG Flags;
|
||||
} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
|
||||
|
||||
typedef enum _NDIS_802_11_STATUS_TYPE {
|
||||
Ndis802_11StatusType_Authentication,
|
||||
Ndis802_11StatusType_MediaStreamMode,
|
||||
Ndis802_11StatusType_PMKID_CandidateList,
|
||||
Ndis802_11StatusTypeMax /* not a real type, defined as an upper bound */
|
||||
} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
|
||||
|
||||
typedef struct _NDIS_802_11_STATUS_INDICATION {
|
||||
NDIS_802_11_STATUS_TYPE StatusType;
|
||||
} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
|
||||
|
||||
/* mask for authentication/integrity fields */
|
||||
#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
|
||||
#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
|
||||
#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
|
||||
#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
|
||||
#define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
|
||||
|
||||
/* MIC check time, 60 seconds. */
|
||||
#define MIC_CHECK_TIME 60000000
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_EVENT {
|
||||
NDIS_802_11_STATUS_INDICATION Status;
|
||||
NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
|
||||
} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
|
||||
|
||||
typedef struct _NDIS_802_11_TEST {
|
||||
ULONG Length;
|
||||
ULONG Type;
|
||||
union {
|
||||
NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
|
||||
NDIS_802_11_RSSI RssiTrigger;
|
||||
} tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
|
||||
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
#ifndef Ndis802_11APMode
|
||||
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
||||
#endif
|
||||
@ -553,10 +286,7 @@ enum bss_type {
|
||||
/* temporally add #pragma pack for structure alignment issue of
|
||||
* WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz()
|
||||
*/
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
typedef struct _WLAN_BSSID_EX {
|
||||
ULONG Length;
|
||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
||||
@ -573,13 +303,8 @@ typedef struct _WLAN_BSSID_EX {
|
||||
ULONG IELength;
|
||||
UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
|
||||
}
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
__attribute__((packed))
|
||||
#endif
|
||||
WLAN_BSSID_EX, *PWLAN_BSSID_EX;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#define BSS_EX_IES(bss_ex) ((bss_ex)->IEs)
|
||||
#define BSS_EX_IES_LEN(bss_ex) ((bss_ex)->IELength)
|
||||
@ -627,9 +352,6 @@ struct wlan_network {
|
||||
int aid; /* will only be valid when a BSS is joinned. */
|
||||
int join_res;
|
||||
WLAN_BSSID_EX network; /* must be the last item */
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
unsigned char iebuf[MAX_IE_SZ];
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
@ -645,16 +367,12 @@ enum VCS_TYPE {
|
||||
CTS_TO_SELF
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#define PWR_CAM 0
|
||||
#define PWR_MINPS 1
|
||||
#define PWR_MAXPS 2
|
||||
#define PWR_UAPSD 3
|
||||
#define PWR_VOIP 4
|
||||
|
||||
|
||||
enum UAPSD_MAX_SP {
|
||||
NO_LIMIT,
|
||||
TWO_MSDU,
|
||||
@ -662,7 +380,6 @@ enum UAPSD_MAX_SP {
|
||||
SIX_MSDU
|
||||
};
|
||||
|
||||
|
||||
/* john */
|
||||
#define NUM_PRE_AUTH_KEY 16
|
||||
#define NUM_PMKID_CACHE NUM_PRE_AUTH_KEY
|
||||
@ -671,34 +388,4 @@ enum UAPSD_MAX_SP {
|
||||
* WPA2
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_OS_CE
|
||||
typedef struct _PMKID_CANDIDATE {
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
ULONG Flags;
|
||||
} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
|
||||
|
||||
typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST {
|
||||
ULONG Version; /* Version of the structure */
|
||||
ULONG NumCandidates; /* No. of pmkid candidates */
|
||||
PMKID_CANDIDATE CandidateList[1];
|
||||
} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION {
|
||||
NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
|
||||
NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
|
||||
|
||||
} NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
|
||||
|
||||
typedef struct _NDIS_802_11_CAPABILITY {
|
||||
ULONG Length;
|
||||
ULONG Version;
|
||||
ULONG NoOfPMKIDs;
|
||||
ULONG NoOfAuthEncryptPairsSupported;
|
||||
NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
|
||||
|
||||
} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* #ifndef WLAN_BSSDEF_H_ */
|
||||
|
@ -15,7 +15,6 @@
|
||||
#ifndef __XMIT_OSDEP_H_
|
||||
#define __XMIT_OSDEP_H_
|
||||
|
||||
|
||||
struct pkt_file {
|
||||
_pkt *pkt;
|
||||
SIZE_T pkt_len; /* the remainder length of the open_file */
|
||||
@ -25,38 +24,6 @@ struct pkt_file {
|
||||
SIZE_T buf_len;
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb.h>
|
||||
#include <usbdlib.h>
|
||||
#include <usbioctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#define NR_XMITFRAME 64
|
||||
#else
|
||||
#define NR_XMITFRAME 128
|
||||
#endif
|
||||
|
||||
#define ETH_ALEN 6
|
||||
|
||||
extern NDIS_STATUS rtw_xmit_entry(
|
||||
IN _nic_hdl cnxt,
|
||||
IN NDIS_PACKET *pkt,
|
||||
IN UINT flags
|
||||
);
|
||||
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
#define NR_XMITFRAME 256
|
||||
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
extern void rtw_xmit_entry_wrap(struct ifnet *pifp);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
#define NR_XMITFRAME 256
|
||||
|
@ -17,13 +17,6 @@
|
||||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
|
||||
MODULE_AUTHOR("Realtek Semiconductor Corp.");
|
||||
@ -79,7 +72,6 @@ int rtw_scan_mode = 1;/* active, passive */
|
||||
int rtw_lps_chk_by_tp = 0;
|
||||
#endif /* CONFIG_POWER_SAVING */
|
||||
|
||||
|
||||
module_param(rtw_ips_mode, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_ips_mode, "The default IPS mode");
|
||||
|
||||
@ -88,7 +80,7 @@ MODULE_PARM_DESC(rtw_lps_level, "The default LPS level");
|
||||
|
||||
module_param(rtw_lps_chk_by_tp, int, 0644);
|
||||
|
||||
/* LPS:
|
||||
/* LPS:
|
||||
* rtw_smart_ps = 0 => TX: pwr bit = 1, RX: PS_Poll
|
||||
* rtw_smart_ps = 1 => TX: pwr bit = 0, RX: PS_Poll
|
||||
* rtw_smart_ps = 2 => TX: pwr bit = 0, RX: NullData with pwr bit = 0
|
||||
@ -97,8 +89,8 @@ int rtw_smart_ps = 2;
|
||||
|
||||
int rtw_max_bss_cnt = 0;
|
||||
module_param(rtw_max_bss_cnt, int, 0644);
|
||||
#ifdef CONFIG_WMMPS_STA
|
||||
/* WMMPS:
|
||||
#ifdef CONFIG_WMMPS_STA
|
||||
/* WMMPS:
|
||||
* rtw_smart_ps = 0 => Only for fw test
|
||||
* rtw_smart_ps = 1 => Refer to Beacon's TIM Bitmap
|
||||
* rtw_smart_ps = 2 => Don't refer to Beacon's TIM Bitmap
|
||||
@ -194,7 +186,7 @@ int rtw_bw_mode = 0x21;
|
||||
#endif
|
||||
int rtw_ampdu_enable = 1;/* for enable tx_ampdu , */ /* 0: disable, 0x1:enable */
|
||||
int rtw_rx_stbc = 1;/* 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ */
|
||||
#if (defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822B)) && defined(CONFIG_PCI_HCI)
|
||||
#if (defined(CONFIG_RTL8814A) && defined(CONFIG_PCI_HCI))
|
||||
int rtw_rx_ampdu_amsdu = 2;/* 0: disabled, 1:enabled, 2:auto . There is an IOT issu with DLINK DIR-629 when the flag turn on */
|
||||
#elif (defined(CONFIG_RTL8822B) && defined(CONFIG_SDIO_HCI))
|
||||
int rtw_rx_ampdu_amsdu = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user