rtl8188eu: Remove some Sparse problems

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2014-12-14 23:08:37 -06:00
parent 065126d8ce
commit a0c85b341e
13 changed files with 246 additions and 296 deletions

View file

@ -18,6 +18,8 @@ EXTRA_CFLAGS += -Wno-uninitialized
EXTRA_CFLAGS += -I$(src)/include EXTRA_CFLAGS += -I$(src)/include
ccflags-y += -D__CHECK_ENDIAN__
CONFIG_AUTOCFG_CP = y CONFIG_AUTOCFG_CP = y
CONFIG_RTL8192C = n CONFIG_RTL8192C = n
@ -305,11 +307,11 @@ _HAL_INTFS_FILES += $(CHIP_FILES)
ifeq ($(CONFIG_AUTOCFG_CP), y) ifeq ($(CONFIG_AUTOCFG_CP), y)
ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy) #ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy)
$(shell cp $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h) #$(shell cp $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
else #else
$(shell cp $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h) #$(shell cp $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h)
endif #endif
endif endif

View file

@ -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 WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02};
unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02}; unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02};
extern unsigned char REALTEK_96B_IE[];
/******************************************************** /********************************************************
MCS rate definitions MCS rate definitions
*********************************************************/ *********************************************************/
@ -4010,9 +4008,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr )
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
{
return; return;
}
//update attribute //update attribute
pattrib = &pmgntframe->attrib; pattrib = &pmgntframe->attrib;

View file

@ -869,7 +869,7 @@ _func_enter_;
return NDIS_STATUS_NOT_ACCEPTED; return NDIS_STATUS_NOT_ACCEPTED;
_irqlevel_changed_(&oldirql, LOWER); _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); _irqlevel_changed_(&oldirql, RAISE);
_func_exit_; _func_exit_;

View file

@ -23,24 +23,25 @@
#include <osdep_service.h> #include <osdep_service.h>
#include <drv_types.h> #include <drv_types.h>
#include <wifi.h> #include <wifi.h>
#include <rtw_mlme_ext.h>
#ifdef CONFIG_WOWLAN #ifdef CONFIG_WOWLAN
#include <linux/inetdevice.h> #include <linux/inetdevice.h>
#endif #endif
unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f}; static unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74}; static unsigned char ARTHEROS_OUI2[] = {0x00, 0x13, 0x74};
unsigned char BROADCOM_OUI1[] = {0x00, 0x10, 0x18}; static unsigned char BROADCOM_OUI1[] = {0x00, 0x10, 0x18};
unsigned char BROADCOM_OUI2[] = {0x00, 0x0a, 0xf7}; static unsigned char BROADCOM_OUI2[] = {0x00, 0x0a, 0xf7};
unsigned char BROADCOM_OUI3[] = {0x00, 0x05, 0xb5}; static unsigned char BROADCOM_OUI3[] = {0x00, 0x05, 0xb5};
unsigned char CISCO_OUI[] = {0x00, 0x40, 0x96}; static unsigned char CISCO_OUI[] = {0x00, 0x40, 0x96};
unsigned char MARVELL_OUI[] = {0x00, 0x50, 0x43}; static unsigned char MARVELL_OUI[] = {0x00, 0x50, 0x43};
unsigned char RALINK_OUI[] = {0x00, 0x0c, 0x43}; static unsigned char RALINK_OUI[] = {0x00, 0x0c, 0x43};
unsigned char REALTEK_OUI[] = {0x00, 0xe0, 0x4c}; static unsigned char REALTEK_OUI[] = {0x00, 0xe0, 0x4c};
unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5}; static unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5};
unsigned char EPIGRAM_OUI[] = {0x00, 0x90, 0x4c}; 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};
@ -577,11 +578,10 @@ __inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork)
u16 get_beacon_interval(WLAN_BSSID_EX *bss) u16 get_beacon_interval(WLAN_BSSID_EX *bss)
{ {
unsigned short val; __le16 le_val;
_rtw_memcpy((unsigned char *)&val, rtw_get_beacon_interval_from_ie(bss->IEs), 2);
return le16_to_cpu(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) int is_client_associated_to_ap(_adapter *padapter)
@ -664,7 +664,7 @@ void CAM_empty_entry(
void invalidate_cam_all(_adapter *padapter) 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 #if 0
static u32 _ReadCAM(_adapter *padapter ,u32 addr) static u32 _ReadCAM(_adapter *padapter ,u32 addr)
@ -838,7 +838,7 @@ void flush_all_cam_entry(_adapter *padapter)
} }
#else //CONFIG_CONCURRENT_MODE #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 #endif //CONFIG_CONCURRENT_MODE

View file

@ -116,7 +116,7 @@ extern unsigned char P2P_OUI[];
extern unsigned char WMM_INFO_OUI[]; extern unsigned char WMM_INFO_OUI[];
extern unsigned char WMM_PARA_OUI[]; extern unsigned char WMM_PARA_OUI[];
extern unsigned char REALTEK_96B_IE[];
// //
// Channel Plan Type. // Channel Plan Type.
@ -557,7 +557,6 @@ struct mlme_ext_priv
#ifdef DBG_FIXED_CHAN #ifdef DBG_FIXED_CHAN
u8 fixed_chan; u8 fixed_chan;
#endif #endif
}; };
int init_mlme_ext_priv(_adapter* padapter); int init_mlme_ext_priv(_adapter* padapter);

View file

@ -669,103 +669,105 @@ typedef enum _ENCRY_CTRL_STATE_ {
#define Mac_DropPacket 0xA0000000 #define Mac_DropPacket 0xA0000000
//======================================================================= //=======================================================================
//extern struct mp_xmit_frame *alloc_mp_xmitframe(struct mp_priv *pmp_priv); //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); //int free_mp_xmitframe(struct xmit_priv *pxmitpriv, struct mp_xmit_frame *pmp_xmitframe);
extern s32 init_mp_priv(PADAPTER padapter); s32 init_mp_priv(PADAPTER padapter);
extern void free_mp_priv(struct mp_priv *pmp_priv); void free_mp_priv(struct mp_priv *pmp_priv);
extern s32 MPT_InitializeAdapter(PADAPTER padapter, u8 Channel); s32 MPT_InitializeAdapter(PADAPTER padapter, u8 Channel);
extern void MPT_DeInitAdapter(PADAPTER padapter); void MPT_DeInitAdapter(PADAPTER padapter);
extern s32 mp_start_test(PADAPTER padapter); s32 mp_start_test(PADAPTER padapter);
extern void mp_stop_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); //u32 bb_reg_read(PADAPTER Adapter, u16 offset);
//extern u8 bb_reg_write(PADAPTER Adapter, u16 offset, u32 value); //u8 bb_reg_write(PADAPTER Adapter, u16 offset, u32 value);
//extern u32 rf_reg_read(PADAPTER Adapter, u8 path, u8 offset); //u32 rf_reg_read(PADAPTER Adapter, u8 path, u8 offset);
//extern u8 rf_reg_write(PADAPTER Adapter, u8 path, u8 offset, u32 value); //u8 rf_reg_write(PADAPTER Adapter, u8 path, u8 offset, u32 value);
//extern u32 get_bb_reg(PADAPTER Adapter, u16 offset, u32 bitmask); //u32 get_bb_reg(PADAPTER Adapter, u16 offset, u32 bitmask);
//extern u8 set_bb_reg(PADAPTER Adapter, u16 offset, u32 bitmask, u32 value); //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); //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); //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); 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); void _write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 bitmask, u32 val);
extern u32 read_macreg(_adapter *padapter, u32 addr, u32 sz); u32 read_macreg(_adapter *padapter, u32 addr, u32 sz);
extern void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz); void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz);
extern u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask); u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask);
extern void write_bbreg(_adapter *padapter, u32 addr, u32 bitmask, u32 val); void write_bbreg(_adapter *padapter, u32 addr, u32 bitmask, u32 val);
extern u32 read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr); u32 read_rfreg(PADAPTER padapter, u8 rfpath, u32 addr);
extern void write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 val); void write_rfreg(PADAPTER padapter, u8 rfpath, u32 addr, u32 val);
extern void SetChannel(PADAPTER pAdapter); void SetChannel(PADAPTER pAdapter);
extern void SetBandwidth(PADAPTER pAdapter); void SetBandwidth(PADAPTER pAdapter);
extern void SetTxPower(PADAPTER pAdapter); void SetTxPower(PADAPTER pAdapter);
extern void SetAntennaPathPower(PADAPTER pAdapter); void SetAntennaPathPower(PADAPTER pAdapter);
//extern void SetTxAGCOffset(PADAPTER pAdapter, u32 ulTxAGCOffset); void SetTxAGCOffset(PADAPTER pAdapter, u32 ulTxAGCOffset);
extern void SetDataRate(PADAPTER pAdapter); 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); s32 SetThermalMeter(PADAPTER pAdapter, u8 target_ther);
extern void GetThermalMeter(PADAPTER pAdapter, u8 *value); void GetThermalMeter(PADAPTER pAdapter, u8 *value);
extern void SetContinuousTx(PADAPTER pAdapter, u8 bStart); void SetContinuousTx(PADAPTER pAdapter, u8 bStart);
extern void SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart); void SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart);
extern void SetSingleToneTx(PADAPTER pAdapter, u8 bStart); void SetSingleToneTx(PADAPTER pAdapter, u8 bStart);
extern void SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart); void SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart);
extern void PhySetTxPowerLevel(PADAPTER pAdapter); void PhySetTxPowerLevel(PADAPTER pAdapter);
extern void fill_txdesc_for_mp(PADAPTER padapter, struct tx_desc *ptxdesc); void fill_txdesc_for_mp(PADAPTER padapter, struct tx_desc *ptxdesc);
extern void SetPacketTx(PADAPTER padapter); void SetPacketTx(PADAPTER padapter);
extern void SetPacketRx(PADAPTER pAdapter, u8 bStartRx); void SetPacketRx(PADAPTER pAdapter, u8 bStartRx);
extern void ResetPhyRxPktCount(PADAPTER pAdapter); void ResetPhyRxPktCount(PADAPTER pAdapter);
extern u32 GetPhyRxPktReceived(PADAPTER pAdapter); u32 GetPhyRxPktReceived(PADAPTER pAdapter);
extern u32 GetPhyRxPktCRC32Error(PADAPTER pAdapter); u32 GetPhyRxPktCRC32Error(PADAPTER pAdapter);
extern s32 SetPowerTracking(PADAPTER padapter, u8 enable); s32 SetPowerTracking(PADAPTER padapter, u8 enable);
extern void GetPowerTracking(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); void Hal_SetAntenna(PADAPTER pAdapter);
extern void Hal_SetBandwidth(PADAPTER pAdapter); void Hal_SetBandwidth(PADAPTER pAdapter);
extern void Hal_SetTxPower(PADAPTER pAdapter); void Hal_SetTxPower(PADAPTER pAdapter);
extern void Hal_SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart); void Hal_SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart);
extern void Hal_SetSingleToneTx ( PADAPTER pAdapter , u8 bStart ); void Hal_SetSingleToneTx ( PADAPTER pAdapter , u8 bStart );
extern void Hal_SetSingleCarrierTx (PADAPTER pAdapter, u8 bStart); void Hal_SetSingleCarrierTx (PADAPTER pAdapter, u8 bStart);
extern void Hal_SetContinuousTx (PADAPTER pAdapter, u8 bStart); void Hal_SetContinuousTx (PADAPTER pAdapter, u8 bStart);
extern void Hal_SetBandwidth(PADAPTER pAdapter); void Hal_SetBandwidth(PADAPTER pAdapter);
extern void Hal_SetDataRate(PADAPTER pAdapter); void Hal_SetDataRate(PADAPTER pAdapter);
extern void Hal_SetChannel(PADAPTER pAdapter); void Hal_SetChannel(PADAPTER pAdapter);
extern void Hal_SetAntennaPathPower(PADAPTER pAdapter); void Hal_SetAntennaPathPower(PADAPTER pAdapter);
extern s32 Hal_SetThermalMeter(PADAPTER pAdapter, u8 target_ther); s32 Hal_SetThermalMeter(PADAPTER pAdapter, u8 target_ther);
extern s32 Hal_SetPowerTracking(PADAPTER padapter, u8 enable); s32 Hal_SetPowerTracking(PADAPTER padapter, u8 enable);
extern void Hal_GetPowerTracking(PADAPTER padapter, u8 * enable); void Hal_GetPowerTracking(PADAPTER padapter, u8 * enable);
extern void Hal_GetThermalMeter(PADAPTER pAdapter, u8 *value); void Hal_GetThermalMeter(PADAPTER pAdapter, u8 *value);
extern void Hal_mpt_SwitchRfSetting(PADAPTER pAdapter); void Hal_mpt_SwitchRfSetting(PADAPTER pAdapter);
extern void Hal_MPT_CCKTxPowerAdjust(PADAPTER Adapter, BOOLEAN bInCH14); void Hal_MPT_CCKTxPowerAdjust(PADAPTER Adapter, BOOLEAN bInCH14);
extern void Hal_MPT_CCKTxPowerAdjustbyIndex(PADAPTER pAdapter, BOOLEAN beven); void Hal_MPT_CCKTxPowerAdjustbyIndex(PADAPTER pAdapter, BOOLEAN beven);
extern void Hal_SetCCKTxPower(PADAPTER pAdapter, u8 * TxPower); void Hal_SetCCKTxPower(PADAPTER pAdapter, u8 * TxPower);
extern void Hal_SetOFDMTxPower(PADAPTER pAdapter, u8 * TxPower); void Hal_SetOFDMTxPower(PADAPTER pAdapter, u8 * TxPower);
extern void Hal_TriggerRFThermalMeter(PADAPTER pAdapter); void Hal_TriggerRFThermalMeter(PADAPTER pAdapter);
extern u8 Hal_ReadRFThermalMeter(PADAPTER pAdapter); u8 Hal_ReadRFThermalMeter(PADAPTER pAdapter);
extern void Hal_SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart); void Hal_SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart);
extern void Hal_SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart); void SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart);
extern void Hal_ProSetCrystalCap (PADAPTER pAdapter , u32 CrystalCapVal); void SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart);
extern void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv); void Hal_SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart);
extern void MP_PHY_SetRFPathSwitch(PADAPTER pAdapter ,BOOLEAN bMain); void Hal_ProSetCrystalCap (PADAPTER pAdapter , u32 CrystalCapVal);
extern void MPT_PwrCtlDM(PADAPTER padapter, u32 bstart); 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_ #endif //_RTW_MP_H_

View file

@ -204,7 +204,7 @@ NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv);
#ifdef _RTW_MP_IOCTL_C_ #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_null_function}, //0x00 OID_RT_PRO_RESET_DUT
{1, &oid_rt_pro_set_data_rate_hdl}, //0x01 {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}, //0x20 OID_RT_PRO_READ_POWER_CONTROL
{1, &oid_null_function}, //0x21 OID_RT_PRO_WRITE_EEPROM {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}, //0x40
{1, &oid_null_function}, //0x41 {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 {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}, //0x80 OID_RT_DRIVER_OPTION
{1, &oid_null_function}, //0x81 OID_RT_RF_OFF {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 {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_null_function}, //0x80 OID_RT_PRO8187_WI_POLL
{1, &oid_rt_pro_write_bb_reg_hdl}, //0x81 {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 {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_pro8711_join_bss_hdl}, //0x00 //S
{1, &oid_rt_pro_read_register_hdl}, //0x01 {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 {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_cfg_debug_message_hdl}, //0x20
{1, &oid_rt_pro_set_data_rate_ex_hdl}, //0x21 {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_qry_pwrstate_hdl}, //0x50
{1, &oid_rt_pro_set_pwrstate_hdl} //0x51 {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 {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 {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}, //0xF0
{1, &oid_null_function}, //0xF1 {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_encryption_ctrl_hdl}, //0x00 Q&S
{1, &oid_rt_pro_add_sta_info_hdl}, //0x01 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[] = { 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) /*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) GEN_MP_IOCTL_HANDLER(sizeof(u32), oid_rt_pro_stop_test_hdl, OID_RT_PRO_STOP_TEST)

View file

@ -168,47 +168,17 @@ do{\
struct tx_desc{ struct tx_desc{
/* DWORD 0 */
//DWORD 0 __le32 txdw0;
unsigned int txdw0; __le32 txdw1;
__le32 txdw2;
unsigned int txdw1; __le32 txdw3;
__le32 txdw4;
unsigned int txdw2; __le32 txdw5;
__le32 txdw6;
unsigned int txdw3; __le32 txdw7;
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
}; };
union txdesc { union txdesc {
struct tx_desc txdesc; struct tx_desc txdesc;
unsigned int value[TXDESC_SIZE>>2]; unsigned int value[TXDESC_SIZE>>2];

View file

@ -254,26 +254,26 @@ enum WIFI_REG_DOMAIN {
#define SetToDs(pbuf) \ #define SetToDs(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_TO_DS_); \ *(__le16 *)(pbuf) |= cpu_to_le16(_TO_DS_); \
} while(0) } 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) \ #define ClearToDs(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_)); \
} while(0) } while(0)
#define SetFrDs(pbuf) \ #define SetFrDs(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_FROM_DS_); \ *(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_); \
} while(0) } 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) \ #define ClearFrDs(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_)); \
} while (0) } while (0)
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe)) #define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
@ -281,68 +281,68 @@ enum WIFI_REG_DOMAIN {
#define SetMFrag(pbuf) \ #define SetMFrag(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \ *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_FRAG_); \
} while (0) } 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) \ #define ClearMFrag(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)); \
} while (0) } while (0)
#define SetRetry(pbuf) \ #define SetRetry(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_RETRY_); \ *(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_); \
} while (0) } 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) \ #define ClearRetry(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_)); \
} while (0) } while (0)
#define SetPwrMgt(pbuf) \ #define SetPwrMgt(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_PWRMGT_); \ *(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_); \
} while (0) } 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) \ #define ClearPwrMgt(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_)); \
} while(0) } while(0)
#define SetMData(pbuf) \ #define SetMData(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \ *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_); \
} while(0) } 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) \ #define ClearMData(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_)); \
} while(0) } while(0)
#define SetPrivacy(pbuf) \ #define SetPrivacy(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) |= cpu_to_le16(_PRIVACY_); \ *(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_); \
} while(0) } 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) \ #define ClearPrivacy(pbuf) \
do { \ do { \
*(unsigned short *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \ *(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_)); \
} while(0) } 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) \ #define SetFrameType(pbuf,type) \
do { \ do { \
@ -350,17 +350,17 @@ 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) (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) \ #define SetFrameSubType(pbuf,type) \
do { \ do { \
*(unsigned short *)(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))); \
*(unsigned short *)(pbuf) |= cpu_to_le16(type); \ *(__le16 *)(pbuf) |= cpu_to_le16(type); \
} while(0) } 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))) #define GetTupleCache(pbuf) (cpu_to_le16(*(unsigned short *)((SIZE_PTR)(pbuf) + 22)))
@ -740,9 +740,9 @@ struct HT_info_element
struct AC_param struct AC_param
{ {
unsigned char ACI_AIFSN; u8 ACI_AIFSN;
unsigned char CW; u8 CW;
unsigned short TXOP_limit; __le16 TXOP_limit;
} __attribute__ ((packed)); } __attribute__ ((packed));
struct WMM_para_element struct WMM_para_element
@ -754,10 +754,10 @@ struct WMM_para_element
struct ADDBA_request struct ADDBA_request
{ {
unsigned char dialog_token; u8 dialog_token;
unsigned short BA_para_set; __le16 BA_para_set;
unsigned short BA_timeout_value; __le16 BA_timeout_value;
unsigned short BA_starting_seqctrl; __le16 BA_starting_seqctrl;
} __attribute__ ((packed)); } __attribute__ ((packed));
@ -787,18 +787,15 @@ struct ieee80211_ht_addt_info {
unsigned char basic_set[16]; unsigned char basic_set[16];
}; };
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; __le16 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]; unsigned char HT_cap[26];
}; };
@ -813,9 +810,9 @@ struct HT_info_element
struct AC_param struct AC_param
{ {
unsigned char ACI_AIFSN; u8 ACI_AIFSN;
unsigned char CW; u8 CW;
unsigned short TXOP_limit; __le16 TXOP_limit;
}; };
struct WMM_para_element struct WMM_para_element
@ -827,10 +824,10 @@ struct WMM_para_element
struct ADDBA_request struct ADDBA_request
{ {
unsigned char dialog_token; u8 dialog_token;
unsigned short BA_para_set; __le16 BA_para_set;
unsigned short BA_timeout_value; __le16 BA_timeout_value;
unsigned short BA_starting_seqctrl; __le16 BA_starting_seqctrl;
}; };

View file

@ -55,7 +55,7 @@
#define WEXT_CSCAN_HOME_DWELL_SECTION 'H' #define WEXT_CSCAN_HOME_DWELL_SECTION 'H'
#define WEXT_CSCAN_TYPE_SECTION 'T' #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) /*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) GEN_HANDLER(sizeof(u32), rtl8188eu_oid_rt_pro_stop_test_hdl, OID_RT_PRO_STOP_TEST)

View file

@ -102,7 +102,7 @@ extern u8 key_2char2num(u8 hch, u8 lch);
extern u8 str_2char2num(u8 hch, u8 lch); extern u8 str_2char2num(u8 hch, u8 lch);
extern u8 convert_ip_addr(u8 hch, u8 mch, 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}; 6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000};
static const char * const iw_operation_mode[] = static const char * const iw_operation_mode[] =
@ -315,6 +315,7 @@ static char *translate_scan(_adapter *padapter,
{ {
struct iw_event iwe; struct iw_event iwe;
u16 cap; u16 cap;
__le16 le_cap;
u32 ht_ielen = 0; u32 ht_ielen = 0;
char custom[MAX_CUSTOM_LEN]; char custom[MAX_CUSTOM_LEN];
char *p; char *p;
@ -484,10 +485,10 @@ static char *translate_scan(_adapter *padapter,
/* Add mode */ /* Add mode */
iwe.cmd = SIOCGIWMODE; 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_IBSS |WLAN_CAPABILITY_BSS)){
if (cap & WLAN_CAPABILITY_BSS) if (cap & WLAN_CAPABILITY_BSS)
@ -1953,7 +1954,7 @@ struct iw_mlme
#endif #endif
int ret=0; int ret=0;
u16 reason; __le16 reason;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev); _adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
struct iw_mlme *mlme = (struct iw_mlme *) extra; struct iw_mlme *mlme = (struct iw_mlme *) extra;
@ -1965,23 +1966,17 @@ struct iw_mlme
reason = cpu_to_le16(mlme->reason_code); reason = cpu_to_le16(mlme->reason_code);
DBG_871X("%s, cmd=%d, reason=%d\n", __FUNCTION__, mlme->cmd, reason); DBG_871X("%s, cmd=%d, reason=%d\n", __FUNCTION__, mlme->cmd, reason);
switch (mlme->cmd) {
switch (mlme->cmd)
{
case IW_MLME_DEAUTH: case IW_MLME_DEAUTH:
if(!rtw_set_802_11_disassociate(padapter)) if(!rtw_set_802_11_disassociate(padapter))
ret = -1; ret = -1;
break; break;
case IW_MLME_DISASSOC: case IW_MLME_DISASSOC:
if(!rtw_set_802_11_disassociate(padapter)) if(!rtw_set_802_11_disassociate(padapter))
ret = -1; ret = -1;
break; break;
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
@ -3907,7 +3902,7 @@ static void rtw_dbg_mode_hdl(_adapter *padapter, u32 id, u8 *pdata, u32 len)
break; break;
case GEN_MP_IOCTL_SUBCODE(TRIGGER_GPIO): case GEN_MP_IOCTL_SUBCODE(TRIGGER_GPIO):
DBG_871X("==> trigger gpio 0\n"); 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; break;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
case GEN_MP_IOCTL_SUBCODE(SET_DM_BT): 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); _queue *queue = &(pmlmepriv->scanned_queue);
struct wlan_network *pnetwork = NULL; struct wlan_network *pnetwork = NULL;
u8 blnMatch = 0; u8 blnMatch = 0;
__be16 be_attr_content = 0;
u16 attr_content = 0; u16 attr_content = 0;
uint attr_contentlen = 0; uint attr_contentlen = 0;
u8 attr_content_str[P2P_PRIVATE_IOCTL_SET_LEN] = { 0x00 }; 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])) ) 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); rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_CONF_METHOD, (u8 *)&be_attr_content, &attr_contentlen);
if (attr_contentlen) if (attr_contentlen) {
{ attr_content = be16_to_cpu(be_attr_content);
attr_content = be16_to_cpu(attr_content);
sprintf(attr_content_str, "\n\nM=%.4d", attr_content); sprintf(attr_content_str, "\n\nM=%.4d", attr_content);
blnMatch = 1; 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])) ) 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); rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_PRIMARY_DEV_TYPE, dev_type, &dev_type_len);
if (dev_type_len) if (dev_type_len) {
{ __be16 be_type;
u16 type = 0; u16 type;
_rtw_memcpy(&type, dev_type, 2); _rtw_memcpy(&be_type, dev_type, 2);
type = be16_to_cpu(type); type = be16_to_cpu(be_type);
sprintf(dev_type_str, "\n\nN=%.2d", type); sprintf(dev_type_str, "\n\nN=%.2d", type);
blnMatch = 1; blnMatch = 1;
} }
@ -6727,7 +6722,7 @@ void rf_reg_dump(_adapter *padapter)
#endif #endif
void mac_reg_dump(_adapter *padapter) static void mac_reg_dump(_adapter *padapter)
{ {
int i,j=1; int i,j=1;
printk("\n======= MAC REG =======\n"); printk("\n======= MAC REG =======\n");
@ -9205,7 +9200,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
u8 *data = NULL; u8 *data = NULL;
u8 *rawdata = 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; u8 ips_mode,lps_mode;
u16 i=0, j=0, mapLen=0, addr=0, cnts=0; u16 i=0, j=0, mapLen=0, addr=0, cnts=0;
u16 max_available_size=0, raw_cursize=0, raw_maxsize=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 *ShadowMapBT = NULL;
u8 *ShadowMapWiFi = NULL; u8 *ShadowMapWiFi = NULL;
u8 *setrawdata = 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; u16 addr=0, cnts=0, max_available_size=0;
int err; int err;

View file

@ -47,7 +47,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#endif #endif
const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = { static const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = {
"START", "START",
"STOP", "STOP",
"SCAN-ACTIVE", "SCAN-ACTIVE",
@ -128,7 +128,7 @@ typedef struct android_wifi_priv_cmd {
*/ */
static int g_wifi_on = _TRUE; static int g_wifi_on = _TRUE;
unsigned int oob_irq; static unsigned int oob_irq;
#ifdef PNO_SUPPORT #ifdef PNO_SUPPORT
static int wl_android_set_pno_setup(struct net_device *dev, char *command, int total_len) 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; 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); _adapter *padapter = (_adapter *)rtw_netdev_priv(net);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); 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; 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); _adapter *padapter = (_adapter *)rtw_netdev_priv(net);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); 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; 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); _adapter *adapter = (_adapter *)rtw_netdev_priv(net);
int bytes_written = 0; 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; 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); _adapter *adapter = (_adapter *)rtw_netdev_priv(net);
char *country_code = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_COUNTRY]) + 1; 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; 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; 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; 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); _adapter *adapter = (_adapter *)rtw_netdev_priv(net);
char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK]) + 1; 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; return 0;
} }
int get_int_from_command( char* pcmd ) static int get_int_from_command(char *pcmd)
{ {
int i = 0; int i = 0;
@ -526,7 +526,6 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
#ifdef CONFIG_WFD #ifdef CONFIG_WFD
case ANDROID_WIFI_CMD_WFD_ENABLE: case ANDROID_WIFI_CMD_WFD_ENABLE:
{
// Commented by Albert 2012/07/24 // Commented by Albert 2012/07/24
// We can enable the WFD function by using the following command: // We can enable the WFD function by using the following command:
// wpa_cli driver wfd-enable // 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 ) if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 )
pwfd_info->wfd_enable = _TRUE; pwfd_info->wfd_enable = _TRUE;
break; break;
}
case ANDROID_WIFI_CMD_WFD_DISABLE: case ANDROID_WIFI_CMD_WFD_DISABLE:
{
// Commented by Albert 2012/07/24 // Commented by Albert 2012/07/24
// We can disable the WFD function by using the following command: // We can disable the WFD function by using the following command:
// wpa_cli driver wfd-disable // wpa_cli driver wfd-disable
@ -547,9 +543,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 ) if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 )
pwfd_info->wfd_enable = _FALSE; pwfd_info->wfd_enable = _FALSE;
break; break;
}
case ANDROID_WIFI_CMD_WFD_SET_TCPPORT: case ANDROID_WIFI_CMD_WFD_SET_TCPPORT:
{
// Commented by Albert 2012/07/24 // Commented by Albert 2012/07/24
// We can set the tcp port number by using the following command: // We can set the tcp port number by using the following command:
// wpa_cli driver wfd-set-tcpport = 554 // wpa_cli driver wfd-set-tcpport = 554
@ -558,11 +552,8 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 ) 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; break;
}
case ANDROID_WIFI_CMD_WFD_SET_MAX_TPUT: case ANDROID_WIFI_CMD_WFD_SET_MAX_TPUT:
{
break; break;
}
case ANDROID_WIFI_CMD_WFD_SET_DEVTYPE: case ANDROID_WIFI_CMD_WFD_SET_DEVTYPE:
{ {
// Commented by Albert 2012/08/28 // Commented by Albert 2012/08/28
@ -572,8 +563,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
_adapter* padapter = ( _adapter * ) rtw_netdev_priv(net); _adapter* padapter = ( _adapter * ) rtw_netdev_priv(net);
pwfd_info = &padapter->wfd_info; pwfd_info = &padapter->wfd_info;
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 ) 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 = (u8)get_int_from_command(priv_cmd.buf);
pwfd_info->wfd_device_type &= WFD_DEVINFO_DUAL; pwfd_info->wfd_device_type &= WFD_DEVINFO_DUAL;

View file

@ -306,7 +306,7 @@ static void rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
} }
#ifdef CONFIG_TX_MCAST2UNI #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 sta_priv *pstapriv = &padapter->stapriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;