mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacmn: Init average rssi with frames rssi on receipt
Initialize average rssi with instantaneous rssi in util_scan_unpack_beacon_frame intead of marking it as DUMMY. Change-Id: Ie2fd577feeb46d61915c6974d8c627acb31e8b81 CRs-Fixed: 2096979
This commit is contained in:
parent
fe1abe8c70
commit
6af738bb71
2 changed files with 5 additions and 5 deletions
|
|
@ -425,12 +425,12 @@ static void scm_delete_duplicate_entry(struct scan_dbs *scan_db,
|
|||
/* If elapsed time since last rssi update for this
|
||||
* entry is smaller than a thresold, calculate a
|
||||
* running average of the RSSI values.
|
||||
* Otherwise last RSSI is more representive of the
|
||||
* signal strength.
|
||||
* Otherwise new frames RSSI is more representive
|
||||
* of the signal strength.
|
||||
*/
|
||||
time_gap =
|
||||
scan_entry->rssi_timestamp -
|
||||
scan_params->rssi_timestamp;
|
||||
scan_params->scan_entry_time -
|
||||
scan_entry->rssi_timestamp;
|
||||
if (time_gap > WLAN_RSSI_AVERAGING_TIME)
|
||||
scan_params->avg_rssi =
|
||||
WLAN_RSSI_IN(scan_params->rssi_raw);
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ util_scan_unpack_beacon_frame(uint8_t *frame,
|
|||
(le16toh(*(uint16_t *)hdr->i_seq) >> WLAN_SEQ_SEQ_SHIFT);
|
||||
|
||||
scan_entry->rssi_raw = rx_param->rssi;
|
||||
scan_entry->avg_rssi = WLAN_RSSI_DUMMY_MARKER;
|
||||
scan_entry->avg_rssi = WLAN_RSSI_IN(scan_entry->rssi_raw);
|
||||
scan_entry->tsf_delta = rx_param->tsf_delta;
|
||||
|
||||
/* store jiffies */
|
||||
|
|
|
|||
Loading…
Reference in a new issue