浏览代码

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 年之前
父节点
当前提交
2779e62274
共有 1 个文件被更改,包括 4 次插入2 次删除
  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;
 	}