summaryrefslogtreecommitdiffstats
path: root/bcmdhd/wifi_hal
diff options
context:
space:
mode:
authorChilam Ng <chilam@broadcom.com>2014-07-23 18:21:22 -0700
committervandwalle <vandwalle@google.com>2014-08-25 10:08:53 -0700
commitb0a46db6eb1f18c6345f6f8c07f0aabff7ad6623 (patch)
treebf77acbb80fe4ba840142208506c599c44cdc6f3 /bcmdhd/wifi_hal
parentbd06406dceb430cca32ae2aa195fbf37b10d58b0 (diff)
downloadhardware_broadcom_wlan-b0a46db6eb1f18c6345f6f8c07f0aabff7ad6623.zip
hardware_broadcom_wlan-b0a46db6eb1f18c6345f6f8c07f0aabff7ad6623.tar.gz
hardware_broadcom_wlan-b0a46db6eb1f18c6345f6f8c07f0aabff7ad6623.tar.bz2
halutil updates for link layer statistics
Change-Id: I49ab526d42b9083b8a1c2e7568d7ed9a45f492d8 Signed-off-by: Chilam Ng <chilam@broadcom.com>
Diffstat (limited to 'bcmdhd/wifi_hal')
-rw-r--r--bcmdhd/wifi_hal/link_layer_stats.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/bcmdhd/wifi_hal/link_layer_stats.cpp b/bcmdhd/wifi_hal/link_layer_stats.cpp
index 82c5502..3226da8 100644
--- a/bcmdhd/wifi_hal/link_layer_stats.cpp
+++ b/bcmdhd/wifi_hal/link_layer_stats.cpp
@@ -40,7 +40,7 @@ public:
{ }
virtual int create() {
- // ALOGD("Creating message to get link statistics; iface = %d", mIfaceInfo->id);
+ // ALOGI("Creating message to get link statistics; iface = %d", mIfaceInfo->id);
int ret = mMsg.create(GOOGLE_OUI, LSTATS_SUBCMD_GET_INFO);
if (ret < 0) {
@@ -54,7 +54,7 @@ public:
protected:
virtual int handleResponse(WifiEvent& reply) {
- // ALOGD("In GetLinkStatsCommand::handleResponse");
+ // ALOGI("In GetLinkStatsCommand::handleResponse");
if (reply.get_cmd() != NL80211_CMD_VENDOR) {
ALOGD("Ignoring reply with cmd = %d", reply.get_cmd());
@@ -64,16 +64,19 @@ protected:
int id = reply.get_vendor_id();
int subcmd = reply.get_vendor_subcmd();
- // ALOGD("Id = %0x, subcmd = %d", id, subcmd);
+ // ALOGI("Id = %0x, subcmd = %d", id, subcmd);
void *data = reply.get_vendor_data();
int len = reply.get_vendor_data_len();
-
- if (len == sizeof(wifi_iface_stat)) {
- (*mHandler.on_link_stats_results)(id, (wifi_iface_stat *)data, 1, NULL);
- } else {
- ALOGE("Invalid reply length: %d", len);
+ int num_chan = ((wifi_radio_stat *)data)->num_channels;
+ if (num_chan > 32) {
+ ALOGE("Incorrect number of channels = %d", num_chan);
+ return NL_SKIP;
}
+ (*mHandler.on_link_stats_results)(id,
+ (wifi_iface_stat *)((char *)&((wifi_radio_stat *)data)->channels
+ + num_chan*sizeof(wifi_channel_stat)),
+ 1, (wifi_radio_stat *)data);
return NL_OK;
}