mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue