mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: Remove "if 1" statements
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
35044413a3
commit
4f92869c5b
10 changed files with 127 additions and 270 deletions
|
@ -1012,10 +1012,9 @@ int proc_get_best_channel(char *page, char **start,
|
|||
best_channel_5G = pmlmeext->channel_set[i].ChannelNum;
|
||||
}
|
||||
}
|
||||
#if 1 /* debug */
|
||||
/* debug */
|
||||
len += snprintf(page + len, count - len, "The rx cnt of channel %3d = %d\n",
|
||||
pmlmeext->channel_set[i].ChannelNum, pmlmeext->channel_set[i].rx_count);
|
||||
#endif
|
||||
}
|
||||
|
||||
len += snprintf(page + len, count - len, "best_channel_5G = %d\n", best_channel_5G);
|
||||
|
|
|
@ -27,15 +27,12 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter)
|
|||
struct pkt_attrib *pattrib;
|
||||
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv);
|
||||
|
||||
#if 1
|
||||
if ((xmit_frame = rtw_alloc_xmitframe(pxmitpriv)) == NULL)
|
||||
{
|
||||
if ((xmit_frame = rtw_alloc_xmitframe(pxmitpriv)) == NULL) {
|
||||
DBG_88E("%s rtw_alloc_xmitframe return null\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if ((xmitbuf = rtw_alloc_xmitbuf(pxmitpriv)) == NULL)
|
||||
{
|
||||
if ((xmitbuf = rtw_alloc_xmitbuf(pxmitpriv)) == NULL) {
|
||||
DBG_88E("%s rtw_alloc_xmitbuf return null\n", __func__);
|
||||
rtw_free_xmitframe(pxmitpriv, xmit_frame);
|
||||
xmit_frame=NULL;
|
||||
|
@ -53,19 +50,6 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter)
|
|||
pattrib->subtype = WIFI_BEACON;
|
||||
pattrib->pktlen = pattrib->last_txcmdsz = 0;
|
||||
|
||||
#else
|
||||
if ((xmit_frame = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||
{
|
||||
DBG_88E("%s alloc_mgtxmitframe return null\n", __func__);
|
||||
}
|
||||
else {
|
||||
pattrib = &xmit_frame->attrib;
|
||||
update_mgntframe_attrib(adapter, pattrib);
|
||||
pattrib->qsel = 0x10;
|
||||
pattrib->pktlen = pattrib->last_txcmdsz = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
exit:
|
||||
return xmit_frame;
|
||||
}
|
||||
|
|
|
@ -6033,7 +6033,7 @@ void issue_assocreq(struct adapter *padapter)
|
|||
|
||||
/* supported rate & extended supported rate */
|
||||
|
||||
#if 1 /* Check if the AP's supported rates are also supported by STA. */
|
||||
/* Check if the AP's supported rates are also supported by STA. */
|
||||
get_rate_set(padapter, sta_bssrate, &sta_bssrate_len);
|
||||
|
||||
if (pmlmeext->cur_channel == 14)/* for JAPAN, channel 14 can only uses B Mode(CCK) */
|
||||
|
@ -6069,17 +6069,6 @@ void issue_assocreq(struct adapter *padapter)
|
|||
bssrate_len = index;
|
||||
DBG_88E("bssrate_len = %d\n", bssrate_len);
|
||||
|
||||
#else /* Check if the AP's supported rates are also supported by STA. */
|
||||
for (bssrate_len = 0; bssrate_len < NumRates; bssrate_len++) {
|
||||
if (pmlmeinfo->network.SupportedRates[bssrate_len] == 0) break;
|
||||
|
||||
if (pmlmeinfo->network.SupportedRates[bssrate_len] == 0x2C) /* Avoid the proprietary data rate (22Mbps) of Handlink WSG-4000 AP */
|
||||
break;
|
||||
|
||||
bssrate[bssrate_len] = pmlmeinfo->network.SupportedRates[bssrate_len];
|
||||
}
|
||||
#endif /* Check if the AP's supported rates are also supported by STA. */
|
||||
|
||||
if (bssrate_len == 0) {
|
||||
rtw_free_xmitbuf(pxmitpriv, pmgntframe->pxmitbuf);
|
||||
rtw_free_xmitframe(pxmitpriv, pmgntframe);
|
||||
|
|
|
@ -1516,9 +1516,8 @@ int validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
|
|||
u8 type;
|
||||
u8 subtype;
|
||||
int retval = _SUCCESS;
|
||||
|
||||
u8 bDumpRxPkt;
|
||||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
|
||||
u8 *ptr = precv_frame->u.hdr.rx_data;
|
||||
u8 ver =(unsigned char) (*ptr)&0x3 ;
|
||||
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
|
||||
|
@ -1552,9 +1551,7 @@ _func_enter_;
|
|||
pattrib->privacy = GetPrivacy(ptr);
|
||||
pattrib->order = GetOrder(ptr);
|
||||
|
||||
#if 1 /* Dump rx packets */
|
||||
{
|
||||
u8 bDumpRxPkt;
|
||||
/* Dump rx packets */
|
||||
rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
|
||||
if (bDumpRxPkt ==1){/* dump all rx packets */
|
||||
int i;
|
||||
|
@ -1575,8 +1572,7 @@ _func_enter_;
|
|||
*(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7));
|
||||
DBG_88E("#############################\n");
|
||||
}
|
||||
}
|
||||
else if (bDumpRxPkt ==3){
|
||||
} else if (bDumpRxPkt ==3){
|
||||
if (type== WIFI_DATA_TYPE){
|
||||
int i;
|
||||
DBG_88E("#############################\n");
|
||||
|
@ -1587,39 +1583,36 @@ _func_enter_;
|
|||
DBG_88E("#############################\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
switch (type)
|
||||
{
|
||||
case WIFI_MGT_TYPE: /* mgnt */
|
||||
retval = validate_recv_mgnt_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_mgnt_frame fail\n"));
|
||||
}
|
||||
retval = _FAIL; /* only data frame return _SUCCESS */
|
||||
break;
|
||||
case WIFI_CTRL_TYPE: /* ctrl */
|
||||
retval = validate_recv_ctrl_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_ctrl_frame fail\n"));
|
||||
}
|
||||
retval = _FAIL; /* only data frame return _SUCCESS */
|
||||
break;
|
||||
case WIFI_DATA_TYPE: /* data */
|
||||
rtw_led_control(adapter, LED_CTL_RX);
|
||||
pattrib->qos = (subtype & BIT(7))? 1:0;
|
||||
retval = validate_recv_data_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL) {
|
||||
struct recv_priv *precvpriv = &adapter->recvpriv;
|
||||
precvpriv->rx_drop++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_data_frame fail! type=0x%x\n", type));
|
||||
retval = _FAIL;
|
||||
break;
|
||||
switch (type) {
|
||||
case WIFI_MGT_TYPE: /* mgnt */
|
||||
retval = validate_recv_mgnt_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_mgnt_frame fail\n"));
|
||||
}
|
||||
retval = _FAIL; /* only data frame return _SUCCESS */
|
||||
break;
|
||||
case WIFI_CTRL_TYPE: /* ctrl */
|
||||
retval = validate_recv_ctrl_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_ctrl_frame fail\n"));
|
||||
}
|
||||
retval = _FAIL; /* only data frame return _SUCCESS */
|
||||
break;
|
||||
case WIFI_DATA_TYPE: /* data */
|
||||
rtw_led_control(adapter, LED_CTL_RX);
|
||||
pattrib->qos = (subtype & BIT(7))? 1:0;
|
||||
retval = validate_recv_data_frame(adapter, precv_frame);
|
||||
if (retval == _FAIL) {
|
||||
struct recv_priv *precvpriv = &adapter->recvpriv;
|
||||
precvpriv->rx_drop++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_data_frame fail! type=0x%x\n", type));
|
||||
retval = _FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
exit:
|
||||
|
|
|
@ -1830,97 +1830,43 @@ _func_exit_;
|
|||
return pxmitframe;
|
||||
}
|
||||
|
||||
#if 1
|
||||
struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, int up, u8 *ac)
|
||||
{
|
||||
struct tx_servq *ptxservq;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
switch (up)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
ptxservq = &(psta->sta_xmitpriv.bk_q);
|
||||
*(ac) = 3;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BK\n"));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
case 5:
|
||||
ptxservq = &(psta->sta_xmitpriv.vi_q);
|
||||
*(ac) = 1;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VI\n"));
|
||||
break;
|
||||
|
||||
case 6:
|
||||
case 7:
|
||||
ptxservq = &(psta->sta_xmitpriv.vo_q);
|
||||
*(ac) = 0;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VO\n"));
|
||||
break;
|
||||
|
||||
case 0:
|
||||
case 3:
|
||||
default:
|
||||
ptxservq = &(psta->sta_xmitpriv.be_q);
|
||||
*(ac) = 2;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BE\n"));
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
_func_exit_;
|
||||
|
||||
return ptxservq;
|
||||
}
|
||||
#else
|
||||
__inline static struct tx_servq *rtw_get_sta_pending
|
||||
(struct adapter *padapter, struct __queue **ppstapending, struct sta_info *psta, int up)
|
||||
{
|
||||
struct tx_servq *ptxservq;
|
||||
struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
switch (up) {
|
||||
case 1:
|
||||
case 2:
|
||||
ptxservq = &(psta->sta_xmitpriv.bk_q);
|
||||
*ppstapending = &padapter->xmitpriv.bk_pending;
|
||||
(phwxmits+3)->accnt++;
|
||||
*(ac) = 3;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BK\n"));
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
ptxservq = &(psta->sta_xmitpriv.vi_q);
|
||||
*ppstapending = &padapter->xmitpriv.vi_pending;
|
||||
(phwxmits+1)->accnt++;
|
||||
*(ac) = 1;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VI\n"));
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
ptxservq = &(psta->sta_xmitpriv.vo_q);
|
||||
*ppstapending = &padapter->xmitpriv.vo_pending;
|
||||
(phwxmits+0)->accnt++;
|
||||
*(ac) = 0;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VO\n"));
|
||||
break;
|
||||
case 0:
|
||||
case 3:
|
||||
default:
|
||||
ptxservq = &(psta->sta_xmitpriv.be_q);
|
||||
*ppstapending = &padapter->xmitpriv.be_pending;
|
||||
(phwxmits+2)->accnt++;
|
||||
*(ac) = 2;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BE\n"));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
_func_exit_;
|
||||
|
||||
return ptxservq;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Will enqueue pxmitframe to the proper queue,
|
||||
|
|
|
@ -599,7 +599,6 @@ ODM_RAInfo_Init(
|
|||
)
|
||||
{
|
||||
struct odm_ra_info *pRaInfo = &pDM_Odm->RAInfo[MacID];
|
||||
#if 1
|
||||
u1Byte WirelessMode=0xFF; /* invalid value */
|
||||
u1Byte max_rate_idx = 0x13; /* MCS7 */
|
||||
if (pDM_Odm->pWirelessMode!=NULL){
|
||||
|
@ -622,11 +621,6 @@ ODM_RAInfo_Init(
|
|||
pRaInfo->DecisionRate = max_rate_idx;
|
||||
pRaInfo->PreRate = max_rate_idx;
|
||||
pRaInfo->HighestRate=max_rate_idx;
|
||||
#else
|
||||
pRaInfo->DecisionRate = 0x13;
|
||||
pRaInfo->PreRate = 0x13;
|
||||
pRaInfo->HighestRate= 0x13;
|
||||
#endif
|
||||
pRaInfo->LowestRate=0;
|
||||
pRaInfo->RateID=0;
|
||||
pRaInfo->RateMask=0xffffffff;
|
||||
|
|
|
@ -1749,7 +1749,6 @@ if (*(pDM_Odm->mp_mode) != 1)
|
|||
continue;
|
||||
|
||||
tmpReg = APK_RF_init_value[path][index];
|
||||
#if 1
|
||||
if (!pDM_Odm->RFCalibrateInfo.bAPKThermalMeterIgnore)
|
||||
{
|
||||
BB_offset = (tmpReg & 0xF0000) >> 16;
|
||||
|
@ -1776,7 +1775,6 @@ if (*(pDM_Odm->mp_mode) != 1)
|
|||
}
|
||||
tmpReg = (tmpReg & 0xFFF0FFFF) | (BB_offset << 16);
|
||||
}
|
||||
#endif
|
||||
|
||||
ODM_SetRFReg(pDM_Odm, path, RF_IPA_A, bMaskDWord, 0x8992e);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("phy_APCalibrate_8188E() offset 0xc %x\n", PHY_QueryRFReg(pAdapter, path, RF_IPA_A, bMaskDWord)));
|
||||
|
|
14
hal/odm.c
14
hal/odm.c
|
@ -2714,18 +2714,9 @@ odm_InitHybridAntDiv(
|
|||
}
|
||||
|
||||
|
||||
bool
|
||||
odm_StaDefAntSel(
|
||||
struct odm_dm_struct *pDM_Odm,
|
||||
u4Byte OFDM_Ant1_Cnt,
|
||||
u4Byte OFDM_Ant2_Cnt,
|
||||
u4Byte CCK_Ant1_Cnt,
|
||||
u4Byte CCK_Ant2_Cnt,
|
||||
u1Byte *pDefAnt
|
||||
|
||||
)
|
||||
bool odm_StaDefAntSel(struct odm_dm_struct *pDM_Odm, u4Byte OFDM_Ant1_Cnt,
|
||||
u4Byte OFDM_Ant2_Cnt, u4Byte CCK_Ant1_Cnt, u4Byte CCK_Ant2_Cnt, u1Byte *pDefAnt)
|
||||
{
|
||||
#if 1
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("odm_StaDefAntSelect==============>\n"));
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("OFDM_Ant1_Cnt:%d, OFDM_Ant2_Cnt:%d\n",OFDM_Ant1_Cnt,OFDM_Ant2_Cnt));
|
||||
|
@ -2760,7 +2751,6 @@ odm_StaDefAntSel(
|
|||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("TxAnt = %s\n",((*pDefAnt)==1)?"Ant1":"Ant2"));
|
||||
|
||||
#endif
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("<==============odm_StaDefAntSelect\n"));
|
||||
|
||||
return true;
|
||||
|
|
|
@ -2832,114 +2832,96 @@ GetHalDefVar8188EUsb(
|
|||
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
|
||||
u8 bResult = _SUCCESS;
|
||||
|
||||
switch (eVariable)
|
||||
{
|
||||
case HAL_DEF_UNDERCORATEDSMOOTHEDPWDB:
|
||||
#if 1 /* trunk */
|
||||
switch (eVariable) {
|
||||
case HAL_DEF_UNDERCORATEDSMOOTHEDPWDB:
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
|
||||
struct sta_priv * pstapriv = &Adapter->stapriv;
|
||||
struct sta_info * psta;
|
||||
psta = rtw_get_stainfo(pstapriv, pmlmepriv->cur_network.network.MacAddress);
|
||||
if (psta)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
|
||||
struct sta_priv * pstapriv = &Adapter->stapriv;
|
||||
struct sta_info * psta;
|
||||
psta = rtw_get_stainfo(pstapriv, pmlmepriv->cur_network.network.MacAddress);
|
||||
if (psta)
|
||||
{
|
||||
*((int *)pValue) = psta->rssi_stat.UndecoratedSmoothedPWDB;
|
||||
}
|
||||
*((int *)pValue) = psta->rssi_stat.UndecoratedSmoothedPWDB;
|
||||
}
|
||||
#else /* V4 branch */
|
||||
if (check_fwstate(&Adapter->mlmepriv, WIFI_STATION_STATE) == true){
|
||||
*((int *)pValue) = pHalData->dmpriv.UndecoratedSmoothedPWDB;
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case HAL_DEF_IS_SUPPORT_ANT_DIV:
|
||||
*((u8 *)pValue) = (pHalData->AntDivCfg==0)?false:true;
|
||||
break;
|
||||
case HAL_DEF_CURRENT_ANTENNA:
|
||||
*(( u8*)pValue) = pHalData->CurAntenna;
|
||||
break;
|
||||
case HAL_DEF_DRVINFO_SZ:
|
||||
*(( u32*)pValue) = DRVINFO_SZ;
|
||||
break;
|
||||
case HAL_DEF_MAX_RECVBUF_SZ:
|
||||
*(( u32*)pValue) = MAX_RECVBUF_SZ;
|
||||
break;
|
||||
case HAL_DEF_RX_PACKET_OFFSET:
|
||||
*(( u32*)pValue) = RXDESC_SIZE + DRVINFO_SZ;
|
||||
break;
|
||||
|
||||
case HAL_DEF_DBG_DM_FUNC:
|
||||
*(( u32*)pValue) =pHalData->odmpriv.SupportAbility;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case HAL_DEF_IS_SUPPORT_ANT_DIV:
|
||||
*((u8 *)pValue) = (pHalData->AntDivCfg==0)?false:true;
|
||||
break;
|
||||
case HAL_DEF_CURRENT_ANTENNA:
|
||||
*(( u8*)pValue) = pHalData->CurAntenna;
|
||||
break;
|
||||
case HAL_DEF_DRVINFO_SZ:
|
||||
*(( u32*)pValue) = DRVINFO_SZ;
|
||||
break;
|
||||
case HAL_DEF_MAX_RECVBUF_SZ:
|
||||
*(( u32*)pValue) = MAX_RECVBUF_SZ;
|
||||
break;
|
||||
case HAL_DEF_RX_PACKET_OFFSET:
|
||||
*(( u32*)pValue) = RXDESC_SIZE + DRVINFO_SZ;
|
||||
break;
|
||||
case HAL_DEF_DBG_DM_FUNC:
|
||||
*(( u32*)pValue) =pHalData->odmpriv.SupportAbility;
|
||||
break;
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
case HAL_DEF_RA_DECISION_RATE:
|
||||
{
|
||||
u8 MacID = *((u8*)pValue);
|
||||
*((u8*)pValue) = ODM_RA_GetDecisionRate_8188E(&(pHalData->odmpriv), MacID);
|
||||
}
|
||||
break;
|
||||
|
||||
case HAL_DEF_RA_SGI:
|
||||
{
|
||||
u8 MacID = *((u8*)pValue);
|
||||
*((u8*)pValue) = ODM_RA_GetShortGI_8188E(&(pHalData->odmpriv), MacID);
|
||||
}
|
||||
break;
|
||||
case HAL_DEF_RA_DECISION_RATE:
|
||||
{
|
||||
u8 MacID = *((u8*)pValue);
|
||||
*((u8*)pValue) = ODM_RA_GetDecisionRate_8188E(&(pHalData->odmpriv), MacID);
|
||||
}
|
||||
break;
|
||||
case HAL_DEF_RA_SGI:
|
||||
{
|
||||
u8 MacID = *((u8*)pValue);
|
||||
*((u8*)pValue) = ODM_RA_GetShortGI_8188E(&(pHalData->odmpriv), MacID);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
||||
case HAL_DEF_PT_PWR_STATUS:
|
||||
case HAL_DEF_PT_PWR_STATUS:
|
||||
#if (POWER_TRAINING_ACTIVE==1)
|
||||
{
|
||||
u8 MacID = *((u8*)pValue);
|
||||
*((u8*)pValue) = ODM_RA_GetHwPwrStatus_8188E(&(pHalData->odmpriv), MacID);
|
||||
}
|
||||
{
|
||||
u8 MacID = *((u8*)pValue);
|
||||
*((u8*)pValue) = ODM_RA_GetHwPwrStatus_8188E(&(pHalData->odmpriv), MacID);
|
||||
}
|
||||
#endif/* POWER_TRAINING_ACTIVE==1) */
|
||||
break;
|
||||
|
||||
case HW_VAR_MAX_RX_AMPDU_FACTOR:
|
||||
*(( u32*)pValue) = MAX_AMPDU_FACTOR_64K;
|
||||
break;
|
||||
|
||||
case HW_DEF_RA_INFO_DUMP:
|
||||
break;
|
||||
case HW_VAR_MAX_RX_AMPDU_FACTOR:
|
||||
*(( u32*)pValue) = MAX_AMPDU_FACTOR_64K;
|
||||
break;
|
||||
case HW_DEF_RA_INFO_DUMP:
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
{
|
||||
u8 entry_id = *((u8*)pValue);
|
||||
if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)== true)
|
||||
{
|
||||
u8 entry_id = *((u8*)pValue);
|
||||
if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)== true)
|
||||
{
|
||||
DBG_88E("============ RA status check ===================\n");
|
||||
DBG_88E("Mac_id:%d ,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d\n",
|
||||
entry_id,
|
||||
pHalData->odmpriv.RAInfo[entry_id].RateID,
|
||||
pHalData->odmpriv.RAInfo[entry_id].RAUseRate,
|
||||
pHalData->odmpriv.RAInfo[entry_id].RateSGI,
|
||||
pHalData->odmpriv.RAInfo[entry_id].DecisionRate,
|
||||
pHalData->odmpriv.RAInfo[entry_id].PTStage);
|
||||
}
|
||||
DBG_88E("============ RA status check ===================\n");
|
||||
DBG_88E("Mac_id:%d ,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d\n",
|
||||
entry_id,
|
||||
pHalData->odmpriv.RAInfo[entry_id].RateID,
|
||||
pHalData->odmpriv.RAInfo[entry_id].RAUseRate,
|
||||
pHalData->odmpriv.RAInfo[entry_id].RateSGI,
|
||||
pHalData->odmpriv.RAInfo[entry_id].DecisionRate,
|
||||
pHalData->odmpriv.RAInfo[entry_id].PTStage);
|
||||
}
|
||||
}
|
||||
#endif /* RATE_ADAPTIVE_SUPPORT == 1) */
|
||||
break;
|
||||
case HW_DEF_ODM_DBG_FLAG:
|
||||
{
|
||||
u8Byte DebugComponents = *((u32*)pValue);
|
||||
struct odm_dm_struct *pDM_Odm = &(pHalData->odmpriv);
|
||||
printk("pDM_Odm->DebugComponents = 0x%llx\n",pDM_Odm->DebugComponents );
|
||||
}
|
||||
break;
|
||||
|
||||
case HAL_DEF_DBG_DUMP_RXPKT:
|
||||
*(( u8*)pValue) = pHalData->bDumpRxPkt;
|
||||
break;
|
||||
case HAL_DEF_DBG_DUMP_TXPKT:
|
||||
*(( u8*)pValue) = pHalData->bDumpTxPkt;
|
||||
break;
|
||||
|
||||
default:
|
||||
bResult = _FAIL;
|
||||
break;
|
||||
break;
|
||||
case HW_DEF_ODM_DBG_FLAG:
|
||||
{
|
||||
u8Byte DebugComponents = *((u32*)pValue);
|
||||
struct odm_dm_struct *pDM_Odm = &(pHalData->odmpriv);
|
||||
printk("pDM_Odm->DebugComponents = 0x%llx\n",pDM_Odm->DebugComponents );
|
||||
}
|
||||
break;
|
||||
case HAL_DEF_DBG_DUMP_RXPKT:
|
||||
*(( u8*)pValue) = pHalData->bDumpRxPkt;
|
||||
break;
|
||||
case HAL_DEF_DBG_DUMP_TXPKT:
|
||||
*(( u8*)pValue) = pHalData->bDumpTxPkt;
|
||||
break;
|
||||
default:
|
||||
bResult = _FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
return bResult;
|
||||
|
|
|
@ -958,7 +958,7 @@ static void dump_usb_interface(struct usb_interface *usb_intf)
|
|||
struct usb_host_endpoint *host_endp;
|
||||
struct usb_endpoint_descriptor *endp_desc;
|
||||
|
||||
#if 1 /* The usb device this usb interface belongs to */
|
||||
/* The usb device this usb interface belongs to */
|
||||
DBG_88E("usb_interface:%p, usb_device:%p(num:%d, path:%s), usb_device_descriptor:%p\n", usb_intf, udev, udev->devnum, udev->devpath, dev_desc);
|
||||
DBG_88E("bLength:%u\n", dev_desc->bLength);
|
||||
DBG_88E("bDescriptorType:0x%02x\n", dev_desc->bDescriptorType);
|
||||
|
@ -974,10 +974,8 @@ static void dump_usb_interface(struct usb_interface *usb_intf)
|
|||
DBG_88E("iProduct:0x%02x\n", dev_desc->iProduct);
|
||||
DBG_88E("iSerialNumber:0x%02x\n", dev_desc->iSerialNumber);
|
||||
DBG_88E("bNumConfigurations:%u\n", dev_desc->bNumConfigurations);
|
||||
#endif
|
||||
|
||||
|
||||
#if 1 /* The acting usb_config_descriptor */
|
||||
/* The acting usb_config_descriptor */
|
||||
DBG_88E("\nact_conf_desc:%p\n", act_conf_desc);
|
||||
DBG_88E("bLength:%u\n", act_conf_desc->bLength);
|
||||
DBG_88E("bDescriptorType:0x%02x\n", act_conf_desc->bDescriptorType);
|
||||
|
@ -987,15 +985,13 @@ static void dump_usb_interface(struct usb_interface *usb_intf)
|
|||
DBG_88E("iConfiguration:0x%02x\n", act_conf_desc->iConfiguration);
|
||||
DBG_88E("bmAttributes:0x%02x\n", act_conf_desc->bmAttributes);
|
||||
DBG_88E("bMaxPower=%u\n", act_conf_desc->bMaxPower);
|
||||
#endif
|
||||
|
||||
|
||||
DBG_88E("****** num of altsetting = (%d) ******/\n", usb_intf->num_altsetting);
|
||||
/* Get he host side alternate setting (the current alternate setting) for this interface*/
|
||||
host_iface = usb_intf->cur_altsetting;
|
||||
iface_desc = &host_iface->desc;
|
||||
|
||||
#if 1 /* The current alternate setting*/
|
||||
/* The current alternate setting*/
|
||||
DBG_88E("\nusb_interface_descriptor:%p:\n", iface_desc);
|
||||
DBG_88E("bLength:%u\n", iface_desc->bLength);
|
||||
DBG_88E("bDescriptorType:0x%02x\n", iface_desc->bDescriptorType);
|
||||
|
@ -1006,11 +1002,6 @@ static void dump_usb_interface(struct usb_interface *usb_intf)
|
|||
DBG_88E("bInterfaceSubClass=%x\n", iface_desc->bInterfaceSubClass);
|
||||
DBG_88E("bInterfaceProtocol=%x\n", iface_desc->bInterfaceProtocol);
|
||||
DBG_88E("iInterface=%x\n", iface_desc->iInterface);
|
||||
#endif
|
||||
|
||||
|
||||
#if 1
|
||||
//DBG_88E("\ndump usb_endpoint_descriptor:\n");
|
||||
|
||||
for (i = 0; i < iface_desc->bNumEndpoints; i++)
|
||||
{
|
||||
|
@ -1027,31 +1018,22 @@ static void dump_usb_interface(struct usb_interface *usb_intf)
|
|||
DBG_88E("wMaxPacketSize=%x\n",endp_desc->wMaxPacketSize);
|
||||
DBG_88E("wMaxPacketSize=%x\n",le16_to_cpu(endp_desc->wMaxPacketSize));
|
||||
DBG_88E("bInterval=%x\n",endp_desc->bInterval);
|
||||
//DBG_88E("bRefresh=%x\n",pendp_desc->bRefresh);
|
||||
//DBG_88E("bSynchAddress=%x\n",pendp_desc->bSynchAddress);
|
||||
|
||||
if (RT_usb_endpoint_is_bulk_in(endp_desc))
|
||||
{
|
||||
DBG_88E("RT_usb_endpoint_is_bulk_in = %x\n", RT_usb_endpoint_num(endp_desc));
|
||||
//pdvobjpriv->RtNumInPipes++;
|
||||
}
|
||||
else if (RT_usb_endpoint_is_int_in(endp_desc))
|
||||
{
|
||||
DBG_88E("RT_usb_endpoint_is_int_in = %x, Interval = %x\n", RT_usb_endpoint_num(endp_desc),endp_desc->bInterval);
|
||||
//pdvobjpriv->RtNumInPipes++;
|
||||
}
|
||||
else if (RT_usb_endpoint_is_bulk_out(endp_desc))
|
||||
{
|
||||
DBG_88E("RT_usb_endpoint_is_bulk_out = %x\n", RT_usb_endpoint_num(endp_desc));
|
||||
//pdvobjpriv->RtNumOutPipes++;
|
||||
}
|
||||
//pdvobjpriv->ep_num[i] = RT_usb_endpoint_num(pendp_desc);
|
||||
}
|
||||
}
|
||||
|
||||
//DBG_88E("nr_endpoint=%d, in_num=%d, out_num=%d\n\n", pdvobjpriv->nr_endpoint, pdvobjpriv->RtNumInPipes, pdvobjpriv->RtNumOutPipes);
|
||||
#endif
|
||||
|
||||
if (udev->speed == USB_SPEED_HIGH)
|
||||
DBG_88E("USB_SPEED_HIGH\n");
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue