mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-14 00:59:37 +00:00
rtl8188eu: Remove CONFIG_NEW_SIGNAL_STAT_PROCESS
This symbol is always defined. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
73821a9a55
commit
1a2d9b8514
6 changed files with 7 additions and 114 deletions
|
@ -1100,9 +1100,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||||
#endif
|
|
||||||
|
|
||||||
if(pmlmepriv->to_join == true)
|
if(pmlmepriv->to_join == true)
|
||||||
{
|
{
|
||||||
|
@ -1630,9 +1628,7 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
|
||||||
cur_network->aid = pnetwork->join_res;
|
cur_network->aid = pnetwork->join_res;
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||||
#endif
|
|
||||||
padapter->recvpriv.signal_strength = ptarget_wlan->network.PhyInfo.SignalStrength;
|
padapter->recvpriv.signal_strength = ptarget_wlan->network.PhyInfo.SignalStrength;
|
||||||
padapter->recvpriv.signal_qual = ptarget_wlan->network.PhyInfo.SignalQuality;
|
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) */
|
/* the ptarget_wlan->network.Rssi is raw data, we use ptarget_wlan->network.PhyInfo.SignalStrength instead (has scaled) */
|
||||||
|
@ -1646,9 +1642,7 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
|
||||||
, padapter->recvpriv.signal_qual
|
, padapter->recvpriv.signal_qual
|
||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* update fw_state will clr _FW_UNDER_LINKING here indirectly */
|
/* update fw_state will clr _FW_UNDER_LINKING here indirectly */
|
||||||
switch(pnetwork->network.InfrastructureMode)
|
switch(pnetwork->network.InfrastructureMode)
|
||||||
|
|
|
@ -36,9 +36,7 @@
|
||||||
#include <wifi.h>
|
#include <wifi.h>
|
||||||
#include <circ_buf.h>
|
#include <circ_buf.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
|
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)
|
void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
|
||||||
|
@ -119,20 +117,14 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
|
||||||
_rtw_init_sema(&precvpriv->allrxreturnevt, 0);
|
_rtw_init_sema(&precvpriv->allrxreturnevt, 0);
|
||||||
res = rtw_hal_init_recv_priv(padapter);
|
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);
|
_init_timer(&precvpriv->signal_stat_timer, padapter->pnetdev, RTW_TIMER_HDL_NAME(signal_stat), padapter);
|
||||||
|
|
||||||
precvpriv->signal_stat_sampling_interval = 1000; /* ms */
|
precvpriv->signal_stat_sampling_interval = 1000; /* ms */
|
||||||
|
|
||||||
rtw_set_signal_stat_timer(precvpriv);
|
rtw_set_signal_stat_timer(precvpriv);
|
||||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv);
|
void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv);
|
||||||
|
@ -3495,7 +3487,6 @@ _recv_entry_drop:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
||||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||||
struct recv_priv *recvpriv = &adapter->recvpriv;
|
struct recv_priv *recvpriv = &adapter->recvpriv;
|
||||||
|
@ -3584,4 +3575,3 @@ set_timer:
|
||||||
rtw_set_signal_stat_timer(recvpriv);
|
rtw_set_signal_stat_timer(recvpriv);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
|
||||||
|
|
|
@ -41,15 +41,9 @@ static void process_rssi(struct adapter *padapter,union recv_frame *prframe)
|
||||||
{
|
{
|
||||||
u32 last_rssi, tmp_val;
|
u32 last_rssi, tmp_val;
|
||||||
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
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;
|
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) {
|
if(signal_stat->update_req) {
|
||||||
signal_stat->total_num = 0;
|
signal_stat->total_num = 0;
|
||||||
signal_stat->total_val = 0;
|
signal_stat->total_val = 0;
|
||||||
|
@ -59,59 +53,21 @@ static void process_rssi(struct adapter *padapter,union recv_frame *prframe)
|
||||||
signal_stat->total_num++;
|
signal_stat->total_num++;
|
||||||
signal_stat->total_val += pattrib->phy_info.SignalStrength;
|
signal_stat->total_val += pattrib->phy_info.SignalStrength;
|
||||||
signal_stat->avg_val = signal_stat->total_val / signal_stat->total_num;
|
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 */
|
}/* Process_UI_RSSI_8192C */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void process_link_qual(struct adapter *padapter,union recv_frame *prframe)
|
static void process_link_qual(struct adapter *padapter,union recv_frame *prframe)
|
||||||
{
|
{
|
||||||
u32 last_evm=0, tmpVal;
|
u32 last_evm=0, tmpVal;
|
||||||
struct rx_pkt_attrib *pattrib;
|
struct rx_pkt_attrib *pattrib;
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
struct signal_stat * signal_stat;
|
struct signal_stat * signal_stat;
|
||||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
|
||||||
|
|
||||||
if(prframe == NULL || padapter==NULL){
|
if(prframe == NULL || padapter==NULL){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pattrib = &prframe->u.hdr.attrib;
|
pattrib = &prframe->u.hdr.attrib;
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
signal_stat = &padapter->recvpriv.signal_qual_data;
|
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) {
|
if(signal_stat->update_req) {
|
||||||
signal_stat->total_num = 0;
|
signal_stat->total_num = 0;
|
||||||
signal_stat->total_val = 0;
|
signal_stat->total_val = 0;
|
||||||
|
@ -121,38 +77,6 @@ static void process_link_qual(struct adapter *padapter,union recv_frame *prframe
|
||||||
signal_stat->total_num++;
|
signal_stat->total_num++;
|
||||||
signal_stat->total_val += pattrib->phy_info.SignalQuality;
|
signal_stat->total_val += pattrib->phy_info.SignalQuality;
|
||||||
signal_stat->avg_val = signal_stat->total_val / signal_stat->total_num;
|
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(struct adapter *padapter, union recv_frame *prframe) */
|
/* void rtl8188e_process_phy_info(struct adapter *padapter, union recv_frame *prframe) */
|
||||||
|
|
|
@ -69,7 +69,6 @@
|
||||||
#define USB_INTERFERENCE_ISSUE // this should be checked in all usb interface
|
#define USB_INTERFERENCE_ISSUE // this should be checked in all usb interface
|
||||||
#define CONFIG_GLOBAL_UI_PID
|
#define CONFIG_GLOBAL_UI_PID
|
||||||
|
|
||||||
#define CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
#define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
|
#define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
|
||||||
#define CONFIG_DEAUTH_BEFORE_CONNECT
|
#define CONFIG_DEAUTH_BEFORE_CONNECT
|
||||||
|
|
||||||
|
|
|
@ -274,22 +274,13 @@ struct recv_priv
|
||||||
s8 RxRssi[2];
|
s8 RxRssi[2];
|
||||||
int FalseAlmCnt_all;
|
int FalseAlmCnt_all;
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
_timer signal_stat_timer;
|
_timer signal_stat_timer;
|
||||||
u32 signal_stat_sampling_interval;
|
u32 signal_stat_sampling_interval;
|
||||||
//u32 signal_stat_converging_constant;
|
|
||||||
struct signal_stat signal_qual_data;
|
struct signal_stat signal_qual_data;
|
||||||
struct signal_stat signal_strength_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)
|
#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 {
|
struct sta_recv_priv {
|
||||||
|
|
||||||
|
|
|
@ -863,14 +863,11 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
|
||||||
/* mlmeextpriv */
|
/* mlmeextpriv */
|
||||||
padapter->mlmeextpriv.sitesurvey_res.state= SCAN_DISABLE;
|
padapter->mlmeextpriv.sitesurvey_res.state= SCAN_DISABLE;
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||||
#endif
|
|
||||||
|
|
||||||
return ret8;
|
return ret8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u8 rtw_init_drv_sw(struct adapter *padapter)
|
u8 rtw_init_drv_sw(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1041,9 +1038,7 @@ void rtw_cancel_all_timer(struct adapter *padapter)
|
||||||
rtw_clear_scan_deny(padapter);
|
rtw_clear_scan_deny(padapter);
|
||||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel set_scan_deny_timer! \n"));
|
RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel set_scan_deny_timer! \n"));
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
|
||||||
_cancel_timer_ex(&padapter->recvpriv.signal_stat_timer);
|
_cancel_timer_ex(&padapter->recvpriv.signal_stat_timer);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
#ifdef CONFIG_DETECT_C2H_BY_POLLING
|
||||||
_cancel_timer_ex(&padapter->mlmepriv.event_polling_timer);
|
_cancel_timer_ex(&padapter->mlmepriv.event_polling_timer);
|
||||||
|
|
Loading…
Reference in a new issue