mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 15:39:38 +00:00
rtl8188eu: Remove some Sparse problems
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
065126d8ce
commit
a0c85b341e
13 changed files with 246 additions and 296 deletions
12
Makefile
12
Makefile
|
@ -18,6 +18,8 @@ EXTRA_CFLAGS += -Wno-uninitialized
|
|||
|
||||
EXTRA_CFLAGS += -I$(src)/include
|
||||
|
||||
ccflags-y += -D__CHECK_ENDIAN__
|
||||
|
||||
CONFIG_AUTOCFG_CP = y
|
||||
|
||||
CONFIG_RTL8192C = n
|
||||
|
@ -305,11 +307,11 @@ _HAL_INTFS_FILES += $(CHIP_FILES)
|
|||
|
||||
ifeq ($(CONFIG_AUTOCFG_CP), y)
|
||||
|
||||
ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy)
|
||||
$(shell cp $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
|
||||
else
|
||||
$(shell cp $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
|
||||
endif
|
||||
#ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy)
|
||||
#$(shell cp $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
|
||||
#else
|
||||
#$(shell cp $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
|
||||
#endif
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
@ -115,8 +115,6 @@ unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
|
|||
unsigned char WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02};
|
||||
unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02};
|
||||
|
||||
extern unsigned char REALTEK_96B_IE[];
|
||||
|
||||
/********************************************************
|
||||
MCS rate definitions
|
||||
*********************************************************/
|
||||
|
@ -3980,39 +3978,37 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr )
|
|||
{
|
||||
|
||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_INVIT_REQ;
|
||||
u8 p2pie[ 255 ] = { 0x00 };
|
||||
u8 p2pielen = 0, i;
|
||||
u8 dialogToken = 3;
|
||||
u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh = 0;
|
||||
u16 len_channellist_attr = 0;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_INVIT_REQ;
|
||||
u8 p2pie[ 255 ] = { 0x00 };
|
||||
u8 p2pielen = 0, i;
|
||||
u8 dialogToken = 3;
|
||||
u8 channel_cnt_24g = 0, channel_cnt_5gl = 0, channel_cnt_5gh = 0;
|
||||
u16 len_channellist_attr = 0;
|
||||
#ifdef CONFIG_WFD
|
||||
u32 wfdielen = 0;
|
||||
u32 wfdielen = 0;
|
||||
#endif //CONFIG_WFD
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct wifidirect_info *pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif
|
||||
|
||||
struct xmit_frame *pmgntframe;
|
||||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct xmit_frame *pmgntframe;
|
||||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
unsigned short *fctrl;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
struct wifidirect_info *pwdinfo = &( padapter->wdinfo);
|
||||
|
||||
|
||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//update attribute
|
||||
pattrib = &pmgntframe->attrib;
|
||||
|
|
|
@ -869,7 +869,7 @@ _func_enter_;
|
|||
return NDIS_STATUS_NOT_ACCEPTED;
|
||||
|
||||
_irqlevel_changed_(&oldirql, LOWER);
|
||||
rtw_hal_set_hwreg(Adapter, HW_VAR_TRIGGER_GPIO_0, 0);
|
||||
rtw_hal_set_hwreg(Adapter, HW_VAR_TRIGGER_GPIO_0, NULL);
|
||||
_irqlevel_changed_(&oldirql, RAISE);
|
||||
|
||||
_func_exit_;
|
||||
|
|
|
@ -23,24 +23,25 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <wifi.h>
|
||||
#include <rtw_mlme_ext.h>
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
#include <linux/inetdevice.h>
|
||||
#endif
|
||||
|
||||
unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
|
||||
unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
|
||||
static unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
|
||||
static unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
|
||||
|
||||
unsigned char BROADCOM_OUI1[] = {0x00, 0x10, 0x18};
|
||||
unsigned char BROADCOM_OUI2[] = {0x00, 0x0a, 0xf7};
|
||||
unsigned char BROADCOM_OUI3[] = {0x00, 0x05, 0xb5};
|
||||
static unsigned char BROADCOM_OUI1[] = {0x00, 0x10, 0x18};
|
||||
static unsigned char BROADCOM_OUI2[] = {0x00, 0x0a, 0xf7};
|
||||
static unsigned char BROADCOM_OUI3[] = {0x00, 0x05, 0xb5};
|
||||
|
||||
unsigned char CISCO_OUI[] = {0x00, 0x40, 0x96};
|
||||
unsigned char MARVELL_OUI[] = {0x00, 0x50, 0x43};
|
||||
unsigned char RALINK_OUI[] = {0x00, 0x0c, 0x43};
|
||||
unsigned char REALTEK_OUI[] = {0x00, 0xe0, 0x4c};
|
||||
unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
|
||||
unsigned char EPIGRAM_OUI[] = {0x00, 0x90, 0x4c};
|
||||
static unsigned char CISCO_OUI[] = {0x00, 0x40, 0x96};
|
||||
static unsigned char MARVELL_OUI[] = {0x00, 0x50, 0x43};
|
||||
static unsigned char RALINK_OUI[] = {0x00, 0x0c, 0x43};
|
||||
static unsigned char REALTEK_OUI[] = {0x00, 0xe0, 0x4c};
|
||||
static unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
|
||||
static unsigned char EPIGRAM_OUI[] = {0x00, 0x90, 0x4c};
|
||||
|
||||
unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
|
||||
|
||||
|
@ -577,11 +578,10 @@ __inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork)
|
|||
|
||||
u16 get_beacon_interval(WLAN_BSSID_EX *bss)
|
||||
{
|
||||
unsigned short val;
|
||||
_rtw_memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
|
||||
|
||||
return le16_to_cpu(val);
|
||||
__le16 le_val;
|
||||
|
||||
memcpy(&le_val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
|
||||
return le16_to_cpu(le_val);
|
||||
}
|
||||
|
||||
int is_client_associated_to_ap(_adapter *padapter)
|
||||
|
@ -664,7 +664,7 @@ void CAM_empty_entry(
|
|||
|
||||
void invalidate_cam_all(_adapter *padapter)
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL);
|
||||
}
|
||||
#if 0
|
||||
static u32 _ReadCAM(_adapter *padapter ,u32 addr)
|
||||
|
@ -838,7 +838,7 @@ void flush_all_cam_entry(_adapter *padapter)
|
|||
}
|
||||
#else //CONFIG_CONCURRENT_MODE
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL);
|
||||
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ extern unsigned char P2P_OUI[];
|
|||
|
||||
extern unsigned char WMM_INFO_OUI[];
|
||||
extern unsigned char WMM_PARA_OUI[];
|
||||
|
||||
extern unsigned char REALTEK_96B_IE[];
|
||||
|
||||
//
|
||||
// Channel Plan Type.
|
||||
|
@ -557,7 +557,6 @@ struct mlme_ext_priv
|
|||
#ifdef DBG_FIXED_CHAN
|
||||
u8 fixed_chan;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
int init_mlme_ext_priv(_adapter* padapter);
|
||||
|
|
156
include/rtw_mp.h
156
include/rtw_mp.h
|
@ -669,103 +669,105 @@ typedef enum _ENCRY_CTRL_STATE_ {
|
|||
#define Mac_DropPacket 0xA0000000
|
||||
|
||||
//=======================================================================
|
||||
//extern struct mp_xmit_frame *alloc_mp_xmitframe(struct mp_priv *pmp_priv);
|
||||
//extern int free_mp_xmitframe(struct xmit_priv *pxmitpriv, struct mp_xmit_frame *pmp_xmitframe);
|
||||
//struct mp_xmit_frame *alloc_mp_xmitframe(struct mp_priv *pmp_priv);
|
||||
//int free_mp_xmitframe(struct xmit_priv *pxmitpriv, struct mp_xmit_frame *pmp_xmitframe);
|
||||
|
||||
extern s32 init_mp_priv(PADAPTER padapter);
|
||||
extern void free_mp_priv(struct mp_priv *pmp_priv);
|
||||
extern s32 MPT_InitializeAdapter(PADAPTER padapter, u8 Channel);
|
||||
extern void MPT_DeInitAdapter(PADAPTER padapter);
|
||||
extern s32 mp_start_test(PADAPTER padapter);
|
||||
extern void mp_stop_test(PADAPTER padapter);
|
||||
s32 init_mp_priv(PADAPTER padapter);
|
||||
void free_mp_priv(struct mp_priv *pmp_priv);
|
||||
s32 MPT_InitializeAdapter(PADAPTER padapter, u8 Channel);
|
||||
void MPT_DeInitAdapter(PADAPTER padapter);
|
||||
s32 mp_start_test(PADAPTER padapter);
|
||||
void mp_stop_test(PADAPTER padapter);
|
||||
|
||||
//=======================================================================
|
||||
//extern void IQCalibrateBcut(PADAPTER pAdapter);
|
||||
//void IQCalibrateBcut(PADAPTER pAdapter);
|
||||
|
||||
//extern u32 bb_reg_read(PADAPTER Adapter, u16 offset);
|
||||
//extern u8 bb_reg_write(PADAPTER Adapter, u16 offset, u32 value);
|
||||
//extern u32 rf_reg_read(PADAPTER Adapter, u8 path, u8 offset);
|
||||
//extern u8 rf_reg_write(PADAPTER Adapter, u8 path, u8 offset, u32 value);
|
||||
//u32 bb_reg_read(PADAPTER Adapter, u16 offset);
|
||||
//u8 bb_reg_write(PADAPTER Adapter, u16 offset, u32 value);
|
||||
//u32 rf_reg_read(PADAPTER Adapter, u8 path, u8 offset);
|
||||
//u8 rf_reg_write(PADAPTER Adapter, u8 path, u8 offset, u32 value);
|
||||
|
||||
//extern u32 get_bb_reg(PADAPTER Adapter, u16 offset, u32 bitmask);
|
||||
//extern u8 set_bb_reg(PADAPTER Adapter, u16 offset, u32 bitmask, u32 value);
|
||||
//extern u32 get_rf_reg(PADAPTER Adapter, u8 path, u8 offset, u32 bitmask);
|
||||
//extern u8 set_rf_reg(PADAPTER Adapter, u8 path, u8 offset, u32 bitmask, u32 value);
|
||||
//u32 get_bb_reg(PADAPTER Adapter, u16 offset, u32 bitmask);
|
||||
//u8 set_bb_reg(PADAPTER Adapter, u16 offset, u32 bitmask, u32 value);
|
||||
//u32 get_rf_reg(PADAPTER Adapter, u8 path, u8 offset, u32 bitmask);
|
||||
//u8 set_rf_reg(PADAPTER Adapter, u8 path, u8 offset, u32 bitmask, u32 value);
|
||||
|
||||
extern u32 _read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask);
|
||||
extern void _write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask, u32 val);
|
||||
u32 _read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask);
|
||||
void _write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask, u32 val);
|
||||
|
||||
extern u32 read_macreg(_adapter *padapter, u32 addr, u32 sz);
|
||||
extern void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz);
|
||||
extern u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask);
|
||||
extern void write_bbreg(_adapter *padapter, u32 addr, u32 bitmask, u32 val);
|
||||
extern u32 read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr);
|
||||
extern void write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 val);
|
||||
u32 read_macreg(_adapter *padapter, u32 addr, u32 sz);
|
||||
void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz);
|
||||
u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask);
|
||||
void write_bbreg(_adapter *padapter, u32 addr, u32 bitmask, u32 val);
|
||||
u32 read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr);
|
||||
void write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 val);
|
||||
|
||||
extern void SetChannel(PADAPTER pAdapter);
|
||||
extern void SetBandwidth(PADAPTER pAdapter);
|
||||
extern void SetTxPower(PADAPTER pAdapter);
|
||||
extern void SetAntennaPathPower(PADAPTER pAdapter);
|
||||
//extern void SetTxAGCOffset(PADAPTER pAdapter, u32 ulTxAGCOffset);
|
||||
extern void SetDataRate(PADAPTER pAdapter);
|
||||
void SetChannel(PADAPTER pAdapter);
|
||||
void SetBandwidth(PADAPTER pAdapter);
|
||||
void SetTxPower(PADAPTER pAdapter);
|
||||
void SetAntennaPathPower(PADAPTER pAdapter);
|
||||
void SetTxAGCOffset(PADAPTER pAdapter, u32 ulTxAGCOffset);
|
||||
void SetDataRate(PADAPTER pAdapter);
|
||||
|
||||
extern void SetAntenna(PADAPTER pAdapter);
|
||||
void SetAntenna(PADAPTER pAdapter);
|
||||
|
||||
//extern void SetCrystalCap(PADAPTER pAdapter);
|
||||
//void SetCrystalCap(PADAPTER pAdapter);
|
||||
|
||||
extern s32 SetThermalMeter(PADAPTER pAdapter, u8 target_ther);
|
||||
extern void GetThermalMeter(PADAPTER pAdapter, u8 *value);
|
||||
s32 SetThermalMeter(PADAPTER pAdapter, u8 target_ther);
|
||||
void GetThermalMeter(PADAPTER pAdapter, u8 *value);
|
||||
|
||||
extern void SetContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
extern void SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart);
|
||||
extern void SetSingleToneTx(PADAPTER pAdapter, u8 bStart);
|
||||
extern void SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart);
|
||||
extern void PhySetTxPowerLevel(PADAPTER pAdapter);
|
||||
void SetContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
void SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart);
|
||||
void SetSingleToneTx(PADAPTER pAdapter, u8 bStart);
|
||||
void SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart);
|
||||
void PhySetTxPowerLevel(PADAPTER pAdapter);
|
||||
|
||||
extern void fill_txdesc_for_mp(PADAPTER padapter, struct tx_desc *ptxdesc);
|
||||
extern void SetPacketTx(PADAPTER padapter);
|
||||
extern void SetPacketRx(PADAPTER pAdapter, u8 bStartRx);
|
||||
void fill_txdesc_for_mp(PADAPTER padapter, struct tx_desc *ptxdesc);
|
||||
void SetPacketTx(PADAPTER padapter);
|
||||
void SetPacketRx(PADAPTER pAdapter, u8 bStartRx);
|
||||
|
||||
extern void ResetPhyRxPktCount(PADAPTER pAdapter);
|
||||
extern u32 GetPhyRxPktReceived(PADAPTER pAdapter);
|
||||
extern u32 GetPhyRxPktCRC32Error(PADAPTER pAdapter);
|
||||
void ResetPhyRxPktCount(PADAPTER pAdapter);
|
||||
u32 GetPhyRxPktReceived(PADAPTER pAdapter);
|
||||
u32 GetPhyRxPktCRC32Error(PADAPTER pAdapter);
|
||||
|
||||
extern s32 SetPowerTracking(PADAPTER padapter, u8 enable);
|
||||
extern void GetPowerTracking(PADAPTER padapter, u8 *enable);
|
||||
s32 SetPowerTracking(PADAPTER padapter, u8 enable);
|
||||
void GetPowerTracking(PADAPTER padapter, u8 *enable);
|
||||
|
||||
extern u32 mp_query_psd(PADAPTER pAdapter, u8 *data);
|
||||
u32 mp_query_psd(PADAPTER pAdapter, u8 *data);
|
||||
|
||||
|
||||
extern void Hal_SetAntenna(PADAPTER pAdapter);
|
||||
extern void Hal_SetBandwidth(PADAPTER pAdapter);
|
||||
void Hal_SetAntenna(PADAPTER pAdapter);
|
||||
void Hal_SetBandwidth(PADAPTER pAdapter);
|
||||
|
||||
extern void Hal_SetTxPower(PADAPTER pAdapter);
|
||||
extern void Hal_SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart);
|
||||
extern void Hal_SetSingleToneTx ( PADAPTER pAdapter , u8 bStart );
|
||||
extern void Hal_SetSingleCarrierTx (PADAPTER pAdapter, u8 bStart);
|
||||
extern void Hal_SetContinuousTx (PADAPTER pAdapter, u8 bStart);
|
||||
extern void Hal_SetBandwidth(PADAPTER pAdapter);
|
||||
void Hal_SetTxPower(PADAPTER pAdapter);
|
||||
void Hal_SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart);
|
||||
void Hal_SetSingleToneTx ( PADAPTER pAdapter , u8 bStart );
|
||||
void Hal_SetSingleCarrierTx (PADAPTER pAdapter, u8 bStart);
|
||||
void Hal_SetContinuousTx (PADAPTER pAdapter, u8 bStart);
|
||||
void Hal_SetBandwidth(PADAPTER pAdapter);
|
||||
|
||||
extern void Hal_SetDataRate(PADAPTER pAdapter);
|
||||
extern void Hal_SetChannel(PADAPTER pAdapter);
|
||||
extern void Hal_SetAntennaPathPower(PADAPTER pAdapter);
|
||||
extern s32 Hal_SetThermalMeter(PADAPTER pAdapter, u8 target_ther);
|
||||
extern s32 Hal_SetPowerTracking(PADAPTER padapter, u8 enable);
|
||||
extern void Hal_GetPowerTracking(PADAPTER padapter, u8 * enable);
|
||||
extern void Hal_GetThermalMeter(PADAPTER pAdapter, u8 *value);
|
||||
extern void Hal_mpt_SwitchRfSetting(PADAPTER pAdapter);
|
||||
extern void Hal_MPT_CCKTxPowerAdjust(PADAPTER Adapter, BOOLEAN bInCH14);
|
||||
extern void Hal_MPT_CCKTxPowerAdjustbyIndex(PADAPTER pAdapter, BOOLEAN beven);
|
||||
extern void Hal_SetCCKTxPower(PADAPTER pAdapter, u8 * TxPower);
|
||||
extern void Hal_SetOFDMTxPower(PADAPTER pAdapter, u8 * TxPower);
|
||||
extern void Hal_TriggerRFThermalMeter(PADAPTER pAdapter);
|
||||
extern u8 Hal_ReadRFThermalMeter(PADAPTER pAdapter);
|
||||
extern void Hal_SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
extern void Hal_SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
extern void Hal_ProSetCrystalCap (PADAPTER pAdapter , u32 CrystalCapVal);
|
||||
extern void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv);
|
||||
extern void MP_PHY_SetRFPathSwitch(PADAPTER pAdapter ,BOOLEAN bMain);
|
||||
extern void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart);
|
||||
void Hal_SetDataRate(PADAPTER pAdapter);
|
||||
void Hal_SetChannel(PADAPTER pAdapter);
|
||||
void Hal_SetAntennaPathPower(PADAPTER pAdapter);
|
||||
s32 Hal_SetThermalMeter(PADAPTER pAdapter, u8 target_ther);
|
||||
s32 Hal_SetPowerTracking(PADAPTER padapter, u8 enable);
|
||||
void Hal_GetPowerTracking(PADAPTER padapter, u8 * enable);
|
||||
void Hal_GetThermalMeter(PADAPTER pAdapter, u8 *value);
|
||||
void Hal_mpt_SwitchRfSetting(PADAPTER pAdapter);
|
||||
void Hal_MPT_CCKTxPowerAdjust(PADAPTER Adapter, BOOLEAN bInCH14);
|
||||
void Hal_MPT_CCKTxPowerAdjustbyIndex(PADAPTER pAdapter, BOOLEAN beven);
|
||||
void Hal_SetCCKTxPower(PADAPTER pAdapter, u8 * TxPower);
|
||||
void Hal_SetOFDMTxPower(PADAPTER pAdapter, u8 * TxPower);
|
||||
void Hal_TriggerRFThermalMeter(PADAPTER pAdapter);
|
||||
u8 Hal_ReadRFThermalMeter(PADAPTER pAdapter);
|
||||
void Hal_SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
void SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
void SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
void Hal_SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart);
|
||||
void Hal_ProSetCrystalCap (PADAPTER pAdapter , u32 CrystalCapVal);
|
||||
void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv);
|
||||
void MP_PHY_SetRFPathSwitch(PADAPTER pAdapter ,BOOLEAN bMain);
|
||||
void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart);
|
||||
|
||||
#endif //_RTW_MP_H_
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv);
|
|||
|
||||
#ifdef _RTW_MP_IOCTL_C_
|
||||
|
||||
const struct oid_obj_priv oid_rtl_seg_81_80_00[] =
|
||||
static const struct oid_obj_priv oid_rtl_seg_81_80_00[] =
|
||||
{
|
||||
{1, &oid_null_function}, //0x00 OID_RT_PRO_RESET_DUT
|
||||
{1, &oid_rt_pro_set_data_rate_hdl}, //0x01
|
||||
|
@ -241,7 +241,7 @@ const struct oid_obj_priv oid_rtl_seg_81_80_00[] =
|
|||
|
||||
};
|
||||
|
||||
const struct oid_obj_priv oid_rtl_seg_81_80_20[] =
|
||||
static const struct oid_obj_priv oid_rtl_seg_81_80_20[] =
|
||||
{
|
||||
{1, &oid_null_function}, //0x20 OID_RT_PRO_READ_POWER_CONTROL
|
||||
{1, &oid_null_function}, //0x21 OID_RT_PRO_WRITE_EEPROM
|
||||
|
@ -262,7 +262,7 @@ const struct oid_obj_priv oid_rtl_seg_81_80_20[] =
|
|||
|
||||
};
|
||||
|
||||
const struct oid_obj_priv oid_rtl_seg_81_80_40[] =
|
||||
static const struct oid_obj_priv oid_rtl_seg_81_80_40[] =
|
||||
{
|
||||
{1, &oid_null_function}, //0x40
|
||||
{1, &oid_null_function}, //0x41
|
||||
|
@ -272,7 +272,7 @@ const struct oid_obj_priv oid_rtl_seg_81_80_40[] =
|
|||
{1, &oid_null_function} //0x45
|
||||
};
|
||||
|
||||
const struct oid_obj_priv oid_rtl_seg_81_80_80[] =
|
||||
static const struct oid_obj_priv oid_rtl_seg_81_80_80[] =
|
||||
{
|
||||
{1, &oid_null_function}, //0x80 OID_RT_DRIVER_OPTION
|
||||
{1, &oid_null_function}, //0x81 OID_RT_RF_OFF
|
||||
|
@ -280,12 +280,12 @@ const struct oid_obj_priv oid_rtl_seg_81_80_80[] =
|
|||
|
||||
};
|
||||
|
||||
const struct oid_obj_priv oid_rtl_seg_81_85[] =
|
||||
static const struct oid_obj_priv oid_rtl_seg_81_85[] =
|
||||
{
|
||||
{1, &oid_rt_wireless_mode_hdl} //0x00 OID_RT_WIRELESS_MODE
|
||||
};
|
||||
|
||||
struct oid_obj_priv oid_rtl_seg_81_87[] =
|
||||
static struct oid_obj_priv oid_rtl_seg_81_87[] =
|
||||
{
|
||||
{1, &oid_null_function}, //0x80 OID_RT_PRO8187_WI_POLL
|
||||
{1, &oid_rt_pro_write_bb_reg_hdl}, //0x81
|
||||
|
@ -294,7 +294,7 @@ struct oid_obj_priv oid_rtl_seg_81_87[] =
|
|||
{1, &oid_rt_pro_read_rf_reg_hdl} //0x83
|
||||
};
|
||||
|
||||
struct oid_obj_priv oid_rtl_seg_87_11_00[] =
|
||||
static struct oid_obj_priv oid_rtl_seg_87_11_00[] =
|
||||
{
|
||||
{1, &oid_rt_pro8711_join_bss_hdl}, //0x00 //S
|
||||
{1, &oid_rt_pro_read_register_hdl}, //0x01
|
||||
|
@ -330,7 +330,7 @@ struct oid_obj_priv oid_rtl_seg_87_11_00[] =
|
|||
{1, &oid_rt_poll_rx_status_hdl} //0X1F
|
||||
};
|
||||
|
||||
struct oid_obj_priv oid_rtl_seg_87_11_20[] =
|
||||
static struct oid_obj_priv oid_rtl_seg_87_11_20[] =
|
||||
{
|
||||
{1, &oid_rt_pro_cfg_debug_message_hdl}, //0x20
|
||||
{1, &oid_rt_pro_set_data_rate_ex_hdl}, //0x21
|
||||
|
@ -340,23 +340,23 @@ struct oid_obj_priv oid_rtl_seg_87_11_20[] =
|
|||
};
|
||||
|
||||
|
||||
struct oid_obj_priv oid_rtl_seg_87_11_50[] =
|
||||
static struct oid_obj_priv oid_rtl_seg_87_11_50[] =
|
||||
{
|
||||
{1, &oid_rt_pro_qry_pwrstate_hdl}, //0x50
|
||||
{1, &oid_rt_pro_set_pwrstate_hdl} //0x51
|
||||
};
|
||||
|
||||
struct oid_obj_priv oid_rtl_seg_87_11_80[] =
|
||||
static struct oid_obj_priv oid_rtl_seg_87_11_80[] =
|
||||
{
|
||||
{1, &oid_null_function} //0x80
|
||||
};
|
||||
|
||||
struct oid_obj_priv oid_rtl_seg_87_11_B0[] =
|
||||
static struct oid_obj_priv oid_rtl_seg_87_11_B0[] =
|
||||
{
|
||||
{1, &oid_null_function} //0xB0
|
||||
};
|
||||
|
||||
struct oid_obj_priv oid_rtl_seg_87_11_F0[] =
|
||||
static struct oid_obj_priv oid_rtl_seg_87_11_F0[] =
|
||||
{
|
||||
{1, &oid_null_function}, //0xF0
|
||||
{1, &oid_null_function}, //0xF1
|
||||
|
@ -377,7 +377,7 @@ struct oid_obj_priv oid_rtl_seg_87_11_F0[] =
|
|||
|
||||
};
|
||||
|
||||
struct oid_obj_priv oid_rtl_seg_87_12_00[]=
|
||||
static struct oid_obj_priv oid_rtl_seg_87_12_00[]=
|
||||
{
|
||||
{1, &oid_rt_pro_encryption_ctrl_hdl}, //0x00 Q&S
|
||||
{1, &oid_rt_pro_add_sta_info_hdl}, //0x01 S
|
||||
|
@ -542,7 +542,6 @@ u32 mp_ioctl_xmit_packet_hdl(struct oid_par_priv* poid_par_priv);
|
|||
|
||||
|
||||
struct mp_ioctl_handler mp_ioctl_hdl[] = {
|
||||
|
||||
/*0*/ GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_start_test_hdl, OID_RT_PRO_START_TEST)
|
||||
GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_stop_test_hdl, OID_RT_PRO_STOP_TEST)
|
||||
|
||||
|
|
|
@ -168,47 +168,17 @@ do{\
|
|||
|
||||
|
||||
struct tx_desc{
|
||||
|
||||
//DWORD 0
|
||||
unsigned int txdw0;
|
||||
|
||||
unsigned int txdw1;
|
||||
|
||||
unsigned int txdw2;
|
||||
|
||||
unsigned int txdw3;
|
||||
|
||||
unsigned int txdw4;
|
||||
|
||||
unsigned int txdw5;
|
||||
|
||||
unsigned int txdw6;
|
||||
|
||||
unsigned int txdw7;
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
unsigned int txdw8;
|
||||
|
||||
unsigned int txdw9;
|
||||
|
||||
unsigned int txdw10;
|
||||
|
||||
unsigned int txdw11;
|
||||
|
||||
// 2008/05/15 MH Because PCIE HW memory R/W 4K limit. And now, our descriptor
|
||||
// size is 40 bytes. If you use more than 102 descriptor( 103*40>4096), HW will execute
|
||||
// memoryR/W CRC error. And then all DMA fetch will fail. We must decrease descriptor
|
||||
// number or enlarge descriptor size as 64 bytes.
|
||||
unsigned int txdw12;
|
||||
|
||||
unsigned int txdw13;
|
||||
|
||||
unsigned int txdw14;
|
||||
|
||||
unsigned int txdw15;
|
||||
#endif
|
||||
/* DWORD 0 */
|
||||
__le32 txdw0;
|
||||
__le32 txdw1;
|
||||
__le32 txdw2;
|
||||
__le32 txdw3;
|
||||
__le32 txdw4;
|
||||
__le32 txdw5;
|
||||
__le32 txdw6;
|
||||
__le32 txdw7;
|
||||
};
|
||||
|
||||
|
||||
union txdesc {
|
||||
struct tx_desc txdesc;
|
||||
unsigned int value[TXDESC_SIZE>>2];
|
||||
|
|
127
include/wifi.h
127
include/wifi.h
|
@ -254,113 +254,113 @@ enum WIFI_REG_DOMAIN {
|
|||
|
||||
#define SetToDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_TO_DS_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_); \
|
||||
} while(0)
|
||||
|
||||
#define GetToDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_TO_DS_)) != 0)
|
||||
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
|
||||
|
||||
#define ClearToDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
|
||||
} while(0)
|
||||
|
||||
#define SetFrDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
|
||||
} while(0)
|
||||
|
||||
#define GetFrDs(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_FROM_DS_)) != 0)
|
||||
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
|
||||
|
||||
#define ClearFrDs(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
|
||||
} while (0)
|
||||
|
||||
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
|
||||
|
||||
|
||||
#define SetMFrag(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
|
||||
} while (0)
|
||||
|
||||
#define GetMFrag(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_MORE_FRAG_)) != 0)
|
||||
#define GetMFrag(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_FRAG_)) != 0)
|
||||
|
||||
#define ClearMFrag(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
|
||||
} while (0)
|
||||
|
||||
#define SetRetry(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_RETRY_); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_); \
|
||||
} while (0)
|
||||
|
||||
#define GetRetry(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_RETRY_)) != 0)
|
||||
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
|
||||
|
||||
#define ClearRetry(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
|
||||
} while (0)
|
||||
|
||||
#define SetPwrMgt(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
|
||||
} while(0)
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
|
||||
} while (0)
|
||||
|
||||
#define GetPwrMgt(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_PWRMGT_)) != 0)
|
||||
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
|
||||
|
||||
#define ClearPwrMgt(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
|
||||
} while(0)
|
||||
|
||||
#define SetMData(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
|
||||
} while(0)
|
||||
|
||||
#define GetMData(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_MORE_DATA_)) != 0)
|
||||
#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
|
||||
|
||||
#define ClearMData(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
|
||||
} while(0)
|
||||
|
||||
#define SetPrivacy(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
|
||||
} while(0)
|
||||
|
||||
#define GetPrivacy(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_PRIVACY_)) != 0)
|
||||
#define GetPrivacy(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
|
||||
|
||||
#define ClearPrivacy(pbuf) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
|
||||
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
|
||||
} while(0)
|
||||
|
||||
|
||||
#define GetOrder(pbuf) (((*(unsigned short *)(pbuf)) & le16_to_cpu(_ORDER_)) != 0)
|
||||
#define GetOrder(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
|
||||
|
||||
#define GetFrameType(pbuf) (le16_to_cpu(*(unsigned short *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
#define GetFrameType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
|
||||
#define SetFrameType(pbuf,type) \
|
||||
do { \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
|
||||
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define GetFrameSubType(pbuf) (cpu_to_le16(*(unsigned short *)(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) \
|
||||
do { \
|
||||
*(unsigned short *)(pbuf) &= cpu_to_le16(~(BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2))); \
|
||||
*(unsigned short *)(pbuf) |= cpu_to_le16(type); \
|
||||
*(__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)
|
||||
|
||||
#define GetSequence(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) >> 4)
|
||||
#define GetSequence(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) >> 4)
|
||||
|
||||
#define GetFragNum(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & 0x0f)
|
||||
#define GetFragNum(pbuf) (le16_to_cpu(*(__le16 *)((SIZE_PTR)(pbuf) + 22)) & 0x0f)
|
||||
|
||||
#define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)))
|
||||
|
||||
|
@ -369,7 +369,7 @@ enum WIFI_REG_DOMAIN {
|
|||
*(unsigned short *)((SIZE_PTR)(pbuf) + 22) = \
|
||||
((*(unsigned short *)((SIZE_PTR)(pbuf) + 22)) & le16_to_cpu(~(0x000f))) | \
|
||||
cpu_to_le16(0x0f & (num)); \
|
||||
} while(0)
|
||||
} while (0)
|
||||
|
||||
#define SetSeqNum(pbuf, num) \
|
||||
do { \
|
||||
|
@ -740,9 +740,9 @@ struct HT_info_element
|
|||
|
||||
struct AC_param
|
||||
{
|
||||
unsigned char ACI_AIFSN;
|
||||
unsigned char CW;
|
||||
unsigned short TXOP_limit;
|
||||
u8 ACI_AIFSN;
|
||||
u8 CW;
|
||||
__le16 TXOP_limit;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct WMM_para_element
|
||||
|
@ -754,10 +754,10 @@ struct WMM_para_element
|
|||
|
||||
struct ADDBA_request
|
||||
{
|
||||
unsigned char dialog_token;
|
||||
unsigned short BA_para_set;
|
||||
unsigned short BA_timeout_value;
|
||||
unsigned short BA_starting_seqctrl;
|
||||
u8 dialog_token;
|
||||
__le16 BA_para_set;
|
||||
__le16 BA_timeout_value;
|
||||
__le16 BA_starting_seqctrl;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
|
@ -787,18 +787,15 @@ struct ieee80211_ht_addt_info {
|
|||
unsigned char basic_set[16];
|
||||
};
|
||||
|
||||
struct HT_caps_element
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned short HT_caps_info;
|
||||
unsigned char AMPDU_para;
|
||||
unsigned char MCS_rate[16];
|
||||
unsigned short HT_ext_caps;
|
||||
unsigned int Beamforming_caps;
|
||||
unsigned char ASEL_caps;
|
||||
struct HT_caps_element {
|
||||
union {
|
||||
struct {
|
||||
__le16 HT_caps_info;
|
||||
u8 AMPDU_para;
|
||||
u8 MCS_rate[16];
|
||||
__le16 HT_ext_caps;
|
||||
__le16 Beamforming_caps;
|
||||
u8 ASEL_caps;
|
||||
} HT_cap_element;
|
||||
unsigned char HT_cap[26];
|
||||
};
|
||||
|
@ -813,9 +810,9 @@ struct HT_info_element
|
|||
|
||||
struct AC_param
|
||||
{
|
||||
unsigned char ACI_AIFSN;
|
||||
unsigned char CW;
|
||||
unsigned short TXOP_limit;
|
||||
u8 ACI_AIFSN;
|
||||
u8 CW;
|
||||
__le16 TXOP_limit;
|
||||
};
|
||||
|
||||
struct WMM_para_element
|
||||
|
@ -827,10 +824,10 @@ struct WMM_para_element
|
|||
|
||||
struct ADDBA_request
|
||||
{
|
||||
unsigned char dialog_token;
|
||||
unsigned short BA_para_set;
|
||||
unsigned short BA_timeout_value;
|
||||
unsigned short BA_starting_seqctrl;
|
||||
u8 dialog_token;
|
||||
__le16 BA_para_set;
|
||||
__le16 BA_timeout_value;
|
||||
__le16 BA_starting_seqctrl;
|
||||
};
|
||||
|
||||
|
||||
|
@ -839,11 +836,11 @@ struct ADDBA_request
|
|||
#endif
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_FACTOR {
|
||||
MAX_AMPDU_FACTOR_8K = 0,
|
||||
MAX_AMPDU_FACTOR_8K = 0,
|
||||
MAX_AMPDU_FACTOR_16K = 1,
|
||||
MAX_AMPDU_FACTOR_32K = 2,
|
||||
MAX_AMPDU_FACTOR_64K = 3,
|
||||
}HT_CAP_AMPDU_FACTOR;
|
||||
} HT_CAP_AMPDU_FACTOR;
|
||||
|
||||
/* 802.11n HT capabilities masks */
|
||||
#define IEEE80211_HT_CAP_SUP_WIDTH 0x0002
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#define WEXT_CSCAN_HOME_DWELL_SECTION 'H'
|
||||
#define WEXT_CSCAN_TYPE_SECTION 'T'
|
||||
|
||||
static struct mp_ioctl_handler mp_ioctl_hdl[] = {
|
||||
struct mp_ioctl_handler mp_ioctl_hdl[] = {
|
||||
/*0*/ GEN_HANDLER(sizeof(u32), rtl8188eu_oid_rt_pro_start_test_hdl, OID_RT_PRO_START_TEST)
|
||||
GEN_HANDLER(sizeof(u32), rtl8188eu_oid_rt_pro_stop_test_hdl, OID_RT_PRO_STOP_TEST)
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ extern u8 key_2char2num(u8 hch, u8 lch);
|
|||
extern u8 str_2char2num(u8 hch, u8 lch);
|
||||
extern u8 convert_ip_addr(u8 hch, u8 mch, u8 lch);
|
||||
|
||||
u32 rtw_rates[] = {1000000,2000000,5500000,11000000,
|
||||
static u32 rtw_rates[] = {1000000,2000000,5500000,11000000,
|
||||
6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000};
|
||||
|
||||
static const char * const iw_operation_mode[] =
|
||||
|
@ -315,6 +315,7 @@ static char *translate_scan(_adapter *padapter,
|
|||
{
|
||||
struct iw_event iwe;
|
||||
u16 cap;
|
||||
__le16 le_cap;
|
||||
u32 ht_ielen = 0;
|
||||
char custom[MAX_CUSTOM_LEN];
|
||||
char *p;
|
||||
|
@ -484,10 +485,10 @@ static char *translate_scan(_adapter *padapter,
|
|||
|
||||
/* Add mode */
|
||||
iwe.cmd = SIOCGIWMODE;
|
||||
_rtw_memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
_rtw_memcpy((u8 *)&le_cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
|
||||
|
||||
cap = le16_to_cpu(cap);
|
||||
cap = le16_to_cpu(le_cap);
|
||||
|
||||
if(cap & (WLAN_CAPABILITY_IBSS |WLAN_CAPABILITY_BSS)){
|
||||
if (cap & WLAN_CAPABILITY_BSS)
|
||||
|
@ -1953,7 +1954,7 @@ struct iw_mlme
|
|||
#endif
|
||||
|
||||
int ret=0;
|
||||
u16 reason;
|
||||
__le16 reason;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct iw_mlme *mlme = (struct iw_mlme *) extra;
|
||||
|
||||
|
@ -1965,25 +1966,19 @@ struct iw_mlme
|
|||
|
||||
reason = cpu_to_le16(mlme->reason_code);
|
||||
|
||||
|
||||
DBG_871X("%s, cmd=%d, reason=%d\n", __FUNCTION__, mlme->cmd, reason);
|
||||
|
||||
|
||||
switch (mlme->cmd)
|
||||
{
|
||||
case IW_MLME_DEAUTH:
|
||||
if(!rtw_set_802_11_disassociate(padapter))
|
||||
switch (mlme->cmd) {
|
||||
case IW_MLME_DEAUTH:
|
||||
if(!rtw_set_802_11_disassociate(padapter))
|
||||
ret = -1;
|
||||
break;
|
||||
case IW_MLME_DISASSOC:
|
||||
if(!rtw_set_802_11_disassociate(padapter))
|
||||
ret = -1;
|
||||
break;
|
||||
|
||||
case IW_MLME_DISASSOC:
|
||||
if(!rtw_set_802_11_disassociate(padapter))
|
||||
ret = -1;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
break;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -3907,7 +3902,7 @@ static void rtw_dbg_mode_hdl(_adapter *padapter, u32 id, u8 *pdata, u32 len)
|
|||
break;
|
||||
case GEN_MP_IOCTL_SUBCODE(TRIGGER_GPIO):
|
||||
DBG_871X("==> trigger gpio 0\n");
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_TRIGGER_GPIO_0, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_TRIGGER_GPIO_0, NULL);
|
||||
break;
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
case GEN_MP_IOCTL_SUBCODE(SET_DM_BT):
|
||||
|
@ -4730,6 +4725,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
|||
_queue *queue = &(pmlmepriv->scanned_queue);
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
u8 blnMatch = 0;
|
||||
__be16 be_attr_content = 0;
|
||||
u16 attr_content = 0;
|
||||
uint attr_contentlen = 0;
|
||||
u8 attr_content_str[P2P_PRIVATE_IOCTL_SET_LEN] = { 0x00 };
|
||||
|
@ -4762,10 +4758,9 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
|||
|
||||
if ( (wpsie=rtw_get_wps_ie_from_scan_queue( &pnetwork->network.IEs[0], pnetwork->network.IELength, NULL, &wpsie_len, pnetwork->network.Reserved[0])) )
|
||||
{
|
||||
rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_CONF_METHOD, (u8 *)&attr_content, &attr_contentlen);
|
||||
if (attr_contentlen)
|
||||
{
|
||||
attr_content = be16_to_cpu(attr_content);
|
||||
rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_CONF_METHOD, (u8 *)&be_attr_content, &attr_contentlen);
|
||||
if (attr_contentlen) {
|
||||
attr_content = be16_to_cpu(be_attr_content);
|
||||
sprintf(attr_content_str, "\n\nM=%.4d", attr_content);
|
||||
blnMatch = 1;
|
||||
}
|
||||
|
@ -4992,12 +4987,12 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
|
|||
if ( (wpsie=rtw_get_wps_ie_from_scan_queue( &pnetwork->network.IEs[0], pnetwork->network.IELength, NULL, &wpsie_len, pnetwork->network.Reserved[0])) )
|
||||
{
|
||||
rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_PRIMARY_DEV_TYPE, dev_type, &dev_type_len);
|
||||
if (dev_type_len)
|
||||
{
|
||||
u16 type = 0;
|
||||
if (dev_type_len) {
|
||||
__be16 be_type;
|
||||
u16 type;
|
||||
|
||||
_rtw_memcpy(&type, dev_type, 2);
|
||||
type = be16_to_cpu(type);
|
||||
_rtw_memcpy(&be_type, dev_type, 2);
|
||||
type = be16_to_cpu(be_type);
|
||||
sprintf(dev_type_str, "\n\nN=%.2d", type);
|
||||
blnMatch = 1;
|
||||
}
|
||||
|
@ -6727,7 +6722,7 @@ void rf_reg_dump(_adapter *padapter)
|
|||
|
||||
#endif
|
||||
|
||||
void mac_reg_dump(_adapter *padapter)
|
||||
static void mac_reg_dump(_adapter *padapter)
|
||||
{
|
||||
int i,j=1;
|
||||
printk("\n======= MAC REG =======\n");
|
||||
|
@ -9205,7 +9200,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
|
|||
|
||||
u8 *data = NULL;
|
||||
u8 *rawdata = NULL;
|
||||
char *pch, *ptmp, *token, *tmp[3]={0x00,0x00,0x00};
|
||||
char *pch, *ptmp, *token, *tmp[3]={NULL, NULL, NULL};
|
||||
u8 ips_mode,lps_mode;
|
||||
u16 i=0, j=0, mapLen=0, addr=0, cnts=0;
|
||||
u16 max_available_size=0, raw_cursize=0, raw_maxsize=0;
|
||||
|
@ -9779,7 +9774,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
u8 *ShadowMapBT = NULL;
|
||||
u8 *ShadowMapWiFi = NULL;
|
||||
u8 *setrawdata = NULL;
|
||||
char *pch, *ptmp, *token, *tmp[3]={0x00,0x00,0x00};
|
||||
char *pch, *ptmp, *token, *tmp[3]={NULL, NULL, NULL};
|
||||
u16 addr=0, cnts=0, max_available_size=0;
|
||||
int err;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include <linux/irq.h>
|
||||
#endif
|
||||
|
||||
const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = {
|
||||
static const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = {
|
||||
"START",
|
||||
"STOP",
|
||||
"SCAN-ACTIVE",
|
||||
|
@ -128,7 +128,7 @@ typedef struct android_wifi_priv_cmd {
|
|||
*/
|
||||
static int g_wifi_on = _TRUE;
|
||||
|
||||
unsigned int oob_irq;
|
||||
static unsigned int oob_irq;
|
||||
|
||||
#ifdef PNO_SUPPORT
|
||||
static int wl_android_set_pno_setup(struct net_device *dev, char *command, int total_len)
|
||||
|
@ -248,7 +248,7 @@ int rtw_android_cmdstr_to_num(char *cmdstr)
|
|||
return cmd_num;
|
||||
}
|
||||
|
||||
int rtw_android_get_rssi(struct net_device *net, char *command, int total_len)
|
||||
static int rtw_android_get_rssi(struct net_device *net, char *command, int total_len)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(net);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
@ -263,7 +263,7 @@ int rtw_android_get_rssi(struct net_device *net, char *command, int total_len)
|
|||
return bytes_written;
|
||||
}
|
||||
|
||||
int rtw_android_get_link_speed(struct net_device *net, char *command, int total_len)
|
||||
static int rtw_android_get_link_speed(struct net_device *net, char *command, int total_len)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(net);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
@ -277,7 +277,7 @@ int rtw_android_get_link_speed(struct net_device *net, char *command, int total_
|
|||
return bytes_written;
|
||||
}
|
||||
|
||||
int rtw_android_get_macaddr(struct net_device *net, char *command, int total_len)
|
||||
static int rtw_android_get_macaddr(struct net_device *net, char *command, int total_len)
|
||||
{
|
||||
_adapter *adapter = (_adapter *)rtw_netdev_priv(net);
|
||||
int bytes_written = 0;
|
||||
|
@ -286,7 +286,7 @@ int rtw_android_get_macaddr(struct net_device *net, char *command, int total_len
|
|||
return bytes_written;
|
||||
}
|
||||
|
||||
int rtw_android_set_country(struct net_device *net, char *command, int total_len)
|
||||
static int rtw_android_set_country(struct net_device *net, char *command, int total_len)
|
||||
{
|
||||
_adapter *adapter = (_adapter *)rtw_netdev_priv(net);
|
||||
char *country_code = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_COUNTRY]) + 1;
|
||||
|
@ -297,7 +297,7 @@ int rtw_android_set_country(struct net_device *net, char *command, int total_len
|
|||
return (ret==_SUCCESS)?0:-1;
|
||||
}
|
||||
|
||||
int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int total_len)
|
||||
static int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int total_len)
|
||||
{
|
||||
int bytes_written = 0;
|
||||
|
||||
|
@ -308,7 +308,7 @@ int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int tota
|
|||
return bytes_written;
|
||||
}
|
||||
|
||||
int rtw_android_set_block(struct net_device *net, char *command, int total_len)
|
||||
static int rtw_android_set_block(struct net_device *net, char *command, int total_len)
|
||||
{
|
||||
_adapter *adapter = (_adapter *)rtw_netdev_priv(net);
|
||||
char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK]) + 1;
|
||||
|
@ -320,7 +320,7 @@ int rtw_android_set_block(struct net_device *net, char *command, int total_len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int get_int_from_command( char* pcmd )
|
||||
static int get_int_from_command(char *pcmd)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
|
@ -526,7 +526,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||
|
||||
#ifdef CONFIG_WFD
|
||||
case ANDROID_WIFI_CMD_WFD_ENABLE:
|
||||
{
|
||||
// Commented by Albert 2012/07/24
|
||||
// We can enable the WFD function by using the following command:
|
||||
// wpa_cli driver wfd-enable
|
||||
|
@ -535,10 +534,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 )
|
||||
pwfd_info->wfd_enable = _TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
case ANDROID_WIFI_CMD_WFD_DISABLE:
|
||||
{
|
||||
// Commented by Albert 2012/07/24
|
||||
// We can disable the WFD function by using the following command:
|
||||
// wpa_cli driver wfd-disable
|
||||
|
@ -547,22 +543,17 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 )
|
||||
pwfd_info->wfd_enable = _FALSE;
|
||||
break;
|
||||
}
|
||||
case ANDROID_WIFI_CMD_WFD_SET_TCPPORT:
|
||||
{
|
||||
// Commented by Albert 2012/07/24
|
||||
// We can set the tcp port number by using the following command:
|
||||
// wpa_cli driver wfd-set-tcpport = 554
|
||||
|
||||
pwfd_info = &padapter->wfd_info;
|
||||
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 )
|
||||
pwfd_info->rtsp_ctrlport = ( u16 ) get_int_from_command( priv_cmd.buf );
|
||||
pwfd_info->rtsp_ctrlport = (u16)get_int_from_command(priv_cmd.buf);
|
||||
break;
|
||||
}
|
||||
case ANDROID_WIFI_CMD_WFD_SET_MAX_TPUT:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case ANDROID_WIFI_CMD_WFD_SET_DEVTYPE:
|
||||
{
|
||||
// Commented by Albert 2012/08/28
|
||||
|
@ -572,9 +563,8 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||
_adapter* padapter = ( _adapter * ) rtw_netdev_priv(net);
|
||||
|
||||
pwfd_info = &padapter->wfd_info;
|
||||
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 )
|
||||
{
|
||||
pwfd_info->wfd_device_type = ( u8 ) get_int_from_command( priv_cmd.buf );
|
||||
if (padapter->wdinfo.driver_interface == DRIVER_CFG80211) {
|
||||
pwfd_info->wfd_device_type = (u8)get_int_from_command(priv_cmd.buf);
|
||||
|
||||
pwfd_info->wfd_device_type &= WFD_DEVINFO_DUAL;
|
||||
}
|
||||
|
|
|
@ -306,7 +306,7 @@ static void rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
||||
static int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
||||
{
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
|
Loading…
Reference in a new issue