staging: rtl8723au: recv_priv.is_signal_dbg is never set
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2af7f0b611
commit
707ce72f97
|
@ -2314,66 +2314,54 @@ void rtw_signal_stat_timer_hdl23a(unsigned long data)
|
|||
u8 _alpha = 3; /* this value is based on converging_constant = 5000 */
|
||||
/* and sampling_interval = 1000 */
|
||||
|
||||
if (adapter->recvpriv.is_signal_dbg) {
|
||||
/* update the user specific value, signal_strength_dbg, */
|
||||
/* to signal_strength, rssi */
|
||||
adapter->recvpriv.signal_strength =
|
||||
adapter->recvpriv.signal_strength_dbg;
|
||||
adapter->recvpriv.rssi =
|
||||
(s8)translate_percentage_to_dbm((u8)adapter->recvpriv.signal_strength_dbg);
|
||||
} else {
|
||||
if (recvpriv->signal_strength_data.update_req == 0) {
|
||||
/* update_req is clear, means we got rx */
|
||||
avg_signal_strength =
|
||||
recvpriv->signal_strength_data.avg_val;
|
||||
num_signal_strength =
|
||||
recvpriv->signal_strength_data.total_num;
|
||||
/* after avg_vals are acquired, we can re-stat */
|
||||
/* the signal values */
|
||||
recvpriv->signal_strength_data.update_req = 1;
|
||||
}
|
||||
|
||||
if (recvpriv->signal_qual_data.update_req == 0) {
|
||||
/* update_req is clear, means we got rx */
|
||||
avg_signal_qual = recvpriv->signal_qual_data.avg_val;
|
||||
num_signal_qual = recvpriv->signal_qual_data.total_num;
|
||||
/* after avg_vals are acquired, we can re-stat */
|
||||
/*the signal values */
|
||||
recvpriv->signal_qual_data.update_req = 1;
|
||||
}
|
||||
|
||||
/* update value of signal_strength, rssi, signal_qual */
|
||||
if (!check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY)) {
|
||||
tmp_s = (avg_signal_strength + (_alpha - 1) *
|
||||
recvpriv->signal_strength);
|
||||
if (tmp_s %_alpha)
|
||||
tmp_s = tmp_s / _alpha + 1;
|
||||
else
|
||||
tmp_s = tmp_s / _alpha;
|
||||
if (tmp_s > 100)
|
||||
tmp_s = 100;
|
||||
|
||||
tmp_q = (avg_signal_qual + (_alpha - 1) *
|
||||
recvpriv->signal_qual);
|
||||
if (tmp_q %_alpha)
|
||||
tmp_q = tmp_q / _alpha + 1;
|
||||
else
|
||||
tmp_q = tmp_q / _alpha;
|
||||
if (tmp_q > 100)
|
||||
tmp_q = 100;
|
||||
|
||||
recvpriv->signal_strength = tmp_s;
|
||||
recvpriv->rssi = (s8)translate_percentage_to_dbm(tmp_s);
|
||||
recvpriv->signal_qual = tmp_q;
|
||||
|
||||
DBG_8723A("%s signal_strength:%3u, rssi:%3d, "
|
||||
"signal_qual:%3u, num_signal_strength:%u, "
|
||||
"num_signal_qual:%u\n",
|
||||
__func__, recvpriv->signal_strength,
|
||||
recvpriv->rssi, recvpriv->signal_qual,
|
||||
num_signal_strength, num_signal_qual
|
||||
);
|
||||
}
|
||||
if (recvpriv->signal_strength_data.update_req == 0) {
|
||||
/* update_req is clear, means we got rx */
|
||||
avg_signal_strength = recvpriv->signal_strength_data.avg_val;
|
||||
num_signal_strength = recvpriv->signal_strength_data.total_num;
|
||||
/* after avg_vals are acquired, we can re-stat */
|
||||
/* the signal values */
|
||||
recvpriv->signal_strength_data.update_req = 1;
|
||||
}
|
||||
|
||||
if (recvpriv->signal_qual_data.update_req == 0) {
|
||||
/* update_req is clear, means we got rx */
|
||||
avg_signal_qual = recvpriv->signal_qual_data.avg_val;
|
||||
num_signal_qual = recvpriv->signal_qual_data.total_num;
|
||||
/* after avg_vals are acquired, we can re-stat */
|
||||
/*the signal values */
|
||||
recvpriv->signal_qual_data.update_req = 1;
|
||||
}
|
||||
|
||||
/* update value of signal_strength, rssi, signal_qual */
|
||||
if (!check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY)) {
|
||||
tmp_s = (avg_signal_strength + (_alpha - 1) *
|
||||
recvpriv->signal_strength);
|
||||
if (tmp_s %_alpha)
|
||||
tmp_s = tmp_s / _alpha + 1;
|
||||
else
|
||||
tmp_s = tmp_s / _alpha;
|
||||
if (tmp_s > 100)
|
||||
tmp_s = 100;
|
||||
|
||||
tmp_q = avg_signal_qual + (_alpha - 1) * recvpriv->signal_qual;
|
||||
if (tmp_q %_alpha)
|
||||
tmp_q = tmp_q / _alpha + 1;
|
||||
else
|
||||
tmp_q = tmp_q / _alpha;
|
||||
if (tmp_q > 100)
|
||||
tmp_q = 100;
|
||||
|
||||
recvpriv->signal_strength = tmp_s;
|
||||
recvpriv->rssi = (s8)translate_percentage_to_dbm(tmp_s);
|
||||
recvpriv->signal_qual = tmp_q;
|
||||
|
||||
DBG_8723A("%s signal_strength:%3u, rssi:%3d, "
|
||||
"signal_qual:%3u, num_signal_strength:%u, "
|
||||
"num_signal_qual:%u\n",
|
||||
__func__, recvpriv->signal_strength,
|
||||
recvpriv->rssi, recvpriv->signal_qual,
|
||||
num_signal_strength, num_signal_qual);
|
||||
}
|
||||
|
||||
rtw_set_signal_stat_timer(recvpriv);
|
||||
}
|
||||
|
|
|
@ -200,8 +200,6 @@ struct recv_priv {
|
|||
u8 *precv_buf;
|
||||
|
||||
/* For display the phy informatiom */
|
||||
u8 is_signal_dbg; /* for debug */
|
||||
u8 signal_strength_dbg; /* for debug */
|
||||
s8 rssi;
|
||||
s8 rxpwdb;
|
||||
u8 signal_strength;
|
||||
|
|
Loading…
Reference in New Issue