mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-09 06:43:06 +00:00
rtl8188eu: Place driver rtl8188EUS_rtl8189ES_linux_v4.1.8_9499.20131104 in branch v4.1.8_9499
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
bad0b4cde4
commit
065126d8ce
247 changed files with 192113 additions and 30447 deletions
97
hal/rtl8188e/Hal8188EPwrSeq.c
Executable file
97
hal/rtl8188e/Hal8188EPwrSeq.c
Executable file
|
@ -0,0 +1,97 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "Hal8188EPwrSeq.h"
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
/*
|
||||
drivers should parse below arrays and do the corresponding actions
|
||||
*/
|
||||
//3 Power on Array
|
||||
WLAN_PWR_CFG rtl8188E_power_on_flow[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Radio off Array
|
||||
WLAN_PWR_CFG rtl8188E_radio_off_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Card Disable Array
|
||||
WLAN_PWR_CFG rtl8188E_card_disable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_CARDDIS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Card Enable Array
|
||||
WLAN_PWR_CFG rtl8188E_card_enable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_CARDDIS_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Suspend Array
|
||||
WLAN_PWR_CFG rtl8188E_suspend_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_SUS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Resume Array
|
||||
WLAN_PWR_CFG rtl8188E_resume_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_SUS_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
|
||||
//3HWPDN Array
|
||||
WLAN_PWR_CFG rtl8188E_hwpdn_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_PDN
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Enter LPS
|
||||
WLAN_PWR_CFG rtl8188E_enter_lps_flow[RTL8188E_TRANS_ACT_TO_LPS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
//FW behavior
|
||||
RTL8188E_TRANS_ACT_TO_LPS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Leave LPS
|
||||
WLAN_PWR_CFG rtl8188E_leave_lps_flow[RTL8188E_TRANS_LPS_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
//FW behavior
|
||||
RTL8188E_TRANS_LPS_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
1493
hal/rtl8188e/rtl8188e_cmd.c
Executable file
1493
hal/rtl8188e/rtl8188e_cmd.c
Executable file
File diff suppressed because it is too large
Load diff
650
hal/rtl8188e/rtl8188e_dm.c
Executable file
650
hal/rtl8188e/rtl8188e_dm.c
Executable file
|
@ -0,0 +1,650 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
//============================================================
|
||||
// Description:
|
||||
//
|
||||
// This file is for 92CE/92CU dynamic mechanism only
|
||||
//
|
||||
//
|
||||
//============================================================
|
||||
#define _RTL8188E_DM_C_
|
||||
|
||||
//============================================================
|
||||
// include files
|
||||
//============================================================
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <rtw_byteorder.h>
|
||||
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
//============================================================
|
||||
// Global var
|
||||
//============================================================
|
||||
|
||||
|
||||
static VOID
|
||||
dm_CheckProtection(
|
||||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo);
|
||||
u1Byte CurRate, RateThreshold;
|
||||
|
||||
if(pMgntInfo->pHTInfo->bCurBW40MHz)
|
||||
RateThreshold = MGN_MCS1;
|
||||
else
|
||||
RateThreshold = MGN_MCS3;
|
||||
|
||||
if(Adapter->TxStats.CurrentInitTxRate <= RateThreshold)
|
||||
{
|
||||
pMgntInfo->bDmDisableProtect = TRUE;
|
||||
DbgPrint("Forced disable protect: %x\n", Adapter->TxStats.CurrentInitTxRate);
|
||||
}
|
||||
else
|
||||
{
|
||||
pMgntInfo->bDmDisableProtect = FALSE;
|
||||
DbgPrint("Enable protect: %x\n", Adapter->TxStats.CurrentInitTxRate);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static VOID
|
||||
dm_CheckStatistics(
|
||||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
if(!Adapter->MgntInfo.bMediaConnect)
|
||||
return;
|
||||
|
||||
//2008.12.10 tynli Add for getting Current_Tx_Rate_Reg flexibly.
|
||||
rtw_hal_get_hwreg( Adapter, HW_VAR_INIT_TX_RATE, (pu1Byte)(&Adapter->TxStats.CurrentInitTxRate) );
|
||||
|
||||
// Calculate current Tx Rate(Successful transmited!!)
|
||||
|
||||
// Calculate current Rx Rate(Successful received!!)
|
||||
|
||||
//for tx tx retry count
|
||||
rtw_hal_get_hwreg( Adapter, HW_VAR_RETRY_COUNT, (pu1Byte)(&Adapter->TxStats.NumTxRetryCount) );
|
||||
#endif
|
||||
}
|
||||
|
||||
static void dm_CheckPbcGPIO(_adapter *padapter)
|
||||
{
|
||||
u8 tmp1byte;
|
||||
u8 bPbcPressed = _FALSE;
|
||||
|
||||
if(!padapter->registrypriv.hw_wps_pbc)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
tmp1byte = rtw_read8(padapter, GPIO_IO_SEL);
|
||||
tmp1byte |= (HAL_8188E_HW_GPIO_WPS_BIT);
|
||||
rtw_write8(padapter, GPIO_IO_SEL, tmp1byte); //enable GPIO[2] as output mode
|
||||
|
||||
tmp1byte &= ~(HAL_8188E_HW_GPIO_WPS_BIT);
|
||||
rtw_write8(padapter, GPIO_IN, tmp1byte); //reset the floating voltage level
|
||||
|
||||
tmp1byte = rtw_read8(padapter, GPIO_IO_SEL);
|
||||
tmp1byte &= ~(HAL_8188E_HW_GPIO_WPS_BIT);
|
||||
rtw_write8(padapter, GPIO_IO_SEL, tmp1byte); //enable GPIO[2] as input mode
|
||||
|
||||
tmp1byte =rtw_read8(padapter, GPIO_IN);
|
||||
|
||||
if (tmp1byte == 0xff)
|
||||
return ;
|
||||
|
||||
if (tmp1byte&HAL_8188E_HW_GPIO_WPS_BIT)
|
||||
{
|
||||
bPbcPressed = _TRUE;
|
||||
}
|
||||
#else
|
||||
tmp1byte = rtw_read8(padapter, GPIO_IN);
|
||||
//RT_TRACE(COMP_IO, DBG_TRACE, ("dm_CheckPbcGPIO - %x\n", tmp1byte));
|
||||
|
||||
if (tmp1byte == 0xff || padapter->init_adpt_in_progress)
|
||||
return ;
|
||||
|
||||
if((tmp1byte&HAL_8188E_HW_GPIO_WPS_BIT)==0)
|
||||
{
|
||||
bPbcPressed = _TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( _TRUE == bPbcPressed)
|
||||
{
|
||||
// Here we only set bPbcPressed to true
|
||||
// After trigger PBC, the variable will be set to false
|
||||
DBG_8192C("CheckPbcGPIO - PBC is pressed\n");
|
||||
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
|
||||
kobject_uevent(&padapter->pnetdev->dev.kobj, KOBJ_NET_PBC);
|
||||
#else
|
||||
kobject_hotplug(&padapter->pnetdev->class_dev.kobj, KOBJ_NET_PBC);
|
||||
#endif
|
||||
#else
|
||||
|
||||
if ( padapter->pid[0] == 0 )
|
||||
{ // 0 is the default value and it means the application monitors the HW PBC doesn't privde its pid to driver.
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
rtw_signal_process(padapter->pid[0], SIGUSR1);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
//
|
||||
// Description:
|
||||
// Perform interrupt migration dynamically to reduce CPU utilization.
|
||||
//
|
||||
// Assumption:
|
||||
// 1. Do not enable migration under WIFI test.
|
||||
//
|
||||
// Created by Roger, 2010.03.05.
|
||||
//
|
||||
VOID
|
||||
dm_InterruptMigration(
|
||||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv);
|
||||
BOOLEAN bCurrentIntMt, bCurrentACIntDisable;
|
||||
BOOLEAN IntMtToSet = _FALSE;
|
||||
BOOLEAN ACIntToSet = _FALSE;
|
||||
|
||||
|
||||
// Retrieve current interrupt migration and Tx four ACs IMR settings first.
|
||||
bCurrentIntMt = pHalData->bInterruptMigration;
|
||||
bCurrentACIntDisable = pHalData->bDisableTxInt;
|
||||
|
||||
//
|
||||
// <Roger_Notes> Currently we use busy traffic for reference instead of RxIntOK counts to prevent non-linear Rx statistics
|
||||
// when interrupt migration is set before. 2010.03.05.
|
||||
//
|
||||
if(!Adapter->registrypriv.wifi_spec &&
|
||||
(check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE) &&
|
||||
pmlmepriv->LinkDetectInfo.bHigherBusyTraffic)
|
||||
{
|
||||
IntMtToSet = _TRUE;
|
||||
|
||||
// To check whether we should disable Tx interrupt or not.
|
||||
if(pmlmepriv->LinkDetectInfo.bHigherBusyRxTraffic )
|
||||
ACIntToSet = _TRUE;
|
||||
}
|
||||
|
||||
//Update current settings.
|
||||
if( bCurrentIntMt != IntMtToSet ){
|
||||
DBG_8192C("%s(): Update interrrupt migration(%d)\n",__FUNCTION__,IntMtToSet);
|
||||
if(IntMtToSet)
|
||||
{
|
||||
//
|
||||
// <Roger_Notes> Set interrrupt migration timer and corresponging Tx/Rx counter.
|
||||
// timer 25ns*0xfa0=100us for 0xf packets.
|
||||
// 2010.03.05.
|
||||
//
|
||||
rtw_write32(Adapter, REG_INT_MIG, 0xff000fa0);// 0x306:Rx, 0x307:Tx
|
||||
pHalData->bInterruptMigration = IntMtToSet;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reset all interrupt migration settings.
|
||||
rtw_write32(Adapter, REG_INT_MIG, 0);
|
||||
pHalData->bInterruptMigration = IntMtToSet;
|
||||
}
|
||||
}
|
||||
|
||||
/*if( bCurrentACIntDisable != ACIntToSet ){
|
||||
DBG_8192C("%s(): Update AC interrrupt(%d)\n",__FUNCTION__,ACIntToSet);
|
||||
if(ACIntToSet) // Disable four ACs interrupts.
|
||||
{
|
||||
//
|
||||
// <Roger_Notes> Disable VO, VI, BE and BK four AC interrupts to gain more efficient CPU utilization.
|
||||
// When extremely highly Rx OK occurs, we will disable Tx interrupts.
|
||||
// 2010.03.05.
|
||||
//
|
||||
UpdateInterruptMask8192CE( Adapter, 0, RT_AC_INT_MASKS );
|
||||
pHalData->bDisableTxInt = ACIntToSet;
|
||||
}
|
||||
else// Enable four ACs interrupts.
|
||||
{
|
||||
UpdateInterruptMask8192CE( Adapter, RT_AC_INT_MASKS, 0 );
|
||||
pHalData->bDisableTxInt = ACIntToSet;
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Initialize GPIO setting registers
|
||||
//
|
||||
static void
|
||||
dm_InitGPIOSetting(
|
||||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
|
||||
u8 tmp1byte;
|
||||
|
||||
tmp1byte = rtw_read8(Adapter, REG_GPIO_MUXCFG);
|
||||
tmp1byte &= (GPIOSEL_GPIO | ~GPIOSEL_ENBT);
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
// UMB-B cut bug. We need to support the modification.
|
||||
if (IS_81xxC_VENDOR_UMC_B_CUT(pHalData->VersionID) &&
|
||||
pHalData->bt_coexist.BT_Coexist)
|
||||
{
|
||||
tmp1byte |= (BIT5);
|
||||
}
|
||||
#endif
|
||||
rtw_write8(Adapter, REG_GPIO_MUXCFG, tmp1byte);
|
||||
|
||||
}
|
||||
|
||||
//============================================================
|
||||
// functions
|
||||
//============================================================
|
||||
static void Init_ODM_ComInfo_88E(PADAPTER Adapter)
|
||||
{
|
||||
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
PDM_ODM_T pDM_Odm = &(pHalData->odmpriv);
|
||||
u8 cut_ver,fab_ver;
|
||||
|
||||
//
|
||||
// Init Value
|
||||
//
|
||||
_rtw_memset(pDM_Odm,0,sizeof(pDM_Odm));
|
||||
|
||||
pDM_Odm->Adapter = Adapter;
|
||||
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_PLATFORM,ODM_CE);
|
||||
|
||||
if(Adapter->interface_type == RTW_GSPI )
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_INTERFACE,ODM_ITRF_SDIO);
|
||||
else
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_INTERFACE,Adapter->interface_type);//RTL871X_HCI_TYPE
|
||||
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_IC_TYPE,ODM_RTL8188E);
|
||||
|
||||
fab_ver = ODM_TSMC;
|
||||
cut_ver = ODM_CUT_A;
|
||||
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_FAB_VER,fab_ver);
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_CUT_VER,cut_ver);
|
||||
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_MP_TEST_CHIP,IS_NORMAL_CHIP(pHalData->VersionID));
|
||||
|
||||
#if 0
|
||||
//#ifdef CONFIG_USB_HCI
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_BOARD_TYPE,pHalData->BoardType);
|
||||
|
||||
if(pHalData->BoardType == BOARD_USB_High_PA){
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_EXT_LNA,_TRUE);
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_EXT_PA,_TRUE);
|
||||
}
|
||||
#endif
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_PATCH_ID,pHalData->CustomerID);
|
||||
// ODM_CMNINFO_BINHCT_TEST only for MP Team
|
||||
ODM_CmnInfoInit(pDM_Odm,ODM_CMNINFO_BWIFI_TEST,Adapter->registrypriv.wifi_spec);
|
||||
|
||||
|
||||
if(pHalData->rf_type == RF_1T1R){
|
||||
ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_1T1R);
|
||||
}
|
||||
else if(pHalData->rf_type == RF_2T2R){
|
||||
ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_2T2R);
|
||||
}
|
||||
else if(pHalData->rf_type == RF_1T2R){
|
||||
ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_RF_TYPE,ODM_1T2R);
|
||||
}
|
||||
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_RF_ANTENNA_TYPE, pHalData->TRxAntDivType);
|
||||
|
||||
#ifdef CONFIG_DISABLE_ODM
|
||||
pdmpriv->InitODMFlag = 0;
|
||||
#else
|
||||
pdmpriv->InitODMFlag = ODM_RF_CALIBRATION |
|
||||
ODM_RF_TX_PWR_TRACK //|
|
||||
;
|
||||
//if(pHalData->AntDivCfg)
|
||||
// pdmpriv->InitODMFlag |= ODM_BB_ANT_DIV;
|
||||
#endif
|
||||
|
||||
ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_ABILITY,pdmpriv->InitODMFlag);
|
||||
|
||||
}
|
||||
static void Update_ODM_ComInfo_88E(PADAPTER Adapter)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
||||
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
|
||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(Adapter);
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
PDM_ODM_T pDM_Odm = &(pHalData->odmpriv);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
int i;
|
||||
|
||||
pdmpriv->InitODMFlag = 0
|
||||
| ODM_BB_DIG
|
||||
#ifdef CONFIG_ODM_REFRESH_RAMASK
|
||||
| ODM_BB_RA_MASK
|
||||
#endif
|
||||
| ODM_BB_DYNAMIC_TXPWR
|
||||
| ODM_BB_FA_CNT
|
||||
| ODM_BB_RSSI_MONITOR
|
||||
| ODM_BB_CCK_PD
|
||||
| ODM_BB_PWR_SAVE
|
||||
| ODM_RF_CALIBRATION
|
||||
| ODM_RF_TX_PWR_TRACK
|
||||
#ifdef CONFIG_ODM_ADAPTIVITY
|
||||
| ODM_BB_ADAPTIVITY
|
||||
#endif
|
||||
;
|
||||
|
||||
if (!Adapter->registrypriv.qos_opt_enable) {
|
||||
pdmpriv->InitODMFlag |= ODM_MAC_EDCA_TURBO;
|
||||
}
|
||||
|
||||
if(pHalData->AntDivCfg)
|
||||
pdmpriv->InitODMFlag |= ODM_BB_ANT_DIV;
|
||||
|
||||
#if (MP_DRIVER==1)
|
||||
if (Adapter->registrypriv.mp_mode == 1) {
|
||||
pdmpriv->InitODMFlag = 0
|
||||
| ODM_RF_CALIBRATION
|
||||
| ODM_RF_TX_PWR_TRACK
|
||||
;
|
||||
}
|
||||
#endif//(MP_DRIVER==1)
|
||||
|
||||
#ifdef CONFIG_DISABLE_ODM
|
||||
pdmpriv->InitODMFlag = 0;
|
||||
#endif//CONFIG_DISABLE_ODM
|
||||
|
||||
ODM_CmnInfoUpdate(pDM_Odm,ODM_CMNINFO_ABILITY,pdmpriv->InitODMFlag);
|
||||
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_TX_UNI,&(Adapter->xmitpriv.tx_bytes));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_RX_UNI,&(Adapter->recvpriv.rx_bytes));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_WM_MODE,&(pmlmeext->cur_wireless_mode));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SEC_CHNL_OFFSET,&(pHalData->nCur40MhzPrimeSC));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SEC_MODE,&(Adapter->securitypriv.dot11PrivacyAlgrthm));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BW,&(pHalData->CurrentChannelBW ));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_CHNL,&( pHalData->CurrentChannel));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_NET_CLOSED,&( Adapter->net_closed));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_MP_MODE,&(Adapter->registrypriv.mp_mode));
|
||||
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BAND,&(pDM_Odm->u1Byte_temp));
|
||||
//================= only for 8192D =================
|
||||
/*
|
||||
//pHalData->CurrentBandType92D
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BAND,&(pDM_Odm->u1Byte_temp));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_DMSP_GET_VALUE,&(pDM_Odm->u1Byte_temp));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BUDDY_ADAPTOR,&(pDM_Odm->PADAPTER_temp));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_DMSP_IS_MASTER,&(pDM_Odm->u1Byte_temp));
|
||||
//================= only for 8192D =================
|
||||
// driver havn't those variable now
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BT_OPERATION,&(pDM_Odm->u1Byte_temp));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_BT_DISABLE_EDCA,&(pDM_Odm->u1Byte_temp));
|
||||
*/
|
||||
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_SCAN,&(pmlmepriv->bScanInProcess));
|
||||
ODM_CmnInfoHook(pDM_Odm,ODM_CMNINFO_POWER_SAVING,&(pwrctrlpriv->bpower_saving));
|
||||
ODM_CmnInfoInit(pDM_Odm, ODM_CMNINFO_RF_ANTENNA_TYPE, pHalData->TRxAntDivType);
|
||||
|
||||
for(i=0; i< NUM_STA; i++)
|
||||
{
|
||||
//pDM_Odm->pODM_StaInfo[i] = NULL;
|
||||
ODM_CmnInfoPtrArrayHook(pDM_Odm, ODM_CMNINFO_STA_STATUS,i,NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
rtl8188e_InitHalDm(
|
||||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
PDM_ODM_T pDM_Odm = &(pHalData->odmpriv);
|
||||
u8 i;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
dm_InitGPIOSetting(Adapter);
|
||||
#endif
|
||||
|
||||
pdmpriv->DM_Type = DM_Type_ByDriver;
|
||||
pdmpriv->DMFlag = DYNAMIC_FUNC_DISABLE;
|
||||
|
||||
Update_ODM_ComInfo_88E(Adapter);
|
||||
ODM_DMInit(pDM_Odm);
|
||||
|
||||
Adapter->fix_rate = 0xFF;
|
||||
|
||||
}
|
||||
|
||||
|
||||
VOID
|
||||
rtl8188e_HalDmWatchDog(
|
||||
IN PADAPTER Adapter
|
||||
)
|
||||
{
|
||||
BOOLEAN bFwCurrentInPSMode = _FALSE;
|
||||
BOOLEAN bFwPSAwake = _TRUE;
|
||||
u8 hw_init_completed = _FALSE;
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
PDM_ODM_T pDM_Odm = &(pHalData->odmpriv);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = Adapter->pbuddy_adapter;
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
_func_enter_;
|
||||
|
||||
hw_init_completed = Adapter->hw_init_completed;
|
||||
|
||||
if (hw_init_completed == _FALSE)
|
||||
goto skip_dm;
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
bFwCurrentInPSMode = adapter_to_pwrctl(Adapter)->bFwCurrentInPSMode;
|
||||
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
// Fw is under p2p powersaving mode, driver should stop dynamic mechanism.
|
||||
// modifed by thomas. 2011.06.11.
|
||||
if(Adapter->wdinfo.p2p_ps_mode)
|
||||
bFwPSAwake = _FALSE;
|
||||
#endif //CONFIG_P2P_PS
|
||||
|
||||
if( (hw_init_completed == _TRUE)
|
||||
&& ((!bFwCurrentInPSMode) && bFwPSAwake))
|
||||
{
|
||||
//
|
||||
// Calculate Tx/Rx statistics.
|
||||
//
|
||||
dm_CheckStatistics(Adapter);
|
||||
|
||||
//
|
||||
// Dynamically switch RTS/CTS protection.
|
||||
//
|
||||
//dm_CheckProtection(Adapter);
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
// 20100630 Joseph: Disable Interrupt Migration mechanism temporarily because it degrades Rx throughput.
|
||||
// Tx Migration settings.
|
||||
//dm_InterruptMigration(Adapter);
|
||||
|
||||
//if(Adapter->HalFunc.TxCheckStuckHandler(Adapter))
|
||||
// PlatformScheduleWorkItem(&(GET_HAL_DATA(Adapter)->HalResetWorkItem));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
//ODM
|
||||
if (hw_init_completed == _TRUE)
|
||||
{
|
||||
u8 bLinked=_FALSE;
|
||||
u8 bsta_state = _FALSE;
|
||||
|
||||
#ifdef CONFIG_DISABLE_ODM
|
||||
pHalData->odmpriv.SupportAbility = 0;
|
||||
#endif
|
||||
|
||||
if(rtw_linked_check(Adapter))
|
||||
bLinked = _TRUE;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(pbuddy_adapter && rtw_linked_check(pbuddy_adapter))
|
||||
bLinked = _TRUE;
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
ODM_CmnInfoUpdate(&pHalData->odmpriv ,ODM_CMNINFO_LINK, bLinked);
|
||||
|
||||
|
||||
if (check_fwstate(&Adapter->mlmepriv, WIFI_STATION_STATE))
|
||||
bsta_state = _TRUE;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(pbuddy_adapter && check_fwstate(&pbuddy_adapter->mlmepriv, WIFI_STATION_STATE))
|
||||
bsta_state = _TRUE;
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
ODM_CmnInfoUpdate(&pHalData->odmpriv ,ODM_CMNINFO_STATION_STATE, bsta_state);
|
||||
|
||||
ODM_DMWatchdog(&pHalData->odmpriv);
|
||||
|
||||
}
|
||||
|
||||
skip_dm:
|
||||
|
||||
// Check GPIO to determine current RF on/off and Pbc status.
|
||||
// Check Hardware Radio ON/OFF or not
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
if(pHalData->bGpioHwWpsPbc)
|
||||
#endif
|
||||
{
|
||||
//temp removed
|
||||
//dm_CheckPbcGPIO(Adapter);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void rtl8188e_init_dm_priv(IN PADAPTER Adapter)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
PDM_ODM_T podmpriv = &pHalData->odmpriv;
|
||||
_rtw_memset(pdmpriv, 0, sizeof(struct dm_priv));
|
||||
//_rtw_spinlock_init(&(pHalData->odm_stainfo_lock));
|
||||
Init_ODM_ComInfo_88E(Adapter);
|
||||
#ifdef CONFIG_SW_ANTENNA_DIVERSITY
|
||||
//_init_timer(&(pdmpriv->SwAntennaSwitchTimer), Adapter->pnetdev , odm_SW_AntennaSwitchCallback, Adapter);
|
||||
ODM_InitAllTimers(podmpriv );
|
||||
#endif
|
||||
ODM_InitDebugSetting(podmpriv);
|
||||
}
|
||||
|
||||
void rtl8188e_deinit_dm_priv(IN PADAPTER Adapter)
|
||||
{
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
PDM_ODM_T podmpriv = &pHalData->odmpriv;
|
||||
//_rtw_spinlock_free(&pHalData->odm_stainfo_lock);
|
||||
#ifdef CONFIG_SW_ANTENNA_DIVERSITY
|
||||
//_cancel_timer_ex(&pdmpriv->SwAntennaSwitchTimer);
|
||||
ODM_CancelAllTimers(podmpriv);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||
// Add new function to reset the state of antenna diversity before link.
|
||||
//
|
||||
// Compare RSSI for deciding antenna
|
||||
void AntDivCompare8188E(PADAPTER Adapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src)
|
||||
{
|
||||
//PADAPTER Adapter = pDM_Odm->Adapter ;
|
||||
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
if(0 != pHalData->AntDivCfg )
|
||||
{
|
||||
//DBG_8192C("update_network=> orgRSSI(%d)(%d),newRSSI(%d)(%d)\n",dst->Rssi,query_rx_pwr_percentage(dst->Rssi),
|
||||
// src->Rssi,query_rx_pwr_percentage(src->Rssi));
|
||||
//select optimum_antenna for before linked =>For antenna diversity
|
||||
if(dst->Rssi >= src->Rssi )//keep org parameter
|
||||
{
|
||||
src->Rssi = dst->Rssi;
|
||||
src->PhyInfo.Optimum_antenna = dst->PhyInfo.Optimum_antenna;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add new function to reset the state of antenna diversity before link.
|
||||
u8 AntDivBeforeLink8188E(PADAPTER Adapter )
|
||||
{
|
||||
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
PDM_ODM_T pDM_Odm =&pHalData->odmpriv;
|
||||
SWAT_T *pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table;
|
||||
struct mlme_priv *pmlmepriv = &(Adapter->mlmepriv);
|
||||
|
||||
// Condition that does not need to use antenna diversity.
|
||||
if(pHalData->AntDivCfg==0)
|
||||
{
|
||||
//DBG_8192C("odm_AntDivBeforeLink8192C(): No AntDiv Mechanism.\n");
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
if(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE)
|
||||
{
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
|
||||
if(pDM_SWAT_Table->SWAS_NoLink_State == 0){
|
||||
//switch channel
|
||||
pDM_SWAT_Table->SWAS_NoLink_State = 1;
|
||||
pDM_SWAT_Table->CurAntenna = (pDM_SWAT_Table->CurAntenna==Antenna_A)?Antenna_B:Antenna_A;
|
||||
|
||||
//PHY_SetBBReg(Adapter, rFPGA0_XA_RFInterfaceOE, 0x300, pDM_SWAT_Table->CurAntenna);
|
||||
rtw_antenna_select_cmd(Adapter, pDM_SWAT_Table->CurAntenna, _FALSE);
|
||||
//DBG_8192C("%s change antenna to ANT_( %s ).....\n",__FUNCTION__, (pDM_SWAT_Table->CurAntenna==Antenna_A)?"A":"B");
|
||||
return _TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
pDM_SWAT_Table->SWAS_NoLink_State = 0;
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
3800
hal/rtl8188e/rtl8188e_hal_init.c
Executable file
3800
hal/rtl8188e/rtl8188e_hal_init.c
Executable file
File diff suppressed because it is too large
Load diff
1157
hal/rtl8188e/rtl8188e_mp.c
Executable file
1157
hal/rtl8188e/rtl8188e_mp.c
Executable file
File diff suppressed because it is too large
Load diff
3552
hal/rtl8188e/rtl8188e_phycfg.c
Executable file
3552
hal/rtl8188e/rtl8188e_phycfg.c
Executable file
File diff suppressed because it is too large
Load diff
1272
hal/rtl8188e/rtl8188e_rf6052.c
Executable file
1272
hal/rtl8188e/rtl8188e_rf6052.c
Executable file
File diff suppressed because it is too large
Load diff
350
hal/rtl8188e/rtl8188e_rxdesc.c
Executable file
350
hal/rtl8188e/rtl8188e_rxdesc.c
Executable file
|
@ -0,0 +1,350 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#define _RTL8188E_REDESC_C_
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
static s32 translate2dbm(u8 signal_strength_idx)
|
||||
{
|
||||
s32 signal_power; // in dBm.
|
||||
|
||||
|
||||
// Translate to dBm (x=0.5y-95).
|
||||
signal_power = (s32)((signal_strength_idx + 1) >> 1);
|
||||
signal_power -= 95;
|
||||
|
||||
return signal_power;
|
||||
}
|
||||
|
||||
|
||||
static void process_rssi(_adapter *padapter,union recv_frame *prframe)
|
||||
{
|
||||
u32 last_rssi, tmp_val;
|
||||
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
struct signal_stat * signal_stat = &padapter->recvpriv.signal_strength_data;
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
//DBG_8192C("process_rssi=> pattrib->rssil(%d) signal_strength(%d)\n ",pattrib->RecvSignalPower,pattrib->signal_strength);
|
||||
//if(pRfd->Status.bPacketToSelf || pRfd->Status.bPacketBeacon)
|
||||
{
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
if(signal_stat->update_req) {
|
||||
signal_stat->total_num = 0;
|
||||
signal_stat->total_val = 0;
|
||||
signal_stat->update_req = 0;
|
||||
}
|
||||
|
||||
signal_stat->total_num++;
|
||||
signal_stat->total_val += pattrib->phy_info.SignalStrength;
|
||||
signal_stat->avg_val = signal_stat->total_val / signal_stat->total_num;
|
||||
#else //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
//Adapter->RxStats.RssiCalculateCnt++; //For antenna Test
|
||||
if(padapter->recvpriv.signal_strength_data.total_num++ >= PHY_RSSI_SLID_WIN_MAX)
|
||||
{
|
||||
padapter->recvpriv.signal_strength_data.total_num = PHY_RSSI_SLID_WIN_MAX;
|
||||
last_rssi = padapter->recvpriv.signal_strength_data.elements[padapter->recvpriv.signal_strength_data.index];
|
||||
padapter->recvpriv.signal_strength_data.total_val -= last_rssi;
|
||||
}
|
||||
padapter->recvpriv.signal_strength_data.total_val +=pattrib->phy_info.SignalStrength;
|
||||
|
||||
padapter->recvpriv.signal_strength_data.elements[padapter->recvpriv.signal_strength_data.index++] = pattrib->phy_info.SignalStrength;
|
||||
if(padapter->recvpriv.signal_strength_data.index >= PHY_RSSI_SLID_WIN_MAX)
|
||||
padapter->recvpriv.signal_strength_data.index = 0;
|
||||
|
||||
|
||||
tmp_val = padapter->recvpriv.signal_strength_data.total_val/padapter->recvpriv.signal_strength_data.total_num;
|
||||
|
||||
if(padapter->recvpriv.is_signal_dbg) {
|
||||
padapter->recvpriv.signal_strength= padapter->recvpriv.signal_strength_dbg;
|
||||
padapter->recvpriv.rssi=(s8)translate2dbm((u8)padapter->recvpriv.signal_strength_dbg);
|
||||
} else {
|
||||
padapter->recvpriv.signal_strength= tmp_val;
|
||||
padapter->recvpriv.rssi=(s8)translate2dbm((u8)tmp_val);
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("UI RSSI = %d, ui_rssi.TotalVal = %d, ui_rssi.TotalNum = %d\n", tmp_val, padapter->recvpriv.signal_strength_data.total_val,padapter->recvpriv.signal_strength_data.total_num));
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
}
|
||||
|
||||
}// Process_UI_RSSI_8192C
|
||||
|
||||
|
||||
|
||||
static void process_link_qual(_adapter *padapter,union recv_frame *prframe)
|
||||
{
|
||||
u32 last_evm=0, tmpVal;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
struct signal_stat * signal_stat;
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
if(prframe == NULL || padapter==NULL){
|
||||
return;
|
||||
}
|
||||
|
||||
pattrib = &prframe->u.hdr.attrib;
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
signal_stat = &padapter->recvpriv.signal_qual_data;
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
//DBG_8192C("process_link_qual=> pattrib->signal_qual(%d)\n ",pattrib->signal_qual);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
if(signal_stat->update_req) {
|
||||
signal_stat->total_num = 0;
|
||||
signal_stat->total_val = 0;
|
||||
signal_stat->update_req = 0;
|
||||
}
|
||||
|
||||
signal_stat->total_num++;
|
||||
signal_stat->total_val += pattrib->phy_info.SignalQuality;
|
||||
signal_stat->avg_val = signal_stat->total_val / signal_stat->total_num;
|
||||
|
||||
#else //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
if(pattrib->phy_info.SignalQuality != 0)
|
||||
{
|
||||
//
|
||||
// 1. Record the general EVM to the sliding window.
|
||||
//
|
||||
if(padapter->recvpriv.signal_qual_data.total_num++ >= PHY_LINKQUALITY_SLID_WIN_MAX)
|
||||
{
|
||||
padapter->recvpriv.signal_qual_data.total_num = PHY_LINKQUALITY_SLID_WIN_MAX;
|
||||
last_evm = padapter->recvpriv.signal_qual_data.elements[padapter->recvpriv.signal_qual_data.index];
|
||||
padapter->recvpriv.signal_qual_data.total_val -= last_evm;
|
||||
}
|
||||
padapter->recvpriv.signal_qual_data.total_val += pattrib->phy_info.SignalQuality;
|
||||
|
||||
padapter->recvpriv.signal_qual_data.elements[padapter->recvpriv.signal_qual_data.index++] = pattrib->phy_info.SignalQuality;
|
||||
if(padapter->recvpriv.signal_qual_data.index >= PHY_LINKQUALITY_SLID_WIN_MAX)
|
||||
padapter->recvpriv.signal_qual_data.index = 0;
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("Total SQ=%d pattrib->signal_qual= %d\n", padapter->recvpriv.signal_qual_data.total_val, pattrib->phy_info.SignalQuality));
|
||||
|
||||
// <1> Showed on UI for user, in percentage.
|
||||
tmpVal = padapter->recvpriv.signal_qual_data.total_val/padapter->recvpriv.signal_qual_data.total_num;
|
||||
padapter->recvpriv.signal_qual=(u8)tmpVal;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,(" pattrib->signal_qual =%d\n", pattrib->phy_info.SignalQuality));
|
||||
}
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
}
|
||||
|
||||
//void rtl8188e_process_phy_info(_adapter *padapter, union recv_frame *prframe)
|
||||
void rtl8188e_process_phy_info(_adapter *padapter, void *prframe)
|
||||
{
|
||||
union recv_frame *precvframe = (union recv_frame *)prframe;
|
||||
|
||||
//
|
||||
// Check RSSI
|
||||
//
|
||||
process_rssi(padapter, precvframe);
|
||||
//
|
||||
// Check PWDB.
|
||||
//
|
||||
//process_PWDB(padapter, precvframe);
|
||||
|
||||
//UpdateRxSignalStatistics8192C(Adapter, pRfd);
|
||||
//
|
||||
// Check EVM
|
||||
//
|
||||
process_link_qual(padapter, precvframe);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void update_recvframe_attrib_88e(
|
||||
union recv_frame *precvframe,
|
||||
struct recv_stat *prxstat)
|
||||
{
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
struct recv_stat report;
|
||||
PRXREPORT prxreport;
|
||||
//struct recv_frame_hdr *phdr;
|
||||
|
||||
//phdr = &precvframe->u.hdr;
|
||||
|
||||
report.rxdw0 = le32_to_cpu(prxstat->rxdw0);
|
||||
report.rxdw1 = le32_to_cpu(prxstat->rxdw1);
|
||||
report.rxdw2 = le32_to_cpu(prxstat->rxdw2);
|
||||
report.rxdw3 = le32_to_cpu(prxstat->rxdw3);
|
||||
report.rxdw4 = le32_to_cpu(prxstat->rxdw4);
|
||||
report.rxdw5 = le32_to_cpu(prxstat->rxdw5);
|
||||
|
||||
prxreport = (PRXREPORT)&report;
|
||||
|
||||
pattrib = &precvframe->u.hdr.attrib;
|
||||
_rtw_memset(pattrib, 0, sizeof(struct rx_pkt_attrib));
|
||||
|
||||
pattrib->crc_err = (u8)((report.rxdw0 >> 14) & 0x1);;//(u8)prxreport->crc32;
|
||||
|
||||
// update rx report to recv_frame attribute
|
||||
pattrib->pkt_rpt_type = (u8)((report.rxdw3 >> 14) & 0x3);//prxreport->rpt_sel;
|
||||
|
||||
if(pattrib->pkt_rpt_type == NORMAL_RX)//Normal rx packet
|
||||
{
|
||||
pattrib->pkt_len = (u16)(report.rxdw0 &0x00003fff);//(u16)prxreport->pktlen;
|
||||
pattrib->drvinfo_sz = (u8)((report.rxdw0 >> 16) & 0xf) * 8;//(u8)(prxreport->drvinfosize << 3);
|
||||
|
||||
pattrib->physt = (u8)((report.rxdw0 >> 26) & 0x1);//(u8)prxreport->physt;
|
||||
|
||||
pattrib->bdecrypted = (report.rxdw0 & BIT(27))? 0:1;//(u8)(prxreport->swdec ? 0 : 1);
|
||||
pattrib->encrypt = (u8)((report.rxdw0 >> 20) & 0x7);//(u8)prxreport->security;
|
||||
|
||||
pattrib->qos = (u8)((report.rxdw0 >> 23) & 0x1);//(u8)prxreport->qos;
|
||||
pattrib->priority = (u8)((report.rxdw1 >> 8) & 0xf);//(u8)prxreport->tid;
|
||||
|
||||
pattrib->amsdu = (u8)((report.rxdw1 >> 13) & 0x1);//(u8)prxreport->amsdu;
|
||||
|
||||
pattrib->seq_num = (u16)(report.rxdw2 & 0x00000fff);//(u16)prxreport->seq;
|
||||
pattrib->frag_num = (u8)((report.rxdw2 >> 12) & 0xf);//(u8)prxreport->frag;
|
||||
pattrib->mfrag = (u8)((report.rxdw1 >> 27) & 0x1);//(u8)prxreport->mf;
|
||||
pattrib->mdata = (u8)((report.rxdw1 >> 26) & 0x1);//(u8)prxreport->md;
|
||||
|
||||
pattrib->mcs_rate = (u8)(report.rxdw3 & 0x3f);//(u8)prxreport->rxmcs;
|
||||
pattrib->rxht = (u8)((report.rxdw3 >> 6) & 0x1);//(u8)prxreport->rxht;
|
||||
|
||||
pattrib->icv_err = (u8)((report.rxdw0 >> 15) & 0x1);//(u8)prxreport->icverr;
|
||||
pattrib->shift_sz = (u8)((report.rxdw0 >> 24) & 0x3);
|
||||
|
||||
}
|
||||
else if(pattrib->pkt_rpt_type == TX_REPORT1)//CCX
|
||||
{
|
||||
pattrib->pkt_len = TX_RPT1_PKT_LEN;
|
||||
pattrib->drvinfo_sz = 0;
|
||||
}
|
||||
else if(pattrib->pkt_rpt_type == TX_REPORT2)// TX RPT
|
||||
{
|
||||
pattrib->pkt_len =(u16)(report.rxdw0 & 0x3FF);//Rx length[9:0]
|
||||
pattrib->drvinfo_sz = 0;
|
||||
|
||||
//
|
||||
// Get TX report MAC ID valid.
|
||||
//
|
||||
pattrib->MacIDValidEntry[0] = report.rxdw4;
|
||||
pattrib->MacIDValidEntry[1] = report.rxdw5;
|
||||
|
||||
}
|
||||
else if(pattrib->pkt_rpt_type == HIS_REPORT)// USB HISR RPT
|
||||
{
|
||||
pattrib->pkt_len = (u16)(report.rxdw0 &0x00003fff);//(u16)prxreport->pktlen;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Notice:
|
||||
* Before calling this function,
|
||||
* precvframe->u.hdr.rx_data should be ready!
|
||||
*/
|
||||
void update_recvframe_phyinfo_88e(
|
||||
union recv_frame *precvframe,
|
||||
struct phy_stat *pphy_status)
|
||||
{
|
||||
PADAPTER padapter = precvframe->u.hdr.adapter;
|
||||
struct rx_pkt_attrib *pattrib = &precvframe->u.hdr.attrib;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
PODM_PHY_INFO_T pPHYInfo = (PODM_PHY_INFO_T)(&pattrib->phy_info);
|
||||
u8 *wlanhdr;
|
||||
ODM_PACKET_INFO_T pkt_info;
|
||||
u8 *sa;
|
||||
struct sta_priv *pstapriv;
|
||||
struct sta_info *psta;
|
||||
//_irqL irqL;
|
||||
|
||||
pkt_info.bPacketMatchBSSID =_FALSE;
|
||||
pkt_info.bPacketToSelf = _FALSE;
|
||||
pkt_info.bPacketBeacon = _FALSE;
|
||||
|
||||
wlanhdr = get_recvframe_data(precvframe);
|
||||
|
||||
pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) &&
|
||||
!pattrib->icv_err && !pattrib->crc_err &&
|
||||
_rtw_memcmp(get_hdr_bssid(wlanhdr), get_bssid(&padapter->mlmepriv), ETH_ALEN));
|
||||
|
||||
pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID && (_rtw_memcmp(get_da(wlanhdr), myid(&padapter->eeprompriv), ETH_ALEN));
|
||||
|
||||
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && (GetFrameSubType(wlanhdr) == WIFI_BEACON);
|
||||
|
||||
if(pkt_info.bPacketBeacon){
|
||||
if(check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE) == _TRUE){
|
||||
sa = padapter->mlmepriv.cur_network.network.MacAddress;
|
||||
#if 0
|
||||
{
|
||||
DBG_8192C("==> rx beacon from AP[%02x:%02x:%02x:%02x:%02x:%02x]\n",
|
||||
sa[0],sa[1],sa[2],sa[3],sa[4],sa[5]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
sa = get_sa(wlanhdr);
|
||||
}
|
||||
else{
|
||||
sa = get_sa(wlanhdr);
|
||||
}
|
||||
|
||||
pstapriv = &padapter->stapriv;
|
||||
pkt_info.StationID = 0xFF;
|
||||
psta = rtw_get_stainfo(pstapriv, sa);
|
||||
if (psta)
|
||||
{
|
||||
pkt_info.StationID = psta->mac_id;
|
||||
//DBG_8192C("%s ==> StationID(%d)\n",__FUNCTION__,pkt_info.StationID);
|
||||
}
|
||||
pkt_info.Rate = pattrib->mcs_rate;
|
||||
//rtl8188e_query_rx_phy_status(precvframe, pphy_status);
|
||||
|
||||
//_enter_critical_bh(&pHalData->odm_stainfo_lock, &irqL);
|
||||
ODM_PhyStatusQuery(&pHalData->odmpriv,pPHYInfo,(u8 *)pphy_status,&(pkt_info));
|
||||
//_exit_critical_bh(&pHalData->odm_stainfo_lock, &irqL);
|
||||
|
||||
precvframe->u.hdr.psta = NULL;
|
||||
if (pkt_info.bPacketMatchBSSID &&
|
||||
(check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE))
|
||||
{
|
||||
if (psta)
|
||||
{
|
||||
precvframe->u.hdr.psta = psta;
|
||||
rtl8188e_process_phy_info(padapter, precvframe);
|
||||
|
||||
}
|
||||
}
|
||||
else if (pkt_info.bPacketToSelf || pkt_info.bPacketBeacon)
|
||||
{
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == _TRUE)
|
||||
{
|
||||
if (psta)
|
||||
{
|
||||
precvframe->u.hdr.psta = psta;
|
||||
}
|
||||
}
|
||||
rtl8188e_process_phy_info(padapter, precvframe);
|
||||
}
|
||||
}
|
||||
|
125
hal/rtl8188e/rtl8188e_sreset.c
Executable file
125
hal/rtl8188e/rtl8188e_sreset.c
Executable file
|
@ -0,0 +1,125 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#define _RTL8188E_SRESET_C_
|
||||
|
||||
#include <rtl8188e_sreset.h>
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
|
||||
void rtl8188e_sreset_xmit_status_check(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
unsigned long current_time;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
unsigned int diff_time;
|
||||
u32 txdma_status;
|
||||
|
||||
if( (txdma_status=rtw_read32(padapter, REG_TXDMA_STATUS)) !=0x00){
|
||||
DBG_871X("%s REG_TXDMA_STATUS:0x%08x\n", __FUNCTION__, txdma_status);
|
||||
rtw_hal_sreset_reset(padapter);
|
||||
}
|
||||
#ifdef CONFIG_USB_HCI
|
||||
//total xmit irp = 4
|
||||
//DBG_8192C("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__FUNCTION__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt);
|
||||
//if(pxmitpriv->txirp_cnt == NR_XMITBUFF+1)
|
||||
current_time = rtw_get_current_time();
|
||||
|
||||
if(0 == pxmitpriv->free_xmitbuf_cnt || 0 == pxmitpriv->free_xmit_extbuf_cnt) {
|
||||
|
||||
diff_time = rtw_get_passing_time_ms(psrtpriv->last_tx_time);
|
||||
|
||||
if (diff_time > 2000) {
|
||||
if (psrtpriv->last_tx_complete_time == 0) {
|
||||
psrtpriv->last_tx_complete_time = current_time;
|
||||
}
|
||||
else{
|
||||
diff_time = rtw_get_passing_time_ms(psrtpriv->last_tx_complete_time);
|
||||
if (diff_time > 4000) {
|
||||
u32 ability;
|
||||
|
||||
//padapter->Wifi_Error_Status = WIFI_TX_HANG;
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DM_FUNC, &ability);
|
||||
|
||||
DBG_871X("%s tx hang %s\n", __FUNCTION__,
|
||||
(ability & ODM_BB_ADAPTIVITY)? "ODM_BB_ADAPTIVITY" : "");
|
||||
|
||||
if (!(ability & ODM_BB_ADAPTIVITY))
|
||||
rtw_hal_sreset_reset(padapter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //CONFIG_USB_HCI
|
||||
|
||||
if (psrtpriv->dbg_trigger_point == SRESET_TGP_XMIT_STATUS) {
|
||||
psrtpriv->dbg_trigger_point = SRESET_TGP_NULL;
|
||||
rtw_hal_sreset_reset(padapter);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void rtl8188e_sreset_linked_status_check(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
u32 rx_dma_status = 0;
|
||||
u8 fw_status=0;
|
||||
rx_dma_status = rtw_read32(padapter,REG_RXDMA_STATUS);
|
||||
if(rx_dma_status!= 0x00){
|
||||
DBG_8192C("%s REG_RXDMA_STATUS:0x%08x \n",__FUNCTION__,rx_dma_status);
|
||||
rtw_write32(padapter,REG_RXDMA_STATUS,rx_dma_status);
|
||||
}
|
||||
fw_status = rtw_read8(padapter,REG_FMETHR);
|
||||
if(fw_status != 0x00)
|
||||
{
|
||||
if(fw_status == 1)
|
||||
DBG_8192C("%s REG_FW_STATUS (0x%02x), Read_Efuse_Fail !! \n",__FUNCTION__,fw_status);
|
||||
else if(fw_status == 2)
|
||||
DBG_8192C("%s REG_FW_STATUS (0x%02x), Condition_No_Match !! \n",__FUNCTION__,fw_status);
|
||||
}
|
||||
#if 0
|
||||
u32 regc50,regc58,reg824,reg800;
|
||||
regc50 = rtw_read32(padapter,0xc50);
|
||||
regc58 = rtw_read32(padapter,0xc58);
|
||||
reg824 = rtw_read32(padapter,0x824);
|
||||
reg800 = rtw_read32(padapter,0x800);
|
||||
if( ((regc50&0xFFFFFF00)!= 0x69543400)||
|
||||
((regc58&0xFFFFFF00)!= 0x69543400)||
|
||||
(((reg824&0xFFFFFF00)!= 0x00390000)&&(((reg824&0xFFFFFF00)!= 0x80390000)))||
|
||||
( ((reg800&0xFFFFFF00)!= 0x03040000)&&((reg800&0xFFFFFF00)!= 0x83040000)))
|
||||
{
|
||||
DBG_8192C("%s regc50:0x%08x, regc58:0x%08x, reg824:0x%08x, reg800:0x%08x,\n", __FUNCTION__,
|
||||
regc50, regc58, reg824, reg800);
|
||||
rtw_hal_sreset_reset(padapter);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (psrtpriv->dbg_trigger_point == SRESET_TGP_LINK_STATUS) {
|
||||
psrtpriv->dbg_trigger_point = SRESET_TGP_NULL;
|
||||
rtw_hal_sreset_reset(padapter);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
292
hal/rtl8188e/rtl8188e_xmit.c
Executable file
292
hal/rtl8188e/rtl8188e_xmit.c
Executable file
|
@ -0,0 +1,292 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#define _RTL8188E_XMIT_C_
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
void dump_txrpt_ccx_88e(void *buf)
|
||||
{
|
||||
struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
|
||||
|
||||
DBG_871X("%s:\n"
|
||||
"tag1:%u, pkt_num:%u, txdma_underflow:%u, int_bt:%u, int_tri:%u, int_ccx:%u\n"
|
||||
"mac_id:%u, pkt_ok:%u, bmc:%u\n"
|
||||
"retry_cnt:%u, lifetime_over:%u, retry_over:%u\n"
|
||||
"ccx_qtime:%u\n"
|
||||
"final_data_rate:0x%02x\n"
|
||||
"qsel:%u, sw:0x%03x\n"
|
||||
, __func__
|
||||
, txrpt_ccx->tag1, txrpt_ccx->pkt_num, txrpt_ccx->txdma_underflow, txrpt_ccx->int_bt, txrpt_ccx->int_tri, txrpt_ccx->int_ccx
|
||||
, txrpt_ccx->mac_id, txrpt_ccx->pkt_ok, txrpt_ccx->bmc
|
||||
, txrpt_ccx->retry_cnt, txrpt_ccx->lifetime_over, txrpt_ccx->retry_over
|
||||
, txrpt_ccx_qtime_88e(txrpt_ccx)
|
||||
, txrpt_ccx->final_data_rate
|
||||
, txrpt_ccx->qsel, txrpt_ccx_sw_88e(txrpt_ccx)
|
||||
);
|
||||
}
|
||||
|
||||
void handle_txrpt_ccx_88e(_adapter *adapter, u8 *buf)
|
||||
{
|
||||
struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
|
||||
|
||||
#ifdef DBG_CCX
|
||||
dump_txrpt_ccx_88e(buf);
|
||||
#endif
|
||||
|
||||
if (txrpt_ccx->int_ccx) {
|
||||
if (txrpt_ccx->pkt_ok)
|
||||
rtw_ack_tx_done(&adapter->xmitpriv, RTW_SCTX_DONE_SUCCESS);
|
||||
else
|
||||
rtw_ack_tx_done(&adapter->xmitpriv, RTW_SCTX_DONE_CCX_PKT_FAIL);
|
||||
}
|
||||
}
|
||||
#endif //CONFIG_XMIT_ACK
|
||||
|
||||
void _dbg_dump_tx_info(_adapter *padapter,int frame_tag,struct tx_desc *ptxdesc)
|
||||
{
|
||||
u8 bDumpTxPkt;
|
||||
u8 bDumpTxDesc = _FALSE;
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(bDumpTxPkt));
|
||||
|
||||
if(bDumpTxPkt ==1){//dump txdesc for data frame
|
||||
DBG_871X("dump tx_desc for data frame\n");
|
||||
if((frame_tag&0x0f) == DATA_FRAMETAG){
|
||||
bDumpTxDesc = _TRUE;
|
||||
}
|
||||
}
|
||||
else if(bDumpTxPkt ==2){//dump txdesc for mgnt frame
|
||||
DBG_871X("dump tx_desc for mgnt frame\n");
|
||||
if((frame_tag&0x0f) == MGNT_FRAMETAG){
|
||||
bDumpTxDesc = _TRUE;
|
||||
}
|
||||
}
|
||||
else if(bDumpTxPkt ==3){//dump early info
|
||||
}
|
||||
|
||||
if(bDumpTxDesc){
|
||||
// ptxdesc->txdw4 = cpu_to_le32(0x00001006);//RTS Rate=24M
|
||||
// ptxdesc->txdw6 = 0x6666f800;
|
||||
DBG_8192C("=====================================\n");
|
||||
DBG_8192C("txdw0(0x%08x)\n",ptxdesc->txdw0);
|
||||
DBG_8192C("txdw1(0x%08x)\n",ptxdesc->txdw1);
|
||||
DBG_8192C("txdw2(0x%08x)\n",ptxdesc->txdw2);
|
||||
DBG_8192C("txdw3(0x%08x)\n",ptxdesc->txdw3);
|
||||
DBG_8192C("txdw4(0x%08x)\n",ptxdesc->txdw4);
|
||||
DBG_8192C("txdw5(0x%08x)\n",ptxdesc->txdw5);
|
||||
DBG_8192C("txdw6(0x%08x)\n",ptxdesc->txdw6);
|
||||
DBG_8192C("txdw7(0x%08x)\n",ptxdesc->txdw7);
|
||||
DBG_8192C("=====================================\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Description:
|
||||
* Aggregation packets and send to hardware
|
||||
*
|
||||
* Return:
|
||||
* 0 Success
|
||||
* -1 Hardware resource(TX FIFO) not ready
|
||||
* -2 Software resource(xmitbuf) not ready
|
||||
*/
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
|
||||
//#define DBG_EMINFO
|
||||
|
||||
#if RTL8188E_EARLY_MODE_PKT_NUM_10 == 1
|
||||
#define EARLY_MODE_MAX_PKT_NUM 10
|
||||
#else
|
||||
#define EARLY_MODE_MAX_PKT_NUM 5
|
||||
#endif
|
||||
|
||||
|
||||
struct EMInfo{
|
||||
u8 EMPktNum;
|
||||
u16 EMPktLen[EARLY_MODE_MAX_PKT_NUM];
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
InsertEMContent_8188E(
|
||||
struct EMInfo *pEMInfo,
|
||||
IN pu1Byte VirtualAddress)
|
||||
{
|
||||
|
||||
#if RTL8188E_EARLY_MODE_PKT_NUM_10 == 1
|
||||
u1Byte index=0;
|
||||
u4Byte dwtmp=0;
|
||||
#endif
|
||||
|
||||
_rtw_memset(VirtualAddress, 0, EARLY_MODE_INFO_SIZE);
|
||||
if(pEMInfo->EMPktNum==0)
|
||||
return;
|
||||
|
||||
#ifdef DBG_EMINFO
|
||||
{
|
||||
int i;
|
||||
DBG_8192C("\n%s ==> pEMInfo->EMPktNum =%d\n",__FUNCTION__,pEMInfo->EMPktNum);
|
||||
for(i=0;i< EARLY_MODE_MAX_PKT_NUM;i++){
|
||||
DBG_8192C("%s ==> pEMInfo->EMPktLen[%d] =%d\n",__FUNCTION__,i,pEMInfo->EMPktLen[i]);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#if RTL8188E_EARLY_MODE_PKT_NUM_10 == 1
|
||||
SET_EARLYMODE_PKTNUM(VirtualAddress, pEMInfo->EMPktNum);
|
||||
|
||||
if(pEMInfo->EMPktNum == 1){
|
||||
dwtmp = pEMInfo->EMPktLen[0];
|
||||
}else{
|
||||
dwtmp = pEMInfo->EMPktLen[0];
|
||||
dwtmp += ((dwtmp%4)?(4-dwtmp%4):0)+4;
|
||||
dwtmp += pEMInfo->EMPktLen[1];
|
||||
}
|
||||
SET_EARLYMODE_LEN0(VirtualAddress, dwtmp);
|
||||
if(pEMInfo->EMPktNum <= 3){
|
||||
dwtmp = pEMInfo->EMPktLen[2];
|
||||
}else{
|
||||
dwtmp = pEMInfo->EMPktLen[2];
|
||||
dwtmp += ((dwtmp%4)?(4-dwtmp%4):0)+4;
|
||||
dwtmp += pEMInfo->EMPktLen[3];
|
||||
}
|
||||
SET_EARLYMODE_LEN1(VirtualAddress, dwtmp);
|
||||
if(pEMInfo->EMPktNum <= 5){
|
||||
dwtmp = pEMInfo->EMPktLen[4];
|
||||
}else{
|
||||
dwtmp = pEMInfo->EMPktLen[4];
|
||||
dwtmp += ((dwtmp%4)?(4-dwtmp%4):0)+4;
|
||||
dwtmp += pEMInfo->EMPktLen[5];
|
||||
}
|
||||
SET_EARLYMODE_LEN2_1(VirtualAddress, dwtmp&0xF);
|
||||
SET_EARLYMODE_LEN2_2(VirtualAddress, dwtmp>>4);
|
||||
if(pEMInfo->EMPktNum <= 7){
|
||||
dwtmp = pEMInfo->EMPktLen[6];
|
||||
}else{
|
||||
dwtmp = pEMInfo->EMPktLen[6];
|
||||
dwtmp += ((dwtmp%4)?(4-dwtmp%4):0)+4;
|
||||
dwtmp += pEMInfo->EMPktLen[7];
|
||||
}
|
||||
SET_EARLYMODE_LEN3(VirtualAddress, dwtmp);
|
||||
if(pEMInfo->EMPktNum <= 9){
|
||||
dwtmp = pEMInfo->EMPktLen[8];
|
||||
}else{
|
||||
dwtmp = pEMInfo->EMPktLen[8];
|
||||
dwtmp += ((dwtmp%4)?(4-dwtmp%4):0)+4;
|
||||
dwtmp += pEMInfo->EMPktLen[9];
|
||||
}
|
||||
SET_EARLYMODE_LEN4(VirtualAddress, dwtmp);
|
||||
#else
|
||||
SET_EARLYMODE_PKTNUM(VirtualAddress, pEMInfo->EMPktNum);
|
||||
SET_EARLYMODE_LEN0(VirtualAddress, pEMInfo->EMPktLen[0]);
|
||||
SET_EARLYMODE_LEN1(VirtualAddress, pEMInfo->EMPktLen[1]);
|
||||
SET_EARLYMODE_LEN2_1(VirtualAddress, pEMInfo->EMPktLen[2]&0xF);
|
||||
SET_EARLYMODE_LEN2_2(VirtualAddress, pEMInfo->EMPktLen[2]>>4);
|
||||
SET_EARLYMODE_LEN3(VirtualAddress, pEMInfo->EMPktLen[3]);
|
||||
SET_EARLYMODE_LEN4(VirtualAddress, pEMInfo->EMPktLen[4]);
|
||||
#endif
|
||||
//RT_PRINT_DATA(COMP_SEND, DBG_LOUD, "EMHdr:", VirtualAddress, 8);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void UpdateEarlyModeInfo8188E(struct xmit_priv *pxmitpriv,struct xmit_buf *pxmitbuf )
|
||||
{
|
||||
//_adapter *padapter, struct xmit_frame *pxmitframe,struct tx_servq *ptxservq
|
||||
int index,j;
|
||||
u16 offset,pktlen;
|
||||
PTXDESC ptxdesc;
|
||||
|
||||
u8 *pmem,*pEMInfo_mem;
|
||||
s8 node_num_0=0,node_num_1=0;
|
||||
struct EMInfo eminfo;
|
||||
struct agg_pkt_info *paggpkt;
|
||||
struct xmit_frame *pframe = (struct xmit_frame*)pxmitbuf->priv_data;
|
||||
pmem= pframe->buf_addr;
|
||||
|
||||
#ifdef DBG_EMINFO
|
||||
DBG_8192C("\n%s ==> agg_num:%d\n",__FUNCTION__, pframe->agg_num);
|
||||
for(index=0;index<pframe->agg_num;index++){
|
||||
offset = pxmitpriv->agg_pkt[index].offset;
|
||||
pktlen = pxmitpriv->agg_pkt[index].pkt_len;
|
||||
DBG_8192C("%s ==> agg_pkt[%d].offset=%d\n",__FUNCTION__,index,offset);
|
||||
DBG_8192C("%s ==> agg_pkt[%d].pkt_len=%d\n",__FUNCTION__,index,pktlen);
|
||||
}
|
||||
#endif
|
||||
|
||||
if( pframe->agg_num > EARLY_MODE_MAX_PKT_NUM)
|
||||
{
|
||||
node_num_0 = pframe->agg_num;
|
||||
node_num_1= EARLY_MODE_MAX_PKT_NUM-1;
|
||||
}
|
||||
|
||||
for(index=0;index<pframe->agg_num;index++){
|
||||
|
||||
offset = pxmitpriv->agg_pkt[index].offset;
|
||||
pktlen = pxmitpriv->agg_pkt[index].pkt_len;
|
||||
|
||||
_rtw_memset(&eminfo,0,sizeof(struct EMInfo));
|
||||
if( pframe->agg_num > EARLY_MODE_MAX_PKT_NUM){
|
||||
if(node_num_0 > EARLY_MODE_MAX_PKT_NUM){
|
||||
eminfo.EMPktNum = EARLY_MODE_MAX_PKT_NUM;
|
||||
node_num_0--;
|
||||
}
|
||||
else{
|
||||
eminfo.EMPktNum = node_num_1;
|
||||
node_num_1--;
|
||||
}
|
||||
}
|
||||
else{
|
||||
eminfo.EMPktNum = pframe->agg_num-(index+1);
|
||||
}
|
||||
for(j=0;j< eminfo.EMPktNum ;j++){
|
||||
eminfo.EMPktLen[j] = pxmitpriv->agg_pkt[index+1+j].pkt_len+4;// 4 bytes CRC
|
||||
}
|
||||
|
||||
if(pmem){
|
||||
if(index==0){
|
||||
ptxdesc = (PTXDESC)(pmem);
|
||||
pEMInfo_mem = ((u8 *)ptxdesc)+TXDESC_SIZE;
|
||||
}
|
||||
else{
|
||||
pmem = pmem + pxmitpriv->agg_pkt[index-1].offset;
|
||||
ptxdesc = (PTXDESC)(pmem);
|
||||
pEMInfo_mem = ((u8 *)ptxdesc)+TXDESC_SIZE;
|
||||
}
|
||||
|
||||
#ifdef DBG_EMINFO
|
||||
DBG_8192C("%s ==> desc.pkt_len=%d\n",__FUNCTION__,ptxdesc->pktlen);
|
||||
#endif
|
||||
InsertEMContent_8188E(&eminfo,pEMInfo_mem);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
_rtw_memset(pxmitpriv->agg_pkt,0,sizeof(struct agg_pkt_info)*MAX_AGG_PKT_NUM);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
124
hal/rtl8188e/sdio/rtl8189es_led.c
Executable file
124
hal/rtl8188e/sdio/rtl8189es_led.c
Executable file
|
@ -0,0 +1,124 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#define _RTL8189ES_LED_C_
|
||||
|
||||
#include "drv_types.h"
|
||||
#include "rtl8188e_hal.h"
|
||||
|
||||
//================================================================================
|
||||
// LED object.
|
||||
//================================================================================
|
||||
|
||||
|
||||
//================================================================================
|
||||
// Prototype of protected function.
|
||||
//================================================================================
|
||||
|
||||
//================================================================================
|
||||
// LED_819xUsb routines.
|
||||
//================================================================================
|
||||
|
||||
//
|
||||
// Description:
|
||||
// Turn on LED according to LedPin specified.
|
||||
//
|
||||
void
|
||||
SwLedOn(
|
||||
_adapter *padapter,
|
||||
PLED_871x pLed
|
||||
)
|
||||
{
|
||||
u8 LedCfg;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if( (padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pLed->bLedOn = _TRUE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Description:
|
||||
// Turn off LED according to LedPin specified.
|
||||
//
|
||||
void
|
||||
SwLedOff(
|
||||
_adapter *padapter,
|
||||
PLED_871x pLed
|
||||
)
|
||||
{
|
||||
u8 LedCfg;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if((padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
||||
exit:
|
||||
pLed->bLedOn = _FALSE;
|
||||
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
// Default LED behavior.
|
||||
//================================================================================
|
||||
|
||||
//
|
||||
// Description:
|
||||
// Initialize all LED_871x objects.
|
||||
//
|
||||
void
|
||||
rtl8188es_InitSwLeds(
|
||||
_adapter *padapter
|
||||
)
|
||||
{
|
||||
struct led_priv *pledpriv = &(padapter->ledpriv);
|
||||
|
||||
#if 0
|
||||
pledpriv->LedControlHandler = LedControl871x;
|
||||
|
||||
InitLed871x(padapter, &(pledpriv->SwLed0), LED_PIN_LED0);
|
||||
|
||||
InitLed871x(padapter,&(pledpriv->SwLed1), LED_PIN_LED1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Description:
|
||||
// DeInitialize all LED_819xUsb objects.
|
||||
//
|
||||
void
|
||||
rtl8188es_DeInitSwLeds(
|
||||
_adapter *padapter
|
||||
)
|
||||
{
|
||||
#if 0
|
||||
struct led_priv *ledpriv = &(padapter->ledpriv);
|
||||
|
||||
DeInitLed871x( &(ledpriv->SwLed0) );
|
||||
DeInitLed871x( &(ledpriv->SwLed1) );
|
||||
#endif
|
||||
}
|
||||
|
861
hal/rtl8188e/sdio/rtl8189es_recv.c
Executable file
861
hal/rtl8188e/sdio/rtl8189es_recv.c
Executable file
|
@ -0,0 +1,861 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#define _RTL8189ES_RECV_C_
|
||||
|
||||
#include <drv_conf.h>
|
||||
|
||||
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
#endif
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <recv_osdep.h>
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
static void rtl8188es_recv_tasklet(void *priv);
|
||||
|
||||
static s32 initrecvbuf(struct recv_buf *precvbuf, PADAPTER padapter)
|
||||
{
|
||||
_rtw_init_listhead(&precvbuf->list);
|
||||
_rtw_spinlock_init(&precvbuf->recvbuf_lock);
|
||||
|
||||
precvbuf->adapter = padapter;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
static void freerecvbuf(struct recv_buf *precvbuf)
|
||||
{
|
||||
_rtw_spinlock_free(&precvbuf->recvbuf_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize recv private variable for hardware dependent
|
||||
* 1. recv buf
|
||||
* 2. recv tasklet
|
||||
*
|
||||
*/
|
||||
s32 rtl8188es_init_recv_priv(PADAPTER padapter)
|
||||
{
|
||||
s32 res;
|
||||
u32 i, n;
|
||||
struct recv_priv *precvpriv;
|
||||
struct recv_buf *precvbuf;
|
||||
|
||||
|
||||
res = _SUCCESS;
|
||||
precvpriv = &padapter->recvpriv;
|
||||
|
||||
//3 1. init recv buffer
|
||||
_rtw_init_queue(&precvpriv->free_recv_buf_queue);
|
||||
_rtw_init_queue(&precvpriv->recv_buf_pending_queue);
|
||||
|
||||
n = NR_RECVBUFF * sizeof(struct recv_buf) + 4;
|
||||
precvpriv->pallocated_recv_buf = rtw_zmalloc(n);
|
||||
if (precvpriv->pallocated_recv_buf == NULL) {
|
||||
res = _FAIL;
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("alloc recv_buf fail!\n"));
|
||||
goto exit;
|
||||
}
|
||||
|
||||
precvpriv->precv_buf = (u8*)N_BYTE_ALIGMENT((SIZE_PTR)(precvpriv->pallocated_recv_buf), 4);
|
||||
|
||||
// init each recv buffer
|
||||
precvbuf = (struct recv_buf*)precvpriv->precv_buf;
|
||||
for (i = 0; i < NR_RECVBUFF; i++)
|
||||
{
|
||||
res = initrecvbuf(precvbuf, padapter);
|
||||
if (res == _FAIL)
|
||||
break;
|
||||
|
||||
res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf);
|
||||
if (res == _FAIL) {
|
||||
freerecvbuf(precvbuf);
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SDIO_RX_COPY
|
||||
if (precvbuf->pskb == NULL) {
|
||||
SIZE_PTR tmpaddr=0;
|
||||
SIZE_PTR alignment=0;
|
||||
|
||||
precvbuf->pskb = rtw_skb_alloc(MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
|
||||
|
||||
if(precvbuf->pskb)
|
||||
{
|
||||
precvbuf->pskb->dev = padapter->pnetdev;
|
||||
|
||||
tmpaddr = (SIZE_PTR)precvbuf->pskb->data;
|
||||
alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
|
||||
skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
|
||||
|
||||
precvbuf->phead = precvbuf->pskb->head;
|
||||
precvbuf->pdata = precvbuf->pskb->data;
|
||||
precvbuf->ptail = skb_tail_pointer(precvbuf->pskb);
|
||||
precvbuf->pend = skb_end_pointer(precvbuf->pskb);
|
||||
precvbuf->len = 0;
|
||||
}
|
||||
|
||||
if (precvbuf->pskb == NULL) {
|
||||
DBG_871X("%s: alloc_skb fail!\n", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
rtw_list_insert_tail(&precvbuf->list, &precvpriv->free_recv_buf_queue.queue);
|
||||
|
||||
precvbuf++;
|
||||
}
|
||||
precvpriv->free_recv_buf_queue_cnt = i;
|
||||
|
||||
if (res == _FAIL)
|
||||
goto initbuferror;
|
||||
|
||||
//3 2. init tasklet
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_init(&precvpriv->recv_tasklet,
|
||||
(void(*)(unsigned long))rtl8188es_recv_tasklet,
|
||||
(unsigned long)padapter);
|
||||
#endif
|
||||
|
||||
goto exit;
|
||||
|
||||
initbuferror:
|
||||
precvbuf = (struct recv_buf*)precvpriv->precv_buf;
|
||||
if (precvbuf) {
|
||||
n = precvpriv->free_recv_buf_queue_cnt;
|
||||
precvpriv->free_recv_buf_queue_cnt = 0;
|
||||
for (i = 0; i < n ; i++)
|
||||
{
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
rtw_os_recvbuf_resource_free(padapter, precvbuf);
|
||||
freerecvbuf(precvbuf);
|
||||
precvbuf++;
|
||||
}
|
||||
precvpriv->precv_buf = NULL;
|
||||
}
|
||||
|
||||
if (precvpriv->pallocated_recv_buf) {
|
||||
n = NR_RECVBUFF * sizeof(struct recv_buf) + 4;
|
||||
rtw_mfree(precvpriv->pallocated_recv_buf, n);
|
||||
precvpriv->pallocated_recv_buf = NULL;
|
||||
}
|
||||
|
||||
exit:
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free recv private variable of hardware dependent
|
||||
* 1. recv buf
|
||||
* 2. recv tasklet
|
||||
*
|
||||
*/
|
||||
void rtl8188es_free_recv_priv(PADAPTER padapter)
|
||||
{
|
||||
u32 i, n;
|
||||
struct recv_priv *precvpriv;
|
||||
struct recv_buf *precvbuf;
|
||||
|
||||
|
||||
precvpriv = &padapter->recvpriv;
|
||||
|
||||
//3 1. kill tasklet
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_kill(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
|
||||
//3 2. free all recv buffers
|
||||
precvbuf = (struct recv_buf*)precvpriv->precv_buf;
|
||||
if (precvbuf) {
|
||||
n = NR_RECVBUFF;
|
||||
precvpriv->free_recv_buf_queue_cnt = 0;
|
||||
for (i = 0; i < n ; i++)
|
||||
{
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
rtw_os_recvbuf_resource_free(padapter, precvbuf);
|
||||
freerecvbuf(precvbuf);
|
||||
precvbuf++;
|
||||
}
|
||||
precvpriv->precv_buf = NULL;
|
||||
}
|
||||
|
||||
if (precvpriv->pallocated_recv_buf) {
|
||||
n = NR_RECVBUFF * sizeof(struct recv_buf) + 4;
|
||||
rtw_mfree(precvpriv->pallocated_recv_buf, n);
|
||||
precvpriv->pallocated_recv_buf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SDIO_RX_COPY
|
||||
static s32 pre_recv_entry(union recv_frame *precvframe, struct recv_buf *precvbuf, struct phy_stat *pphy_status)
|
||||
{
|
||||
s32 ret=_SUCCESS;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *primary_myid, *secondary_myid, *paddr1;
|
||||
union recv_frame *precvframe_if2 = NULL;
|
||||
_adapter *primary_padapter = precvframe->u.hdr.adapter;
|
||||
_adapter *secondary_padapter = primary_padapter->pbuddy_adapter;
|
||||
struct recv_priv *precvpriv = &primary_padapter->recvpriv;
|
||||
_queue *pfree_recv_queue = &precvpriv->free_recv_queue;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(primary_padapter);
|
||||
|
||||
if(!secondary_padapter)
|
||||
return ret;
|
||||
|
||||
paddr1 = GetAddr1Ptr(precvframe->u.hdr.rx_data);
|
||||
|
||||
if(IS_MCAST(paddr1) == _FALSE)//unicast packets
|
||||
{
|
||||
//primary_myid = myid(&primary_padapter->eeprompriv);
|
||||
secondary_myid = myid(&secondary_padapter->eeprompriv);
|
||||
|
||||
if(_rtw_memcmp(paddr1, secondary_myid, ETH_ALEN))
|
||||
{
|
||||
//change to secondary interface
|
||||
precvframe->u.hdr.adapter = secondary_padapter;
|
||||
}
|
||||
|
||||
//ret = recv_entry(precvframe);
|
||||
|
||||
}
|
||||
else // Handle BC/MC Packets
|
||||
{
|
||||
//clone/copy to if2
|
||||
_pkt *pkt_copy = NULL;
|
||||
struct rx_pkt_attrib *pattrib = NULL;
|
||||
|
||||
precvframe_if2 = rtw_alloc_recvframe(pfree_recv_queue);
|
||||
|
||||
if(!precvframe_if2)
|
||||
return _FAIL;
|
||||
|
||||
precvframe_if2->u.hdr.adapter = secondary_padapter;
|
||||
_rtw_memcpy(&precvframe_if2->u.hdr.attrib, &precvframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib));
|
||||
pattrib = &precvframe_if2->u.hdr.attrib;
|
||||
|
||||
//driver need to set skb len for rtw_skb_copy().
|
||||
//If skb->len is zero, rtw_skb_copy() will not copy data from original skb.
|
||||
skb_put(precvframe->u.hdr.pkt, pattrib->pkt_len);
|
||||
|
||||
pkt_copy = rtw_skb_copy( precvframe->u.hdr.pkt);
|
||||
if (pkt_copy == NULL)
|
||||
{
|
||||
if((pattrib->mfrag == 1)&&(pattrib->frag_num == 0))
|
||||
{
|
||||
DBG_8192C("pre_recv_entry(): rtw_skb_copy fail , drop frag frame \n");
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
return ret;
|
||||
}
|
||||
|
||||
pkt_copy = rtw_skb_clone(precvframe->u.hdr.pkt);
|
||||
if(pkt_copy == NULL)
|
||||
{
|
||||
DBG_8192C("pre_recv_entry(): rtw_skb_clone fail , drop frame\n");
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
pkt_copy->dev = secondary_padapter->pnetdev;
|
||||
|
||||
precvframe_if2->u.hdr.pkt = pkt_copy;
|
||||
precvframe_if2->u.hdr.rx_head = pkt_copy->head;
|
||||
precvframe_if2->u.hdr.rx_data = pkt_copy->data;
|
||||
precvframe_if2->u.hdr.rx_tail = skb_tail_pointer(pkt_copy);
|
||||
precvframe_if2->u.hdr.rx_end = skb_end_pointer(pkt_copy);
|
||||
precvframe_if2->u.hdr.len = pkt_copy->len;
|
||||
|
||||
//recvframe_put(precvframe_if2, pattrib->pkt_len);
|
||||
|
||||
if ( pHalData->ReceiveConfig & RCR_APPFCS)
|
||||
recvframe_pull_tail(precvframe_if2, IEEE80211_FCS_LEN);
|
||||
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe_if2, pphy_status);
|
||||
|
||||
if(rtw_recv_entry(precvframe_if2) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
}
|
||||
|
||||
if (precvframe->u.hdr.attrib.physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, pphy_status);
|
||||
ret = rtw_recv_entry(precvframe);
|
||||
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static void rtl8188es_recv_tasklet(void *priv)
|
||||
{
|
||||
PADAPTER padapter;
|
||||
PHAL_DATA_TYPE pHalData;
|
||||
struct recv_priv *precvpriv;
|
||||
struct recv_buf *precvbuf;
|
||||
union recv_frame *precvframe;
|
||||
struct recv_frame_hdr *phdr;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
_irqL irql;
|
||||
u8 *ptr;
|
||||
u32 pkt_offset, skb_len, alloc_sz;
|
||||
s32 transfer_len;
|
||||
_pkt *pkt_copy = NULL;
|
||||
struct phy_stat *pphy_status = NULL;
|
||||
u8 shift_sz = 0, rx_report_sz = 0;
|
||||
|
||||
|
||||
padapter = (PADAPTER)priv;
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
precvpriv = &padapter->recvpriv;
|
||||
|
||||
do {
|
||||
if ((padapter->bDriverStopped == _TRUE)||(padapter->bSurpriseRemoved== _TRUE))
|
||||
{
|
||||
DBG_8192C("recv_tasklet => bDriverStopped or bSurpriseRemoved \n");
|
||||
break;
|
||||
}
|
||||
|
||||
precvbuf = rtw_dequeue_recvbuf(&precvpriv->recv_buf_pending_queue);
|
||||
if (NULL == precvbuf) break;
|
||||
|
||||
transfer_len = (s32)precvbuf->len;
|
||||
ptr = precvbuf->pdata;
|
||||
|
||||
do {
|
||||
precvframe = rtw_alloc_recvframe(&precvpriv->free_recv_queue);
|
||||
if (precvframe == NULL) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("%s: no enough recv frame!\n",__FUNCTION__));
|
||||
rtw_enqueue_recvbuf_to_head(precvbuf, &precvpriv->recv_buf_pending_queue);
|
||||
|
||||
// The case of can't allocte recvframe should be temporary,
|
||||
// schedule again and hope recvframe is available next time.
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
//rx desc parsing
|
||||
update_recvframe_attrib_88e(precvframe, (struct recv_stat*)ptr);
|
||||
|
||||
pattrib = &precvframe->u.hdr.attrib;
|
||||
|
||||
// fix Hardware RX data error, drop whole recv_buffer
|
||||
if ((!(pHalData->ReceiveConfig & RCR_ACRC32)) && pattrib->crc_err)
|
||||
{
|
||||
DBG_8192C("%s()-%d: RX Warning! rx CRC ERROR !!\n", __FUNCTION__, __LINE__);
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
break;
|
||||
}
|
||||
|
||||
if (pHalData->ReceiveConfig & RCR_APP_BA_SSN)
|
||||
rx_report_sz = RXDESC_SIZE + 4 + pattrib->drvinfo_sz;
|
||||
else
|
||||
rx_report_sz = RXDESC_SIZE + pattrib->drvinfo_sz;
|
||||
|
||||
pkt_offset = rx_report_sz + pattrib->shift_sz + pattrib->pkt_len;
|
||||
|
||||
if ((pattrib->pkt_len==0) || (pkt_offset>transfer_len)) {
|
||||
DBG_8192C("%s()-%d: RX Warning!,pkt_len==0 or pkt_offset(%d)> transfoer_len(%d) \n", __FUNCTION__, __LINE__, pkt_offset, transfer_len);
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((pattrib->crc_err) || (pattrib->icv_err))
|
||||
{
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_MP_STATE) == _TRUE))//&&(padapter->mppriv.check_mp_pkt == 0))
|
||||
{
|
||||
if (pattrib->crc_err == 1)
|
||||
padapter->mppriv.rx_crcerrpktcount++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
DBG_8192C("%s: crc_err=%d icv_err=%d, skip!\n", __FUNCTION__, pattrib->crc_err, pattrib->icv_err);
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Modified by Albert 20101213
|
||||
// For 8 bytes IP header alignment.
|
||||
if (pattrib->qos) // Qos data, wireless lan header length is 26
|
||||
{
|
||||
shift_sz = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
shift_sz = 0;
|
||||
}
|
||||
|
||||
skb_len = pattrib->pkt_len;
|
||||
|
||||
// for first fragment packet, driver need allocate 1536+drvinfo_sz+RXDESC_SIZE to defrag packet.
|
||||
// modify alloc_sz for recvive crc error packet by thomas 2011-06-02
|
||||
if((pattrib->mfrag == 1)&&(pattrib->frag_num == 0)){
|
||||
//alloc_sz = 1664; //1664 is 128 alignment.
|
||||
if(skb_len <= 1650)
|
||||
alloc_sz = 1664;
|
||||
else
|
||||
alloc_sz = skb_len + 14;
|
||||
}
|
||||
else {
|
||||
alloc_sz = skb_len;
|
||||
// 6 is for IP header 8 bytes alignment in QoS packet case.
|
||||
// 8 is for skb->data 4 bytes alignment.
|
||||
alloc_sz += 14;
|
||||
}
|
||||
|
||||
pkt_copy = rtw_skb_alloc(alloc_sz);
|
||||
|
||||
if(pkt_copy)
|
||||
{
|
||||
pkt_copy->dev = padapter->pnetdev;
|
||||
precvframe->u.hdr.pkt = pkt_copy;
|
||||
skb_reserve( pkt_copy, 8 - ((SIZE_PTR)( pkt_copy->data ) & 7 ));//force pkt_copy->data at 8-byte alignment address
|
||||
skb_reserve( pkt_copy, shift_sz );//force ip_hdr at 8-byte alignment address according to shift_sz.
|
||||
_rtw_memcpy(pkt_copy->data, (ptr + rx_report_sz + pattrib->shift_sz), skb_len);
|
||||
precvframe->u.hdr.rx_head = pkt_copy->head;
|
||||
precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pkt_copy->data;
|
||||
precvframe->u.hdr.rx_end = skb_end_pointer(pkt_copy);
|
||||
}
|
||||
else
|
||||
{
|
||||
if((pattrib->mfrag == 1)&&(pattrib->frag_num == 0))
|
||||
{
|
||||
DBG_8192C("rtl8188es_recv_tasklet: alloc_skb fail , drop frag frame \n");
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
break;
|
||||
}
|
||||
|
||||
precvframe->u.hdr.pkt = rtw_skb_clone(precvbuf->pskb);
|
||||
if(precvframe->u.hdr.pkt)
|
||||
{
|
||||
_pkt *pkt_clone = precvframe->u.hdr.pkt;
|
||||
|
||||
pkt_clone->data = ptr + rx_report_sz + pattrib->shift_sz;
|
||||
skb_reset_tail_pointer(pkt_clone);
|
||||
precvframe->u.hdr.rx_head = precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail
|
||||
= pkt_clone->data;
|
||||
precvframe->u.hdr.rx_end = pkt_clone->data + skb_len;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG_8192C("rtl8188es_recv_tasklet: rtw_skb_clone fail\n");
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
recvframe_put(precvframe, skb_len);
|
||||
//recvframe_pull(precvframe, drvinfo_sz + RXDESC_SIZE);
|
||||
|
||||
if (pHalData->ReceiveConfig & RCR_APPFCS)
|
||||
recvframe_pull_tail(precvframe, IEEE80211_FCS_LEN);
|
||||
|
||||
// update drv info
|
||||
if (pHalData->ReceiveConfig & RCR_APP_BA_SSN) {
|
||||
//rtl8723s_update_bassn(padapter, (ptr + RXDESC_SIZE));
|
||||
}
|
||||
|
||||
if(pattrib->pkt_rpt_type == NORMAL_RX)//Normal rx packet
|
||||
{
|
||||
pphy_status = (struct phy_stat *)(ptr + (rx_report_sz - pattrib->drvinfo_sz));
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(rtw_buddy_adapter_up(padapter))
|
||||
{
|
||||
if(pre_recv_entry(precvframe, precvbuf, (struct phy_stat*)pphy_status) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, (struct phy_stat*)pphy_status);
|
||||
|
||||
if (rtw_recv_entry(precvframe) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("%s: rtw_recv_entry(precvframe) != _SUCCESS\n",__FUNCTION__));
|
||||
}
|
||||
}
|
||||
}
|
||||
else{ // pkt_rpt_type == TX_REPORT1-CCX, TX_REPORT2-TX RTP,HIS_REPORT-USB HISR RTP
|
||||
|
||||
//enqueue recvframe to txrtp queue
|
||||
if(pattrib->pkt_rpt_type == TX_REPORT1){
|
||||
//DBG_8192C("rx CCX \n");
|
||||
//CCX-TXRPT ack for xmit mgmt frames.
|
||||
handle_txrpt_ccx_88e(padapter, precvframe->u.hdr.rx_data);
|
||||
}
|
||||
else if(pattrib->pkt_rpt_type == TX_REPORT2){
|
||||
//printk("rx TX RPT \n");
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
&pHalData->odmpriv,
|
||||
precvframe->u.hdr.rx_data,
|
||||
pattrib->pkt_len,
|
||||
pattrib->MacIDValidEntry[0],
|
||||
pattrib->MacIDValidEntry[1]
|
||||
);
|
||||
|
||||
}
|
||||
/*
|
||||
else if(pattrib->pkt_rpt_type == HIS_REPORT){
|
||||
printk("rx USB HISR \n");
|
||||
}*/
|
||||
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Page size of receive package is 128 bytes alignment =>DMA AGG
|
||||
// refer to _InitTransferPageSize()
|
||||
pkt_offset = _RND128(pkt_offset);
|
||||
transfer_len -= pkt_offset;
|
||||
ptr += pkt_offset;
|
||||
precvframe = NULL;
|
||||
pkt_copy = NULL;
|
||||
}while(transfer_len>0);
|
||||
|
||||
precvbuf->len = 0;
|
||||
|
||||
rtw_enqueue_recvbuf(precvbuf, &precvpriv->free_recv_buf_queue);
|
||||
} while (1);
|
||||
|
||||
}
|
||||
#else
|
||||
static s32 pre_recv_entry(union recv_frame *precvframe, struct recv_buf *precvbuf, struct phy_stat *pphy_status)
|
||||
{
|
||||
s32 ret=_SUCCESS;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *primary_myid, *secondary_myid, *paddr1;
|
||||
union recv_frame *precvframe_if2 = NULL;
|
||||
_adapter *primary_padapter = precvframe->u.hdr.adapter;
|
||||
_adapter *secondary_padapter = primary_padapter->pbuddy_adapter;
|
||||
struct recv_priv *precvpriv = &primary_padapter->recvpriv;
|
||||
_queue *pfree_recv_queue = &precvpriv->free_recv_queue;
|
||||
u8 *pbuf = precvframe->u.hdr.rx_head;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(primary_padapter);
|
||||
|
||||
if(!secondary_padapter)
|
||||
return ret;
|
||||
|
||||
paddr1 = GetAddr1Ptr(precvframe->u.hdr.rx_data);
|
||||
|
||||
if(IS_MCAST(paddr1) == _FALSE)//unicast packets
|
||||
{
|
||||
//primary_myid = myid(&primary_padapter->eeprompriv);
|
||||
secondary_myid = myid(&secondary_padapter->eeprompriv);
|
||||
|
||||
if(_rtw_memcmp(paddr1, secondary_myid, ETH_ALEN))
|
||||
{
|
||||
//change to secondary interface
|
||||
precvframe->u.hdr.adapter = secondary_padapter;
|
||||
}
|
||||
|
||||
//ret = recv_entry(precvframe);
|
||||
|
||||
}
|
||||
else // Handle BC/MC Packets
|
||||
{
|
||||
//clone/copy to if2
|
||||
u8 shift_sz = 0;
|
||||
u32 alloc_sz, skb_len;
|
||||
_pkt *pkt_copy = NULL;
|
||||
struct rx_pkt_attrib *pattrib = NULL;
|
||||
|
||||
precvframe_if2 = rtw_alloc_recvframe(pfree_recv_queue);
|
||||
|
||||
if(!precvframe_if2)
|
||||
return _FAIL;
|
||||
|
||||
precvframe_if2->u.hdr.adapter = secondary_padapter;
|
||||
_rtw_init_listhead(&precvframe_if2->u.hdr.list);
|
||||
precvframe_if2->u.hdr.precvbuf = NULL; //can't access the precvbuf for new arch.
|
||||
precvframe_if2->u.hdr.len=0;
|
||||
_rtw_memcpy(&precvframe_if2->u.hdr.attrib, &precvframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib));
|
||||
pattrib = &precvframe_if2->u.hdr.attrib;
|
||||
|
||||
pkt_copy = rtw_skb_copy( precvframe->u.hdr.pkt);
|
||||
if (pkt_copy == NULL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_crit_, ("%s: no enough memory to allocate SKB!\n",__FUNCTION__));
|
||||
rtw_free_recvframe(precvframe_if2, &precvpriv->free_recv_queue);
|
||||
rtw_enqueue_recvbuf_to_head(precvbuf, &precvpriv->recv_buf_pending_queue);
|
||||
|
||||
// The case of can't allocte skb is serious and may never be recovered,
|
||||
// once bDriverStopped is enable, this task should be stopped.
|
||||
if (secondary_padapter->bDriverStopped == _FALSE)
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
pkt_copy->dev = secondary_padapter->pnetdev;
|
||||
|
||||
|
||||
|
||||
if((pattrib->mfrag == 1)&&(pattrib->frag_num == 0)){
|
||||
//alloc_sz = 1664; //1664 is 128 alignment.
|
||||
if(skb_len <= 1650)
|
||||
alloc_sz = 1664;
|
||||
else
|
||||
alloc_sz = skb_len + 14;
|
||||
}
|
||||
else {
|
||||
alloc_sz = skb_len;
|
||||
// 6 is for IP header 8 bytes alignment in QoS packet case.
|
||||
// 8 is for skb->data 4 bytes alignment.
|
||||
alloc_sz += 14;
|
||||
}
|
||||
|
||||
#if 1
|
||||
precvframe_if2->u.hdr.pkt = pkt_copy;
|
||||
precvframe_if2->u.hdr.rx_head = pkt_copy->head;
|
||||
precvframe_if2->u.hdr.rx_data = precvframe_if2->u.hdr.rx_tail = pkt_copy->data;
|
||||
precvframe_if2->u.hdr.rx_end = pkt_copy->data + alloc_sz;
|
||||
#endif
|
||||
recvframe_put(precvframe_if2, pkt_offset);
|
||||
recvframe_pull(precvframe_if2, RXDESC_SIZE + pattrib->drvinfo_sz);
|
||||
|
||||
if ( pHalData->ReceiveConfig & RCR_APPFCS)
|
||||
recvframe_pull_tail(precvframe_if2, IEEE80211_FCS_LEN);
|
||||
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe_if2, pphy_status);
|
||||
|
||||
if(rtw_recv_entry(precvframe_if2) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
}
|
||||
|
||||
if (precvframe->u.hdr.attrib.physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, (struct phy_stat*)pphy_status);
|
||||
ret = rtw_recv_entry(precvframe);
|
||||
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static void rtl8188es_recv_tasklet(void *priv)
|
||||
{
|
||||
PADAPTER padapter;
|
||||
PHAL_DATA_TYPE pHalData;
|
||||
struct recv_priv *precvpriv;
|
||||
struct recv_buf *precvbuf;
|
||||
union recv_frame *precvframe;
|
||||
struct recv_frame_hdr *phdr;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
u8 *ptr;
|
||||
_pkt *ppkt;
|
||||
u32 pkt_offset;
|
||||
_irqL irql;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct recv_stat *prxstat;
|
||||
#endif
|
||||
|
||||
padapter = (PADAPTER)priv;
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
precvpriv = &padapter->recvpriv;
|
||||
|
||||
do {
|
||||
precvbuf = rtw_dequeue_recvbuf(&precvpriv->recv_buf_pending_queue);
|
||||
if (NULL == precvbuf) break;
|
||||
|
||||
ptr = precvbuf->pdata;
|
||||
|
||||
while (ptr < precvbuf->ptail)
|
||||
{
|
||||
precvframe = rtw_alloc_recvframe(&precvpriv->free_recv_queue);
|
||||
if (precvframe == NULL) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("%s: no enough recv frame!\n",__FUNCTION__));
|
||||
rtw_enqueue_recvbuf_to_head(precvbuf, &precvpriv->recv_buf_pending_queue);
|
||||
|
||||
// The case of can't allocte recvframe should be temporary,
|
||||
// schedule again and hope recvframe is available next time.
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
phdr = &precvframe->u.hdr;
|
||||
pattrib = &phdr->attrib;
|
||||
|
||||
//rx desc parsing
|
||||
update_recvframe_attrib_88e(precvframe, (struct recv_stat*)ptr);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
prxstat = (struct recv_stat*)ptr;
|
||||
#endif
|
||||
// fix Hardware RX data error, drop whole recv_buffer
|
||||
if ((!(pHalData->ReceiveConfig & RCR_ACRC32)) && pattrib->crc_err)
|
||||
{
|
||||
DBG_8192C("%s()-%d: RX Warning! rx CRC ERROR !!\n", __FUNCTION__, __LINE__);
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
break;
|
||||
}
|
||||
|
||||
pkt_offset = RXDESC_SIZE + pattrib->drvinfo_sz + pattrib->pkt_len;
|
||||
|
||||
if ((ptr + pkt_offset) > precvbuf->ptail) {
|
||||
DBG_8192C("%s()-%d: : next pkt len(%p,%d) exceed ptail(%p)!\n", __FUNCTION__, __LINE__, ptr, pkt_offset, precvbuf->ptail);
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((pattrib->crc_err) || (pattrib->icv_err))
|
||||
{
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if ((check_fwstate(&padapter->mlmepriv, WIFI_MP_STATE) == _TRUE))//&&(padapter->mppriv.check_mp_pkt == 0))
|
||||
{
|
||||
if (pattrib->crc_err == 1)
|
||||
padapter->mppriv.rx_crcerrpktcount++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DBG_8192C("%s: crc_err=%d icv_err=%d, skip!\n", __FUNCTION__, pattrib->crc_err, pattrib->icv_err);
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
}
|
||||
else
|
||||
{
|
||||
ppkt = rtw_skb_clone(precvbuf->pskb);
|
||||
if (ppkt == NULL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_, _drv_crit_, ("%s: no enough memory to allocate SKB!\n",__FUNCTION__));
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
rtw_enqueue_recvbuf_to_head(precvbuf, &precvpriv->recv_buf_pending_queue);
|
||||
|
||||
// The case of can't allocte skb is serious and may never be recovered,
|
||||
// once bDriverStopped is enable, this task should be stopped.
|
||||
if (padapter->bDriverStopped == _FALSE) {
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_schedule(&precvpriv->recv_tasklet);
|
||||
#endif
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
phdr->pkt = ppkt;
|
||||
phdr->len = 0;
|
||||
phdr->rx_head = precvbuf->phead;
|
||||
phdr->rx_data = phdr->rx_tail = precvbuf->pdata;
|
||||
phdr->rx_end = precvbuf->pend;
|
||||
|
||||
recvframe_put(precvframe, pkt_offset);
|
||||
recvframe_pull(precvframe, RXDESC_SIZE + pattrib->drvinfo_sz);
|
||||
|
||||
if (pHalData->ReceiveConfig & RCR_APPFCS)
|
||||
recvframe_pull_tail(precvframe, IEEE80211_FCS_LEN);
|
||||
|
||||
// move to drv info position
|
||||
ptr += RXDESC_SIZE;
|
||||
|
||||
// update drv info
|
||||
if (pHalData->ReceiveConfig & RCR_APP_BA_SSN) {
|
||||
// rtl8723s_update_bassn(padapter, pdrvinfo);
|
||||
ptr += 4;
|
||||
}
|
||||
|
||||
if(pattrib->pkt_rpt_type == NORMAL_RX)//Normal rx packet
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(rtw_buddy_adapter_up(padapter))
|
||||
{
|
||||
if(pre_recv_entry(precvframe, precvbuf, (struct phy_stat*)ptr) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, (struct phy_stat*)ptr);
|
||||
|
||||
if (rtw_recv_entry(precvframe) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else{ // pkt_rpt_type == TX_REPORT1-CCX, TX_REPORT2-TX RTP,HIS_REPORT-USB HISR RTP
|
||||
|
||||
//enqueue recvframe to txrtp queue
|
||||
if(pattrib->pkt_rpt_type == TX_REPORT1){
|
||||
DBG_8192C("rx CCX \n");
|
||||
}
|
||||
else if(pattrib->pkt_rpt_type == TX_REPORT2){
|
||||
//DBG_8192C("rx TX RPT \n");
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
&pHalData->odmpriv,
|
||||
precvframe->u.hdr.rx_data,
|
||||
pattrib->pkt_len,
|
||||
pattrib->MacIDValidEntry[0],
|
||||
pattrib->MacIDValidEntry[1]
|
||||
);
|
||||
|
||||
}
|
||||
/*
|
||||
else if(pattrib->pkt_rpt_type == HIS_REPORT){
|
||||
DBG_8192C("rx USB HISR \n");
|
||||
}*/
|
||||
|
||||
rtw_free_recvframe(precvframe, &precvpriv->free_recv_queue);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Page size of receive package is 128 bytes alignment =>DMA AGG
|
||||
// refer to _InitTransferPageSize()
|
||||
pkt_offset = _RND128(pkt_offset);
|
||||
precvbuf->pdata += pkt_offset;
|
||||
ptr = precvbuf->pdata;
|
||||
|
||||
}
|
||||
|
||||
rtw_skb_free(precvbuf->pskb);
|
||||
precvbuf->pskb = NULL;
|
||||
rtw_enqueue_recvbuf(precvbuf, &precvpriv->free_recv_buf_queue);
|
||||
|
||||
} while (1);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
1720
hal/rtl8188e/sdio/rtl8189es_xmit.c
Executable file
1720
hal/rtl8188e/sdio/rtl8189es_xmit.c
Executable file
File diff suppressed because it is too large
Load diff
4218
hal/rtl8188e/sdio/sdio_halinit.c
Executable file
4218
hal/rtl8188e/sdio/sdio_halinit.c
Executable file
File diff suppressed because it is too large
Load diff
1959
hal/rtl8188e/sdio/sdio_ops.c
Executable file
1959
hal/rtl8188e/sdio/sdio_ops.c
Executable file
File diff suppressed because it is too large
Load diff
170
hal/rtl8188e/usb/rtl8188eu_led.c
Executable file
170
hal/rtl8188e/usb/rtl8188eu_led.c
Executable file
|
@ -0,0 +1,170 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
//================================================================================
|
||||
// LED object.
|
||||
//================================================================================
|
||||
|
||||
|
||||
//================================================================================
|
||||
// Prototype of protected function.
|
||||
//================================================================================
|
||||
|
||||
|
||||
//================================================================================
|
||||
// LED_819xUsb routines.
|
||||
//================================================================================
|
||||
|
||||
//
|
||||
// Description:
|
||||
// Turn on LED according to LedPin specified.
|
||||
//
|
||||
void
|
||||
SwLedOn(
|
||||
_adapter *padapter,
|
||||
PLED_871x pLed
|
||||
)
|
||||
{
|
||||
u8 LedCfg;
|
||||
//HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if( (padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LedCfg = rtw_read8(padapter, REG_LEDCFG2);
|
||||
switch(pLed->LedPin)
|
||||
{
|
||||
case LED_PIN_LED0:
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg&0xf0)|BIT5|BIT6); // SW control led0 on.
|
||||
break;
|
||||
|
||||
case LED_PIN_LED1:
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg&0x0f)|BIT5); // SW control led1 on.
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
pLed->bLedOn = _TRUE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Description:
|
||||
// Turn off LED according to LedPin specified.
|
||||
//
|
||||
void
|
||||
SwLedOff(
|
||||
_adapter *padapter,
|
||||
PLED_871x pLed
|
||||
)
|
||||
{
|
||||
u8 LedCfg;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if((padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
LedCfg = rtw_read8(padapter, REG_LEDCFG2);//0x4E
|
||||
|
||||
switch(pLed->LedPin)
|
||||
{
|
||||
case LED_PIN_LED0:
|
||||
if(pHalData->bLedOpenDrain == _TRUE) // Open-drain arrangement for controlling the LED)
|
||||
{
|
||||
LedCfg &= 0x90; // Set to software control.
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3));
|
||||
LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
|
||||
LedCfg &= 0xFE;
|
||||
rtw_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);
|
||||
}
|
||||
else
|
||||
{
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3|BIT5|BIT6));
|
||||
}
|
||||
break;
|
||||
|
||||
case LED_PIN_LED1:
|
||||
LedCfg &= 0x0f; // Set to software control.
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
exit:
|
||||
pLed->bLedOn = _FALSE;
|
||||
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
// Interface to manipulate LED objects.
|
||||
//================================================================================
|
||||
|
||||
|
||||
//================================================================================
|
||||
// Default LED behavior.
|
||||
//================================================================================
|
||||
|
||||
//
|
||||
// Description:
|
||||
// Initialize all LED_871x objects.
|
||||
//
|
||||
void
|
||||
rtl8188eu_InitSwLeds(
|
||||
_adapter *padapter
|
||||
)
|
||||
{
|
||||
struct led_priv *pledpriv = &(padapter->ledpriv);
|
||||
|
||||
pledpriv->LedControlHandler = LedControl871x;
|
||||
|
||||
InitLed871x(padapter, &(pledpriv->SwLed0), LED_PIN_LED0);
|
||||
|
||||
InitLed871x(padapter,&(pledpriv->SwLed1), LED_PIN_LED1);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Description:
|
||||
// DeInitialize all LED_819xUsb objects.
|
||||
//
|
||||
void
|
||||
rtl8188eu_DeInitSwLeds(
|
||||
_adapter *padapter
|
||||
)
|
||||
{
|
||||
struct led_priv *ledpriv = &(padapter->ledpriv);
|
||||
|
||||
DeInitLed871x( &(ledpriv->SwLed0) );
|
||||
DeInitLed871x( &(ledpriv->SwLed1) );
|
||||
}
|
||||
|
234
hal/rtl8188e/usb/rtl8188eu_recv.c
Executable file
234
hal/rtl8188e/usb/rtl8188eu_recv.c
Executable file
|
@ -0,0 +1,234 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#define _RTL8188EU_RECV_C_
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <recv_osdep.h>
|
||||
#include <mlme_osdep.h>
|
||||
#include <ip.h>
|
||||
#include <if_ether.h>
|
||||
#include <ethernet.h>
|
||||
|
||||
#include <usb_ops.h>
|
||||
|
||||
#if defined (PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
|
||||
#endif
|
||||
|
||||
#include <wifi.h>
|
||||
#include <circ_buf.h>
|
||||
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
|
||||
void rtl8188eu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf)
|
||||
{
|
||||
|
||||
precvbuf->transfer_len = 0;
|
||||
|
||||
precvbuf->len = 0;
|
||||
|
||||
precvbuf->ref_cnt = 0;
|
||||
|
||||
if(precvbuf->pbuf)
|
||||
{
|
||||
precvbuf->pdata = precvbuf->phead = precvbuf->ptail = precvbuf->pbuf;
|
||||
precvbuf->pend = precvbuf->pdata + MAX_RECVBUF_SZ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int rtl8188eu_init_recv_priv(_adapter *padapter)
|
||||
{
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
int i, res = _SUCCESS;
|
||||
struct recv_buf *precvbuf;
|
||||
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
_rtw_init_sema(&precvpriv->recv_sema, 0);//will be removed
|
||||
_rtw_init_sema(&precvpriv->terminate_recvthread_sema, 0);//will be removed
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
tasklet_init(&precvpriv->recv_tasklet,
|
||||
(void(*)(unsigned long))rtl8188eu_recv_tasklet,
|
||||
(unsigned long)padapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if(precvpriv->int_in_urb == NULL){
|
||||
res= _FAIL;
|
||||
DBG_8192C("alloc_urb for interrupt in endpoint fail !!!!\n");
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
precvpriv->int_in_buf = rtw_zmalloc(INTERRUPT_MSG_FORMAT_LEN);
|
||||
if(precvpriv->int_in_buf == NULL){
|
||||
res= _FAIL;
|
||||
DBG_8192C("alloc_mem for interrupt in endpoint fail !!!!\n");
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
//init recv_buf
|
||||
_rtw_init_queue(&precvpriv->free_recv_buf_queue);
|
||||
|
||||
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
_rtw_init_queue(&precvpriv->recv_buf_pending_queue);
|
||||
#endif // CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
||||
precvpriv->pallocated_recv_buf = rtw_zmalloc(NR_RECVBUFF *sizeof(struct recv_buf) + 4);
|
||||
if(precvpriv->pallocated_recv_buf==NULL){
|
||||
res= _FAIL;
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("alloc recv_buf fail!\n"));
|
||||
goto exit;
|
||||
}
|
||||
_rtw_memset(precvpriv->pallocated_recv_buf, 0, NR_RECVBUFF *sizeof(struct recv_buf) + 4);
|
||||
|
||||
precvpriv->precv_buf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(precvpriv->pallocated_recv_buf), 4);
|
||||
//precvpriv->precv_buf = precvpriv->pallocated_recv_buf + 4 -
|
||||
// ((uint) (precvpriv->pallocated_recv_buf) &(4-1));
|
||||
|
||||
|
||||
precvbuf = (struct recv_buf*)precvpriv->precv_buf;
|
||||
|
||||
for(i=0; i < NR_RECVBUFF ; i++)
|
||||
{
|
||||
_rtw_init_listhead(&precvbuf->list);
|
||||
|
||||
_rtw_spinlock_init(&precvbuf->recvbuf_lock);
|
||||
|
||||
precvbuf->alloc_sz = MAX_RECVBUF_SZ;
|
||||
|
||||
res = rtw_os_recvbuf_resource_alloc(padapter, precvbuf);
|
||||
if(res==_FAIL)
|
||||
break;
|
||||
|
||||
precvbuf->ref_cnt = 0;
|
||||
precvbuf->adapter =padapter;
|
||||
|
||||
|
||||
//rtw_list_insert_tail(&precvbuf->list, &(precvpriv->free_recv_buf_queue.queue));
|
||||
|
||||
precvbuf++;
|
||||
|
||||
}
|
||||
|
||||
precvpriv->free_recv_buf_queue_cnt = NR_RECVBUFF;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
skb_queue_head_init(&precvpriv->rx_skb_queue);
|
||||
|
||||
#ifdef CONFIG_PREALLOC_RECV_SKB
|
||||
{
|
||||
int i;
|
||||
SIZE_PTR tmpaddr=0;
|
||||
SIZE_PTR alignment=0;
|
||||
struct sk_buff *pskb=NULL;
|
||||
|
||||
skb_queue_head_init(&precvpriv->free_recv_skb_queue);
|
||||
|
||||
for(i=0; i<NR_PREALLOC_RECV_SKB; i++)
|
||||
{
|
||||
pskb = rtw_skb_alloc(MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
|
||||
|
||||
if(pskb)
|
||||
{
|
||||
pskb->dev = padapter->pnetdev;
|
||||
|
||||
tmpaddr = (SIZE_PTR)pskb->data;
|
||||
alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
|
||||
skb_reserve(pskb, (RECVBUFF_ALIGN_SZ - alignment));
|
||||
|
||||
skb_queue_tail(&precvpriv->free_recv_skb_queue, pskb);
|
||||
}
|
||||
|
||||
pskb=NULL;
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
exit:
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
void rtl8188eu_free_recv_priv (_adapter *padapter)
|
||||
{
|
||||
int i;
|
||||
struct recv_buf *precvbuf;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
|
||||
precvbuf = (struct recv_buf *)precvpriv->precv_buf;
|
||||
|
||||
for(i=0; i < NR_RECVBUFF ; i++)
|
||||
{
|
||||
rtw_os_recvbuf_resource_free(padapter, precvbuf);
|
||||
precvbuf++;
|
||||
}
|
||||
|
||||
if(precvpriv->pallocated_recv_buf)
|
||||
rtw_mfree(precvpriv->pallocated_recv_buf, NR_RECVBUFF *sizeof(struct recv_buf) + 4);
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
if(precvpriv->int_in_urb)
|
||||
{
|
||||
usb_free_urb(precvpriv->int_in_urb);
|
||||
}
|
||||
#endif//PLATFORM_LINUX
|
||||
|
||||
if(precvpriv->int_in_buf)
|
||||
rtw_mfree(precvpriv->int_in_buf, INTERRUPT_MSG_FORMAT_LEN);
|
||||
#endif//CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
if (skb_queue_len(&precvpriv->rx_skb_queue)) {
|
||||
DBG_8192C(KERN_WARNING "rx_skb_queue not empty\n");
|
||||
}
|
||||
|
||||
rtw_skb_queue_purge(&precvpriv->rx_skb_queue);
|
||||
|
||||
#ifdef CONFIG_PREALLOC_RECV_SKB
|
||||
|
||||
if (skb_queue_len(&precvpriv->free_recv_skb_queue)) {
|
||||
DBG_8192C(KERN_WARNING "free_recv_skb_queue not empty, %d\n", skb_queue_len(&precvpriv->free_recv_skb_queue));
|
||||
}
|
||||
|
||||
rtw_skb_queue_purge(&precvpriv->free_recv_skb_queue);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
1370
hal/rtl8188e/usb/rtl8188eu_xmit.c
Executable file
1370
hal/rtl8188e/usb/rtl8188eu_xmit.c
Executable file
File diff suppressed because it is too large
Load diff
5370
hal/rtl8188e/usb/usb_halinit.c
Executable file
5370
hal/rtl8188e/usb/usb_halinit.c
Executable file
File diff suppressed because it is too large
Load diff
1743
hal/rtl8188e/usb/usb_ops_linux.c
Executable file
1743
hal/rtl8188e/usb/usb_ops_linux.c
Executable file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue