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:
Jes Sorensen 2014-11-30 16:04:52 -05:00 committed by Greg Kroah-Hartman
parent 2af7f0b611
commit 707ce72f97
2 changed files with 48 additions and 62 deletions

View File

@ -2314,66 +2314,54 @@ void rtw_signal_stat_timer_hdl23a(unsigned long data)
u8 _alpha = 3; /* this value is based on converging_constant = 5000 */ u8 _alpha = 3; /* this value is based on converging_constant = 5000 */
/* and sampling_interval = 1000 */ /* and sampling_interval = 1000 */
if (adapter->recvpriv.is_signal_dbg) { if (recvpriv->signal_strength_data.update_req == 0) {
/* update the user specific value, signal_strength_dbg, */ /* update_req is clear, means we got rx */
/* to signal_strength, rssi */ avg_signal_strength = recvpriv->signal_strength_data.avg_val;
adapter->recvpriv.signal_strength = num_signal_strength = recvpriv->signal_strength_data.total_num;
adapter->recvpriv.signal_strength_dbg; /* after avg_vals are acquired, we can re-stat */
adapter->recvpriv.rssi = /* the signal values */
(s8)translate_percentage_to_dbm((u8)adapter->recvpriv.signal_strength_dbg); recvpriv->signal_strength_data.update_req = 1;
} 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_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); rtw_set_signal_stat_timer(recvpriv);
} }

View File

@ -200,8 +200,6 @@ struct recv_priv {
u8 *precv_buf; u8 *precv_buf;
/* For display the phy informatiom */ /* For display the phy informatiom */
u8 is_signal_dbg; /* for debug */
u8 signal_strength_dbg; /* for debug */
s8 rssi; s8 rssi;
s8 rxpwdb; s8 rxpwdb;
u8 signal_strength; u8 signal_strength;