summaryrefslogtreecommitdiffstats
path: root/bcmdhd/wifi_hal
diff options
context:
space:
mode:
Diffstat (limited to 'bcmdhd/wifi_hal')
-rw-r--r--bcmdhd/wifi_hal/Android.mk8
-rw-r--r--bcmdhd/wifi_hal/common.cpp18
-rw-r--r--bcmdhd/wifi_hal/gscan.cpp18
-rw-r--r--bcmdhd/wifi_hal/wifi_hal.cpp15
-rw-r--r--bcmdhd/wifi_hal/wifi_logger.cpp1
5 files changed, 28 insertions, 32 deletions
diff --git a/bcmdhd/wifi_hal/Android.mk b/bcmdhd/wifi_hal/Android.mk
index aa6af3f..bb8514a 100644
--- a/bcmdhd/wifi_hal/Android.mk
+++ b/bcmdhd/wifi_hal/Android.mk
@@ -18,16 +18,10 @@ LOCAL_PATH := $(call my-dir)
# ============================================================
include $(CLEAR_VARS)
-LOCAL_REQUIRED_MODULES :=
-
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast
-LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses
-LOCAL_CPPFLAGS += -Wno-conversion-null
+LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_C_INCLUDES += \
external/libnl/include \
- external/stlport/stlport \
- bionic \
$(call include-path-for, libhardware_legacy)/hardware_legacy \
external/wpa_supplicant_8/src/drivers
diff --git a/bcmdhd/wifi_hal/common.cpp b/bcmdhd/wifi_hal/common.cpp
index 91d45dc..61f4475 100644
--- a/bcmdhd/wifi_hal/common.cpp
+++ b/bcmdhd/wifi_hal/common.cpp
@@ -52,7 +52,7 @@ wifi_error wifi_register_handler(wifi_handle handle, int cmd, nl_recvmsg_msg_cb_
info->event_cb[info->num_event_cb].vendor_subcmd = 0;
info->event_cb[info->num_event_cb].cb_func = func;
info->event_cb[info->num_event_cb].cb_arg = arg;
- ALOGI("Successfully added event handler %p:%p for command %d at %d",
+ ALOGV("Successfully added event handler %p:%p for command %d at %d",
arg, func, cmd, info->num_event_cb);
info->num_event_cb++;
result = WIFI_SUCCESS;
@@ -78,7 +78,7 @@ wifi_error wifi_register_vendor_handler(wifi_handle handle,
info->event_cb[info->num_event_cb].vendor_subcmd = subcmd;
info->event_cb[info->num_event_cb].cb_func = func;
info->event_cb[info->num_event_cb].cb_arg = arg;
- ALOGI("Added event handler %p:%p for vendor 0x%0x and subcmd 0x%0x at %d",
+ ALOGV("Added event handler %p:%p for vendor 0x%0x and subcmd 0x%0x at %d",
arg, func, id, subcmd, info->num_event_cb);
info->num_event_cb++;
result = WIFI_SUCCESS;
@@ -101,7 +101,7 @@ void wifi_unregister_handler(wifi_handle handle, int cmd)
for (int i = 0; i < info->num_event_cb; i++) {
if (info->event_cb[i].nl_cmd == cmd) {
- ALOGI("Successfully removed event handler %p:%p for cmd = 0x%0x from %d",
+ ALOGV("Successfully removed event handler %p:%p for cmd = 0x%0x from %d",
info->event_cb[i].cb_arg, info->event_cb[i].cb_func, cmd, i);
memmove(&info->event_cb[i], &info->event_cb[i+1],
@@ -125,7 +125,7 @@ void wifi_unregister_vendor_handler(wifi_handle handle, uint32_t id, int subcmd)
if (info->event_cb[i].nl_cmd == NL80211_CMD_VENDOR
&& info->event_cb[i].vendor_id == id
&& info->event_cb[i].vendor_subcmd == subcmd) {
- ALOGI("Successfully removed event handler %p:%p for vendor 0x%0x, subcmd 0x%0x from %d",
+ ALOGV("Successfully removed event handler %p:%p for vendor 0x%0x, subcmd 0x%0x from %d",
info->event_cb[i].cb_arg, info->event_cb[i].cb_func, id, subcmd, i);
memmove(&info->event_cb[i], &info->event_cb[i+1],
(info->num_event_cb - i - 1) * sizeof(cb_info));
@@ -142,14 +142,14 @@ wifi_error wifi_register_cmd(wifi_handle handle, int id, WifiCommand *cmd)
{
hal_info *info = (hal_info *)handle;
- ALOGD("registering command %d", id);
+ ALOGV("registering command %d", id);
wifi_error result = WIFI_ERROR_OUT_OF_MEMORY;
if (info->num_cmd < info->alloc_cmd) {
info->cmd[info->num_cmd].id = id;
info->cmd[info->num_cmd].cmd = cmd;
- ALOGI("Successfully added command %d: %p at %d", id, cmd, info->num_cmd);
+ ALOGV("Successfully added command %d: %p at %d", id, cmd, info->num_cmd);
info->num_cmd++;
result = WIFI_SUCCESS;
}
@@ -161,7 +161,7 @@ WifiCommand *wifi_unregister_cmd(wifi_handle handle, int id)
{
hal_info *info = (hal_info *)handle;
- ALOGD("un-registering command %d", id);
+ ALOGV("un-registering command %d", id);
WifiCommand *cmd = NULL;
@@ -170,7 +170,7 @@ WifiCommand *wifi_unregister_cmd(wifi_handle handle, int id)
cmd = info->cmd[i].cmd;
memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i) * sizeof(cmd_info));
info->num_cmd--;
- ALOGI("Successfully removed command %d: %p from %d", id, cmd, i);
+ ALOGV("Successfully removed command %d: %p from %d", id, cmd, i);
break;
}
}
@@ -203,7 +203,7 @@ void wifi_unregister_cmd(wifi_handle handle, WifiCommand *cmd)
int id = info->cmd[i].id;
memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i) * sizeof(cmd_info));
info->num_cmd--;
- ALOGI("Successfully removed command %d: %p from %d", id, cmd, i);
+ ALOGV("Successfully removed command %d: %p from %d", id, cmd, i);
break;
}
}
diff --git a/bcmdhd/wifi_hal/gscan.cpp b/bcmdhd/wifi_hal/gscan.cpp
index 8acc498..556baea 100644
--- a/bcmdhd/wifi_hal/gscan.cpp
+++ b/bcmdhd/wifi_hal/gscan.cpp
@@ -429,7 +429,7 @@ public:
if(*mHandler.on_full_scan_result)
(*mHandler.on_full_scan_result)(id(), result);
- ALOGI("Full scan result: %-32s %02x:%02x:%02x:%02x:%02x:%02x %d %d %lld %lld %lld\n",
+ ALOGV("Full scan result: %-32s %02x:%02x:%02x:%02x:%02x:%02x %d %d %lld %lld %lld\n",
result->ssid, result->bssid[0], result->bssid[1], result->bssid[2], result->bssid[3],
result->bssid[4], result->bssid[5], result->rssi, result->channel, result->ts,
result->rtt, result->rtt_sd);
@@ -501,10 +501,10 @@ public:
if (mParams->buckets[i].num_channels) {
nlattr *channels = request.attr_start(GSCAN_ATTRIBUTE_BUCKET_CHANNELS);
- ALOGI(" channels: ");
+ ALOGV(" channels: ");
for (int j = 0; j < mParams->buckets[i].num_channels; j++) {
result = request.put_u32(j, mParams->buckets[i].channels[j].channel);
- ALOGI(" %u", mParams->buckets[i].channels[j].channel);
+ ALOGV(" %u", mParams->buckets[i].channels[j].channel);
if (result < 0) {
return result;
@@ -915,30 +915,30 @@ public:
for (nl_iterator it(vendor_data); it.has_next(); it.next()) {
if (it.get_type() == GSCAN_ATTRIBUTE_SCAN_RESULTS_COMPLETE) {
mCompleted = it.get_u8();
- ALOGI("retrieved mCompleted flag : %d", mCompleted);
+ ALOGV("retrieved mCompleted flag : %d", mCompleted);
} else if (it.get_type() == GSCAN_ATTRIBUTE_SCAN_RESULTS || it.get_type() == 0) {
for (nl_iterator it2(it.get()); it2.has_next(); it2.next()) {
int scan_id = 0, flags = 0, num = 0;
if (it2.get_type() == GSCAN_ATTRIBUTE_SCAN_ID) {
scan_id = it2.get_u32();
- ALOGI("retrieved scan_id : 0x%0x", scan_id);
+ ALOGV("retrieved scan_id : 0x%0x", scan_id);
} else if (it2.get_type() == GSCAN_ATTRIBUTE_SCAN_FLAGS) {
flags = it2.get_u8();
- ALOGI("retrieved scan_flags : 0x%0x", flags);
+ ALOGV("retrieved scan_flags : 0x%0x", flags);
} else if (it2.get_type() == GSCAN_ATTRIBUTE_NUM_OF_RESULTS) {
num = it2.get_u32();
- ALOGI("retrieved num_results: %d", num);
+ ALOGV("retrieved num_results: %d", num);
} else if (it2.get_type() == GSCAN_ATTRIBUTE_SCAN_RESULTS) {
num = it2.get_len() / sizeof(wifi_scan_result);
num = min(MAX_RESULTS - mNextScanResult, num);
num = min((int)MAX_AP_CACHE_PER_SCAN, num);
memcpy(mScanResults + mNextScanResult, it2.get_data(),
sizeof(wifi_scan_result) * num);
- ALOGI("Retrieved %d scan results", num);
+ ALOGV("Retrieved %d scan results", num);
wifi_scan_result *results = (wifi_scan_result *)it2.get_data();
for (int i = 0; i < num; i++) {
wifi_scan_result *result = results + i;
- ALOGI("%02d %-32s %02x:%02x:%02x:%02x:%02x:%02x %04d", i,
+ ALOGV("%02d %-32s %02x:%02x:%02x:%02x:%02x:%02x %04d", i,
result->ssid, result->bssid[0], result->bssid[1], result->bssid[2],
result->bssid[3], result->bssid[4], result->bssid[5],
result->rssi);
diff --git a/bcmdhd/wifi_hal/wifi_hal.cpp b/bcmdhd/wifi_hal/wifi_hal.cpp
index a1d37e1..0bb904d 100644
--- a/bcmdhd/wifi_hal/wifi_hal.cpp
+++ b/bcmdhd/wifi_hal/wifi_hal.cpp
@@ -8,6 +8,7 @@
#include <netpacket/packet.h>
#include <linux/filter.h>
#include <linux/errqueue.h>
+#include <errno.h>
#include <linux/pkt_sched.h>
#include <netlink/object-api.h>
@@ -29,7 +30,7 @@
#include "wifi_hal.h"
#include "common.h"
#include "cpp_bindings.h"
-
+#include "rtt.h"
/*
BUGBUG: normally, libnl allocates ports for all connections it makes; but
being a static library, it doesn't really know how many other netlink connections
@@ -353,13 +354,13 @@ static int internal_valid_message_handler(nl_msg *msg, void *arg)
if (cmd == NL80211_CMD_VENDOR) {
vendor_id = event.get_u32(NL80211_ATTR_VENDOR_ID);
subcmd = event.get_u32(NL80211_ATTR_VENDOR_SUBCMD);
- ALOGI("event received %s, vendor_id = 0x%0x, subcmd = 0x%0x",
+ ALOGV("event received %s, vendor_id = 0x%0x, subcmd = 0x%0x",
event.get_cmdString(), vendor_id, subcmd);
} else {
- // ALOGI("event received %s", event.get_cmdString());
+ // ALOGV("event received %s", event.get_cmdString());
}
- // ALOGI("event received %s, vendor_id = 0x%0x", event.get_cmdString(), vendor_id);
+ // ALOGV("event received %s, vendor_id = 0x%0x", event.get_cmdString(), vendor_id);
// event.log();
bool dispatched = false;
@@ -630,7 +631,7 @@ public:
protected:
virtual int handleResponse(WifiEvent& reply) {
- ALOGD("In GetFeatureSetCommand::handleResponse");
+ ALOGV("In GetFeatureSetCommand::handleResponse");
if (reply.get_cmd() != NL80211_CMD_VENDOR) {
ALOGD("Ignoring reply with cmd = %d", reply.get_cmd());
@@ -643,7 +644,7 @@ protected:
nlattr *vendor_data = reply.get_attribute(NL80211_ATTR_VENDOR_DATA);
int len = reply.get_vendor_data_len();
- ALOGD("Id = %0x, subcmd = %d, len = %d", id, subcmd, len);
+ ALOGV("Id = %0x, subcmd = %d, len = %d", id, subcmd, len);
if (vendor_data == NULL || len == 0) {
ALOGE("no vendor data in GetFeatureSetCommand response; ignoring it");
return NL_SKIP;
@@ -667,7 +668,7 @@ protected:
for (nl_iterator it(vendor_data); it.has_next(); it.next()) {
if (it.get_type() == ANDR_WIFI_ATTRIBUTE_NUM_FEATURE_SET) {
num_features_set = it.get_u32();
- ALOGI("Got feature list with %d concurrent sets", num_features_set);
+ ALOGV("Got feature list with %d concurrent sets", num_features_set);
if(set_size_max && (num_features_set > set_size_max))
num_features_set = set_size_max;
*fm_size = num_features_set;
diff --git a/bcmdhd/wifi_hal/wifi_logger.cpp b/bcmdhd/wifi_hal/wifi_logger.cpp
index b78192c..b401429 100644
--- a/bcmdhd/wifi_hal/wifi_logger.cpp
+++ b/bcmdhd/wifi_hal/wifi_logger.cpp
@@ -625,6 +625,7 @@ public:
ALOGE("Failed to put get memory dump request; result = %d", result);
return result;
}
+
request.attr_end(data);
mBuffSize += buffer_size;