rtl8188eu: Remove "if 1" statements

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-26 21:37:57 -05:00
parent 35044413a3
commit 4f92869c5b
10 changed files with 127 additions and 270 deletions

View file

@ -1012,10 +1012,9 @@ int proc_get_best_channel(char *page, char **start,
best_channel_5G = pmlmeext->channel_set[i].ChannelNum; 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", 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); 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); len += snprintf(page + len, count - len, "best_channel_5G = %d\n", best_channel_5G);

View file

@ -27,15 +27,12 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter)
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
struct xmit_priv *pxmitpriv = &(adapter->xmitpriv); 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__); DBG_88E("%s rtw_alloc_xmitframe return null\n", __func__);
goto exit; 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__); DBG_88E("%s rtw_alloc_xmitbuf return null\n", __func__);
rtw_free_xmitframe(pxmitpriv, xmit_frame); rtw_free_xmitframe(pxmitpriv, xmit_frame);
xmit_frame=NULL; xmit_frame=NULL;
@ -53,19 +50,6 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter)
pattrib->subtype = WIFI_BEACON; pattrib->subtype = WIFI_BEACON;
pattrib->pktlen = pattrib->last_txcmdsz = 0; 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: exit:
return xmit_frame; return xmit_frame;
} }

View file

@ -6033,7 +6033,7 @@ void issue_assocreq(struct adapter *padapter)
/* supported rate & extended supported rate */ /* 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); get_rate_set(padapter, sta_bssrate, &sta_bssrate_len);
if (pmlmeext->cur_channel == 14)/* for JAPAN, channel 14 can only uses B Mode(CCK) */ 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; bssrate_len = index;
DBG_88E("bssrate_len = %d\n", bssrate_len); 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) { if (bssrate_len == 0) {
rtw_free_xmitbuf(pxmitpriv, pmgntframe->pxmitbuf); rtw_free_xmitbuf(pxmitpriv, pmgntframe->pxmitbuf);
rtw_free_xmitframe(pxmitpriv, pmgntframe); rtw_free_xmitframe(pxmitpriv, pmgntframe);

View file

@ -1516,9 +1516,8 @@ int validate_recv_frame(struct adapter *adapter, union recv_frame *precv_frame)
u8 type; u8 type;
u8 subtype; u8 subtype;
int retval = _SUCCESS; int retval = _SUCCESS;
u8 bDumpRxPkt;
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib; struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
u8 *ptr = precv_frame->u.hdr.rx_data; u8 *ptr = precv_frame->u.hdr.rx_data;
u8 ver =(unsigned char) (*ptr)&0x3 ; u8 ver =(unsigned char) (*ptr)&0x3 ;
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
@ -1552,9 +1551,7 @@ _func_enter_;
pattrib->privacy = GetPrivacy(ptr); pattrib->privacy = GetPrivacy(ptr);
pattrib->order = GetOrder(ptr); pattrib->order = GetOrder(ptr);
#if 1 /* Dump rx packets */ /* Dump rx packets */
{
u8 bDumpRxPkt;
rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt)); rtw_hal_get_def_var(adapter, HAL_DEF_DBG_DUMP_RXPKT, &(bDumpRxPkt));
if (bDumpRxPkt ==1){/* dump all rx packets */ if (bDumpRxPkt ==1){/* dump all rx packets */
int i; 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)); *(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7));
DBG_88E("#############################\n"); DBG_88E("#############################\n");
} }
} } else if (bDumpRxPkt ==3){
else if (bDumpRxPkt ==3){
if (type== WIFI_DATA_TYPE){ if (type== WIFI_DATA_TYPE){
int i; int i;
DBG_88E("#############################\n"); DBG_88E("#############################\n");
@ -1587,39 +1583,36 @@ _func_enter_;
DBG_88E("#############################\n"); DBG_88E("#############################\n");
} }
} }
} switch (type) {
#endif case WIFI_MGT_TYPE: /* mgnt */
switch (type) retval = validate_recv_mgnt_frame(adapter, precv_frame);
{ if (retval == _FAIL)
case WIFI_MGT_TYPE: /* mgnt */ {
retval = validate_recv_mgnt_frame(adapter, precv_frame); RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_mgnt_frame fail\n"));
if (retval == _FAIL) }
{ retval = _FAIL; /* only data frame return _SUCCESS */
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_mgnt_frame fail\n")); break;
} case WIFI_CTRL_TYPE: /* ctrl */
retval = _FAIL; /* only data frame return _SUCCESS */ retval = validate_recv_ctrl_frame(adapter, precv_frame);
break; if (retval == _FAIL)
case WIFI_CTRL_TYPE: /* ctrl */ {
retval = validate_recv_ctrl_frame(adapter, precv_frame); RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_ctrl_frame fail\n"));
if (retval == _FAIL) }
{ retval = _FAIL; /* only data frame return _SUCCESS */
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_ctrl_frame fail\n")); break;
} case WIFI_DATA_TYPE: /* data */
retval = _FAIL; /* only data frame return _SUCCESS */ rtw_led_control(adapter, LED_CTL_RX);
break; pattrib->qos = (subtype & BIT(7))? 1:0;
case WIFI_DATA_TYPE: /* data */ retval = validate_recv_data_frame(adapter, precv_frame);
rtw_led_control(adapter, LED_CTL_RX); if (retval == _FAIL) {
pattrib->qos = (subtype & BIT(7))? 1:0; struct recv_priv *precvpriv = &adapter->recvpriv;
retval = validate_recv_data_frame(adapter, precv_frame); precvpriv->rx_drop++;
if (retval == _FAIL) { }
struct recv_priv *precvpriv = &adapter->recvpriv; break;
precvpriv->rx_drop++; default:
} RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_data_frame fail! type=0x%x\n", type));
break; retval = _FAIL;
default: break;
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("validate_recv_data_frame fail! type=0x%x\n", type));
retval = _FAIL;
break;
} }
exit: exit:

View file

@ -1830,97 +1830,43 @@ _func_exit_;
return pxmitframe; 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 *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, int up, u8 *ac)
{ {
struct tx_servq *ptxservq; struct tx_servq *ptxservq;
_func_enter_; _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) { switch (up) {
case 1: case 1:
case 2: case 2:
ptxservq = &(psta->sta_xmitpriv.bk_q); ptxservq = &(psta->sta_xmitpriv.bk_q);
*ppstapending = &padapter->xmitpriv.bk_pending; *(ac) = 3;
(phwxmits+3)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BK\n")); RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BK\n"));
break; break;
case 4: case 4:
case 5: case 5:
ptxservq = &(psta->sta_xmitpriv.vi_q); ptxservq = &(psta->sta_xmitpriv.vi_q);
*ppstapending = &padapter->xmitpriv.vi_pending; *(ac) = 1;
(phwxmits+1)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VI\n")); RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VI\n"));
break; break;
case 6: case 6:
case 7: case 7:
ptxservq = &(psta->sta_xmitpriv.vo_q); ptxservq = &(psta->sta_xmitpriv.vo_q);
*ppstapending = &padapter->xmitpriv.vo_pending; *(ac) = 0;
(phwxmits+0)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VO\n")); RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VO\n"));
break; break;
case 0: case 0:
case 3: case 3:
default: default:
ptxservq = &(psta->sta_xmitpriv.be_q); ptxservq = &(psta->sta_xmitpriv.be_q);
*ppstapending = &padapter->xmitpriv.be_pending; *(ac) = 2;
(phwxmits+2)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BE\n")); RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BE\n"));
break; break;
} }
_func_exit_; _func_exit_;
return ptxservq; return ptxservq;
} }
#endif
/* /*
* Will enqueue pxmitframe to the proper queue, * Will enqueue pxmitframe to the proper queue,

View file

@ -599,7 +599,6 @@ ODM_RAInfo_Init(
) )
{ {
struct odm_ra_info *pRaInfo = &pDM_Odm->RAInfo[MacID]; struct odm_ra_info *pRaInfo = &pDM_Odm->RAInfo[MacID];
#if 1
u1Byte WirelessMode=0xFF; /* invalid value */ u1Byte WirelessMode=0xFF; /* invalid value */
u1Byte max_rate_idx = 0x13; /* MCS7 */ u1Byte max_rate_idx = 0x13; /* MCS7 */
if (pDM_Odm->pWirelessMode!=NULL){ if (pDM_Odm->pWirelessMode!=NULL){
@ -622,11 +621,6 @@ ODM_RAInfo_Init(
pRaInfo->DecisionRate = max_rate_idx; pRaInfo->DecisionRate = max_rate_idx;
pRaInfo->PreRate = max_rate_idx; pRaInfo->PreRate = max_rate_idx;
pRaInfo->HighestRate=max_rate_idx; pRaInfo->HighestRate=max_rate_idx;
#else
pRaInfo->DecisionRate = 0x13;
pRaInfo->PreRate = 0x13;
pRaInfo->HighestRate= 0x13;
#endif
pRaInfo->LowestRate=0; pRaInfo->LowestRate=0;
pRaInfo->RateID=0; pRaInfo->RateID=0;
pRaInfo->RateMask=0xffffffff; pRaInfo->RateMask=0xffffffff;

View file

@ -1749,7 +1749,6 @@ if (*(pDM_Odm->mp_mode) != 1)
continue; continue;
tmpReg = APK_RF_init_value[path][index]; tmpReg = APK_RF_init_value[path][index];
#if 1
if (!pDM_Odm->RFCalibrateInfo.bAPKThermalMeterIgnore) if (!pDM_Odm->RFCalibrateInfo.bAPKThermalMeterIgnore)
{ {
BB_offset = (tmpReg & 0xF0000) >> 16; BB_offset = (tmpReg & 0xF0000) >> 16;
@ -1776,7 +1775,6 @@ if (*(pDM_Odm->mp_mode) != 1)
} }
tmpReg = (tmpReg & 0xFFF0FFFF) | (BB_offset << 16); tmpReg = (tmpReg & 0xFFF0FFFF) | (BB_offset << 16);
} }
#endif
ODM_SetRFReg(pDM_Odm, path, RF_IPA_A, bMaskDWord, 0x8992e); 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))); 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)));

View file

@ -2714,18 +2714,9 @@ odm_InitHybridAntDiv(
} }
bool bool odm_StaDefAntSel(struct odm_dm_struct *pDM_Odm, u4Byte OFDM_Ant1_Cnt,
odm_StaDefAntSel( u4Byte OFDM_Ant2_Cnt, u4Byte CCK_Ant1_Cnt, u4Byte CCK_Ant2_Cnt, u1Byte *pDefAnt)
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,("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)); 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")); 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")); ODM_RT_TRACE(pDM_Odm, ODM_COMP_ANT_DIV,ODM_DBG_LOUD,("<==============odm_StaDefAntSelect\n"));
return true; return true;

View file

@ -2832,114 +2832,96 @@ GetHalDefVar8188EUsb(
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
u8 bResult = _SUCCESS; u8 bResult = _SUCCESS;
switch (eVariable) switch (eVariable) {
{ case HAL_DEF_UNDERCORATEDSMOOTHEDPWDB:
case HAL_DEF_UNDERCORATEDSMOOTHEDPWDB: {
#if 1 /* trunk */ 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; *((int *)pValue) = psta->rssi_stat.UndecoratedSmoothedPWDB;
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;
}
} }
#else /* V4 branch */ }
if (check_fwstate(&Adapter->mlmepriv, WIFI_STATION_STATE) == true){ break;
*((int *)pValue) = pHalData->dmpriv.UndecoratedSmoothedPWDB; case HAL_DEF_IS_SUPPORT_ANT_DIV:
} *((u8 *)pValue) = (pHalData->AntDivCfg==0)?false:true;
else{ break;
case HAL_DEF_CURRENT_ANTENNA:
} *(( u8*)pValue) = pHalData->CurAntenna;
#endif break;
break; case HAL_DEF_DRVINFO_SZ:
case HAL_DEF_IS_SUPPORT_ANT_DIV: *(( u32*)pValue) = DRVINFO_SZ;
*((u8 *)pValue) = (pHalData->AntDivCfg==0)?false:true; break;
break; case HAL_DEF_MAX_RECVBUF_SZ:
case HAL_DEF_CURRENT_ANTENNA: *(( u32*)pValue) = MAX_RECVBUF_SZ;
*(( u8*)pValue) = pHalData->CurAntenna; break;
break; case HAL_DEF_RX_PACKET_OFFSET:
case HAL_DEF_DRVINFO_SZ: *(( u32*)pValue) = RXDESC_SIZE + DRVINFO_SZ;
*(( u32*)pValue) = DRVINFO_SZ; break;
break; case HAL_DEF_DBG_DM_FUNC:
case HAL_DEF_MAX_RECVBUF_SZ: *(( u32*)pValue) =pHalData->odmpriv.SupportAbility;
*(( u32*)pValue) = MAX_RECVBUF_SZ; break;
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) #if (RATE_ADAPTIVE_SUPPORT == 1)
case HAL_DEF_RA_DECISION_RATE: case HAL_DEF_RA_DECISION_RATE:
{ {
u8 MacID = *((u8*)pValue); u8 MacID = *((u8*)pValue);
*((u8*)pValue) = ODM_RA_GetDecisionRate_8188E(&(pHalData->odmpriv), MacID); *((u8*)pValue) = ODM_RA_GetDecisionRate_8188E(&(pHalData->odmpriv), MacID);
} }
break; break;
case HAL_DEF_RA_SGI:
case HAL_DEF_RA_SGI: {
{ u8 MacID = *((u8*)pValue);
u8 MacID = *((u8*)pValue); *((u8*)pValue) = ODM_RA_GetShortGI_8188E(&(pHalData->odmpriv), MacID);
*((u8*)pValue) = ODM_RA_GetShortGI_8188E(&(pHalData->odmpriv), MacID); }
} break;
break;
#endif #endif
case HAL_DEF_PT_PWR_STATUS:
case HAL_DEF_PT_PWR_STATUS:
#if (POWER_TRAINING_ACTIVE==1) #if (POWER_TRAINING_ACTIVE==1)
{ {
u8 MacID = *((u8*)pValue); u8 MacID = *((u8*)pValue);
*((u8*)pValue) = ODM_RA_GetHwPwrStatus_8188E(&(pHalData->odmpriv), MacID); *((u8*)pValue) = ODM_RA_GetHwPwrStatus_8188E(&(pHalData->odmpriv), MacID);
} }
#endif/* POWER_TRAINING_ACTIVE==1) */ #endif/* POWER_TRAINING_ACTIVE==1) */
break; break;
case HW_VAR_MAX_RX_AMPDU_FACTOR:
case HW_VAR_MAX_RX_AMPDU_FACTOR: *(( u32*)pValue) = MAX_AMPDU_FACTOR_64K;
*(( u32*)pValue) = MAX_AMPDU_FACTOR_64K; break;
break; case HW_DEF_RA_INFO_DUMP:
case HW_DEF_RA_INFO_DUMP:
#if (RATE_ADAPTIVE_SUPPORT == 1) #if (RATE_ADAPTIVE_SUPPORT == 1)
{
u8 entry_id = *((u8*)pValue);
if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)== true)
{ {
u8 entry_id = *((u8*)pValue); DBG_88E("============ RA status check ===================\n");
if (check_fwstate(&Adapter->mlmepriv, _FW_LINKED)== true) DBG_88E("Mac_id:%d ,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d\n",
{ entry_id,
DBG_88E("============ RA status check ===================\n"); pHalData->odmpriv.RAInfo[entry_id].RateID,
DBG_88E("Mac_id:%d ,RateID = %d,RAUseRate = 0x%08x,RateSGI = %d, DecisionRate = 0x%02x ,PTStage = %d\n", pHalData->odmpriv.RAInfo[entry_id].RAUseRate,
entry_id, pHalData->odmpriv.RAInfo[entry_id].RateSGI,
pHalData->odmpriv.RAInfo[entry_id].RateID, pHalData->odmpriv.RAInfo[entry_id].DecisionRate,
pHalData->odmpriv.RAInfo[entry_id].RAUseRate, pHalData->odmpriv.RAInfo[entry_id].PTStage);
pHalData->odmpriv.RAInfo[entry_id].RateSGI,
pHalData->odmpriv.RAInfo[entry_id].DecisionRate,
pHalData->odmpriv.RAInfo[entry_id].PTStage);
}
} }
}
#endif /* RATE_ADAPTIVE_SUPPORT == 1) */ #endif /* RATE_ADAPTIVE_SUPPORT == 1) */
break; break;
case HW_DEF_ODM_DBG_FLAG: case HW_DEF_ODM_DBG_FLAG:
{ {
u8Byte DebugComponents = *((u32*)pValue); u8Byte DebugComponents = *((u32*)pValue);
struct odm_dm_struct *pDM_Odm = &(pHalData->odmpriv); struct odm_dm_struct *pDM_Odm = &(pHalData->odmpriv);
printk("pDM_Odm->DebugComponents = 0x%llx\n",pDM_Odm->DebugComponents ); printk("pDM_Odm->DebugComponents = 0x%llx\n",pDM_Odm->DebugComponents );
} }
break; break;
case HAL_DEF_DBG_DUMP_RXPKT:
case HAL_DEF_DBG_DUMP_RXPKT: *(( u8*)pValue) = pHalData->bDumpRxPkt;
*(( u8*)pValue) = pHalData->bDumpRxPkt; break;
break; case HAL_DEF_DBG_DUMP_TXPKT:
case HAL_DEF_DBG_DUMP_TXPKT: *(( u8*)pValue) = pHalData->bDumpTxPkt;
*(( u8*)pValue) = pHalData->bDumpTxPkt; break;
break; default:
bResult = _FAIL;
default: break;
bResult = _FAIL;
break;
} }
return bResult; return bResult;

View file

@ -958,7 +958,7 @@ static void dump_usb_interface(struct usb_interface *usb_intf)
struct usb_host_endpoint *host_endp; struct usb_host_endpoint *host_endp;
struct usb_endpoint_descriptor *endp_desc; 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("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("bLength:%u\n", dev_desc->bLength);
DBG_88E("bDescriptorType:0x%02x\n", dev_desc->bDescriptorType); 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("iProduct:0x%02x\n", dev_desc->iProduct);
DBG_88E("iSerialNumber:0x%02x\n", dev_desc->iSerialNumber); DBG_88E("iSerialNumber:0x%02x\n", dev_desc->iSerialNumber);
DBG_88E("bNumConfigurations:%u\n", dev_desc->bNumConfigurations); DBG_88E("bNumConfigurations:%u\n", dev_desc->bNumConfigurations);
#endif
/* The acting usb_config_descriptor */
#if 1 /* The acting usb_config_descriptor */
DBG_88E("\nact_conf_desc:%p\n", act_conf_desc); DBG_88E("\nact_conf_desc:%p\n", act_conf_desc);
DBG_88E("bLength:%u\n", act_conf_desc->bLength); DBG_88E("bLength:%u\n", act_conf_desc->bLength);
DBG_88E("bDescriptorType:0x%02x\n", act_conf_desc->bDescriptorType); 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("iConfiguration:0x%02x\n", act_conf_desc->iConfiguration);
DBG_88E("bmAttributes:0x%02x\n", act_conf_desc->bmAttributes); DBG_88E("bmAttributes:0x%02x\n", act_conf_desc->bmAttributes);
DBG_88E("bMaxPower=%u\n", act_conf_desc->bMaxPower); DBG_88E("bMaxPower=%u\n", act_conf_desc->bMaxPower);
#endif
DBG_88E("****** num of altsetting = (%d) ******/\n", usb_intf->num_altsetting); DBG_88E("****** num of altsetting = (%d) ******/\n", usb_intf->num_altsetting);
/* Get he host side alternate setting (the current alternate setting) for this interface*/ /* Get he host side alternate setting (the current alternate setting) for this interface*/
host_iface = usb_intf->cur_altsetting; host_iface = usb_intf->cur_altsetting;
iface_desc = &host_iface->desc; 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("\nusb_interface_descriptor:%p:\n", iface_desc);
DBG_88E("bLength:%u\n", iface_desc->bLength); DBG_88E("bLength:%u\n", iface_desc->bLength);
DBG_88E("bDescriptorType:0x%02x\n", iface_desc->bDescriptorType); 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("bInterfaceSubClass=%x\n", iface_desc->bInterfaceSubClass);
DBG_88E("bInterfaceProtocol=%x\n", iface_desc->bInterfaceProtocol); DBG_88E("bInterfaceProtocol=%x\n", iface_desc->bInterfaceProtocol);
DBG_88E("iInterface=%x\n", iface_desc->iInterface); 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++) 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",endp_desc->wMaxPacketSize);
DBG_88E("wMaxPacketSize=%x\n",le16_to_cpu(endp_desc->wMaxPacketSize)); DBG_88E("wMaxPacketSize=%x\n",le16_to_cpu(endp_desc->wMaxPacketSize));
DBG_88E("bInterval=%x\n",endp_desc->bInterval); 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)) 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)); 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)) 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); 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)) 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)); 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) if (udev->speed == USB_SPEED_HIGH)
DBG_88E("USB_SPEED_HIGH\n"); DBG_88E("USB_SPEED_HIGH\n");
else else