mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-03 21:04:05 +00:00
commit
c3d92cfb08
1
Makefile
1
Makefile
@ -1055,7 +1055,6 @@ endif
|
||||
EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04
|
||||
|
||||
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
|
||||
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
|
||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
|
||||
ARCH ?= $(SUBARCH)
|
||||
|
@ -35,7 +35,6 @@ Major Change History:
|
||||
--*/
|
||||
#include <HalPwrSeqCmd.h>
|
||||
|
||||
|
||||
/*
|
||||
* Description:
|
||||
* This routine deal with the Power Configuration CMDs parsing for RTL8723/RTL8188E Series IC.
|
||||
@ -63,7 +62,6 @@ u8 HalPwrSeqCmdParsing(
|
||||
do {
|
||||
PwrCfgCmd = PwrSeqCmd[AryIdx];
|
||||
|
||||
|
||||
/* 2 Only Handle the command whose FAB, CUT, and Interface are matched */
|
||||
if ((GET_PWR_CFG_FAB_MASK(PwrCfgCmd) & FabVersion) &&
|
||||
(GET_PWR_CFG_CUT_MASK(PwrCfgCmd) & CutVersion) &&
|
||||
|
@ -99,7 +99,6 @@ void Init_ODM_ComInfo(_adapter *adapter)
|
||||
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_BWIFI_TEST, adapter->registrypriv.wifi_spec);
|
||||
|
||||
|
||||
if (pHalData->rf_type == RF_1T1R)
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_1T1R);
|
||||
else if (pHalData->rf_type == RF_1T2R)
|
||||
@ -121,7 +120,6 @@ void Init_ODM_ComInfo(_adapter *adapter)
|
||||
else
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_XTXR);
|
||||
|
||||
|
||||
{
|
||||
/* 1 ======= BoardType: ODM_CMNINFO_BOARD_TYPE ======= */
|
||||
u8 odm_board_type = ODM_BOARD_DEFAULT;
|
||||
|
14
hal/hal_mp.c
14
hal/hal_mp.c
@ -52,7 +52,6 @@
|
||||
#endif
|
||||
#endif /* !RTW_HALMAC */
|
||||
|
||||
|
||||
u8 MgntQuery_NssTxRate(u16 Rate)
|
||||
{
|
||||
u8 NssNum = RF_TX_NUM_NONIMPLEMENT;
|
||||
@ -112,7 +111,6 @@ s32 hal_mpt_SetPowerTracking(PADAPTER padapter, u8 enable)
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
PDM_ODM_T pDM_Odm = &(pHalData->odmpriv);
|
||||
|
||||
|
||||
if (!netif_running(padapter->pnetdev)) {
|
||||
return _FAIL;
|
||||
}
|
||||
@ -137,7 +135,6 @@ void hal_mpt_GetPowerTracking(PADAPTER padapter, u8 *enable)
|
||||
*enable = pDM_Odm->RFCalibrateInfo.TxPowerTrackControl;
|
||||
}
|
||||
|
||||
|
||||
void hal_mpt_CCKTxPowerAdjust(PADAPTER Adapter, BOOLEAN bInCH14)
|
||||
{
|
||||
u32 TempVal = 0, TempVal2 = 0, TempVal3 = 0;
|
||||
@ -1299,7 +1296,6 @@ void mpt_SetRFPath_8723D(PADAPTER pAdapter)
|
||||
PHY_SetRFReg(pAdapter, ODM_RF_PATH_A, 0x51,
|
||||
bRFRegOffsetMask, 0x6B04E);
|
||||
|
||||
|
||||
for (i = 0; i < 3; ++i) {
|
||||
/* <20130603, Kordan> Because BB suppors only 1T1R,
|
||||
we restore IQC to S1 instead of S0.*/
|
||||
@ -1468,7 +1464,6 @@ VOID mpt_SetRFPath_819X(PADAPTER pAdapter)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (chgTx && chgRx) {
|
||||
switch (pHalData->rf_chip) {
|
||||
case RF_8225:
|
||||
@ -1493,7 +1488,6 @@ VOID mpt_SetRFPath_819X(PADAPTER pAdapter)
|
||||
}
|
||||
} /* MPT_ProSetRFPath */
|
||||
|
||||
|
||||
void hal_mpt_SetAntenna(PADAPTER pAdapter)
|
||||
|
||||
{
|
||||
@ -1560,12 +1554,10 @@ s32 hal_mpt_SetThermalMeter(PADAPTER pAdapter, u8 target_ther)
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) {
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
||||
target_ther &= 0xff;
|
||||
if (target_ther < 0x07)
|
||||
target_ther = 0x07;
|
||||
@ -1577,14 +1569,12 @@ s32 hal_mpt_SetThermalMeter(PADAPTER pAdapter, u8 target_ther)
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
void hal_mpt_TriggerRFThermalMeter(PADAPTER pAdapter)
|
||||
{
|
||||
PHY_SetRFReg(pAdapter, ODM_RF_PATH_A, 0x42, BIT17 | BIT16, 0x03);
|
||||
|
||||
}
|
||||
|
||||
|
||||
u8 hal_mpt_ReadRFThermalMeter(PADAPTER pAdapter)
|
||||
|
||||
{
|
||||
@ -1595,7 +1585,6 @@ u8 hal_mpt_ReadRFThermalMeter(PADAPTER pAdapter)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void hal_mpt_GetThermalMeter(PADAPTER pAdapter, u8 *value)
|
||||
{
|
||||
#if 0
|
||||
@ -1611,7 +1600,6 @@ void hal_mpt_GetThermalMeter(PADAPTER pAdapter, u8 *value)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void hal_mpt_SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||
@ -1656,7 +1644,6 @@ void hal_mpt_SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void hal_mpt_SetSingleToneTx(PADAPTER pAdapter, u8 bStart)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||
@ -2071,7 +2058,6 @@ static VOID mpt_StopCckContTx(
|
||||
|
||||
} /* mpt_StopCckContTx */
|
||||
|
||||
|
||||
static VOID mpt_StopOfdmContTx(
|
||||
PADAPTER pAdapter
|
||||
)
|
||||
|
@ -217,9 +217,9 @@ typedef enum _RT_SPINLOCK_TYPE{
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_LITTLE_ENDIAN)
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
#define ODM_ENDIAN_TYPE ODM_ENDIAN_LITTLE
|
||||
#elif defined (CONFIG_BIG_ENDIAN)
|
||||
#else
|
||||
#define ODM_ENDIAN_TYPE ODM_ENDIAN_BIG
|
||||
#endif
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static void _dbg_dump_macreg(_adapter *padapter)
|
||||
{
|
||||
u32 offset = 0;
|
||||
@ -50,7 +49,6 @@ _ConfigChipOutEP_8814(
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||
|
||||
|
||||
pHalData->OutEpQueueSel = 0;
|
||||
pHalData->OutEpNumber = 0;
|
||||
|
||||
@ -114,17 +112,11 @@ void rtl8814au_interface_configure(_adapter *padapter)
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
|
||||
if (IS_SUPER_SPEED_USB(padapter))
|
||||
{
|
||||
pHalData->UsbBulkOutSize = USB_SUPER_SPEED_BULK_SIZE;//1024 bytes
|
||||
}
|
||||
else if (IS_HIGH_SPEED_USB(padapter))
|
||||
{
|
||||
pHalData->UsbBulkOutSize = USB_HIGH_SPEED_BULK_SIZE;//512 bytes
|
||||
}
|
||||
else
|
||||
{
|
||||
pHalData->UsbBulkOutSize = USB_FULL_SPEED_BULK_SIZE;//64 bytes
|
||||
}
|
||||
|
||||
pHalData->interfaceIndex = pdvobjpriv->InterfaceNumber;
|
||||
|
||||
@ -234,7 +226,6 @@ _InitBurstPktLen(IN PADAPTER Adapter)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
_InitQueueReservedPage_8814AUsb(
|
||||
IN PADAPTER Adapter
|
||||
@ -273,7 +264,6 @@ _InitQueueReservedPage_8814AUsb(
|
||||
RTW_INFO("<===_InitQueueReservedPage_8814AUsb()\n");
|
||||
}
|
||||
|
||||
|
||||
static u32 _InitPowerOn_8814AU(_adapter *padapter)
|
||||
{
|
||||
int status = _SUCCESS;
|
||||
@ -286,7 +276,6 @@ static u32 _InitPowerOn_8814AU(_adapter *padapter)
|
||||
if(!HalPwrSeqCmdParsing(padapter, ~PWR_CUT_TESTCHIP_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, Rtl8814A_NIC_ENABLE_FLOW))
|
||||
return _FAIL;
|
||||
|
||||
|
||||
// Enable MAC DMA/WMAC/SCHEDULE/SEC block
|
||||
// Set CR bit10 to enable 32k calibration. Suggested by SD1 Gimmy. Added by tynli. 2011.08.31.
|
||||
rtw_write16(padapter, REG_CR_8814A, 0x00); //suggseted by zhouzhou, by page, 20111230
|
||||
@ -299,10 +288,6 @@ static u32 _InitPowerOn_8814AU(_adapter *padapter)
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// MAC init functions
|
||||
@ -340,7 +325,6 @@ _InitPageBoundary_8814AUsb(
|
||||
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
_InitNormalChipRegPriority_8814AUsb(
|
||||
IN PADAPTER Adapter,
|
||||
@ -370,7 +354,6 @@ _InitNormalChipTwoOutEpPriority_8814AUsb(
|
||||
struct registry_priv *pregistrypriv = &Adapter->registrypriv;
|
||||
u16 beQ,bkQ,viQ,voQ,mgtQ,hiQ;
|
||||
|
||||
|
||||
u16 valueHi = 0;
|
||||
u16 valueLow = 0;
|
||||
|
||||
@ -463,8 +446,6 @@ _InitQueuePriority_8814AUsb(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static VOID
|
||||
_InitHardwareDropIncorrectBulkOut_8814A(
|
||||
IN PADAPTER Adapter
|
||||
@ -691,7 +672,6 @@ _InitEDCA_8814AUsb(
|
||||
//rtw_write8(Adapter, REG_USTIME_EDCA, 0x50);
|
||||
}
|
||||
|
||||
|
||||
static VOID
|
||||
_InitBeaconMaxError_8814A(
|
||||
IN PADAPTER Adapter,
|
||||
@ -705,7 +685,6 @@ _InitBeaconMaxError_8814A(
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_LED
|
||||
static void _InitHWLed(PADAPTER Adapter)
|
||||
{
|
||||
@ -787,7 +766,6 @@ usb_AggSettingTxUpdate_8814A(
|
||||
#endif //CONFIG_USB_TX_AGGREGATION
|
||||
} // usb_AggSettingTxUpdate
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Function: usb_AggSettingRxUpdate()
|
||||
*
|
||||
@ -893,8 +871,7 @@ USB_AggModeSwitch(
|
||||
{
|
||||
return; // Inf not support.
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (pMgntInfo->LinkDetectInfo.bHigherBusyRxTraffic == _TRUE &&
|
||||
pHalData->UsbRxHighSpeedMode == _FALSE)
|
||||
{
|
||||
@ -912,7 +889,6 @@ USB_AggModeSwitch(
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#if USB_RX_AGGREGATION_92C
|
||||
if (pHalData->UsbRxHighSpeedMode == _TRUE)
|
||||
{
|
||||
@ -977,7 +953,6 @@ _InitOperationMode_8814A(
|
||||
u8 regBwOpMode = 0;
|
||||
u32 regRATR = 0, regRRSR = 0;
|
||||
|
||||
|
||||
//1 This part need to modified according to the rate set we filtered!!
|
||||
//
|
||||
// Set RRSR, RATR, and REG_BWOPMODE registers
|
||||
@ -1176,7 +1151,6 @@ void _ps_close_RF(_adapter *padapter){
|
||||
//phy_SsPwrSwitch92CU(padapter, rf_off, 1);
|
||||
}
|
||||
|
||||
|
||||
/* A lightweight deinit function */
|
||||
static void rtl8814au_hw_reset(_adapter *Adapter)
|
||||
{
|
||||
@ -1237,7 +1211,6 @@ u32 rtl8814au_hal_init(PADAPTER Adapter)
|
||||
|
||||
u32 init_start_time = rtw_get_current_time();
|
||||
|
||||
|
||||
#ifdef DBG_HAL_INIT_PROFILING
|
||||
|
||||
enum HAL_INIT_STAGES {
|
||||
@ -1365,8 +1338,6 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_BEGIN);
|
||||
*/
|
||||
rtl8814au_hw_reset(Adapter); //todo
|
||||
|
||||
|
||||
|
||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_PW_ON);
|
||||
status = _InitPowerOn_8814AU(Adapter);
|
||||
if(status == _FAIL){
|
||||
@ -1479,7 +1450,6 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC02);
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
#endif // CONFIG_CONCURRENT_MODE || CONFIG_TX_MCAST2UNI
|
||||
|
||||
|
||||
#ifdef CONFIG_LED
|
||||
_InitHWLed(Adapter);
|
||||
#endif //CONFIG_LED
|
||||
@ -1617,15 +1587,12 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_PW_TRACK);
|
||||
|
||||
//ODM_TXPowerTrackingCheck(&pHalData->odmpriv );
|
||||
|
||||
|
||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_LCK);
|
||||
//PHY_LCCalibrate_8812A(Adapter);
|
||||
}
|
||||
|
||||
|
||||
HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC21);
|
||||
|
||||
|
||||
//HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_PABIAS);
|
||||
// _InitPABias(Adapter);
|
||||
#if (MP_DRIVER == 1)
|
||||
@ -1699,7 +1666,6 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_END);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1786,7 +1752,6 @@ u32 rtl8814au_hal_deinit(PADAPTER Adapter)
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
unsigned int rtl8814au_inirp_init(PADAPTER Adapter)
|
||||
{
|
||||
u8 i;
|
||||
@ -1936,7 +1901,6 @@ hal_CustomizedBehavior_8814AU(
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
struct led_priv *pledpriv = &(Adapter->ledpriv);
|
||||
|
||||
|
||||
// Led mode
|
||||
switch(pHalData->CustomerID)
|
||||
@ -2414,4 +2378,3 @@ void rtl8814au_set_hal_ops(_adapter * padapter)
|
||||
rtl8814_set_hal_ops(pHalFunc);
|
||||
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ struct rsn_ie_hdr {
|
||||
} __attribute__((packed));
|
||||
|
||||
struct wme_ac_parameter {
|
||||
#if defined(CONFIG_LITTLE_ENDIAN)
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
/* byte 1 */
|
||||
u8 aifsn:4,
|
||||
acm:1,
|
||||
@ -73,7 +73,7 @@ struct wme_ac_parameter {
|
||||
/* byte 2 */
|
||||
u8 eCWmin:4,
|
||||
eCWmax:4;
|
||||
#elif defined(CONFIG_BIG_ENDIAN)
|
||||
#else
|
||||
/* byte 1 */
|
||||
u8 reserved:1,
|
||||
aci:2,
|
||||
@ -83,8 +83,6 @@ struct wme_ac_parameter {
|
||||
/* byte 2 */
|
||||
u8 eCWmax:4,
|
||||
eCWmin:4;
|
||||
#else
|
||||
#error "Please fix <endian.h>"
|
||||
#endif
|
||||
|
||||
/* bytes 3 & 4 */
|
||||
|
@ -21,18 +21,10 @@
|
||||
#define _RTL871X_BYTEORDER_H_
|
||||
|
||||
|
||||
#if defined(CONFIG_LITTLE_ENDIAN) && defined (CONFIG_BIG_ENDIAN)
|
||||
#error "Shall be CONFIG_LITTLE_ENDIAN or CONFIG_BIG_ENDIAN, but not both!\n"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LITTLE_ENDIAN)
|
||||
#ifndef CONFIG_PLATFORM_MSTAR389
|
||||
#include <byteorder/little_endian.h>
|
||||
#endif
|
||||
#elif defined (CONFIG_BIG_ENDIAN)
|
||||
#include <byteorder/big_endian.h>
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
#include <byteorder/little_endian.h>
|
||||
#else
|
||||
# error "Must be LITTLE/BIG Endian Host"
|
||||
#include <byteorder/big_endian.h>
|
||||
#endif
|
||||
|
||||
#endif /* _RTL871X_BYTEORDER_H_ */
|
||||
|
@ -197,7 +197,7 @@ struct intf_hdl {
|
||||
|
||||
struct reg_protocol_rd {
|
||||
|
||||
#ifdef CONFIG_LITTLE_ENDIAN
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
|
||||
/* DW1 */
|
||||
u32 NumOfTrans:4;
|
||||
@ -255,7 +255,7 @@ struct reg_protocol_rd {
|
||||
struct reg_protocol_wt {
|
||||
|
||||
|
||||
#ifdef CONFIG_LITTLE_ENDIAN
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
|
||||
/* DW1 */
|
||||
u32 NumOfTrans:4;
|
||||
|
@ -1153,21 +1153,17 @@ struct cmd_hdl wlancmds[] = {
|
||||
|
||||
struct C2HEvent_Header {
|
||||
|
||||
#ifdef CONFIG_LITTLE_ENDIAN
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
|
||||
unsigned int len:16;
|
||||
unsigned int ID:8;
|
||||
unsigned int seq:8;
|
||||
|
||||
#elif defined(CONFIG_BIG_ENDIAN)
|
||||
|
||||
unsigned int seq:8;
|
||||
unsigned int ID:8;
|
||||
unsigned int len:16;
|
||||
|
||||
#else
|
||||
|
||||
# error "Must be LITTLE or BIG Endian"
|
||||
unsigned int seq:8;
|
||||
unsigned int ID:8;
|
||||
unsigned int len:16;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -116,7 +116,6 @@ enum _REG_PREAMBLE_MODE {
|
||||
PREAMBLE_SHORT = 3,
|
||||
};
|
||||
|
||||
|
||||
enum _RTL8712_RF_MIMO_CONFIG_ {
|
||||
RTL8712_RFCONFIG_1T = 0x10,
|
||||
RTL8712_RFCONFIG_2T = 0x20,
|
||||
@ -203,7 +202,7 @@ typedef enum _PROTECTION_MODE {
|
||||
PROTECTION_MODE_FORCE_DISABLE = 2,
|
||||
} PROTECTION_MODE, *PPROTECTION_MODE;
|
||||
|
||||
typedef enum _RT_RF_TYPE_DEFINITION {
|
||||
enum rt_rf_types {
|
||||
RF_1T2R = 0,
|
||||
RF_2T4R = 1,
|
||||
RF_2T2R = 2,
|
||||
@ -215,7 +214,7 @@ typedef enum _RT_RF_TYPE_DEFINITION {
|
||||
RF_4T4R = 8,
|
||||
|
||||
RF_MAX_TYPE = 0xF, /* u1Byte */
|
||||
} RT_RF_TYPE_DEF_E;
|
||||
};
|
||||
|
||||
int rtw_ch2freq(int chan);
|
||||
int rtw_freq2ch(int freq);
|
||||
|
@ -20,7 +20,6 @@
|
||||
#ifndef __RTW_SECURITY_H_
|
||||
#define __RTW_SECURITY_H_
|
||||
|
||||
|
||||
#define _NO_PRIVACY_ 0x0
|
||||
#define _WEP40_ 0x1
|
||||
#define _TKIP_ 0x2
|
||||
@ -63,7 +62,6 @@ typedef enum {
|
||||
ENCRYP_PROTOCOL_MAX
|
||||
} ENCRYP_PROTOCOL_E;
|
||||
|
||||
|
||||
#ifndef Ndis802_11AuthModeWPA2
|
||||
#define Ndis802_11AuthModeWPA2 (Ndis802_11AuthModeWPANone + 1)
|
||||
#endif
|
||||
@ -76,7 +74,7 @@ union pn48 {
|
||||
|
||||
u64 val;
|
||||
|
||||
#ifdef CONFIG_LITTLE_ENDIAN
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
|
||||
struct {
|
||||
u8 TSC0;
|
||||
@ -89,7 +87,7 @@ struct {
|
||||
u8 TSC7;
|
||||
} _byte_;
|
||||
|
||||
#elif defined(CONFIG_BIG_ENDIAN)
|
||||
#else
|
||||
|
||||
struct {
|
||||
u8 TSC7;
|
||||
@ -111,7 +109,6 @@ union Keytype {
|
||||
u32 lkey[4];
|
||||
};
|
||||
|
||||
|
||||
typedef struct _RT_PMKID_LIST {
|
||||
u8 bUsed;
|
||||
u8 Bssid[6];
|
||||
@ -121,7 +118,6 @@ typedef struct _RT_PMKID_LIST {
|
||||
u16 ssid_length;
|
||||
} RT_PMKID_LIST, *PRT_PMKID_LIST;
|
||||
|
||||
|
||||
struct security_priv {
|
||||
u32 dot11AuthAlgrthm; /* 802.11 auth, could be open, shared, 8021x and authswitch */
|
||||
u32 dot11PrivacyAlgrthm; /* This specify the privacy for shared auth. algorithm. */
|
||||
@ -162,7 +158,6 @@ struct security_priv {
|
||||
u8 wps_ie[MAX_WPS_IE_LEN];/* added in assoc req */
|
||||
int wps_ie_len;
|
||||
|
||||
|
||||
u8 binstallGrpkey;
|
||||
#ifdef CONFIG_GTK_OL
|
||||
u8 binstallKCK_KEK;
|
||||
@ -182,7 +177,6 @@ struct security_priv {
|
||||
|
||||
s32 hw_decrypted;/* if the rx packets is hw_decrypted==_FALSE, it means the hw has not been ready. */
|
||||
|
||||
|
||||
/* keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc) */
|
||||
u32 ndisauthtype; /* NDIS_802_11_AUTHENTICATION_MODE */
|
||||
u32 ndisencryptstatus; /* NDIS_802_11_ENCRYPTION_STATUS */
|
||||
@ -198,7 +192,6 @@ struct security_priv {
|
||||
u8 authenticator_ie[256]; /* store ap security information element */
|
||||
u8 supplicant_ie[256]; /* store sta security information element */
|
||||
|
||||
|
||||
/* for tkip countermeasure */
|
||||
u32 last_mic_err_time;
|
||||
u8 btkip_countermeasure;
|
||||
@ -297,7 +290,6 @@ struct sha256_state {
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define GET_TKIP_PN(iv, dot11txpn)\
|
||||
do {\
|
||||
dot11txpn._byte_.TSC0 = iv[2];\
|
||||
@ -308,7 +300,6 @@ struct sha256_state {
|
||||
dot11txpn._byte_.TSC5 = iv[7];\
|
||||
} while (0)
|
||||
|
||||
|
||||
#define ROL32(A, n) (((A) << (n)) | (((A)>>(32-(n))) & ((1UL << (n)) - 1)))
|
||||
#define ROR32(A, n) ROL32((A), 32-(n))
|
||||
|
||||
@ -425,7 +416,6 @@ static const unsigned long K[64] = {
|
||||
0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
|
||||
};
|
||||
|
||||
|
||||
/* Various logical functions */
|
||||
#define RORc(x, y) \
|
||||
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> (unsigned long) ((y) & 31)) | \
|
||||
|
@ -648,8 +648,10 @@ void rtw_cfg80211_ibss_indicate_connect(_adapter *padapter)
|
||||
return ;
|
||||
}
|
||||
} else {
|
||||
if (scanned == NULL)
|
||||
if (scanned == NULL) {
|
||||
rtw_warn_on(1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(&(scanned->network.Ssid), &(pnetwork->Ssid), sizeof(NDIS_802_11_SSID)) == _TRUE
|
||||
&& _rtw_memcmp(scanned->network.MacAddress, pnetwork->MacAddress, sizeof(NDIS_802_11_MAC_ADDRESS)) == _TRUE
|
||||
@ -747,7 +749,7 @@ check_bss:
|
||||
struct ieee80211_channel *notify_channel;
|
||||
u32 freq;
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
struct cfg80211_roam_info roam_info = {};
|
||||
#endif
|
||||
|
||||
@ -756,7 +758,7 @@ check_bss:
|
||||
#endif
|
||||
|
||||
RTW_INFO(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0))
|
||||
roam_info.channel = notify_channel;
|
||||
roam_info.bssid = cur_network->network.MacAddress;
|
||||
roam_info.req_ie =
|
||||
@ -907,7 +909,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||
param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) {
|
||||
if (param->u.crypt.idx >= WEP_KEYS
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
&& param->u.crypt.idx > BIP_MAX_KEYID
|
||||
|| param->u.crypt.idx >= BIP_MAX_KEYID
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
) {
|
||||
ret = -EINVAL;
|
||||
@ -1166,7 +1168,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
|
||||
param->sta_addr[4] == 0xff && param->sta_addr[5] == 0xff) {
|
||||
if (param->u.crypt.idx >= WEP_KEYS
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
&& param->u.crypt.idx > BIP_MAX_KEYID
|
||||
|| param->u.crypt.idx >= BIP_MAX_KEYID
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
) {
|
||||
ret = -EINVAL;
|
||||
@ -3478,8 +3480,10 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
|
||||
|
||||
RTW_INFO(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
|
||||
if (skb)
|
||||
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
|
||||
if (!skb)
|
||||
goto fail;
|
||||
|
||||
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, skb->truesize);
|
||||
|
||||
if (unlikely(skb->len < sizeof(struct ieee80211_radiotap_header)))
|
||||
goto fail;
|
||||
@ -3666,6 +3670,11 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12 ,0))
|
||||
mon_ndev->needs_free_netdev = true;
|
||||
#else
|
||||
mon_ndev->destructor = rtw_ndev_destructor;
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 9))
|
||||
mon_ndev->needs_free_netdev = false;
|
||||
mon_ndev->priv_destructor = rtw_ndev_destructor;
|
||||
@ -6442,7 +6451,7 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PM) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0))
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 12 ,0))
|
||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
|
||||
#else // kernel >= 4.12
|
||||
wiphy->max_sched_scan_reqs = 1;
|
||||
|
@ -33,7 +33,6 @@
|
||||
extern int rtw_ht_enable;
|
||||
#endif
|
||||
|
||||
|
||||
#define RTL_IOCTL_WPA_SUPPLICANT (SIOCIWFIRSTPRIV+30)
|
||||
|
||||
#define SCAN_ITEM_SIZE 768
|
||||
@ -57,7 +56,6 @@ extern int ui_pid[3];
|
||||
#define WEXT_CSCAN_HOME_DWELL_SECTION 'H'
|
||||
#define WEXT_CSCAN_TYPE_SECTION 'T'
|
||||
|
||||
|
||||
extern u8 key_2char2num(u8 hch, u8 lch);
|
||||
extern u8 str_2char2num(u8 hch, u8 lch);
|
||||
extern void macstr2num(u8 *dst, u8 *src);
|
||||
@ -148,7 +146,6 @@ static void indicate_wx_custom_event(_adapter *padapter, char *msg)
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void request_wps_pbc_event(_adapter *padapter)
|
||||
{
|
||||
u8 *buff, *p;
|
||||
@ -219,7 +216,6 @@ void indicate_wx_scan_complete_event(_adapter *padapter)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void rtw_indicate_wx_assoc_event(_adapter *padapter)
|
||||
{
|
||||
union iwreq_data wrqu;
|
||||
@ -586,7 +582,6 @@ static inline char *iwe_stream_wpa_wpa2_process(_adapter *padapter,
|
||||
u8 *p;
|
||||
sint out_len = 0;
|
||||
|
||||
|
||||
if (pbuf) {
|
||||
p = pbuf;
|
||||
|
||||
@ -694,7 +689,6 @@ static inline char *iwe_stream_wapi_process(_adapter *padapter,
|
||||
RTW_INFO("rtw_wx_get_scan: %s ", pnetwork->network.Ssid.Ssid);
|
||||
RTW_INFO("rtw_wx_get_scan: ssid = %d ", wapi_len);
|
||||
|
||||
|
||||
if (wapi_len > 0) {
|
||||
p = buf_wapi;
|
||||
/* _rtw_memset(buf_wapi, 0, MAX_WAPI_IE_LEN*2); */
|
||||
@ -746,7 +740,6 @@ static inline char *iwe_stream_rssi_process(_adapter *padapter,
|
||||
sq = pnetwork->network.PhyInfo.SignalQuality;
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_SIGNAL_DISPLAY_DBM
|
||||
iwe->u.qual.level = (u8) translate_percentage_to_dbm(ss); /* dbm */
|
||||
#else
|
||||
@ -1103,7 +1096,6 @@ static char *translate_scan(_adapter *padapter,
|
||||
RTW_INFO("rtw_wx_get_scan: %s ", pnetwork->network.Ssid.Ssid);
|
||||
RTW_INFO("rtw_wx_get_scan: ssid = %d ", wapi_len);
|
||||
|
||||
|
||||
if (wapi_len > 0) {
|
||||
p = buf_wapi;
|
||||
_rtw_memset(buf_wapi, 0, MAX_WAPI_IE_LEN * 2);
|
||||
@ -1150,7 +1142,6 @@ static char *translate_scan(_adapter *padapter,
|
||||
sq = pnetwork->network.PhyInfo.SignalQuality;
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_SIGNAL_DISPLAY_DBM
|
||||
iwe.u.qual.level = (u8) translate_percentage_to_dbm(ss); /* dbm */
|
||||
#else
|
||||
@ -1262,7 +1253,6 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
|
||||
param->u.crypt.err = 0;
|
||||
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
|
||||
|
||||
@ -1484,7 +1474,6 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1645,7 +1634,6 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
|
||||
* || check_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS) == _TRUE) */
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_OFF_RCR_AM, null_addr);
|
||||
|
||||
|
||||
exit:
|
||||
|
||||
if (buf)
|
||||
@ -1667,8 +1655,6 @@ static int rtw_wx_get_name(struct net_device *dev,
|
||||
WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
NDIS_802_11_RATES_EX *prates = NULL;
|
||||
|
||||
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE) == _TRUE) {
|
||||
/* parsing HT_CAP_IE */
|
||||
p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength - 12);
|
||||
@ -1718,7 +1704,6 @@ static int rtw_wx_get_name(struct net_device *dev,
|
||||
snprintf(wrqu->name, IFNAMSIZ, "unassociated");
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1733,8 +1718,6 @@ static int rtw_wx_set_freq(struct net_device *dev,
|
||||
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
||||
int exp = 1, freq = 0, div = 0;
|
||||
|
||||
|
||||
|
||||
if (wrqu->freq.m <= 1000) {
|
||||
if (wrqu->freq.flags == IW_FREQ_AUTO) {
|
||||
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, wrqu->freq.m) > 0) {
|
||||
@ -1778,7 +1761,6 @@ static int rtw_wx_set_freq(struct net_device *dev,
|
||||
|
||||
set_channel_bwmode(padapter, padapter->mlmeextpriv.cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, CHANNEL_WIDTH_20);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1891,7 +1873,6 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
@ -1902,8 +1883,6 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a,
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
wrqu->mode = IW_MODE_INFRA;
|
||||
else if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) ||
|
||||
@ -1922,7 +1901,6 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a,
|
||||
|
||||
}
|
||||
|
||||
|
||||
static int rtw_wx_set_pmkid(struct net_device *dev,
|
||||
struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
@ -2043,8 +2021,6 @@ static int rtw_wx_get_range(struct net_device *dev,
|
||||
u16 val;
|
||||
int i;
|
||||
|
||||
|
||||
|
||||
wrqu->data.length = sizeof(*range);
|
||||
_rtw_memset(range, 0, sizeof(*range));
|
||||
|
||||
@ -2182,8 +2158,6 @@ static int rtw_wx_get_range(struct net_device *dev,
|
||||
IW_SCAN_CAPA_CHANNEL | IW_SCAN_CAPA_MODE | IW_SCAN_CAPA_RATE;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
@ -2318,8 +2292,6 @@ static int rtw_wx_get_wap(struct net_device *dev,
|
||||
|
||||
_rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
|
||||
|
||||
|
||||
|
||||
if (((check_fwstate(pmlmepriv, _FW_LINKED)) == _TRUE) ||
|
||||
((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) == _TRUE) ||
|
||||
((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == _TRUE))
|
||||
@ -2328,7 +2300,6 @@ static int rtw_wx_get_wap(struct net_device *dev,
|
||||
else
|
||||
_rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
@ -2351,7 +2322,6 @@ static int rtw_wx_set_mlme(struct net_device *dev,
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct iw_mlme *mlme = (struct iw_mlme *) extra;
|
||||
|
||||
|
||||
if (mlme == NULL)
|
||||
return -1;
|
||||
|
||||
@ -2359,10 +2329,8 @@ static int rtw_wx_set_mlme(struct net_device *dev,
|
||||
|
||||
reason = cpu_to_le16(mlme->reason_code);
|
||||
|
||||
|
||||
RTW_INFO("%s, cmd=%d, reason=%d\n", __FUNCTION__, mlme->cmd, reason);
|
||||
|
||||
|
||||
switch (mlme->cmd) {
|
||||
case IW_MLME_DEAUTH:
|
||||
if (!rtw_set_802_11_disassociate(padapter))
|
||||
@ -2395,7 +2363,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
|
||||
#ifdef DBG_IOCTL
|
||||
RTW_INFO("DBG_IOCTL %s:%d\n", __FUNCTION__, __LINE__);
|
||||
#endif
|
||||
@ -2522,7 +2489,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
||||
len -= sec_len;
|
||||
break;
|
||||
|
||||
|
||||
case WEXT_CSCAN_CHANNEL_SECTION:
|
||||
/* RTW_INFO("WEXT_CSCAN_CHANNEL_SECTION\n"); */
|
||||
pos += 1;
|
||||
@ -2603,7 +2569,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
|
||||
#ifdef DBG_IOCTL
|
||||
RTW_INFO("DBG_IOCTL %s:%d\n", __FUNCTION__, __LINE__);
|
||||
#endif
|
||||
@ -2683,7 +2648,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
#ifdef DBG_IOCTL
|
||||
RTW_INFO("DBG_IOCTL %s:%d return %d\n", __FUNCTION__, __LINE__, ret);
|
||||
#endif
|
||||
@ -2732,8 +2696,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
rtw_ps_deny(padapter, PS_DENY_JOIN);
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||
ret = -1;
|
||||
@ -2845,7 +2807,6 @@ exit:
|
||||
RTW_INFO("DBG_IOCTL %s:%d return %d\n", __FUNCTION__, __LINE__, ret);
|
||||
#endif
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2858,8 +2819,6 @@ static int rtw_wx_get_essid(struct net_device *dev,
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
WLAN_BSSID_EX *pcur_bss = &pmlmepriv->cur_network.network;
|
||||
|
||||
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE)) {
|
||||
len = pcur_bss->Ssid.SsidLength;
|
||||
@ -2876,7 +2835,6 @@ static int rtw_wx_get_essid(struct net_device *dev,
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
@ -2893,8 +2851,6 @@ static int rtw_wx_set_rate(struct net_device *dev,
|
||||
u32 ratevalue = 0;
|
||||
u8 mpdatarate[NumRates] = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0xff};
|
||||
|
||||
|
||||
|
||||
if (target_rate == -1) {
|
||||
ratevalue = 11;
|
||||
goto set_rate;
|
||||
@ -2959,7 +2915,6 @@ set_rate:
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -3051,7 +3006,6 @@ static int rtw_wx_get_frag(struct net_device *dev,
|
||||
{
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
|
||||
|
||||
RTW_INFO("%s, frag_len=%d\n", __func__, padapter->xmitpriv.frag_len);
|
||||
|
||||
wrqu->frag.value = padapter->xmitpriv.frag_len;
|
||||
@ -3068,7 +3022,6 @@ static int rtw_wx_get_retry(struct net_device *dev,
|
||||
{
|
||||
/* _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); */
|
||||
|
||||
|
||||
wrqu->retry.value = 7;
|
||||
wrqu->retry.fixed = 0; /* no auto select */
|
||||
wrqu->retry.disabled = 1;
|
||||
@ -3118,7 +3071,6 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
||||
|
||||
key = erq->flags & IW_ENCODE_INDEX;
|
||||
|
||||
|
||||
if (erq->flags & IW_ENCODE_DISABLED) {
|
||||
RTW_INFO("EncryptionDisabled\n");
|
||||
padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled;
|
||||
@ -3225,7 +3177,6 @@ static int rtw_wx_set_enc(struct net_device *dev,
|
||||
|
||||
exit:
|
||||
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
@ -3248,7 +3199,6 @@ static int rtw_wx_get_enc(struct net_device *dev,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
key = erq->flags & IW_ENCODE_INDEX;
|
||||
|
||||
if (key) {
|
||||
@ -3310,7 +3260,6 @@ static int rtw_wx_get_enc(struct net_device *dev,
|
||||
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
@ -3448,7 +3397,6 @@ static int rtw_wx_set_auth(struct net_device *dev,
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
ret = wpa_set_auth_algs(dev, (u32)param->value);
|
||||
|
||||
break;
|
||||
@ -3509,7 +3457,6 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
|
||||
param->cmd = IEEE_CMD_SET_ENCRYPTION;
|
||||
_rtw_memset(param->sta_addr, 0xff, ETH_ALEN);
|
||||
|
||||
|
||||
switch (pext->alg) {
|
||||
case IW_ENCODE_ALG_NONE:
|
||||
/* todo: remove key */
|
||||
@ -3593,7 +3540,6 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int rtw_wx_get_nick(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
@ -3636,7 +3582,6 @@ static int rtw_wx_get_nick(struct net_device *dev,
|
||||
|
||||
RTW_INFO("dbg(0x664)=0x%x\n", rtw_read32(padapter, 0x664));
|
||||
|
||||
|
||||
RTW_INFO("\n");
|
||||
|
||||
RTW_INFO("dbg(0x430)=0x%x\n", rtw_read32(padapter, 0x430));
|
||||
@ -3672,7 +3617,6 @@ static int rtw_wx_read32(struct net_device *dev,
|
||||
u8 *ptmp;
|
||||
int ret;
|
||||
|
||||
|
||||
ret = 0;
|
||||
padapter = (PADAPTER)rtw_netdev_priv(dev);
|
||||
p = &wrqu->data;
|
||||
@ -3778,7 +3722,6 @@ static int rtw_wx_read_rf(struct net_device *dev,
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
u32 path, addr, data32;
|
||||
|
||||
|
||||
path = *(u32 *)extra;
|
||||
addr = *((u32 *)extra + 1);
|
||||
data32 = rtw_hal_read_rfreg(padapter, path, addr, 0xFFFFF);
|
||||
@ -3917,7 +3860,6 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
|
||||
goto _rtw_drvext_hdl_exit;
|
||||
}
|
||||
|
||||
|
||||
bset = (u8)(p->flags & 0xFFFF);
|
||||
len = p->length;
|
||||
pparmbuf = (u8 *)rtw_malloc(len);
|
||||
@ -3936,25 +3878,20 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* */
|
||||
poidparam = (struct drvext_oidparam *)pparmbuf;
|
||||
|
||||
|
||||
|
||||
/* check subcode */
|
||||
if (poidparam->subcode >= MAX_DRVEXT_HANDLERS) {
|
||||
ret = -EINVAL;
|
||||
goto _rtw_drvext_hdl_exit;
|
||||
}
|
||||
|
||||
|
||||
if (poidparam->subcode >= MAX_DRVEXT_OID_SUBCODES) {
|
||||
ret = -EINVAL;
|
||||
goto _rtw_drvext_hdl_exit;
|
||||
}
|
||||
|
||||
|
||||
phandler = drvextoidhandlers + poidparam->subcode;
|
||||
|
||||
if (poidparam->len != phandler->parmsize) {
|
||||
@ -3962,7 +3899,6 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
|
||||
goto _rtw_drvext_hdl_exit;
|
||||
}
|
||||
|
||||
|
||||
res = phandler->handler(&padapter->drvextpriv, bset, poidparam->data);
|
||||
|
||||
if (res == 0) {
|
||||
@ -3976,7 +3912,6 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
|
||||
} else
|
||||
ret = -EFAULT;
|
||||
|
||||
|
||||
_rtw_drvext_hdl_exit:
|
||||
|
||||
return ret;
|
||||
@ -4224,7 +4159,6 @@ static int rtw_get_ap_info(struct net_device *dev,
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* pdata->length = 0; */ /* ? */
|
||||
pdata->flags = 0;
|
||||
if (pdata->length >= 32) {
|
||||
@ -4246,7 +4180,6 @@ static int rtw_get_ap_info(struct net_device *dev,
|
||||
if (rtw_end_of_queue_search(phead, plist) == _TRUE)
|
||||
break;
|
||||
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
|
||||
/* if(hwaddr_aton_i(pdata->pointer, bssid)) */
|
||||
@ -4256,7 +4189,6 @@ static int rtw_get_ap_info(struct net_device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
if (_rtw_memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN) == _TRUE) { /* BSSID match, then check if supporting wpa/wpa2 */
|
||||
RTW_INFO("BSSID:" MAC_FMT "\n", MAC_ARG(bssid));
|
||||
|
||||
@ -4450,7 +4382,6 @@ static int rtw_p2p_set_go_nego_ssid(struct net_device *dev,
|
||||
|
||||
}
|
||||
|
||||
|
||||
static int rtw_p2p_set_intent(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
@ -4526,7 +4457,6 @@ static int rtw_p2p_set_op_ch(struct net_device *dev,
|
||||
|
||||
}
|
||||
|
||||
|
||||
static int rtw_p2p_profilefound(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
@ -11938,7 +11868,6 @@ static void freeloopbackpkt(PADAPTER padapter, struct xmit_frame *pframe)
|
||||
struct xmit_priv *pxmitpriv;
|
||||
struct xmit_buf *pxmitbuf;
|
||||
|
||||
|
||||
pxmitpriv = &padapter->xmitpriv;
|
||||
pxmitbuf = pframe->pxmitbuf;
|
||||
|
||||
@ -11950,7 +11879,6 @@ static void printdata(u8 *pbuf, u32 len)
|
||||
{
|
||||
u32 i, val;
|
||||
|
||||
|
||||
for (i = 0; (i + 4) <= len; i += 4) {
|
||||
printk("%08X", *(u32 *)(pbuf + i));
|
||||
if ((i + 4) & 0x1F)
|
||||
@ -11960,10 +11888,10 @@ static void printdata(u8 *pbuf, u32 len)
|
||||
}
|
||||
|
||||
if (i < len) {
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
#ifdef __BIG_ENDIAN
|
||||
for (; i < len, i++)
|
||||
printk("%02X", pbuf + i);
|
||||
#else /* CONFIG_LITTLE_ENDIAN */
|
||||
#else /* __LITTLE_ENDIAN */
|
||||
#if 0
|
||||
val = 0;
|
||||
_rtw_memcpy(&val, pbuf + i, len - i);
|
||||
@ -11978,7 +11906,7 @@ static void printdata(u8 *pbuf, u32 len)
|
||||
n = (4 - n) * 2;
|
||||
printk("%8s", str + n);
|
||||
#endif
|
||||
#endif /* CONFIG_LITTLE_ENDIAN */
|
||||
#endif /* __LITTLE_ENDIAN */
|
||||
}
|
||||
printk("\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user