rtl8188eu: Fix Sparse warnings in core/rtw_mlme_ext.c

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2014-12-18 22:28:04 -06:00
parent 202d20077c
commit 8db176767f
17 changed files with 725 additions and 879 deletions

View file

@ -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 // forward unknow IP packet to upper TCP/IP
DEBUG_INFO("NAT25: Replace DA with BR's MAC\n"); DEBUG_INFO("NAT25: Replace DA with BR's MAC\n");
if ( (*(u32 *)priv->br_mac) == 0 && (*(u16 *)(priv->br_mac+4)) == 0 ) { 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"); printk("Re-init netdev_br_init() due to br_mac==0!\n");
netdev_br_init(priv->pnetdev); netdev_br_init(priv->pnetdev);
} }

View file

@ -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)); return ((key_char2num(hch) * 100) + (key_char2num(mch) * 10 ) + key_char2num(lch));
} }
extern char* rtw_initmac;
void rtw_macaddr_cfg(u8 *mac_addr) void rtw_macaddr_cfg(u8 *mac_addr)
{ {
u8 mac[ETH_ALEN]; u8 mac[ETH_ALEN];

File diff suppressed because it is too large Load diff

View file

@ -22,6 +22,7 @@
#include <drv_conf.h> #include <drv_conf.h>
#include <osdep_service.h> #include <osdep_service.h>
#include <drv_types.h> #include <drv_types.h>
#include <recv_osdep.h>
#include <osdep_intf.h> #include <osdep_intf.h>
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
@ -118,11 +119,6 @@ extern void autosuspend_enter(struct adapter* padapter);
extern int autoresume_enter(struct adapter* padapter); extern int autoresume_enter(struct adapter* padapter);
#endif #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) bool rtw_pwr_unassociated_idle(struct adapter *adapter)
{ {
struct adapter *buddy = adapter->pbuddy_adapter; struct adapter *buddy = adapter->pbuddy_adapter;

View file

@ -45,15 +45,6 @@ static unsigned char EPIGRAM_OUI[] = {0x00, 0x90, 0x4c};
unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20}; 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 R2T_PHY_DELAY (0)
//#define WAIT_FOR_BCN_TO_MIN (3000) //#define WAIT_FOR_BCN_TO_MIN (3000)

View file

@ -304,44 +304,44 @@ struct ieee_ibss_seq {
}; };
struct rtw_ieee80211_hdr { struct rtw_ieee80211_hdr {
u16 frame_ctl; __le16 frame_ctl;
u16 duration_id; __le16 duration_id;
u8 addr1[ETH_ALEN]; u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN]; u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN]; u8 addr3[ETH_ALEN];
u16 seq_ctl; __le16 seq_ctl;
u8 addr4[ETH_ALEN]; u8 addr4[ETH_ALEN];
} __attribute__ ((packed)); } __attribute__ ((packed));
struct rtw_ieee80211_hdr_3addr { struct rtw_ieee80211_hdr_3addr {
u16 frame_ctl; __le16 frame_ctl;
u16 duration_id; __le16 duration_id;
u8 addr1[ETH_ALEN]; u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN]; u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN]; u8 addr3[ETH_ALEN];
u16 seq_ctl; __le16 seq_ctl;
} __attribute__ ((packed)); } __attribute__ ((packed));
struct rtw_ieee80211_hdr_qos { struct rtw_ieee80211_hdr_qos {
u16 frame_ctl; __le16 frame_ctl;
u16 duration_id; __le16 duration_id;
u8 addr1[ETH_ALEN]; u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN]; u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN]; u8 addr3[ETH_ALEN];
u16 seq_ctl; __le16 seq_ctl;
u8 addr4[ETH_ALEN]; u8 addr4[ETH_ALEN];
u16 qc; __le16 qc;
} __attribute__ ((packed)); } __attribute__ ((packed));
struct rtw_ieee80211_hdr_3addr_qos { struct rtw_ieee80211_hdr_3addr_qos {
u16 frame_ctl; __le16 frame_ctl;
u16 duration_id; u16 duration_id;
u8 addr1[ETH_ALEN]; u8 addr1[ETH_ALEN];
u8 addr2[ETH_ALEN]; u8 addr2[ETH_ALEN];
u8 addr3[ETH_ALEN]; u8 addr3[ETH_ALEN];
u16 seq_ctl; __le16 seq_ctl;
u16 qc; __le16 qc;
} __attribute__ ((packed)); } __attribute__ ((packed));
struct eapol { struct eapol {

View file

@ -101,6 +101,34 @@
#include <linux/pci.h> #include <linux/pci.h>
#endif #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 #ifdef CONFIG_USB_HCI
typedef struct urb * PURB; typedef struct urb * PURB;

View file

@ -25,6 +25,12 @@
#include <drv_types.h> #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 sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
extern void _rtw_free_recv_priv (struct recv_priv *precvpriv); extern void _rtw_free_recv_priv (struct recv_priv *precvpriv);

View file

@ -71,6 +71,7 @@ struct br_ext_info {
}; };
void nat25_db_cleanup(struct adapter *priv); void nat25_db_cleanup(struct adapter *priv);
void netdev_br_init(struct net_device *netdev);
#endif // _RTW_BR_EXT_H_ #endif // _RTW_BR_EXT_H_

View file

@ -1086,7 +1086,7 @@ enum rtw_h2c_cmd
#define _SetRFReg_CMD_ _Write_RFREG_CMD_ #define _SetRFReg_CMD_ _Write_RFREG_CMD_
#ifdef _RTW_CMD_C_ #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(_Read_MACREG), NULL}, /*0*/
{GEN_CMD_CODE(_Write_MACREG), NULL}, {GEN_CMD_CODE(_Write_MACREG), NULL},

View file

@ -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(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); 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_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 #ifdef CONFIG_IEEE80211W
void issue_action_SA_Query(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short tid); void issue_action_SA_Query(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short tid);
#endif //CONFIG_IEEE80211W #endif //CONFIG_IEEE80211W
@ -851,8 +850,7 @@ u8 tdls_hdl(struct adapter *padapter, unsigned char *pbuf);
#ifdef _RTW_CMD_C_ #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) /*0*/
GEN_DRV_CMD_HANDLER(0, NULL) GEN_DRV_CMD_HANDLER(0, NULL)
GEN_DRV_CMD_HANDLER(0, NULL) GEN_DRV_CMD_HANDLER(0, NULL)

View file

@ -253,96 +253,71 @@ enum WIFI_REG_DOMAIN {
#define _ORDER_ BIT(15) #define _ORDER_ BIT(15)
#define SetToDs(pbuf) \ #define SetToDs(pbuf) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_)
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_); \
} while(0)
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0) #define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
#define ClearToDs(pbuf) \ #define ClearToDs(pbuf) \
do { \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
} while(0)
#define SetFrDs(pbuf) \ #define SetFrDs(pbuf) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
} while(0)
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0) #define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
#define ClearFrDs(pbuf) \ #define ClearFrDs(pbuf) \
do { \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
} while (0)
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe)) #define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
#define SetMFrag(pbuf) \ #define SetMFrag(pbuf) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_)
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
} while (0)
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0) #define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
#define ClearMFrag(pbuf) \ #define ClearMFrag(pbuf) \
do { \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
} while (0)
#define SetRetry(pbuf) \ #define SetRetry(pbuf) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_); \
} while (0)
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0) #define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define ClearRetry(pbuf) \ #define ClearRetry(pbuf) \
do { \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
} while (0)
#define SetPwrMgt(pbuf) \ #define SetPwrMgt(pbuf) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
} while (0)
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0) #define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
#define ClearPwrMgt(pbuf) \ #define ClearPwrMgt(pbuf) \
do { \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
} while(0)
#define SetMData(pbuf) \ #define SetMData(pbuf) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
} while(0)
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0) #define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
#define ClearMData(pbuf) \ #define ClearMData(pbuf) \
do { \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
} while(0)
#define SetPrivacy(pbuf) \ #define SetPrivacy(pbuf) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
} while(0)
#define GetPrivacy(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0) #define GetPrivacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
#define ClearPrivacy(pbuf) \ #define ClearPrivacy(pbuf) \
do { \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
} while(0)
#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 { \ do { \
@ -350,83 +325,81 @@ enum WIFI_REG_DOMAIN {
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \ *(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
} while (0) } 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 { \ 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); \ *(__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) \ #define SetFragNum(pbuf, num) \
do { \ do { \
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \ *(unsigned short *)((size_t)(pbuf) + 22) = \
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \ ((*(unsigned short *)((size_t)(pbuf) + 22)) & \
le16_to_cpu(~(0x000f))) | \
cpu_to_le16(0x0f & (num)); \ cpu_to_le16(0x0f & (num)); \
} while (0) } while (0)
#define SetSeqNum(pbuf, num) \ #define SetSeqNum(pbuf, num) \
do { \ do { \
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \ *(__le16 *)((size_t)(pbuf) + 22) = \
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu((unsigned short)~0xfff0)) | \ ((*(__le16 *)((size_t)(pbuf) + 22)) & cpu_to_le16((unsigned short)0x000f)) | \
le16_to_cpu((unsigned short)(0xfff0 & (num << 4))); \ cpu_to_le16((unsigned short)(0xfff0 & (num << 4))); \
} while (0) } while (0)
#define SetDuration(pbuf, dur) \ #define SetDuration(pbuf, dur) \
do { \ *(__le16 *)((size_t)(pbuf) + 2) = cpu_to_le16(0xffff & (dur))
*(unsigned short *)((SIZE_PTR)(pbuf) + 2) = cpu_to_le16(0xffff & (dur)); \
} while(0)
#define SetPriority(pbuf, tid) \ #define SetPriority(pbuf, tid) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
*(unsigned short *)(pbuf) |= cpu_to_le16(tid & 0xf); \
} while(0)
#define GetPriority(pbuf) ((le16_to_cpu(*(unsigned short *)(pbuf))) & 0xf) #define GetPriority(pbuf) ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
#define SetEOSP(pbuf, eosp) \ #define SetEOSP(pbuf, eosp) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
*(unsigned short *)(pbuf) |= cpu_to_le16( (eosp & 1) << 4); \
} while(0)
#define SetAckpolicy(pbuf, ack) \ #define SetAckpolicy(pbuf, ack) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16((ack & 3) << 5)
*(unsigned short *)(pbuf) |= cpu_to_le16( (ack & 3) << 5); \
} while(0)
#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) \ #define SetAMsdu(pbuf, amsdu) \
do { \ *(__le16 *)(pbuf) |= cpu_to_le16((amsdu & 1) << 7)
*(unsigned short *)(pbuf) |= cpu_to_le16( (amsdu & 1) << 7); \
} while(0)
#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) \ #define MacAddr_isBcst(addr) \
( \ ( \
((addr[0] == 0xff) && (addr[1] == 0xff) && \ ((addr[0] == 0xff) && (addr[1] == 0xff) && \
(addr[2] == 0xff) && (addr[3] == 0xff) && \ (addr[2] == 0xff) && (addr[3] == 0xff) && \
(addr[4] == 0xff) && (addr[5] == 0xff) ) ? _TRUE : _FALSE \ (addr[4] == 0xff) && (addr[5] == 0xff)) ? true : false \
) )
__inline static int IS_MCAST(unsigned char *da) __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 * described in 802.11n draft section 7.2.1.7.1
*/ */
struct rtw_ieee80211_bar { struct rtw_ieee80211_bar {
unsigned short frame_control; __le16 frame_control;
unsigned short duration; u8 duration;
unsigned char ra[6]; u8 ra[6];
unsigned char ta[6]; u8 ta[6];
unsigned short control; __le16 control;
unsigned short start_seq_num; __le16 start_seq_num;
} __attribute__((packed)); } __attribute__((packed));
/* 802.11 BAR control masks */ /* 802.11 BAR control masks */
@ -684,12 +657,12 @@ struct rtw_ieee80211_bar {
*/ */
struct rtw_ieee80211_ht_cap { struct rtw_ieee80211_ht_cap {
unsigned short cap_info; __le16 cap_info;
unsigned char ampdu_params_info; u8 ampdu_params_info;
unsigned char supp_mcs_set[16]; u8 supp_mcs_set[16];
unsigned short extended_ht_cap_info; __le16 extended_ht_cap_info;
unsigned int tx_BF_cap_info; __le32 tx_BF_cap_info;
unsigned char antenna_selection_info; u8 antenna_selection_info;
} __attribute__ ((packed)); } __attribute__ ((packed));
/** /**
@ -699,54 +672,47 @@ struct rtw_ieee80211_ht_cap {
* described in 802.11n draft section 7.3.2.53 * described in 802.11n draft section 7.3.2.53
*/ */
struct ieee80211_ht_addt_info { struct ieee80211_ht_addt_info {
unsigned char control_chan; u8 control_chan;
unsigned char ht_param; u8 ht_param;
unsigned short operation_mode; __le16 operation_mode;
unsigned short stbc_param; __le16 stbc_param;
unsigned char basic_set[16]; u8 basic_set[16];
} __attribute__ ((packed)); } __attribute__ ((packed));
struct HT_caps_element struct HT_caps_element {
{ union {
union struct {
{ __le16 HT_caps_info;
struct u8 AMPDU_para;
{ u8 MCS_rate[16];
unsigned short HT_caps_info; __le16 HT_ext_caps;
unsigned char AMPDU_para; __le32 Beamforming_caps;
unsigned char MCS_rate[16]; u8 ASEL_caps;
unsigned short HT_ext_caps;
unsigned int Beamforming_caps;
unsigned char ASEL_caps;
} HT_cap_element; } HT_cap_element;
unsigned char HT_cap[26]; u8 HT_cap[26];
} u; } u;
} __attribute__ ((packed)); } __attribute__ ((packed));
struct HT_info_element struct HT_info_element {
{ u8 primary_channel;
unsigned char primary_channel; u8 infos[5];
unsigned char infos[5]; u8 MCS_rate[16];
unsigned char MCS_rate[16];
} __attribute__ ((packed)); } __attribute__ ((packed));
struct AC_param struct AC_param {
{
u8 ACI_AIFSN; u8 ACI_AIFSN;
u8 CW; u8 CW;
__le16 TXOP_limit; __le16 TXOP_limit;
} __attribute__ ((packed)); } __attribute__ ((packed));
struct WMM_para_element struct WMM_para_element {
{ u8 QoS_info;
unsigned char QoS_info; u8 reserved;
unsigned char reserved;
struct AC_param ac_param[4]; struct AC_param ac_param[4];
} __attribute__ ((packed)); } __attribute__ ((packed));
struct ADDBA_request struct ADDBA_request {
{
u8 dialog_token; u8 dialog_token;
__le16 BA_para_set; __le16 BA_para_set;
__le16 BA_timeout_value; __le16 BA_timeout_value;
@ -1102,8 +1068,7 @@ enum P2P_WPSINFO {
#define P2P_PRIVATE_IOCTL_SET_LEN 64 #define P2P_PRIVATE_IOCTL_SET_LEN 64
enum P2P_PROTO_WK_ID enum P2P_PROTO_WK_ID {
{
P2P_FIND_PHASE_WK = 0, P2P_FIND_PHASE_WK = 0,
P2P_RESTORE_STATE_WK = 1, P2P_RESTORE_STATE_WK = 1,
P2P_PRE_TX_PROVDISC_PROCESS_WK = 2, P2P_PRE_TX_PROVDISC_PROCESS_WK = 2,
@ -1114,8 +1079,7 @@ enum P2P_PROTO_WK_ID
}; };
#ifdef CONFIG_P2P_PS #ifdef CONFIG_P2P_PS
enum P2P_PS_STATE enum P2P_PS_STATE {
{
P2P_PS_DISABLE = 0, P2P_PS_DISABLE = 0,
P2P_PS_ENABLE = 1, P2P_PS_ENABLE = 1,
P2P_PS_SCAN = 2, P2P_PS_SCAN = 2,
@ -1123,8 +1087,7 @@ enum P2P_PS_STATE
P2P_PS_ALLSTASLEEP = 4, // for P2P GO P2P_PS_ALLSTASLEEP = 4, // for P2P GO
}; };
enum P2P_PS_MODE enum P2P_PS_MODE {
{
P2P_PS_NONE = 0, P2P_PS_NONE = 0,
P2P_PS_CTWINDOW = 1, P2P_PS_CTWINDOW = 1,
P2P_PS_NOA = 2, P2P_PS_NOA = 2,
@ -1157,8 +1120,6 @@ enum P2P_PS_MODE
#define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff)) #define ICMPV6_MCAST_MAC(mac) ((mac[0]==0x33)&&(mac[1]==0x33)&&(mac[2]!=0xff))
#endif // CONFIG_TX_MCAST2UNI #endif // CONFIG_TX_MCAST2UNI
#ifdef CONFIG_WAPI_SUPPORT #ifdef CONFIG_WAPI_SUPPORT
#ifndef IW_AUTH_WAPI_VERSION_1 #ifndef IW_AUTH_WAPI_VERSION_1
#define IW_AUTH_WAPI_VERSION_1 0x00000008 #define IW_AUTH_WAPI_VERSION_1 0x00000008
@ -1175,4 +1136,3 @@ enum P2P_PS_MODE
#endif #endif
#endif // _WIFI_H_ #endif // _WIFI_H_

View file

@ -55,10 +55,6 @@
#define MAX_CUSTOM_LEN 64 #define MAX_CUSTOM_LEN 64
#define RATE_COUNT 4 #define RATE_COUNT 4
#ifdef CONFIG_GLOBAL_UI_PID
extern int ui_pid[3];
#endif
// combo scan // combo scan
#define WEXT_CSCAN_AMOUNT 9 #define WEXT_CSCAN_AMOUNT 9
#define WEXT_CSCAN_BUF_LEN 360 #define WEXT_CSCAN_BUF_LEN 360

View file

@ -26,7 +26,6 @@
#include <drv_types.h> #include <drv_types.h>
#include <mlme_osdep.h> #include <mlme_osdep.h>
#ifdef RTK_DMP_PLATFORM #ifdef RTK_DMP_PLATFORM
void Linkup_workitem_callback(struct work_struct *work) 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; struct adapter *adapter = (struct adapter *)FunctionContext;
/* remove for MP power tracking DM. /* 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; struct adapter *padapter = (struct adapter *)FunctionContext;
survey_timer_hdl(padapter); survey_timer_hdl(padapter);
} }
void _link_timer_hdl (void *FunctionContext) static void _link_timer_hdl (void *FunctionContext)
{ {
struct adapter *padapter = (struct adapter *)FunctionContext; struct adapter *padapter = (struct adapter *)FunctionContext;
link_timer_hdl(padapter); 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; struct sta_info *psta = (struct sta_info *)FunctionContext;
addba_timer_hdl(psta); addba_timer_hdl(psta);

View file

@ -29,6 +29,7 @@
#include <hal_intf.h> #include <hal_intf.h>
#include <rtw_ioctl.h> #include <rtw_ioctl.h>
#include <rtw_version.h> #include <rtw_version.h>
#include <rtw_br_ext.h>
#ifdef CONFIG_USB_HCI #ifdef CONFIG_USB_HCI
#include <usb_osintf.h> #include <usb_osintf.h>
@ -54,118 +55,118 @@ MODULE_AUTHOR("Realtek Semiconductor Corp.");
MODULE_VERSION(DRIVERVERSION); MODULE_VERSION(DRIVERVERSION);
/* module param defaults */ /* module param defaults */
int rtw_chip_version = 0x00; static int rtw_chip_version = 0x00;
int rtw_rfintfs = HWPI; static int rtw_rfintfs = HWPI;
int rtw_lbkmode = 0;//RTL8712_AIR_TRX; 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; //NDIS_802_11_SSID ssid;
int rtw_channel = 1;//ad-hoc support requirement static int rtw_channel = 1;//ad-hoc support requirement
int rtw_wireless_mode = WIRELESS_11BG_24N; static int rtw_wireless_mode = WIRELESS_11BG_24N;
int rtw_vrtl_carrier_sense = AUTO_VCS; static int rtw_vrtl_carrier_sense = AUTO_VCS;
int rtw_vcs_type = RTS_CTS;//* static int rtw_vcs_type = RTS_CTS;//*
int rtw_rts_thresh = 2347;//* static int rtw_rts_thresh = 2347;//*
int rtw_frag_thresh = 2346;//* static int rtw_frag_thresh = 2346;//*
int rtw_preamble = PREAMBLE_LONG;//long, short, auto static int rtw_preamble = PREAMBLE_LONG;//long, short, auto
int rtw_scan_mode = 1;//active, passive static int rtw_scan_mode = 1;//active, passive
int rtw_adhoc_tx_pwr = 1; static int rtw_adhoc_tx_pwr = 1;
int rtw_soft_ap = 0; static int rtw_soft_ap = 0;
//int smart_ps = 1; //int smart_ps = 1;
#ifdef CONFIG_POWER_SAVING #ifdef CONFIG_POWER_SAVING
int rtw_power_mgnt = 1; static int rtw_power_mgnt = 1;
#ifdef CONFIG_IPS_LEVEL_2 #ifdef CONFIG_IPS_LEVEL_2
int rtw_ips_mode = IPS_LEVEL_2; static int rtw_ips_mode = IPS_LEVEL_2;
#else #else
int rtw_ips_mode = IPS_NORMAL; static int rtw_ips_mode = IPS_NORMAL;
#endif #endif
#else #else
int rtw_power_mgnt = PS_MODE_ACTIVE; static int rtw_power_mgnt = PS_MODE_ACTIVE;
int rtw_ips_mode = IPS_NONE; static int rtw_ips_mode = IPS_NONE;
#endif #endif
int rtw_smart_ps = 2; static int rtw_smart_ps = 2;
#ifdef CONFIG_TX_EARLY_MODE #ifdef CONFIG_TX_EARLY_MODE
int rtw_early_mode=1; static int rtw_early_mode=1;
#endif #endif
module_param(rtw_ips_mode, int, 0644); module_param(rtw_ips_mode, int, 0644);
MODULE_PARM_DESC(rtw_ips_mode,"The default IPS mode"); MODULE_PARM_DESC(rtw_ips_mode,"The default IPS mode");
static int rtw_debug = 1; static int rtw_debug = 1;
int rtw_radio_enable = 1; static int rtw_radio_enable = 1;
int rtw_long_retry_lmt = 7; static int rtw_long_retry_lmt = 7;
int rtw_short_retry_lmt = 7; static int rtw_short_retry_lmt = 7;
int rtw_busy_thresh = 40; static int rtw_busy_thresh = 40;
//int qos_enable = 0; //* //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; static int rtw_software_encrypt = 0;
int rtw_software_decrypt = 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. static int rtw_wmm_enable = 1;// default is set to enable the wmm.
int rtw_uapsd_enable = 0; static int rtw_uapsd_enable = 0;
int rtw_uapsd_max_sp = NO_LIMIT; static int rtw_uapsd_max_sp = NO_LIMIT;
int rtw_uapsd_acbk_en = 0; static int rtw_uapsd_acbk_en = 0;
int rtw_uapsd_acbe_en = 0; static int rtw_uapsd_acbe_en = 0;
int rtw_uapsd_acvi_en = 0; static int rtw_uapsd_acvi_en = 0;
int rtw_uapsd_acvo_en = 0; static int rtw_uapsd_acvo_en = 0;
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
int rtw_ht_enable = 1; int rtw_ht_enable = 1;
int rtw_cbw40_enable = 3; // 0 :diable, bit(0): enable 2.4g, bit(1): enable 5g 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_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 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
int rtw_ampdu_amsdu = 0;// 0: disabled, 1:enabled, 2:auto static int rtw_ampdu_amsdu = 0;// 0: disabled, 1:enabled, 2:auto
#endif #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 rf_config = RF_1T2R; // 1T2R
int rtw_rf_config = RF_819X_MAX_TYPE; //auto static int rtw_rf_config = RF_819X_MAX_TYPE; //auto
int rtw_low_power = 0; static int rtw_low_power = 0;
#ifdef CONFIG_WIFI_TEST #ifdef CONFIG_WIFI_TEST
int rtw_wifi_spec = 1;//for wifi test static int rtw_wifi_spec = 1;//for wifi test
#else #else
int rtw_wifi_spec = 0; static int rtw_wifi_spec = 0;
#endif #endif
int rtw_channel_plan = RT_CHANNEL_DOMAIN_MAX; static int rtw_channel_plan = RT_CHANNEL_DOMAIN_MAX;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
int rtw_btcoex_enable = 1; static int rtw_btcoex_enable = 1;
int rtw_bt_iso = 2;// 0:Low, 1:High, 2:From Efuse static 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 static 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_bt_ampdu =1 ;// 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU.
#endif #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 static 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_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 #ifdef CONFIG_USB_AUTOSUSPEND
int rtw_enusbss = 1;//0:disable,1:enable static int rtw_enusbss = 1;//0:disable,1:enable
#else #else
int rtw_enusbss = 0;//0:disable,1:enable static int rtw_enusbss = 0;//0:disable,1:enable
#endif #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 #ifdef CONFIG_HW_PWRP_DETECTION
int rtw_hwpwrp_detect = 1; static int rtw_hwpwrp_detect = 1;
#else #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 #endif
#ifdef CONFIG_USB_HCI #ifdef CONFIG_USB_HCI
int rtw_hw_wps_pbc = 1; static int rtw_hw_wps_pbc = 1;
#else #else
int rtw_hw_wps_pbc = 0; static int rtw_hw_wps_pbc = 0;
#endif #endif
#ifdef CONFIG_TX_MCAST2UNI #ifdef CONFIG_TX_MCAST2UNI
@ -173,44 +174,44 @@ int rtw_mc2u_disable = 0;
#endif // CONFIG_TX_MCAST2UNI #endif // CONFIG_TX_MCAST2UNI
#ifdef CONFIG_DUALMAC_CONCURRENT #ifdef CONFIG_DUALMAC_CONCURRENT
int rtw_dmsp = 0; static int rtw_dmsp = 0;
#endif // CONFIG_DUALMAC_CONCURRENT #endif // CONFIG_DUALMAC_CONCURRENT
#ifdef CONFIG_80211D #ifdef CONFIG_80211D
int rtw_80211d = 0; static int rtw_80211d = 0;
#endif #endif
#ifdef CONFIG_REGULATORY_CTRL #ifdef CONFIG_REGULATORY_CTRL
int rtw_regulatory_id =2; static int rtw_regulatory_id =2;
#else #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 #endif
module_param(rtw_regulatory_id, int, 0644); module_param(rtw_regulatory_id, int, 0644);
#ifdef CONFIG_SPECIAL_SETTING_FOR_FUNAI_TV #ifdef CONFIG_SPECIAL_SETTING_FOR_FUNAI_TV
int rtw_force_ant = 2;//0 :normal, 1:Main ant, 2:Aux ant static int rtw_force_ant = 2;//0 :normal, 1:Main ant, 2:Aux ant
int rtw_force_igi =0;//0 :normal static int rtw_force_igi =0;//0 :normal
module_param(rtw_force_ant, int, 0644); module_param(rtw_force_ant, int, 0644);
module_param(rtw_force_igi, int, 0644); module_param(rtw_force_igi, int, 0644);
#endif #endif
#ifdef CONFIG_QOS_OPTIMIZATION #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 #else
int rtw_qos_opt_enable=0;//0: disable,1:enable static int rtw_qos_opt_enable=0;//0: disable,1:enable
#endif #endif
module_param(rtw_qos_opt_enable,int,0644); module_param(rtw_qos_opt_enable,int,0644);
char* ifname = "wlan%d"; static char* ifname = "wlan%d";
module_param(ifname, charp, 0644); module_param(ifname, charp, 0644);
MODULE_PARM_DESC(ifname, "The default name to allocate for first interface"); 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_param(if2name, charp, 0644);
MODULE_PARM_DESC(if2name, "The default name to allocate for second interface"); 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_initmac, charp, 0644);
module_param(rtw_channel_plan, int, 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 #endif //CONFIG_ADAPTOR_INFO_CACHING_FILE
#ifdef CONFIG_LAYER2_ROAMING #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_param(rtw_max_roaming_times, uint, 0644);
MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try"); MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try");
#endif //CONFIG_LAYER2_ROAMING #endif //CONFIG_LAYER2_ROAMING
#ifdef CONFIG_IOL #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_param(rtw_fw_iol, int, 0644);
MODULE_PARM_DESC(rtw_fw_iol,"FW IOL"); MODULE_PARM_DESC(rtw_fw_iol,"FW IOL");
#endif //CONFIG_IOL #endif //CONFIG_IOL
#ifdef CONFIG_FILE_FWIMG #ifdef CONFIG_FILE_FWIMG
char *rtw_fw_file_path= ""; static char *rtw_fw_file_path= "";
module_param(rtw_fw_file_path, charp, 0644); module_param(rtw_fw_file_path, charp, 0644);
MODULE_PARM_DESC(rtw_fw_file_path, "The path of fw image"); MODULE_PARM_DESC(rtw_fw_file_path, "The path of fw image");
#endif //CONFIG_FILE_FWIMG #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"); MODULE_PARM_DESC(rtw_btcoex_enable, "Enable BT co-existence mechanism");
#endif #endif
uint rtw_notch_filter = RTW_NOTCH_FILTER; static uint rtw_notch_filter = RTW_NOTCH_FILTER;
module_param(rtw_notch_filter, uint, 0644); module_param(rtw_notch_filter, uint, 0644);
MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for P2P"); MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for P2P");
module_param_named(debug, rtw_debug, int, 0444); module_param_named(debug, rtw_debug, int, 0444);
@ -324,7 +325,7 @@ void rtw_proc_remove_one(struct net_device *dev)
} }
#endif #endif
uint loadparam( struct adapter *padapter, _nic_hdl pnetdev) static uint loadparam( struct adapter *padapter, _nic_hdl pnetdev)
{ {
uint status = _SUCCESS; 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 }; 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. */ /* 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; unsigned int dscp;
@ -546,15 +547,14 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
{ {
struct iphdr *piphdr; struct iphdr *piphdr;
unsigned int dscp; unsigned int dscp;
u16 eth_type; __be16 eth_type;
u32 priority; u32 priority;
u8 *pdata = skb->data; u8 *pdata = skb->data;
_rtw_memcpy(&eth_type, pdata+(ETH_ALEN<<1), 2); _rtw_memcpy(&eth_type, pdata+(ETH_ALEN<<1), 2);
switch (eth_type) { switch (be16_to_cpu(eth_type)) {
case htons(ETH_P_IP): case ETH_P_IP:
piphdr = (struct iphdr *)(pdata+ETH_HLEN); piphdr = (struct iphdr *)(pdata+ETH_HLEN);
dscp = piphdr->tos & 0xfc; dscp = piphdr->tos & 0xfc;
@ -567,7 +567,6 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
} }
return rtw_1d_to_queue[priority]; return rtw_1d_to_queue[priority];
} }
#endif #endif
@ -1776,7 +1775,7 @@ int netdev_open(struct net_device *pnetdev)
} }
#ifdef CONFIG_IPS #ifdef CONFIG_IPS
int ips_netdrv_open(struct adapter *padapter) static int ips_netdrv_open(struct adapter *padapter)
{ {
int status = _SUCCESS; int status = _SUCCESS;
padapter->net_closed = _FALSE; padapter->net_closed = _FALSE;
@ -1853,7 +1852,7 @@ void rtw_ips_dev_unload(struct adapter *padapter)
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
DBG_871X("====> %s...\n",__FUNCTION__); 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) if(padapter->intf_stop)
{ {
@ -2279,7 +2278,7 @@ int rtw_gw_addr_query(struct adapter *padapter)
} }
#endif #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 mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct net_device *pnetdev = padapter->pnetdev; 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)); DBG_871X("==> "FUNC_ADPT_FMT" exit....\n", FUNC_ADPT_ARG(padapter));
return 0; return 0;
} }
extern void rtw_dev_unload(struct adapter *padapter);
int rtw_suspend_common(struct adapter *padapter) int rtw_suspend_common(struct adapter *padapter)
{ {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);

View file

@ -40,18 +40,11 @@
#include <asm/io.h> #include <asm/io.h>
#endif #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 #ifdef CONFIG_GLOBAL_UI_PID
int ui_pid[3] = {0, 0, 0}; int ui_pid[3] = {0, 0, 0};
#endif #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_suspend(struct usb_interface *intf, pm_message_t message);
static int rtw_resume(struct usb_interface *intf); static int rtw_resume(struct usb_interface *intf);
int rtw_resume_process(struct adapter *padapter); 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); 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[] = { 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) {.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 */ {} /* Terminating entry */
}; };
struct rtw_usb_drv rtl8188e_usb_drv = { static struct rtw_usb_drv rtl8188e_usb_drv = {
.usbdrv.name = (char*)"rtl8188eu", .usbdrv.name = (char*)"rtl8188eu",
.usbdrv.probe = rtw_drv_init, .usbdrv.probe = rtw_drv_init,
.usbdrv.disconnect = rtw_dev_remove, .usbdrv.disconnect = rtw_dev_remove,
@ -1293,9 +1285,9 @@ static script_item_u item;
* We accept the new device by returning 0. * 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 usb_interface *pusb_intf, const struct usb_device_id *pdid)
{ {
struct adapter *padapter = NULL; struct adapter *padapter = NULL;
@ -1436,7 +1428,7 @@ struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
free_hal_data: free_hal_data:
if(status != _SUCCESS && padapter->HalData) if(status != _SUCCESS && padapter->HalData)
rtw_mfree(padapter->HalData, sizeof(*(padapter->HalData))); kfree(padapter->HalData);
free_wdev: free_wdev:
if(status != _SUCCESS) { if(status != _SUCCESS) {
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
@ -1730,7 +1722,6 @@ free_dvobj:
exit: exit:
return status == _SUCCESS?0:-ENODEV; return status == _SUCCESS?0:-ENODEV;
} }
extern void rtw_unregister_netdevs(struct dvobj_priv *dvobj);
/* /*
* dev_remove() - our device is being removed * dev_remove() - our device is being removed
*/ */

View file

@ -382,7 +382,6 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
#ifdef CONFIG_TX_MCAST2UNI #ifdef CONFIG_TX_MCAST2UNI
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
extern int rtw_mc2u_disable;
#endif // CONFIG_TX_MCAST2UNI #endif // CONFIG_TX_MCAST2UNI
s32 res = 0; s32 res = 0;
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35)) #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))