Pārlūkot izejas kodu

qcacld-3.0: Send the data rate in mbps for SAP big data

Currently host driver sends the data rate of connected
peer in the units of kbps whereas user space expects the
data rate to be in the units of mbps.

To address above issue, add a change in the host driver
to send the data rate in the units of mbps.

Change-Id: I022659f1cd16ff62dc5b9379405c35c651381e4f
CRs-Fixed: 2688150
Ashish Kumar Dhanotiya 4 gadi atpakaļ
vecāks
revīzija
2779e62274
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4 2
      core/hdd/src/wlan_hdd_station_info.c

+ 4 - 2
core/hdd/src/wlan_hdd_station_info.c

@@ -1135,11 +1135,13 @@ static int hdd_get_cached_station_remote(struct hdd_context *hdd_ctx,
 		hdd_err("remote ch put fail");
 		goto fail;
 	}
-	if (nla_put_u32(skb, REMOTE_LAST_TX_RATE, stainfo->tx_rate)) {
+	/* Convert the data from kbps to mbps as expected by the user space */
+	if (nla_put_u32(skb, REMOTE_LAST_TX_RATE, stainfo->tx_rate / 1000)) {
 		hdd_err("tx rate put fail");
 		goto fail;
 	}
-	if (nla_put_u32(skb, REMOTE_LAST_RX_RATE, stainfo->rx_rate)) {
+	/* Convert the data from kbps to mbps as expected by the user space */
+	if (nla_put_u32(skb, REMOTE_LAST_RX_RATE, stainfo->rx_rate / 1000)) {
 		hdd_err("rx rate put fail");
 		goto fail;
 	}