mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: CONFIG_NEW_SIGNAL_STAT_PROCESS is always selected
The configuration cariable is removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
8fbf5c37a9
commit
07a90aac3f
6 changed files with 11 additions and 123 deletions
|
@ -1032,24 +1032,16 @@ _func_enter_;
|
|||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("nic status =%x, survey done event comes too late!\n", get_fwstate(pmlmepriv)));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||
#endif
|
||||
|
||||
if (pmlmepriv->to_join == true)
|
||||
{
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true) )
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)==false)
|
||||
{
|
||||
if (pmlmepriv->to_join == true) {
|
||||
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true) ) {
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)==false) {
|
||||
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
if (rtw_select_and_join_from_scanned_queue(pmlmepriv)==_SUCCESS)
|
||||
{
|
||||
if (rtw_select_and_join_from_scanned_queue(pmlmepriv)==_SUCCESS) {
|
||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT );
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
WLAN_BSSID_EX *pdev_network = &(adapter->registrypriv.dev_network);
|
||||
u8 *pibss = adapter->registrypriv.dev_network.MacAddress;
|
||||
|
||||
|
@ -1073,29 +1065,21 @@ _func_enter_;
|
|||
pmlmepriv->to_join = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
int s_ret;
|
||||
set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
|
||||
pmlmepriv->to_join = false;
|
||||
if (_SUCCESS == (s_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv)))
|
||||
{
|
||||
if (_SUCCESS == (s_ret=rtw_select_and_join_from_scanned_queue(pmlmepriv))) {
|
||||
_set_timer(&pmlmepriv->assoc_timer, MAX_JOIN_TIMEOUT);
|
||||
}
|
||||
else if (s_ret == 2)/* there is no need to wait for join */
|
||||
{
|
||||
} else if (s_ret == 2) { /* there is no need to wait for join */
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
rtw_indicate_connect(adapter);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
DBG_88E("try_to_join, but select scanning queue fail, to_roaming:%d\n", pmlmepriv->to_roaming);
|
||||
|
||||
if (pmlmepriv->to_roaming!=0) {
|
||||
if ( --pmlmepriv->to_roaming == 0
|
||||
|| _SUCCESS != rtw_sitesurvey_cmd(adapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)
|
||||
) {
|
||||
if (--pmlmepriv->to_roaming == 0 ||
|
||||
_SUCCESS != rtw_sitesurvey_cmd(adapter, &pmlmepriv->assoc_ssid, 1, NULL, 0)) {
|
||||
pmlmepriv->to_roaming = 0;
|
||||
rtw_free_assoc_resources(adapter, 1);
|
||||
rtw_indicate_disconnect(adapter);
|
||||
|
@ -1480,9 +1464,7 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network *
|
|||
cur_network->aid = pnetwork->join_res;
|
||||
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||
#endif
|
||||
padapter->recvpriv.signal_strength = ptarget_wlan->network.PhyInfo.SignalStrength;
|
||||
padapter->recvpriv.signal_qual = ptarget_wlan->network.PhyInfo.SignalQuality;
|
||||
/* the ptarget_wlan->network.Rssi is raw data, we use ptarget_wlan->network.PhyInfo.SignalStrength instead (has scaled) */
|
||||
|
@ -1496,9 +1478,7 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network *
|
|||
, padapter->recvpriv.signal_qual
|
||||
);
|
||||
#endif
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||
#endif
|
||||
|
||||
/* update fw_state will clr _FW_UNDER_LINKING here indirectly */
|
||||
switch (pnetwork->network.InfrastructureMode)
|
||||
|
|
|
@ -30,10 +30,7 @@
|
|||
#include <wifi.h>
|
||||
#include <circ_buf.h>
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
|
||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
||||
|
||||
|
||||
void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
|
||||
{
|
||||
|
@ -104,14 +101,11 @@ _func_enter_;
|
|||
|
||||
res = rtw_hal_init_recv_priv(padapter);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
_init_timer(&precvpriv->signal_stat_timer, padapter->pnetdev, RTW_TIMER_HDL_NAME(signal_stat), padapter);
|
||||
|
||||
precvpriv->signal_stat_sampling_interval = 1000; /* ms */
|
||||
|
||||
rtw_set_signal_stat_timer(precvpriv);
|
||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
||||
|
||||
exit:
|
||||
|
||||
_func_exit_;
|
||||
|
@ -2983,7 +2977,6 @@ _func_exit_;
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
struct recv_priv *recvpriv = &adapter->recvpriv;
|
||||
|
@ -3061,4 +3054,3 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
|||
rtw_set_signal_stat_timer(recvpriv);
|
||||
|
||||
}
|
||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
||||
|
|
|
@ -41,13 +41,10 @@ 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 */
|
||||
|
||||
{
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
if (signal_stat->update_req) {
|
||||
signal_stat->total_num = 0;
|
||||
signal_stat->total_val = 0;
|
||||
|
@ -57,57 +54,23 @@ static void process_rssi(_adapter *padapter,union recv_frame *prframe)
|
|||
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 */
|
||||
|
||||
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 */
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
if (signal_stat->update_req) {
|
||||
signal_stat->total_num = 0;
|
||||
signal_stat->total_val = 0;
|
||||
|
@ -117,38 +80,6 @@ static void process_link_qual(_adapter *padapter,union recv_frame *prframe)
|
|||
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, void *prframe)
|
||||
|
|
|
@ -99,7 +99,6 @@
|
|||
|
||||
#define CONFIG_SKB_COPY //for amsdu
|
||||
|
||||
#define CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
|
||||
|
||||
#define CONFIG_BR_EXT // Enable NAT2.5 support for STA mode interface with a L2 Bridge
|
||||
|
|
|
@ -249,22 +249,13 @@ struct recv_priv
|
|||
s8 RxRssi[2];
|
||||
int FalseAlmCnt_all;
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
_timer signal_stat_timer;
|
||||
u32 signal_stat_sampling_interval;
|
||||
//u32 signal_stat_converging_constant;
|
||||
struct signal_stat signal_qual_data;
|
||||
struct signal_stat signal_strength_data;
|
||||
#else //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
struct smooth_rssi_data signal_qual_data;
|
||||
struct smooth_rssi_data signal_strength_data;
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#define rtw_set_signal_stat_timer(recvpriv) _set_timer(&(recvpriv)->signal_stat_timer, (recvpriv)->signal_stat_sampling_interval)
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
struct sta_recv_priv {
|
||||
|
||||
|
|
|
@ -1113,14 +1113,11 @@ u8 rtw_reset_drv_sw(_adapter *padapter)
|
|||
//mlmeextpriv
|
||||
padapter->mlmeextpriv.sitesurvey_res.state= SCAN_DISABLE;
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||
#endif
|
||||
|
||||
return ret8;
|
||||
}
|
||||
|
||||
|
||||
u8 rtw_init_drv_sw(_adapter *padapter)
|
||||
{
|
||||
u8 ret8=_SUCCESS;
|
||||
|
@ -1256,9 +1253,7 @@ void rtw_cancel_all_timer(_adapter *padapter)
|
|||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel set_scan_deny_timer!\n"));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
_cancel_timer_ex(&padapter->recvpriv.signal_stat_timer);
|
||||
#endif
|
||||
#if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST)
|
||||
if (padapter->HalFunc.hal_cancel_checkbthang_workqueue)
|
||||
padapter->HalFunc.hal_cancel_checkbthang_workqueue(padapter);
|
||||
|
|
Loading…
Reference in a new issue