mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 15:39:38 +00:00
rtl8188eu: Fix Sparse warnings in core/rtw_mlme_ext.c
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
202d20077c
commit
8db176767f
17 changed files with 725 additions and 879 deletions
|
@ -849,7 +849,6 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
// forward unknow IP packet to upper TCP/IP
|
||||
DEBUG_INFO("NAT25: Replace DA with BR's MAC\n");
|
||||
if ( (*(u32 *)priv->br_mac) == 0 && (*(u16 *)(priv->br_mac+4)) == 0 ) {
|
||||
void netdev_br_init(struct net_device *netdev);
|
||||
printk("Re-init netdev_br_init() due to br_mac==0!\n");
|
||||
netdev_br_init(priv->pnetdev);
|
||||
}
|
||||
|
|
|
@ -1313,7 +1313,6 @@ u8 convert_ip_addr(u8 hch, u8 mch, u8 lch)
|
|||
return ((key_char2num(hch) * 100) + (key_char2num(mch) * 10 ) + key_char2num(lch));
|
||||
}
|
||||
|
||||
extern char* rtw_initmac;
|
||||
void rtw_macaddr_cfg(u8 *mac_addr)
|
||||
{
|
||||
u8 mac[ETH_ALEN];
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -22,6 +22,7 @@
|
|||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <recv_osdep.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
|
@ -118,11 +119,6 @@ extern void autosuspend_enter(struct adapter* padapter);
|
|||
extern int autoresume_enter(struct adapter* padapter);
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
int rtw_hw_suspend(struct adapter *padapter );
|
||||
int rtw_hw_resume(struct adapter *padapter);
|
||||
#endif
|
||||
|
||||
bool rtw_pwr_unassociated_idle(struct adapter *adapter)
|
||||
{
|
||||
struct adapter *buddy = adapter->pbuddy_adapter;
|
||||
|
|
|
@ -45,15 +45,6 @@ static unsigned char EPIGRAM_OUI[] = {0x00, 0x90, 0x4c};
|
|||
|
||||
unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
|
||||
|
||||
extern unsigned char MCS_rate_2R[16];
|
||||
#ifdef CONFIG_DISABLE_MCS13TO15
|
||||
extern unsigned char MCS_rate_2R_MCS13TO15_OFF[16];
|
||||
#endif //CONFIG_DISABLE_MCS13TO15
|
||||
extern unsigned char MCS_rate_1R[16];
|
||||
extern unsigned char RTW_WPA_OUI[];
|
||||
extern unsigned char WPA_TKIP_CIPHER[4];
|
||||
extern unsigned char RSN_TKIP_CIPHER[4];
|
||||
|
||||
#define R2T_PHY_DELAY (0)
|
||||
|
||||
//#define WAIT_FOR_BCN_TO_MIN (3000)
|
||||
|
|
|
@ -304,44 +304,44 @@ struct ieee_ibss_seq {
|
|||
};
|
||||
|
||||
struct rtw_ieee80211_hdr {
|
||||
u16 frame_ctl;
|
||||
u16 duration_id;
|
||||
__le16 frame_ctl;
|
||||
__le16 duration_id;
|
||||
u8 addr1[ETH_ALEN];
|
||||
u8 addr2[ETH_ALEN];
|
||||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
__le16 seq_ctl;
|
||||
u8 addr4[ETH_ALEN];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rtw_ieee80211_hdr_3addr {
|
||||
u16 frame_ctl;
|
||||
u16 duration_id;
|
||||
__le16 frame_ctl;
|
||||
__le16 duration_id;
|
||||
u8 addr1[ETH_ALEN];
|
||||
u8 addr2[ETH_ALEN];
|
||||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
__le16 seq_ctl;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
struct rtw_ieee80211_hdr_qos {
|
||||
u16 frame_ctl;
|
||||
u16 duration_id;
|
||||
__le16 frame_ctl;
|
||||
__le16 duration_id;
|
||||
u8 addr1[ETH_ALEN];
|
||||
u8 addr2[ETH_ALEN];
|
||||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
__le16 seq_ctl;
|
||||
u8 addr4[ETH_ALEN];
|
||||
u16 qc;
|
||||
__le16 qc;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct rtw_ieee80211_hdr_3addr_qos {
|
||||
u16 frame_ctl;
|
||||
__le16 frame_ctl;
|
||||
u16 duration_id;
|
||||
u8 addr1[ETH_ALEN];
|
||||
u8 addr2[ETH_ALEN];
|
||||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
u16 qc;
|
||||
__le16 seq_ctl;
|
||||
__le16 qc;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct eapol {
|
||||
|
|
|
@ -101,7 +101,35 @@
|
|||
#include <linux/pci.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
extern int rtw_mc2u_disable;
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
extern char* rtw_initmac;
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
extern int rtw_ht_enable;
|
||||
extern int rtw_cbw40_enable;
|
||||
extern int rtw_ampdu_enable;//for enable tx_ampdu
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GLOBAL_UI_PID
|
||||
extern int ui_pid[3];
|
||||
#endif
|
||||
|
||||
extern unsigned char MCS_rate_2R[16];
|
||||
#ifdef CONFIG_DISABLE_MCS13TO15
|
||||
extern unsigned char MCS_rate_2R_MCS13TO15_OFF[16];
|
||||
#endif //CONFIG_DISABLE_MCS13TO15
|
||||
extern unsigned char MCS_rate_1R[16];
|
||||
extern unsigned char RTW_WPA_OUI[];
|
||||
extern unsigned char WPA_TKIP_CIPHER[4];
|
||||
extern unsigned char RSN_TKIP_CIPHER[4];
|
||||
|
||||
struct dvobj_priv;
|
||||
extern void rtw_unregister_netdevs(struct dvobj_priv *dvobj);
|
||||
extern int pm_netdev_open(struct net_device *pnetdev,u8 bnormal);
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
typedef struct urb * PURB;
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22))
|
||||
|
|
|
@ -25,6 +25,12 @@
|
|||
#include <drv_types.h>
|
||||
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
int rtw_hw_suspend(struct adapter *padapter );
|
||||
int rtw_hw_resume(struct adapter *padapter);
|
||||
#endif
|
||||
|
||||
extern void rtw_dev_unload(struct adapter *padapter);
|
||||
extern sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
|
||||
extern void _rtw_free_recv_priv (struct recv_priv *precvpriv);
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ struct br_ext_info {
|
|||
};
|
||||
|
||||
void nat25_db_cleanup(struct adapter *priv);
|
||||
void netdev_br_init(struct net_device *netdev);
|
||||
|
||||
#endif // _RTW_BR_EXT_H_
|
||||
|
||||
|
|
|
@ -1086,7 +1086,7 @@ enum rtw_h2c_cmd
|
|||
#define _SetRFReg_CMD_ _Write_RFREG_CMD_
|
||||
|
||||
#ifdef _RTW_CMD_C_
|
||||
struct _cmd_callback rtw_cmd_callback[] =
|
||||
static struct _cmd_callback rtw_cmd_callback[] =
|
||||
{
|
||||
{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
|
||||
{GEN_CMD_CODE(_Write_MACREG), NULL},
|
||||
|
|
|
@ -706,7 +706,6 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int
|
|||
int issue_deauth(struct adapter *padapter, unsigned char *da, unsigned short reason);
|
||||
int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int try_cnt, int wait_ms);
|
||||
void issue_action_spct_ch_switch(struct adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset);
|
||||
void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status);
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
void issue_action_SA_Query(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short tid);
|
||||
#endif //CONFIG_IEEE80211W
|
||||
|
@ -851,8 +850,7 @@ u8 tdls_hdl(struct adapter *padapter, unsigned char *pbuf);
|
|||
|
||||
#ifdef _RTW_CMD_C_
|
||||
|
||||
struct cmd_hdl wlancmds[] =
|
||||
{
|
||||
static struct cmd_hdl wlancmds[] = {
|
||||
GEN_DRV_CMD_HANDLER(0, NULL) /*0*/
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
|
|
388
include/wifi.h
388
include/wifi.h
|
@ -253,180 +253,153 @@ enum WIFI_REG_DOMAIN {
|
|||
#define _ORDER_ BIT(15)
|
||||
|
||||
#define SetToDs(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
|
||||
|
||||
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
|
||||
|
||||
#define ClearToDs(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
|
||||
|
||||
#define SetFrDs(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
|
||||
|
||||
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
|
||||
|
||||
#define ClearFrDs(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
|
||||
} while (0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))
|
||||
|
||||
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
|
||||
|
||||
|
||||
#define SetMFrag(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
|
||||
} while (0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)
|
||||
|
||||
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
|
||||
|
||||
#define ClearMFrag(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
|
||||
} while (0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
|
||||
|
||||
#define SetRetry(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_); \
|
||||
} while (0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
|
||||
|
||||
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
|
||||
|
||||
#define ClearRetry(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
|
||||
} while (0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
|
||||
|
||||
#define SetPwrMgt(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
|
||||
} while (0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
|
||||
|
||||
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
|
||||
|
||||
#define ClearPwrMgt(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
|
||||
|
||||
#define SetMData(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
|
||||
|
||||
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
|
||||
|
||||
#define ClearMData(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
|
||||
|
||||
#define SetPrivacy(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
|
||||
|
||||
#define GetPrivacy(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
|
||||
#define GetPrivacy(pbuf) \
|
||||
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
|
||||
|
||||
#define ClearPrivacy(pbuf) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))
|
||||
|
||||
|
||||
#define GetOrder(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
|
||||
#define GetOrder(pbuf) \
|
||||
(((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
|
||||
|
||||
#define GetFrameType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
#define GetFrameType(pbuf) \
|
||||
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
|
||||
#define SetFrameType(pbuf,type) \
|
||||
#define SetFrameType(pbuf, type) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
|
||||
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
|
||||
} while (0)
|
||||
|
||||
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
|
||||
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
|
||||
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
|
||||
|
||||
#define SetFrameSubType(pbuf,type) \
|
||||
#define SetFrameSubType(pbuf, type) \
|
||||
do { \
|
||||
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
|
||||
*(__le16 *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | \
|
||||
BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(type); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define GetSequence(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) >> 4)
|
||||
#define GetSequence(pbuf) \
|
||||
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
|
||||
|
||||
#define GetFragNum(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) & 0x0f)
|
||||
#define GetFragNum(pbuf) \
|
||||
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)
|
||||
|
||||
#define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)))
|
||||
#define GetTupleCache(pbuf) \
|
||||
(cpu_to_le16(*(unsigned short *)((size_t)(pbuf) + 22)))
|
||||
|
||||
#define SetFragNum(pbuf, num) \
|
||||
do { \
|
||||
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \
|
||||
*(unsigned short *)((size_t)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((size_t)(pbuf) + 22)) & \
|
||||
le16_to_cpu(~(0x000f))) | \
|
||||
cpu_to_le16(0x0f & (num)); \
|
||||
} while (0)
|
||||
|
||||
#define SetSeqNum(pbuf, num) \
|
||||
do { \
|
||||
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu((unsigned short)~0xfff0)) | \
|
||||
le16_to_cpu((unsigned short)(0xfff0 & (num << 4))); \
|
||||
} while(0)
|
||||
*(__le16 *)((size_t)(pbuf) + 22) = \
|
||||
((*(__le16 *)((size_t)(pbuf) + 22)) & cpu_to_le16((unsigned short)0x000f)) | \
|
||||
cpu_to_le16((unsigned short)(0xfff0 & (num << 4))); \
|
||||
} while (0)
|
||||
|
||||
#define SetDuration(pbuf, dur) \
|
||||
do { \
|
||||
*(unsigned short *)((SIZE_PTR)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
|
||||
} while(0)
|
||||
*(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
|
||||
|
||||
|
||||
#define SetPriority(pbuf, tid) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(tid & 0xf); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
|
||||
|
||||
#define GetPriority(pbuf) ((le16_to_cpu(*(unsigned short *)(pbuf))) & 0xf)
|
||||
#define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
|
||||
|
||||
#define SetEOSP(pbuf, eosp) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16( (eosp & 1) << 4); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
|
||||
|
||||
#define SetAckpolicy(pbuf, ack) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16( (ack & 3) << 5); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
|
||||
|
||||
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(unsigned short *)pbuf)) >> 5) & 0x3)
|
||||
#define GetAckpolicy(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 5) & 0x3)
|
||||
|
||||
#define GetAMsdu(pbuf) (((le16_to_cpu(*(unsigned short *)pbuf)) >> 7) & 0x1)
|
||||
#define GetAMsdu(pbuf) (((le16_to_cpu(*(__le16 *)pbuf)) >> 7) & 0x1)
|
||||
|
||||
#define SetAMsdu(pbuf, amsdu) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16( (amsdu & 1) << 7); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
|
||||
|
||||
#define GetAid(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 2)) & 0x3fff)
|
||||
#define GetAid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 2)) & 0x3fff)
|
||||
|
||||
#define GetTid(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + (((GetToDs(pbuf)<<1)|GetFrDs(pbuf))==3?30:24))) & 0x000f)
|
||||
#define GetTid(pbuf) (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + \
|
||||
(((GetToDs(pbuf)<<1) | GetFrDs(pbuf)) == 3 ? \
|
||||
30 : 24))) & 0x000f)
|
||||
|
||||
#define GetAddr1Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 4))
|
||||
#define GetAddr1Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 4))
|
||||
|
||||
#define GetAddr2Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 10))
|
||||
#define GetAddr2Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 10))
|
||||
|
||||
#define GetAddr3Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 16))
|
||||
#define GetAddr3Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 16))
|
||||
|
||||
#define GetAddr4Ptr(pbuf) ((unsigned char *)((SIZE_PTR)(pbuf) + 24))
|
||||
#define GetAddr4Ptr(pbuf) ((unsigned char *)((size_t)(pbuf) + 24))
|
||||
|
||||
#define MacAddr_isBcst(addr) \
|
||||
( \
|
||||
( (addr[0] == 0xff) && (addr[1] == 0xff) && \
|
||||
(addr[2] == 0xff) && (addr[3] == 0xff) && \
|
||||
(addr[4] == 0xff) && (addr[5] == 0xff) ) ? _TRUE : _FALSE \
|
||||
( \
|
||||
((addr[0] == 0xff) && (addr[1] == 0xff) && \
|
||||
(addr[2] == 0xff) && (addr[3] == 0xff) && \
|
||||
(addr[4] == 0xff) && (addr[5] == 0xff)) ? true : false \
|
||||
)
|
||||
|
||||
__inline static int IS_MCAST(unsigned char *da)
|
||||
|
@ -664,12 +637,12 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe)
|
|||
* described in 802.11n draft section 7.2.1.7.1
|
||||
*/
|
||||
struct rtw_ieee80211_bar {
|
||||
unsigned short frame_control;
|
||||
unsigned short duration;
|
||||
unsigned char ra[6];
|
||||
unsigned char ta[6];
|
||||
unsigned short control;
|
||||
unsigned short start_seq_num;
|
||||
__le16 frame_control;
|
||||
u8 duration;
|
||||
u8 ra[6];
|
||||
u8 ta[6];
|
||||
__le16 control;
|
||||
__le16 start_seq_num;
|
||||
} __attribute__((packed));
|
||||
|
||||
/* 802.11 BAR control masks */
|
||||
|
@ -684,12 +657,12 @@ struct rtw_ieee80211_bar {
|
|||
*/
|
||||
|
||||
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;
|
||||
__le16 cap_info;
|
||||
u8 ampdu_params_info;
|
||||
u8 supp_mcs_set[16];
|
||||
__le16 extended_ht_cap_info;
|
||||
__le32 tx_BF_cap_info;
|
||||
u8 antenna_selection_info;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/**
|
||||
|
@ -699,54 +672,47 @@ struct rtw_ieee80211_ht_cap {
|
|||
* described in 802.11n draft section 7.3.2.53
|
||||
*/
|
||||
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];
|
||||
u8 control_chan;
|
||||
u8 ht_param;
|
||||
__le16 operation_mode;
|
||||
__le16 stbc_param;
|
||||
u8 basic_set[16];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
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;
|
||||
struct HT_caps_element {
|
||||
union {
|
||||
struct {
|
||||
__le16 HT_caps_info;
|
||||
u8 AMPDU_para;
|
||||
u8 MCS_rate[16];
|
||||
__le16 HT_ext_caps;
|
||||
__le32 Beamforming_caps;
|
||||
u8 ASEL_caps;
|
||||
} HT_cap_element;
|
||||
unsigned char HT_cap[26];
|
||||
}u;
|
||||
u8 HT_cap[26];
|
||||
} u;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct HT_info_element
|
||||
{
|
||||
unsigned char primary_channel;
|
||||
unsigned char infos[5];
|
||||
unsigned char MCS_rate[16];
|
||||
struct HT_info_element {
|
||||
u8 primary_channel;
|
||||
u8 infos[5];
|
||||
u8 MCS_rate[16];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct AC_param
|
||||
{
|
||||
struct AC_param {
|
||||
u8 ACI_AIFSN;
|
||||
u8 CW;
|
||||
__le16 TXOP_limit;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct WMM_para_element
|
||||
{
|
||||
unsigned char QoS_info;
|
||||
unsigned char reserved;
|
||||
struct WMM_para_element {
|
||||
u8 QoS_info;
|
||||
u8 reserved;
|
||||
struct AC_param ac_param[4];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct ADDBA_request
|
||||
{
|
||||
struct ADDBA_request {
|
||||
u8 dialog_token;
|
||||
__le16 BA_para_set;
|
||||
__le16 BA_timeout_value;
|
||||
|
@ -766,7 +732,7 @@ typedef enum _HT_CAP_AMPDU_FACTOR {
|
|||
#define IEEE80211_HT_CAP_GRN_FLD 0x0010
|
||||
#define IEEE80211_HT_CAP_SGI_20 0x0020
|
||||
#define IEEE80211_HT_CAP_SGI_40 0x0040
|
||||
#define IEEE80211_HT_CAP_TX_STBC 0x0080
|
||||
#define IEEE80211_HT_CAP_TX_STBC 0x0080
|
||||
#define IEEE80211_HT_CAP_RX_STBC 0x0300
|
||||
#define IEEE80211_HT_CAP_DELAY_BA 0x0400
|
||||
#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
|
||||
|
@ -794,11 +760,11 @@ typedef enum _HT_CAP_AMPDU_FACTOR {
|
|||
#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010
|
||||
|
||||
/* block-ack parameters */
|
||||
#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
|
||||
#define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C
|
||||
#define IEEE80211_ADDBA_PARAM_POLICY_MASK 0x0002
|
||||
#define IEEE80211_ADDBA_PARAM_TID_MASK 0x003C
|
||||
#define RTW_IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK 0xFFC0
|
||||
#define IEEE80211_DELBA_PARAM_TID_MASK 0xF000
|
||||
#define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800
|
||||
#define IEEE80211_DELBA_PARAM_TID_MASK 0xF000
|
||||
#define IEEE80211_DELBA_PARAM_INITIATOR_MASK 0x0800
|
||||
|
||||
/*
|
||||
* A-PMDU buffer sizes
|
||||
|
@ -978,51 +944,51 @@ typedef enum _HT_CAP_AMPDU_FACTOR {
|
|||
#define P2P_INVITATION_FLAGS_PERSISTENT BIT(0)
|
||||
|
||||
#define DMP_P2P_DEVCAP_SUPPORT (P2P_DEVCAP_SERVICE_DISCOVERY | \
|
||||
P2P_DEVCAP_CLIENT_DISCOVERABILITY | \
|
||||
P2P_DEVCAP_CONCURRENT_OPERATION | \
|
||||
P2P_DEVCAP_INVITATION_PROC)
|
||||
P2P_DEVCAP_CLIENT_DISCOVERABILITY | \
|
||||
P2P_DEVCAP_CONCURRENT_OPERATION | \
|
||||
P2P_DEVCAP_INVITATION_PROC)
|
||||
|
||||
#define DMP_P2P_GRPCAP_SUPPORT (P2P_GRPCAP_INTRABSS)
|
||||
|
||||
// Value of Device Capability Bitmap
|
||||
#define P2P_DEVCAP_SERVICE_DISCOVERY BIT(0)
|
||||
#define P2P_DEVCAP_CLIENT_DISCOVERABILITY BIT(1)
|
||||
#define P2P_DEVCAP_SERVICE_DISCOVERY BIT(0)
|
||||
#define P2P_DEVCAP_CLIENT_DISCOVERABILITY BIT(1)
|
||||
#define P2P_DEVCAP_CONCURRENT_OPERATION BIT(2)
|
||||
#define P2P_DEVCAP_INFRA_MANAGED BIT(3)
|
||||
#define P2P_DEVCAP_DEVICE_LIMIT BIT(4)
|
||||
#define P2P_DEVCAP_INVITATION_PROC BIT(5)
|
||||
|
||||
// Value of Group Capability Bitmap
|
||||
#define P2P_GRPCAP_GO BIT(0)
|
||||
#define P2P_GRPCAP_GO BIT(0)
|
||||
#define P2P_GRPCAP_PERSISTENT_GROUP BIT(1)
|
||||
#define P2P_GRPCAP_GROUP_LIMIT BIT(2)
|
||||
#define P2P_GRPCAP_INTRABSS BIT(3)
|
||||
#define P2P_GRPCAP_INTRABSS BIT(3)
|
||||
#define P2P_GRPCAP_CROSS_CONN BIT(4)
|
||||
#define P2P_GRPCAP_PERSISTENT_RECONN BIT(5)
|
||||
#define P2P_GRPCAP_PERSISTENT_RECONN BIT(5)
|
||||
#define P2P_GRPCAP_GROUP_FORMATION BIT(6)
|
||||
|
||||
// P2P Public Action Frame ( Management Frame )
|
||||
#define P2P_PUB_ACTION_ACTION 0x09
|
||||
|
||||
// P2P Public Action Frame Type
|
||||
#define P2P_GO_NEGO_REQ 0
|
||||
#define P2P_GO_NEGO_RESP 1
|
||||
#define P2P_GO_NEGO_CONF 2
|
||||
#define P2P_INVIT_REQ 3
|
||||
#define P2P_INVIT_RESP 4
|
||||
#define P2P_DEVDISC_REQ 5
|
||||
#define P2P_DEVDISC_RESP 6
|
||||
#define P2P_GO_NEGO_REQ 0
|
||||
#define P2P_GO_NEGO_RESP 1
|
||||
#define P2P_GO_NEGO_CONF 2
|
||||
#define P2P_INVIT_REQ 3
|
||||
#define P2P_INVIT_RESP 4
|
||||
#define P2P_DEVDISC_REQ 5
|
||||
#define P2P_DEVDISC_RESP 6
|
||||
#define P2P_PROVISION_DISC_REQ 7
|
||||
#define P2P_PROVISION_DISC_RESP 8
|
||||
|
||||
// P2P Action Frame Type
|
||||
#define P2P_NOTICE_OF_ABSENCE 0
|
||||
#define P2P_PRESENCE_REQUEST 1
|
||||
#define P2P_PRESENCE_RESPONSE 2
|
||||
#define P2P_GO_DISC_REQUEST 3
|
||||
#define P2P_NOTICE_OF_ABSENCE 0
|
||||
#define P2P_PRESENCE_REQUEST 1
|
||||
#define P2P_PRESENCE_RESPONSE 2
|
||||
#define P2P_GO_DISC_REQUEST 3
|
||||
|
||||
|
||||
#define P2P_MAX_PERSISTENT_GROUP_NUM 10
|
||||
#define P2P_MAX_PERSISTENT_GROUP_NUM 10
|
||||
|
||||
#define P2P_PROVISIONING_SCAN_CNT 3
|
||||
|
||||
|
@ -1031,30 +997,30 @@ typedef enum _HT_CAP_AMPDU_FACTOR {
|
|||
#define P2P_FINDPHASE_EX_NONE 0 // default value, used when: (1)p2p disabed or (2)p2p enabled but only do 1 scan phase
|
||||
#define P2P_FINDPHASE_EX_FULL 1 // used when p2p enabled and want to do 1 scan phase and P2P_FINDPHASE_EX_MAX-1 find phase
|
||||
#define P2P_FINDPHASE_EX_SOCIAL_FIRST (P2P_FINDPHASE_EX_FULL+1)
|
||||
#define P2P_FINDPHASE_EX_MAX 4
|
||||
#define P2P_FINDPHASE_EX_MAX 4
|
||||
#define P2P_FINDPHASE_EX_SOCIAL_LAST P2P_FINDPHASE_EX_MAX
|
||||
|
||||
#define P2P_PROVISION_TIMEOUT 5000 // 5 seconds timeout for sending the provision discovery request
|
||||
#define P2P_CONCURRENT_PROVISION_TIMEOUT 3000 // 3 seconds timeout for sending the provision discovery request under concurrent mode
|
||||
#define P2P_GO_NEGO_TIMEOUT 5000 // 5 seconds timeout for receiving the group negotation response
|
||||
#define P2P_CONCURRENT_GO_NEGO_TIMEOUT 3000 // 3 seconds timeout for sending the negotiation request under concurrent mode
|
||||
#define P2P_CONCURRENT_PROVISION_TIMEOUT 3000 // 3 seconds timeout for sending the provision discovery request under concurrent mode
|
||||
#define P2P_GO_NEGO_TIMEOUT 5000 // 5 seconds timeout for receiving the group negotation response
|
||||
#define P2P_CONCURRENT_GO_NEGO_TIMEOUT 3000 // 3 seconds timeout for sending the negotiation request under concurrent mode
|
||||
#define P2P_TX_PRESCAN_TIMEOUT 100 // 100ms
|
||||
#define P2P_INVITE_TIMEOUT 5000 // 5 seconds timeout for sending the invitation request
|
||||
#define P2P_CONCURRENT_INVITE_TIMEOUT 3000 // 3 seconds timeout for sending the invitation request under concurrent mode
|
||||
#define P2P_RESET_SCAN_CH 25000 // 25 seconds timeout to reset the scan channel ( based on channel plan )
|
||||
#define P2P_MAX_INTENT 15
|
||||
#define P2P_INVITE_TIMEOUT 5000 // 5 seconds timeout for sending the invitation request
|
||||
#define P2P_CONCURRENT_INVITE_TIMEOUT 3000 // 3 seconds timeout for sending the invitation request under concurrent mode
|
||||
#define P2P_RESET_SCAN_CH 25000 // 25 seconds timeout to reset the scan channel ( based on channel plan )
|
||||
#define P2P_MAX_INTENT 15
|
||||
|
||||
#define P2P_MAX_NOA_NUM 2
|
||||
#define P2P_MAX_NOA_NUM 2
|
||||
|
||||
// WPS Configuration Method
|
||||
#define WPS_CM_NONE 0x0000
|
||||
#define WPS_CM_LABEL 0x0004
|
||||
#define WPS_CM_DISPLYA 0x0008
|
||||
#define WPS_CM_NONE 0x0000
|
||||
#define WPS_CM_LABEL 0x0004
|
||||
#define WPS_CM_DISPLYA 0x0008
|
||||
#define WPS_CM_EXTERNAL_NFC_TOKEN 0x0010
|
||||
#define WPS_CM_INTEGRATED_NFC_TOKEN 0x0020
|
||||
#define WPS_CM_NFC_INTERFACE 0x0040
|
||||
#define WPS_CM_PUSH_BUTTON 0x0080
|
||||
#define WPS_CM_KEYPAD 0x0100
|
||||
#define WPS_CM_INTEGRATED_NFC_TOKEN 0x0020
|
||||
#define WPS_CM_NFC_INTERFACE 0x0040
|
||||
#define WPS_CM_PUSH_BUTTON 0x0080
|
||||
#define WPS_CM_KEYPAD 0x0100
|
||||
#define WPS_CM_SW_PUHS_BUTTON 0x0280
|
||||
#define WPS_CM_HW_PUHS_BUTTON 0x0480
|
||||
#define WPS_CM_SW_DISPLAY_PIN 0x2008
|
||||
|
@ -1068,42 +1034,41 @@ enum P2P_ROLE {
|
|||
};
|
||||
|
||||
enum P2P_STATE {
|
||||
P2P_STATE_NONE = 0, // P2P disable
|
||||
P2P_STATE_IDLE = 1, // P2P had enabled and do nothing
|
||||
P2P_STATE_LISTEN = 2, // In pure listen state
|
||||
P2P_STATE_SCAN = 3, // In scan phase
|
||||
P2P_STATE_FIND_PHASE_LISTEN = 4, // In the listen state of find phase
|
||||
P2P_STATE_FIND_PHASE_SEARCH = 5, // In the search state of find phase
|
||||
P2P_STATE_TX_PROVISION_DIS_REQ = 6, // In P2P provisioning discovery
|
||||
P2P_STATE_NONE = 0, // P2P disable
|
||||
P2P_STATE_IDLE = 1, // P2P had enabled and do nothing
|
||||
P2P_STATE_LISTEN = 2, // In pure listen state
|
||||
P2P_STATE_SCAN = 3, // In scan phase
|
||||
P2P_STATE_FIND_PHASE_LISTEN = 4, // In the listen state of find phase
|
||||
P2P_STATE_FIND_PHASE_SEARCH = 5, // In the search state of find phase
|
||||
P2P_STATE_TX_PROVISION_DIS_REQ = 6, // In P2P provisioning discovery
|
||||
P2P_STATE_RX_PROVISION_DIS_RSP = 7,
|
||||
P2P_STATE_RX_PROVISION_DIS_REQ = 8,
|
||||
P2P_STATE_GONEGO_ING = 9, // Doing the group owner negoitation handshake
|
||||
P2P_STATE_GONEGO_OK = 10, // finish the group negoitation handshake with success
|
||||
P2P_STATE_GONEGO_FAIL = 11, // finish the group negoitation handshake with failure
|
||||
P2P_STATE_GONEGO_ING = 9, // Doing the group owner negoitation handshake
|
||||
P2P_STATE_GONEGO_OK = 10, // finish the group negoitation handshake with success
|
||||
P2P_STATE_GONEGO_FAIL = 11, // finish the group negoitation handshake with failure
|
||||
P2P_STATE_RECV_INVITE_REQ_MATCH = 12, // receiving the P2P Inviation request and match with the profile.
|
||||
P2P_STATE_PROVISIONING_ING = 13, // Doing the P2P WPS
|
||||
P2P_STATE_PROVISIONING_DONE = 14, // Finish the P2P WPS
|
||||
P2P_STATE_TX_INVITE_REQ = 15, // Transmit the P2P Invitation request
|
||||
P2P_STATE_RX_INVITE_RESP_OK = 16, // Receiving the P2P Invitation response
|
||||
P2P_STATE_PROVISIONING_ING = 13, // Doing the P2P WPS
|
||||
P2P_STATE_PROVISIONING_DONE = 14, // Finish the P2P WPS
|
||||
P2P_STATE_TX_INVITE_REQ = 15, // Transmit the P2P Invitation request
|
||||
P2P_STATE_RX_INVITE_RESP_OK = 16, // Receiving the P2P Invitation response
|
||||
P2P_STATE_RECV_INVITE_REQ_DISMATCH = 17, // receiving the P2P Inviation request and dismatch with the profile.
|
||||
P2P_STATE_RECV_INVITE_REQ_GO = 18, // receiving the P2P Inviation request and this wifi is GO.
|
||||
P2P_STATE_RECV_INVITE_REQ_JOIN = 19, // receiving the P2P Inviation request to join an existing P2P Group.
|
||||
P2P_STATE_RX_INVITE_RESP_FAIL = 20, // recveing the P2P Inviation response with failure
|
||||
P2P_STATE_RX_INFOR_NOREADY = 21, // receiving p2p negoitation response with information is not available
|
||||
P2P_STATE_TX_INFOR_NOREADY = 22, // sending p2p negoitation response with information is not available
|
||||
P2P_STATE_RECV_INVITE_REQ_GO = 18, // receiving the P2P Inviation request and this wifi is GO.
|
||||
P2P_STATE_RECV_INVITE_REQ_JOIN = 19, // receiving the P2P Inviation request to join an existing P2P Group.
|
||||
P2P_STATE_RX_INVITE_RESP_FAIL = 20, // recveing the P2P Inviation response with failure
|
||||
P2P_STATE_RX_INFOR_NOREADY = 21, // receiving p2p negoitation response with information is not available
|
||||
P2P_STATE_TX_INFOR_NOREADY = 22, // sending p2p negoitation response with information is not available
|
||||
};
|
||||
|
||||
enum P2P_WPSINFO {
|
||||
P2P_NO_WPSINFO = 0,
|
||||
P2P_NO_WPSINFO = 0,
|
||||
P2P_GOT_WPSINFO_PEER_DISPLAY_PIN = 1,
|
||||
P2P_GOT_WPSINFO_SELF_DISPLAY_PIN = 2,
|
||||
P2P_GOT_WPSINFO_PBC = 3,
|
||||
P2P_GOT_WPSINFO_PBC = 3,
|
||||
};
|
||||
|
||||
#define P2P_PRIVATE_IOCTL_SET_LEN 64
|
||||
|
||||
enum P2P_PROTO_WK_ID
|
||||
{
|
||||
enum P2P_PROTO_WK_ID {
|
||||
P2P_FIND_PHASE_WK = 0,
|
||||
P2P_RESTORE_STATE_WK = 1,
|
||||
P2P_PRE_TX_PROVDISC_PROCESS_WK = 2,
|
||||
|
@ -1114,8 +1079,7 @@ enum P2P_PROTO_WK_ID
|
|||
};
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
enum P2P_PS_STATE
|
||||
{
|
||||
enum P2P_PS_STATE {
|
||||
P2P_PS_DISABLE = 0,
|
||||
P2P_PS_ENABLE = 1,
|
||||
P2P_PS_SCAN = 2,
|
||||
|
@ -1123,8 +1087,7 @@ enum P2P_PS_STATE
|
|||
P2P_PS_ALLSTASLEEP = 4, // for P2P GO
|
||||
};
|
||||
|
||||
enum P2P_PS_MODE
|
||||
{
|
||||
enum P2P_PS_MODE {
|
||||
P2P_PS_NONE = 0,
|
||||
P2P_PS_CTWINDOW = 1,
|
||||
P2P_PS_NOA = 2,
|
||||
|
@ -1134,31 +1097,29 @@ enum P2P_PS_MODE
|
|||
|
||||
// =====================WFD Section=====================
|
||||
// For Wi-Fi Display
|
||||
#define WFD_ATTR_DEVICE_INFO 0x00
|
||||
#define WFD_ATTR_ASSOC_BSSID 0x01
|
||||
#define WFD_ATTR_DEVICE_INFO 0x00
|
||||
#define WFD_ATTR_ASSOC_BSSID 0x01
|
||||
#define WFD_ATTR_COUPLED_SINK_INFO 0x06
|
||||
#define WFD_ATTR_LOCAL_IP_ADDR 0x08
|
||||
#define WFD_ATTR_SESSION_INFO 0x09
|
||||
#define WFD_ATTR_ALTER_MAC 0x0a
|
||||
#define WFD_ATTR_ALTER_MAC 0x0a
|
||||
|
||||
// For WFD Device Information Attribute
|
||||
#define WFD_DEVINFO_SOURCE 0x0000
|
||||
#define WFD_DEVINFO_PSINK 0x0001
|
||||
#define WFD_DEVINFO_SSINK 0x0002
|
||||
#define WFD_DEVINFO_DUAL 0x0003
|
||||
#define WFD_DEVINFO_SOURCE 0x0000
|
||||
#define WFD_DEVINFO_PSINK 0x0001
|
||||
#define WFD_DEVINFO_SSINK 0x0002
|
||||
#define WFD_DEVINFO_DUAL 0x0003
|
||||
|
||||
#define WFD_DEVINFO_SESSION_AVAIL 0x0010
|
||||
#define WFD_DEVINFO_WSD 0x0040
|
||||
#define WFD_DEVINFO_PC_TDLS 0x0080
|
||||
#define WFD_DEVINFO_HDCP_SUPPORT 0x0100
|
||||
#define WFD_DEVINFO_SESSION_AVAIL 0x0010
|
||||
#define WFD_DEVINFO_WSD 0x0040
|
||||
#define WFD_DEVINFO_PC_TDLS 0x0080
|
||||
#define WFD_DEVINFO_HDCP_SUPPORT 0x0100
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
#define IP_MCAST_MAC(mac) ((mac[0]==0x01)&&(mac[1]==0x00)&&(mac[2]==0x5e))
|
||||
#define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff))
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
#ifndef IW_AUTH_WAPI_VERSION_1
|
||||
#define IW_AUTH_WAPI_VERSION_1 0x00000008
|
||||
|
@ -1170,9 +1131,8 @@ enum P2P_PS_MODE
|
|||
#define IW_AUTH_WAPI_ENABLED 0x20
|
||||
#endif
|
||||
#ifndef IW_ENCODE_ALG_SM4
|
||||
#define IW_ENCODE_ALG_SM4 0x20
|
||||
#define IW_ENCODE_ALG_SM4 0x20
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // _WIFI_H_
|
||||
|
||||
|
|
|
@ -55,10 +55,6 @@
|
|||
#define MAX_CUSTOM_LEN 64
|
||||
#define RATE_COUNT 4
|
||||
|
||||
#ifdef CONFIG_GLOBAL_UI_PID
|
||||
extern int ui_pid[3];
|
||||
#endif
|
||||
|
||||
// combo scan
|
||||
#define WEXT_CSCAN_AMOUNT 9
|
||||
#define WEXT_CSCAN_BUF_LEN 360
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <drv_types.h>
|
||||
#include <mlme_osdep.h>
|
||||
|
||||
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
void Linkup_workitem_callback(struct work_struct *work)
|
||||
{
|
||||
|
@ -91,7 +90,7 @@ void _rtw_scan_timeout_handler (void *FunctionContext)
|
|||
}
|
||||
|
||||
|
||||
void _dynamic_check_timer_handlder (void *FunctionContext)
|
||||
static void _dynamic_check_timer_handlder (void *FunctionContext)
|
||||
{
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
/* remove for MP power tracking DM.
|
||||
|
@ -333,20 +332,20 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
void _survey_timer_hdl (void *FunctionContext)
|
||||
static void _survey_timer_hdl (void *FunctionContext)
|
||||
{
|
||||
struct adapter *padapter = (struct adapter *)FunctionContext;
|
||||
|
||||
survey_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
void _link_timer_hdl (void *FunctionContext)
|
||||
static void _link_timer_hdl (void *FunctionContext)
|
||||
{
|
||||
struct adapter *padapter = (struct adapter *)FunctionContext;
|
||||
link_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
void _addba_timer_hdl(void *FunctionContext)
|
||||
static void _addba_timer_hdl(void *FunctionContext)
|
||||
{
|
||||
struct sta_info *psta = (struct sta_info *)FunctionContext;
|
||||
addba_timer_hdl(psta);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <hal_intf.h>
|
||||
#include <rtw_ioctl.h>
|
||||
#include <rtw_version.h>
|
||||
#include <rtw_br_ext.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_osintf.h>
|
||||
|
@ -54,118 +55,118 @@ MODULE_AUTHOR("Realtek Semiconductor Corp.");
|
|||
MODULE_VERSION(DRIVERVERSION);
|
||||
|
||||
/* module param defaults */
|
||||
int rtw_chip_version = 0x00;
|
||||
int rtw_rfintfs = HWPI;
|
||||
int rtw_lbkmode = 0;//RTL8712_AIR_TRX;
|
||||
static int rtw_chip_version = 0x00;
|
||||
static int rtw_rfintfs = HWPI;
|
||||
static int rtw_lbkmode = 0;//RTL8712_AIR_TRX;
|
||||
|
||||
|
||||
int rtw_network_mode = Ndis802_11IBSS;//Ndis802_11Infrastructure;//infra, ad-hoc, auto
|
||||
static int rtw_network_mode = Ndis802_11IBSS;//Ndis802_11Infrastructure;//infra, ad-hoc, auto
|
||||
//NDIS_802_11_SSID ssid;
|
||||
int rtw_channel = 1;//ad-hoc support requirement
|
||||
int rtw_wireless_mode = WIRELESS_11BG_24N;
|
||||
int rtw_vrtl_carrier_sense = AUTO_VCS;
|
||||
int rtw_vcs_type = RTS_CTS;//*
|
||||
int rtw_rts_thresh = 2347;//*
|
||||
int rtw_frag_thresh = 2346;//*
|
||||
int rtw_preamble = PREAMBLE_LONG;//long, short, auto
|
||||
int rtw_scan_mode = 1;//active, passive
|
||||
int rtw_adhoc_tx_pwr = 1;
|
||||
int rtw_soft_ap = 0;
|
||||
static int rtw_channel = 1;//ad-hoc support requirement
|
||||
static int rtw_wireless_mode = WIRELESS_11BG_24N;
|
||||
static int rtw_vrtl_carrier_sense = AUTO_VCS;
|
||||
static int rtw_vcs_type = RTS_CTS;//*
|
||||
static int rtw_rts_thresh = 2347;//*
|
||||
static int rtw_frag_thresh = 2346;//*
|
||||
static int rtw_preamble = PREAMBLE_LONG;//long, short, auto
|
||||
static int rtw_scan_mode = 1;//active, passive
|
||||
static int rtw_adhoc_tx_pwr = 1;
|
||||
static int rtw_soft_ap = 0;
|
||||
//int smart_ps = 1;
|
||||
#ifdef CONFIG_POWER_SAVING
|
||||
int rtw_power_mgnt = 1;
|
||||
static int rtw_power_mgnt = 1;
|
||||
#ifdef CONFIG_IPS_LEVEL_2
|
||||
int rtw_ips_mode = IPS_LEVEL_2;
|
||||
static int rtw_ips_mode = IPS_LEVEL_2;
|
||||
#else
|
||||
int rtw_ips_mode = IPS_NORMAL;
|
||||
static int rtw_ips_mode = IPS_NORMAL;
|
||||
#endif
|
||||
#else
|
||||
int rtw_power_mgnt = PS_MODE_ACTIVE;
|
||||
int rtw_ips_mode = IPS_NONE;
|
||||
static int rtw_power_mgnt = PS_MODE_ACTIVE;
|
||||
static int rtw_ips_mode = IPS_NONE;
|
||||
#endif
|
||||
|
||||
int rtw_smart_ps = 2;
|
||||
static int rtw_smart_ps = 2;
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
int rtw_early_mode=1;
|
||||
static int rtw_early_mode=1;
|
||||
#endif
|
||||
module_param(rtw_ips_mode, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_ips_mode,"The default IPS mode");
|
||||
|
||||
static int rtw_debug = 1;
|
||||
int rtw_radio_enable = 1;
|
||||
int rtw_long_retry_lmt = 7;
|
||||
int rtw_short_retry_lmt = 7;
|
||||
int rtw_busy_thresh = 40;
|
||||
static int rtw_radio_enable = 1;
|
||||
static int rtw_long_retry_lmt = 7;
|
||||
static int rtw_short_retry_lmt = 7;
|
||||
static int rtw_busy_thresh = 40;
|
||||
//int qos_enable = 0; //*
|
||||
int rtw_ack_policy = NORMAL_ACK;
|
||||
static int rtw_ack_policy = NORMAL_ACK;
|
||||
|
||||
int rtw_mp_mode = 0;
|
||||
static int rtw_mp_mode = 0;
|
||||
|
||||
int rtw_software_encrypt = 0;
|
||||
int rtw_software_decrypt = 0;
|
||||
static int rtw_software_encrypt = 0;
|
||||
static int rtw_software_decrypt = 0;
|
||||
|
||||
int rtw_acm_method = 0;// 0:By SW 1:By HW.
|
||||
static int rtw_acm_method = 0;// 0:By SW 1:By HW.
|
||||
|
||||
int rtw_wmm_enable = 1;// default is set to enable the wmm.
|
||||
int rtw_uapsd_enable = 0;
|
||||
int rtw_uapsd_max_sp = NO_LIMIT;
|
||||
int rtw_uapsd_acbk_en = 0;
|
||||
int rtw_uapsd_acbe_en = 0;
|
||||
int rtw_uapsd_acvi_en = 0;
|
||||
int rtw_uapsd_acvo_en = 0;
|
||||
static int rtw_wmm_enable = 1;// default is set to enable the wmm.
|
||||
static int rtw_uapsd_enable = 0;
|
||||
static int rtw_uapsd_max_sp = NO_LIMIT;
|
||||
static int rtw_uapsd_acbk_en = 0;
|
||||
static int rtw_uapsd_acbe_en = 0;
|
||||
static int rtw_uapsd_acvi_en = 0;
|
||||
static int rtw_uapsd_acvo_en = 0;
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
int rtw_ht_enable = 1;
|
||||
int rtw_cbw40_enable = 3; // 0 :diable, bit(0): enable 2.4g, bit(1): enable 5g
|
||||
int rtw_ampdu_enable = 1;//for enable tx_ampdu
|
||||
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
|
||||
int rtw_ampdu_amsdu = 0;// 0: disabled, 1:enabled, 2:auto
|
||||
static 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
|
||||
static int rtw_ampdu_amsdu = 0;// 0: disabled, 1:enabled, 2:auto
|
||||
#endif
|
||||
|
||||
int rtw_lowrate_two_xmit = 1;//Use 2 path Tx to transmit MCS0~7 and legacy mode
|
||||
static int rtw_lowrate_two_xmit = 1;//Use 2 path Tx to transmit MCS0~7 and legacy mode
|
||||
|
||||
//int rf_config = RF_1T2R; // 1T2R
|
||||
int rtw_rf_config = RF_819X_MAX_TYPE; //auto
|
||||
int rtw_low_power = 0;
|
||||
static int rtw_rf_config = RF_819X_MAX_TYPE; //auto
|
||||
static int rtw_low_power = 0;
|
||||
#ifdef CONFIG_WIFI_TEST
|
||||
int rtw_wifi_spec = 1;//for wifi test
|
||||
static int rtw_wifi_spec = 1;//for wifi test
|
||||
#else
|
||||
int rtw_wifi_spec = 0;
|
||||
static int rtw_wifi_spec = 0;
|
||||
#endif
|
||||
int rtw_channel_plan = RT_CHANNEL_DOMAIN_MAX;
|
||||
static int rtw_channel_plan = RT_CHANNEL_DOMAIN_MAX;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
int rtw_btcoex_enable = 1;
|
||||
int rtw_bt_iso = 2;// 0:Low, 1:High, 2:From Efuse
|
||||
int rtw_bt_sco = 3;// 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy, 5.OtherBusy
|
||||
int rtw_bt_ampdu =1 ;// 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU.
|
||||
static int rtw_btcoex_enable = 1;
|
||||
static int rtw_bt_iso = 2;// 0:Low, 1:High, 2:From Efuse
|
||||
static int rtw_bt_sco = 3;// 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy, 5.OtherBusy
|
||||
static int rtw_bt_ampdu =1 ;// 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU.
|
||||
#endif
|
||||
|
||||
int rtw_AcceptAddbaReq = _TRUE;// 0:Reject AP's Add BA req, 1:Accept AP's Add BA req.
|
||||
static int rtw_AcceptAddbaReq = _TRUE;// 0:Reject AP's Add BA req, 1:Accept AP's Add BA req.
|
||||
|
||||
int rtw_antdiv_cfg = 2; // 0:OFF , 1:ON, 2:decide by Efuse config
|
||||
int rtw_antdiv_type = 0 ; //0:decide by efuse 1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2: for 88EE, 1Tx and 2Rx are diversity.( 2 Ant, Tx and RxCG are both on aux port, RxCS is on main port ), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port)
|
||||
static int rtw_antdiv_cfg = 2; // 0:OFF , 1:ON, 2:decide by Efuse config
|
||||
static int rtw_antdiv_type = 0 ; //0:decide by efuse 1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2: for 88EE, 1Tx and 2Rx are diversity.( 2 Ant, Tx and RxCG are both on aux port, RxCS is on main port ), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port)
|
||||
|
||||
|
||||
#ifdef CONFIG_USB_AUTOSUSPEND
|
||||
int rtw_enusbss = 1;//0:disable,1:enable
|
||||
static int rtw_enusbss = 1;//0:disable,1:enable
|
||||
#else
|
||||
int rtw_enusbss = 0;//0:disable,1:enable
|
||||
static int rtw_enusbss = 0;//0:disable,1:enable
|
||||
#endif
|
||||
|
||||
int rtw_hwpdn_mode=2;//0:disable,1:enable,2: by EFUSE config
|
||||
static int rtw_hwpdn_mode=2;//0:disable,1:enable,2: by EFUSE config
|
||||
|
||||
#ifdef CONFIG_HW_PWRP_DETECTION
|
||||
int rtw_hwpwrp_detect = 1;
|
||||
static int rtw_hwpwrp_detect = 1;
|
||||
#else
|
||||
int rtw_hwpwrp_detect = 0; //HW power ping detect 0:disable , 1:enable
|
||||
static int rtw_hwpwrp_detect = 0; //HW power ping detect 0:disable , 1:enable
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
int rtw_hw_wps_pbc = 1;
|
||||
static int rtw_hw_wps_pbc = 1;
|
||||
#else
|
||||
int rtw_hw_wps_pbc = 0;
|
||||
static int rtw_hw_wps_pbc = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
|
@ -173,44 +174,44 @@ int rtw_mc2u_disable = 0;
|
|||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
int rtw_dmsp = 0;
|
||||
static int rtw_dmsp = 0;
|
||||
#endif // CONFIG_DUALMAC_CONCURRENT
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
int rtw_80211d = 0;
|
||||
static int rtw_80211d = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_REGULATORY_CTRL
|
||||
int rtw_regulatory_id =2;
|
||||
static int rtw_regulatory_id =2;
|
||||
#else
|
||||
int rtw_regulatory_id = 0xff;// Regulatory tab id, 0xff = follow efuse's setting
|
||||
static int rtw_regulatory_id = 0xff;// Regulatory tab id, 0xff = follow efuse's setting
|
||||
#endif
|
||||
module_param(rtw_regulatory_id, int, 0644);
|
||||
|
||||
|
||||
#ifdef CONFIG_SPECIAL_SETTING_FOR_FUNAI_TV
|
||||
int rtw_force_ant = 2;//0 :normal, 1:Main ant, 2:Aux ant
|
||||
int rtw_force_igi =0;//0 :normal
|
||||
static int rtw_force_ant = 2;//0 :normal, 1:Main ant, 2:Aux ant
|
||||
static int rtw_force_igi =0;//0 :normal
|
||||
module_param(rtw_force_ant, int, 0644);
|
||||
module_param(rtw_force_igi, int, 0644);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_QOS_OPTIMIZATION
|
||||
int rtw_qos_opt_enable=1;//0: disable,1:enable
|
||||
static int rtw_qos_opt_enable=1;//0: disable,1:enable
|
||||
#else
|
||||
int rtw_qos_opt_enable=0;//0: disable,1:enable
|
||||
static int rtw_qos_opt_enable=0;//0: disable,1:enable
|
||||
#endif
|
||||
module_param(rtw_qos_opt_enable,int,0644);
|
||||
|
||||
char* ifname = "wlan%d";
|
||||
static char* ifname = "wlan%d";
|
||||
module_param(ifname, charp, 0644);
|
||||
MODULE_PARM_DESC(ifname, "The default name to allocate for first interface");
|
||||
|
||||
char* if2name = "wlan%d";
|
||||
static char* if2name = "wlan%d";
|
||||
module_param(if2name, charp, 0644);
|
||||
MODULE_PARM_DESC(if2name, "The default name to allocate for second interface");
|
||||
|
||||
char* rtw_initmac = 0; // temp mac address if users want to use instead of the mac address in Efuse
|
||||
char* rtw_initmac = NULL; // temp mac address if users want to use instead of the mac address in Efuse
|
||||
|
||||
module_param(rtw_initmac, charp, 0644);
|
||||
module_param(rtw_channel_plan, int, 0644);
|
||||
|
@ -259,19 +260,19 @@ MODULE_PARM_DESC(rtw_adaptor_info_caching_file_path, "The path of adapter info c
|
|||
#endif //CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
uint rtw_max_roaming_times=2;
|
||||
static uint rtw_max_roaming_times=2;
|
||||
module_param(rtw_max_roaming_times, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try");
|
||||
#endif //CONFIG_LAYER2_ROAMING
|
||||
|
||||
#ifdef CONFIG_IOL
|
||||
int rtw_fw_iol=1;// 0:Disable, 1:enable, 2:by usb speed
|
||||
static int rtw_fw_iol=1;// 0:Disable, 1:enable, 2:by usb speed
|
||||
module_param(rtw_fw_iol, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_iol,"FW IOL");
|
||||
#endif //CONFIG_IOL
|
||||
|
||||
#ifdef CONFIG_FILE_FWIMG
|
||||
char *rtw_fw_file_path= "";
|
||||
static char *rtw_fw_file_path= "";
|
||||
module_param(rtw_fw_file_path, charp, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_file_path, "The path of fw image");
|
||||
#endif //CONFIG_FILE_FWIMG
|
||||
|
@ -294,7 +295,7 @@ module_param(rtw_btcoex_enable, int, 0644);
|
|||
MODULE_PARM_DESC(rtw_btcoex_enable, "Enable BT co-existence mechanism");
|
||||
#endif
|
||||
|
||||
uint rtw_notch_filter = RTW_NOTCH_FILTER;
|
||||
static uint rtw_notch_filter = RTW_NOTCH_FILTER;
|
||||
module_param(rtw_notch_filter, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for P2P");
|
||||
module_param_named(debug, rtw_debug, int, 0444);
|
||||
|
@ -324,7 +325,7 @@ void rtw_proc_remove_one(struct net_device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
uint loadparam( struct adapter *padapter, _nic_hdl pnetdev)
|
||||
static uint loadparam( struct adapter *padapter, _nic_hdl pnetdev)
|
||||
{
|
||||
|
||||
uint status = _SUCCESS;
|
||||
|
@ -504,7 +505,7 @@ static struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev)
|
|||
static const u16 rtw_1d_to_queue[8] = { 2, 3, 3, 2, 1, 1, 0, 0 };
|
||||
|
||||
/* Given a data frame determine the 802.1p/1d tag to use. */
|
||||
unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
static unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
{
|
||||
unsigned int dscp;
|
||||
|
||||
|
@ -546,15 +547,14 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
|
|||
{
|
||||
struct iphdr *piphdr;
|
||||
unsigned int dscp;
|
||||
u16 eth_type;
|
||||
__be16 eth_type;
|
||||
u32 priority;
|
||||
u8 *pdata = skb->data;
|
||||
|
||||
_rtw_memcpy(ð_type, pdata+(ETH_ALEN<<1), 2);
|
||||
|
||||
switch (eth_type) {
|
||||
case htons(ETH_P_IP):
|
||||
|
||||
switch (be16_to_cpu(eth_type)) {
|
||||
case ETH_P_IP:
|
||||
piphdr = (struct iphdr *)(pdata+ETH_HLEN);
|
||||
|
||||
dscp = piphdr->tos & 0xfc;
|
||||
|
@ -567,7 +567,6 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
|
|||
}
|
||||
|
||||
return rtw_1d_to_queue[priority];
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1776,7 +1775,7 @@ int netdev_open(struct net_device *pnetdev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
int ips_netdrv_open(struct adapter *padapter)
|
||||
static int ips_netdrv_open(struct adapter *padapter)
|
||||
{
|
||||
int status = _SUCCESS;
|
||||
padapter->net_closed = _FALSE;
|
||||
|
@ -1853,7 +1852,7 @@ void rtw_ips_dev_unload(struct adapter *padapter)
|
|||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
DBG_871X("====> %s...\n",__FUNCTION__);
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_FIFO_CLEARN_UP, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_FIFO_CLEARN_UP, NULL);
|
||||
|
||||
if(padapter->intf_stop)
|
||||
{
|
||||
|
@ -2279,7 +2278,7 @@ int rtw_gw_addr_query(struct adapter *padapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
int rtw_suspend_free_assoc_resource(struct adapter *padapter)
|
||||
static int rtw_suspend_free_assoc_resource(struct adapter *padapter)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct net_device *pnetdev = padapter->pnetdev;
|
||||
|
@ -2335,7 +2334,7 @@ int rtw_suspend_free_assoc_resource(struct adapter *padapter)
|
|||
DBG_871X("==> "FUNC_ADPT_FMT" exit....\n", FUNC_ADPT_ARG(padapter));
|
||||
return 0;
|
||||
}
|
||||
extern void rtw_dev_unload(struct adapter *padapter);
|
||||
|
||||
int rtw_suspend_common(struct adapter *padapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
|
|
|
@ -40,18 +40,11 @@
|
|||
#include <asm/io.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
extern int rtw_ht_enable;
|
||||
extern int rtw_cbw40_enable;
|
||||
extern int rtw_ampdu_enable;//for enable tx_ampdu
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GLOBAL_UI_PID
|
||||
int ui_pid[3] = {0, 0, 0};
|
||||
#endif
|
||||
|
||||
|
||||
extern int pm_netdev_open(struct net_device *pnetdev,u8 bnormal);
|
||||
static int rtw_suspend(struct usb_interface *intf, pm_message_t message);
|
||||
static int rtw_resume(struct usb_interface *intf);
|
||||
int rtw_resume_process(struct adapter *padapter);
|
||||
|
@ -147,7 +140,6 @@ static struct usb_device_id rtw_usb_id_tbl[] ={
|
|||
};
|
||||
MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
|
||||
|
||||
int const rtw_usb_id_len = sizeof(rtw_usb_id_tbl) / sizeof(struct usb_device_id);
|
||||
|
||||
static struct specific_device_id specific_device_id_tbl[] = {
|
||||
{.idVendor=USB_VENDER_ID_REALTEK, .idProduct=0x8177, .flags=SPEC_DEV_ID_DISABLE_HT},//8188cu 1*1 dongole, (b/g mode only)
|
||||
|
@ -172,7 +164,7 @@ static struct usb_device_id rtl8188e_usb_id_tbl[] ={
|
|||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
struct rtw_usb_drv rtl8188e_usb_drv = {
|
||||
static struct rtw_usb_drv rtl8188e_usb_drv = {
|
||||
.usbdrv.name = (char*)"rtl8188eu",
|
||||
.usbdrv.probe = rtw_drv_init,
|
||||
.usbdrv.disconnect = rtw_dev_remove,
|
||||
|
@ -1293,9 +1285,9 @@ static script_item_u item;
|
|||
* We accept the new device by returning 0.
|
||||
*/
|
||||
|
||||
struct adapter *rtw_sw_export = NULL;
|
||||
static struct adapter *rtw_sw_export = NULL;
|
||||
|
||||
struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
||||
static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
||||
struct usb_interface *pusb_intf, const struct usb_device_id *pdid)
|
||||
{
|
||||
struct adapter *padapter = NULL;
|
||||
|
@ -1436,7 +1428,7 @@ struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
|||
|
||||
free_hal_data:
|
||||
if(status != _SUCCESS && padapter->HalData)
|
||||
rtw_mfree(padapter->HalData, sizeof(*(padapter->HalData)));
|
||||
kfree(padapter->HalData);
|
||||
free_wdev:
|
||||
if(status != _SUCCESS) {
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
|
@ -1730,7 +1722,6 @@ free_dvobj:
|
|||
exit:
|
||||
return status == _SUCCESS?0:-ENODEV;
|
||||
}
|
||||
extern void rtw_unregister_netdevs(struct dvobj_priv *dvobj);
|
||||
/*
|
||||
* dev_remove() - our device is being removed
|
||||
*/
|
||||
|
|
|
@ -382,7 +382,6 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
extern int rtw_mc2u_disable;
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
s32 res = 0;
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
|
||||
|
|
Loading…
Reference in a new issue