qcacmn: Populate proper rates received by FW
Due to unknown legacy reason, the rates received by the driver from the firmware are currently divided by 500 to convert it into units of 500kbps. This division by 500 is later compensated by a multiplication with 5 to maintain units of 100kbps before being sent to the upper layer. This division and then subsequent multiplication results in the loss of precision (in the case the rate is not divisible by 5). Consequently, the rate being sent to the upper layer becomes inaccurate. Also the calculation of the MCS rate flags is affected. Do not carry out the unnecessary division and multiplication by 5. Instead just convert the rates into units of 100kbps (which is as mandated by the kernel) when driver receives the rate from the firmware. Change-Id: Iab7b825f4067ad51174a0c545cf4a7d0ab426171 CRs-Fixed: 2378167
This commit is contained in:

کامیت شده توسط
nshrivas

والد
f40ae2631e
کامیت
195164b7bb
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -571,10 +571,10 @@ tgt_mc_cp_stats_prepare_n_send_raw_station_stats(struct wlan_objmgr_psoc *psoc,
|
||||
peer_mc_stats = peer_cp_stats_priv->peer_stats;
|
||||
/*
|
||||
* The linkspeed returned by fw is in kbps so convert
|
||||
* it in units of 500kbps which is expected by UMAC
|
||||
* it in units of 100kbps which is expected by UMAC
|
||||
*/
|
||||
info.tx_rate = peer_mc_stats->tx_rate / 500;
|
||||
info.rx_rate = peer_mc_stats->rx_rate / 500;
|
||||
info.tx_rate = peer_mc_stats->tx_rate / 100;
|
||||
info.rx_rate = peer_mc_stats->rx_rate / 100;
|
||||
wlan_cp_stats_peer_obj_unlock(peer_cp_stats_priv);
|
||||
|
||||
end:
|
||||
|
مرجع در شماره جدید
Block a user