From a0911e43097b866b37f587fc72126941910dbf30 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Fri, 26 Jul 2013 21:47:50 -0500 Subject: [PATCH] rtl8188eu: Remove RATE_ADAPTIVE_SUPPORT - this is selected Signed-off-by: Larry Finger --- core/rtw_cmd.c | 5 -- core/rtw_mlme.c | 15 ++--- core/rtw_mlme_ext.c | 3 - hal/Hal8188ERateAdaptive.c | 109 ------------------------------------- hal/odm.c | 2 - hal/rtl8188e_cmd.c | 4 -- hal/rtl8188e_hal_init.c | 2 - hal/rtl8188eu_xmit.c | 18 +----- hal/usb_halinit.c | 32 +++-------- include/autoconf.h | 1 - include/odm.h | 2 - include/rtw_cmd.h | 2 - 12 files changed, 14 insertions(+), 181 deletions(-) diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 5328b7b..9651215 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -1935,7 +1935,6 @@ _func_exit_; } -#if (RATE_ADAPTIVE_SUPPORT==1) static void rpt_timer_setting_wk_hdl(struct adapter *padapter, u16 minRptTime) { rtw_hal_set_hwreg(padapter, HW_VAR_RPT_TIMER_SETTING, (u8 *)(&minRptTime)); @@ -1976,8 +1975,6 @@ _func_exit_; } -#endif - static void antenna_select_wk_hdl(struct adapter *padapter, u8 antenna) { rtw_hal_set_hwreg(padapter, HW_VAR_ANTENNA_DIVERSITY_SELECT, (u8 *)(&antenna)); @@ -2319,11 +2316,9 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf) case LPS_CTRL_WK_CID: lps_ctrl_wk_hdl(padapter, (u8)pdrvextra_cmd->type_size); break; -#if (RATE_ADAPTIVE_SUPPORT==1) case RTP_TIMER_CFG_WK_CID: rpt_timer_setting_wk_hdl(padapter, pdrvextra_cmd->type_size); break; -#endif case ANT_SELECT_WK_CID: antenna_select_wk_hdl(padapter, pdrvextra_cmd->type_size); break; diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 2d8391b..175e87e 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -1606,7 +1606,6 @@ _func_exit_; static u8 search_max_mac_id(struct adapter *padapter) { u8 mac_id, aid; -#if (RATE_ADAPTIVE_SUPPORT==1) /* for 88E RA */ struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -1633,24 +1632,20 @@ static u8 search_max_mac_id(struct adapter *padapter) } } } -#endif return mac_id; - } /* FOR AP ,AD-HOC mode */ void rtw_stassoc_hw_rpt(struct adapter *adapter,struct sta_info *psta) { u16 media_status; + u8 macid; - if (psta==NULL) return; + if (psta==NULL) + return; - #if (RATE_ADAPTIVE_SUPPORT==1) /* for 88E RA */ - { - u8 macid = search_max_mac_id(adapter); - rtw_hal_set_hwreg(adapter,HW_VAR_TX_RPT_MAX_MACID, (u8*)&macid); - } - #endif + macid = search_max_mac_id(adapter); + rtw_hal_set_hwreg(adapter,HW_VAR_TX_RPT_MAX_MACID, (u8*)&macid); media_status = (psta->mac_id<<8)|1; /* MACID|OPMODE:1 connect */ rtw_hal_set_hwreg(adapter,HW_VAR_H2C_MEDIA_STATUS_RPT,(u8 *)&media_status); } diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index a3574e7..a9d4db2 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -8406,10 +8406,7 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res) /* set per sta rate after updating HT cap. */ set_sta_rate(padapter, psta); - - #if (RATE_ADAPTIVE_SUPPORT==1) /* for 88E RA */ rtw_hal_set_hwreg(padapter,HW_VAR_TX_RPT_MAX_MACID, (u8*)&psta->mac_id); - #endif media_status = (psta->mac_id<<8)|1; /* MACID|OPMODE: 1 means connect */ rtw_hal_set_hwreg(padapter,HW_VAR_H2C_MEDIA_STATUS_RPT,(u8 *)&media_status); } diff --git a/hal/Hal8188ERateAdaptive.c b/hal/Hal8188ERateAdaptive.c index c4d5aa9..bd53989 100644 --- a/hal/Hal8188ERateAdaptive.c +++ b/hal/Hal8188ERateAdaptive.c @@ -15,7 +15,6 @@ Major Change History: --*/ #include "odm_precomp.h" -#if (RATE_ADAPTIVE_SUPPORT == 1) /* Rate adaptive parameters */ static u1Byte RETRY_PENALTY[PERENTRY][RETRYSIZE+1] = { @@ -883,111 +882,3 @@ ODM_RA_TxRPT2Handle_8188E( ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("<===== ODM_RA_TxRPT2Handle_8188E()\n")); } - -#else - -static void -odm_RATxRPTTimerSetting( - struct odm_dm_struct * pDM_Odm, - u2Byte minRptTime -) -{ - return; -} - - -void -ODM_RASupport_Init( - struct odm_dm_struct *pDM_Odm - ) -{ - return; -} - -int -ODM_RAInfo_Init( - struct odm_dm_struct *pDM_Odm, - u1Byte MacID - ) -{ - return 0; -} - -int -ODM_RAInfo_Init_all( - struct odm_dm_struct * pDM_Odm - ) -{ - return 0; -} - -u1Byte -ODM_RA_GetShortGI_8188E( - struct odm_dm_struct *pDM_Odm, - u1Byte MacID - ) -{ - return 0; -} - -u1Byte -ODM_RA_GetDecisionRate_8188E( - struct odm_dm_struct *pDM_Odm, - u1Byte MacID - ) -{ - return 0; -} -u1Byte -ODM_RA_GetHwPwrStatus_8188E( - struct odm_dm_struct *pDM_Odm, - u1Byte MacID - ) -{ - return 0; -} - -void -ODM_RA_UpdateRateInfo_8188E( - struct odm_dm_struct *pDM_Odm, - u1Byte MacID, - u1Byte RateID, - u4Byte RateMask, - u1Byte SGIEnable - ) -{ - return; -} - -void -ODM_RA_SetRSSI_8188E( - struct odm_dm_struct * pDM_Odm, - u1Byte MacID, - u1Byte Rssi - ) -{ - return; -} - -void -ODM_RA_Set_TxRPT_Time( - struct odm_dm_struct * pDM_Odm, - u2Byte minRptTime - ) -{ - return; -} - -void -ODM_RA_TxRPT2Handle_8188E( - struct odm_dm_struct * pDM_Odm, - pu1Byte TxRPT_Buf, - u2Byte TxRPT_Len, - u4Byte MacIDValidEntry0, - u4Byte MacIDValidEntry1 - ) -{ - return; -} - -#endif diff --git a/hal/odm.c b/hal/odm.c index 5cae082..c134e69 100644 --- a/hal/odm.c +++ b/hal/odm.c @@ -2413,10 +2413,8 @@ odm_RSSIMonitorCheckCE( { } else{ - #if (RATE_ADAPTIVE_SUPPORT == 1) ODM_RA_SetRSSI_8188E( &(pHalData->odmpriv), (PWDB_rssi[i]&0xFF), (u8)((PWDB_rssi[i]>>16) & 0xFF)); - #endif } } } diff --git a/hal/rtl8188e_cmd.c b/hal/rtl8188e_cmd.c index 5aa9a52..887a469 100644 --- a/hal/rtl8188e_cmd.c +++ b/hal/rtl8188e_cmd.c @@ -222,8 +222,6 @@ void rtl8188e_Add_RateATid(struct adapter * pAdapter, u32 bitmap, u8 arg, u8 rss DBG_88E("%s=> mac_id:%d , raid:%d , ra_bitmap=0x%x, shortGIrate=0x%02x\n", __func__,macid ,raid ,bitmap, shortGIrate); - -#if (RATE_ADAPTIVE_SUPPORT == 1) ODM_RA_UpdateRateInfo_8188E( &(pHalData->odmpriv), macid, @@ -231,8 +229,6 @@ void rtl8188e_Add_RateATid(struct adapter * pAdapter, u32 bitmap, u8 arg, u8 rss bitmap, shortGIrate ); -#endif - } void rtl8188e_set_FwPwrMode_cmd(struct adapter * padapter, u8 Mode) diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 08e59c3..2d225b3 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -2456,9 +2456,7 @@ static void rtl8188e_SetHalODMVar( if (bSet){ DBG_88E("### Set STA_(%d) info\n",psta->mac_id); ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS,psta->mac_id,psta); - #if (RATE_ADAPTIVE_SUPPORT==1) ODM_RAInfo_Init(podmpriv,psta->mac_id); - #endif } else{ DBG_88E("### Clean STA_(%d) info\n",psta->mac_id); diff --git a/hal/rtl8188eu_xmit.c b/hal/rtl8188eu_xmit.c index 625bae5..3a5d1c2 100644 --- a/hal/rtl8188eu_xmit.c +++ b/hal/rtl8188eu_xmit.c @@ -293,7 +293,6 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag ptxdesc->txdw4 |= cpu_to_le32(0x00000008);/* RTS Rate=24M */ ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);/* DATA/RTS Rate FB LMT */ - #if (RATE_ADAPTIVE_SUPPORT == 1) if (pattrib->ht_en){ if ( ODM_RA_GetShortGI_8188E(&pHalData->odmpriv,pattrib->mac_id)) ptxdesc->txdw5 |= cpu_to_le32(SGI);/* SGI */ @@ -306,22 +305,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag pwr_status = ODM_RA_GetHwPwrStatus_8188E(&pHalData->odmpriv,pattrib->mac_id); ptxdesc->txdw4 |=cpu_to_le32( (pwr_status & 0x7)<< PWR_STATUS_SHT); #endif /* POWER_TRAINING_ACTIVE==1) */ - #else/* if (RATE_ADAPTIVE_SUPPORT == 1) */ - - if (pattrib->ht_en) - ptxdesc->txdw5 |= cpu_to_le32(SGI);/* SGI */ - - data_rate = 0x13; /* default rate: MCS7 */ - if (padapter->fix_rate!= 0xFF){/* rate control by iwpriv */ - data_rate = padapter->fix_rate; - } - ptxdesc->txdw5 |= cpu_to_le32(data_rate & 0x3F); - - #endif/* if (RATE_ADAPTIVE_SUPPORT == 1) */ - - } - else - { + } else { /* EAP data packet and ARP packet and DHCP. */ /* Use the 1M data rate to send the EAP/ARP packet. */ /* This will maybe make the handshake smooth. */ diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index 028873f..85b0a63 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -1321,17 +1321,14 @@ _func_enter_; _InitRDGSetting(Adapter); } -#if (RATE_ADAPTIVE_SUPPORT==1) - {/* Enable TX Report */ - /* Enable Tx Report Timer */ - value8 = rtw_read8(Adapter, REG_TX_RPT_CTRL); - rtw_write8(Adapter, REG_TX_RPT_CTRL, (value8|BIT1|BIT0)); - /* Set MAX RPT MACID */ - rtw_write8(Adapter, REG_TX_RPT_CTRL+1, 2);/* FOR sta mode ,0: bc/mc ,1:AP */ - /* Tx RPT Timer. Unit: 32us */ - rtw_write16(Adapter, REG_TX_RPT_TIME, 0xCdf0); - } -#endif + /* Enable TX Report */ + /* Enable Tx Report Timer */ + value8 = rtw_read8(Adapter, REG_TX_RPT_CTRL); + rtw_write8(Adapter, REG_TX_RPT_CTRL, (value8|BIT1|BIT0)); + /* Set MAX RPT MACID */ + rtw_write8(Adapter, REG_TX_RPT_CTRL+1, 2);/* FOR sta mode ,0: bc/mc ,1:AP */ + /* Tx RPT Timer. Unit: 32us */ + rtw_write16(Adapter, REG_TX_RPT_TIME, 0xCdf0); rtw_write8(Adapter, REG_EARLY_MODE_CONTROL, 0); @@ -2580,14 +2577,12 @@ _func_enter_; } break; #endif -#if (RATE_ADAPTIVE_SUPPORT==1) case HW_VAR_RPT_TIMER_SETTING: { u16 min_rpt_time = (*(u16 *)val); ODM_RA_Set_TxRPT_Time(podmpriv,min_rpt_time); } break; -#endif case HW_VAR_ANTENNA_DIVERSITY_SELECT: { u8 Optimum_antenna = (*(u8 *)val); @@ -2728,7 +2723,6 @@ _func_enter_; #endif /* CONFIG_WOWLAN */ - #if (RATE_ADAPTIVE_SUPPORT == 1) case HW_VAR_TX_RPT_MAX_MACID: { u8 maxMacid = *val; @@ -2736,7 +2730,6 @@ _func_enter_; rtw_write8(Adapter, REG_TX_RPT_CTRL+1, maxMacid+1); } break; - #endif case HW_VAR_H2C_MEDIA_STATUS_RPT: { rtl8188e_set_FwMediaStatus_cmd(Adapter , (*(__le16 *)val)); @@ -2863,7 +2856,6 @@ GetHalDefVar8188EUsb( 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); @@ -2876,7 +2868,6 @@ GetHalDefVar8188EUsb( *((u8*)pValue) = ODM_RA_GetShortGI_8188E(&(pHalData->odmpriv), MacID); } break; -#endif case HAL_DEF_PT_PWR_STATUS: #if (POWER_TRAINING_ACTIVE==1) { @@ -2889,7 +2880,6 @@ GetHalDefVar8188EUsb( *(( 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) @@ -2904,7 +2894,6 @@ GetHalDefVar8188EUsb( pHalData->odmpriv.RAInfo[entry_id].PTStage); } } -#endif /* RATE_ADAPTIVE_SUPPORT == 1) */ break; case HW_DEF_ODM_DBG_FLAG: { @@ -3123,9 +3112,6 @@ static void UpdateHalRAMask8188EUsb(struct adapter * padapter, u32 mac_id, u8 rs } else { - -#if (RATE_ADAPTIVE_SUPPORT == 1) - ODM_RA_UpdateRateInfo_8188E( &(pHalData->odmpriv), mac_id, @@ -3133,8 +3119,6 @@ static void UpdateHalRAMask8188EUsb(struct adapter * padapter, u32 mac_id, u8 rs mask, shortGIrate ); - -#endif } diff --git a/include/autoconf.h b/include/autoconf.h index 3284aec..202861c 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -82,7 +82,6 @@ #define RTL8188ES_SUPPORT 0 #define RTL8188E_SUPPORT (RTL8188EE_SUPPORT|RTL8188EU_SUPPORT|RTL8188ES_SUPPORT) #define RTL8188E_FOR_TEST_CHIP 0 -#define RATE_ADAPTIVE_SUPPORT 1 #define POWER_TRAINING_ACTIVE 1 /* diff --git a/include/odm.h b/include/odm.h index dfb4422..76d6435 100644 --- a/include/odm.h +++ b/include/odm.h @@ -929,10 +929,8 @@ struct odm_dm_struct { // 2012/01/12 MH For MP, we need to reduce one array pointer for default port.?? struct sta_info *pODM_StaInfo[ODM_ASSOCIATE_ENTRY_NUM]; -#if (RATE_ADAPTIVE_SUPPORT == 1) u2Byte CurrminRptTime; struct odm_ra_info RAInfo[ODM_ASSOCIATE_ENTRY_NUM]; //Use MacID as array index. STA MacID=0, VWiFi Client MacID={1, ODM_ASSOCIATE_ENTRY_NUM-1} //YJ,add,120119 -#endif // // 2012/02/14 MH Add to share 88E ra with other SW team. // We need to colelct all support abilit to a proper area. diff --git a/include/rtw_cmd.h b/include/rtw_cmd.h index b0c959f..3c1565f 100644 --- a/include/rtw_cmd.h +++ b/include/rtw_cmd.h @@ -816,9 +816,7 @@ extern u8 rtw_addbareq_cmd(struct adapter*padapter, u8 tid, u8 *addr); extern u8 rtw_dynamic_chk_wk_cmd(struct adapter *adapter); u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue); -#if (RATE_ADAPTIVE_SUPPORT==1) u8 rtw_rpt_timer_cfg_cmd(struct adapter*padapter, u16 minRptTime); -#endif extern u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna,u8 enqueue); extern u8 rtw_ps_cmd(struct adapter*padapter);