diff options
author | mukesh agrawal <quiche@google.com> | 2016-04-12 17:44:16 -0700 |
---|---|---|
committer | mukesh agrawal <quiche@google.com> | 2016-04-14 11:33:01 -0700 |
commit | 2a1c79670e140baf2e4bb69c6f6ad16893ad9fb6 (patch) | |
tree | 2dc3e1e7fc049527c03c2229b0dceb32015fc044 | |
parent | a58ccfb90f6608d378d04ee655113620afdf00bc (diff) | |
download | wlan-2a1c79670e140baf2e4bb69c6f6ad16893ad9fb6.tar.gz |
Wifi-HAL: make some messages require QC_HAL_DEBUG
Originally part of
https://partner-android-review.googlesource.com/#/c/558740
BUG=27698661
TEST=compile
Change-Id: Ibfa3245bb91b8138d41566f2e8f7060423c07a40
-rw-r--r-- | qcwcn/wifi_hal/gscan_event_handler.cpp | 4 | ||||
-rw-r--r-- | qcwcn/wifi_hal/llstats.cpp | 36 | ||||
-rw-r--r-- | qcwcn/wifi_hal/wifilogger.cpp | 4 | ||||
-rw-r--r-- | qcwcn/wifi_hal/wifilogger_diag.cpp | 7 |
4 files changed, 36 insertions, 15 deletions
diff --git a/qcwcn/wifi_hal/gscan_event_handler.cpp b/qcwcn/wifi_hal/gscan_event_handler.cpp index 591cf55..4d16359 100644 --- a/qcwcn/wifi_hal/gscan_event_handler.cpp +++ b/qcwcn/wifi_hal/gscan_event_handler.cpp @@ -1328,9 +1328,11 @@ int GScanCommandEventHandler::handleEvent(WifiEvent &event) { wifi_request_id id; - ALOGD("Event " +#ifdef QC_HAL_DEBUG + ALOGV("Event " "QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_RESULTS_AVAILABLE " "received."); +#endif if (!tbVendor[QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_REQUEST_ID]) { ALOGE("%s: QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_REQUEST_ID" diff --git a/qcwcn/wifi_hal/llstats.cpp b/qcwcn/wifi_hal/llstats.cpp index e375297..ee5ffe2 100644 --- a/qcwcn/wifi_hal/llstats.cpp +++ b/qcwcn/wifi_hal/llstats.cpp @@ -187,7 +187,7 @@ static wifi_error get_wifi_interface_info(wifi_interface_link_layer_info *stats, len = ((sizeof(stats->country_str) < len) ? sizeof(stats->country_str) : len); memcpy(&stats->country_str[0], nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_COUNTRY_STR]), len); - +#if QC_HAL_DEBUG ALOGV("Mode : %d\n" "Mac addr : " MAC_ADDR_STR @@ -212,6 +212,7 @@ static wifi_error get_wifi_interface_info(wifi_interface_link_layer_info *stats, stats->country_str[0], stats->country_str[1], stats->country_str[2]); +#endif return WIFI_SUCCESS; } @@ -323,7 +324,7 @@ static wifi_error get_wifi_wmm_ac_stat(wifi_wmm_ac_stat *stats, return WIFI_ERROR_INVALID_ARGS; } stats->contention_num_samples = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_AC_CONTENTION_NUM_SAMPLES]); - +#ifdef QC_HAL_DEBUG ALOGV("%4u | %6u | %6u | %7u | %7u | %7u |" " %7u | %8u | %7u | %12u |" " %11u | %17u | %17u |" @@ -343,6 +344,7 @@ static wifi_error get_wifi_wmm_ac_stat(wifi_wmm_ac_stat *stats, stats->contention_time_max, stats->contention_time_avg, stats->contention_num_samples); +#endif return WIFI_SUCCESS; } @@ -426,7 +428,7 @@ static wifi_error get_wifi_rate_stat(wifi_rate_stat *stats, return WIFI_ERROR_INVALID_ARGS; } stats->retries_long = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RATE_RETRIES_LONG]); - +#ifdef QC_HAL_DEBUG ALOGV("%8u | %3u | %2u | %10u | %7u | %6u | %6u | %8u | %7u | %12u | %11u", stats->rate.preamble, stats->rate.nss, @@ -439,6 +441,7 @@ static wifi_error get_wifi_rate_stat(wifi_rate_stat *stats, stats->retries, stats->retries_short, stats->retries_long); +#endif return WIFI_SUCCESS; } @@ -481,19 +484,21 @@ static wifi_error get_wifi_peer_info(wifi_peer_info *stats, return WIFI_ERROR_INVALID_ARGS; } stats->num_rate = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_NUM_RATES]); - +#ifdef QC_HAL_DEBUG ALOGV("numPeers %u Peer MAC addr :" MAC_ADDR_STR " capabilities %0x numRate %u", stats->type, MAC_ADDR_ARRAY(stats->peer_mac_address), stats->capabilities, stats->num_rate); - +#endif if (!tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_RATE_INFO]) { ALOGE("%s: QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_RATE_INFO not found", __func__); return WIFI_ERROR_INVALID_ARGS; } +#ifdef QC_HAL_DEBUG ALOGV("%8s | %3s | %2s | %10s | %7s | %6s | %6s | %8s | %7s | %12s | %11s", "preamble", "nss", "bw", "rateMcsIdx", "bitrate", "txMpdu", "rxMpdu", "mpduLost", "retries", "retriesShort", "retriesLong"); +#endif for (rateInfo = (struct nlattr *) nla_data(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_RATE_INFO]), rem = nla_len(tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_PEER_INFO_RATE_INFO]); nla_ok(rateInfo, rem); rateInfo = nla_next(rateInfo, &(rem))) @@ -618,7 +623,7 @@ wifi_error LLStatsCommand::get_wifi_iface_stats(wifi_iface_stat *stats, } stats->rssi_ack = get_s32(tb_vendor[ QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_RSSI_ACK]); - +#ifdef QC_HAL_DEBUG ALOGV("WMM STATS"); ALOGV("beaconRx : %u " "mgmtRx : %u " @@ -634,13 +639,14 @@ wifi_error LLStatsCommand::get_wifi_iface_stats(wifi_iface_stat *stats, stats->rssi_mgmt, stats->rssi_data, stats->rssi_ack); +#endif if (!tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_INFO]) { ALOGE("%s: QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_INFO" " not found", __func__); return WIFI_ERROR_INVALID_ARGS; } - +#ifdef QC_HAL_DEBUG ALOGV("%4s | %6s | %6s | %7s | %7s | %7s |" " %7s | %8s | %7s | %12s |" " %11s | %17s | %17s |" @@ -649,6 +655,7 @@ wifi_error LLStatsCommand::get_wifi_iface_stats(wifi_iface_stat *stats, "txAmpdu", "mpduLost", "retries", "retriesShort", "retriesLong", "contentionTimeMin", "contentionTimeMax", "contentionTimeAvg", "contentionNumSamples"); +#endif for (wmmInfo = (struct nlattr *) nla_data(tb_vendor[ QCA_WLAN_VENDOR_ATTR_LL_STATS_WMM_INFO]), rem = nla_len(tb_vendor[ @@ -894,7 +901,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) { goto cleanup; } - +#ifdef QC_HAL_DEBUG ALOGV("radio :%u onTime :%u txTime :%u rxTime :%u" " onTimeScan :%u onTimeNbd :%u onTimeGscan :%u" " onTimeRoamScan :%u onTimePnoScan :%u" @@ -913,6 +920,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) ALOGV("%5s | %10s | %11s | %11s | %6s | %11s", "width", "CenterFreq", "CenterFreq0", "CenterFreq1", "onTime", "ccaBusyTime"); +#endif for ( i=0; i < mResultsParams.radio_stat->num_channels; i++) { pWifiChannelStats = @@ -920,6 +928,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) (u8 *)mResultsParams.radio_stat->channels + (i * sizeof(wifi_channel_stat))); +#ifdef QC_HAL_DEBUG ALOGV("%5u | %10u | %11u | %11u | %6u | %11u", pWifiChannelStats->channel.width, pWifiChannelStats->channel.center_freq, @@ -927,6 +936,7 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) pWifiChannelStats->channel.center_freq1, pWifiChannelStats->on_time, pWifiChannelStats->cca_busy_time); +#endif } } break; @@ -968,8 +978,10 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) mResultsParams.iface_stat->num_peers = nla_get_u32(tb_vendor[ QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NUM_PEERS]); - ALOGV("%s: numPeers is %u\n", __func__, +#ifdef QC_HAL_DEBUG + ALOGV("%s: numPeers is %u\n", __FUNCTION__, mResultsParams.iface_stat->num_peers); +#endif if(mResultsParams.iface_stat->num_peers == 0) { // Number of Radios are 1 for now @@ -1002,11 +1014,12 @@ int LLStatsCommand::handleResponse(WifiEvent &reply) status = WIFI_ERROR_INVALID_ARGS; goto cleanup; } +#ifdef QC_HAL_DEBUG ALOGV(" numPeers is %u in %s\n", nla_get_u32(tb_vendor[ QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NUM_PEERS]), - __func__); - + __FUNCTION__); +#endif if((numPeers = nla_get_u32(tb_vendor[ QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_NUM_PEERS])) > 0) { @@ -1344,4 +1357,3 @@ cleanup: delete LLCommand; return (wifi_error)ret; } - diff --git a/qcwcn/wifi_hal/wifilogger.cpp b/qcwcn/wifi_hal/wifilogger.cpp index 72ba658..87593bf 100644 --- a/qcwcn/wifi_hal/wifilogger.cpp +++ b/qcwcn/wifi_hal/wifilogger.cpp @@ -1042,8 +1042,10 @@ int WifiLoggerCommand::handleResponse(WifiEvent &reply) { if (tb_vendor[QCA_WLAN_VENDOR_ATTR_FEATURE_SET]) { *mSupportedSet = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_FEATURE_SET]); - ALOGD("%s: Supported Feature Set : val 0x%x", +#ifdef QC_HAL_DEBUG + ALOGV("%s: Supported Feature Set : val 0x%x", __FUNCTION__, *mSupportedSet); +#endif } } break; diff --git a/qcwcn/wifi_hal/wifilogger_diag.cpp b/qcwcn/wifi_hal/wifilogger_diag.cpp index e22bd0c..1017357 100644 --- a/qcwcn/wifi_hal/wifilogger_diag.cpp +++ b/qcwcn/wifi_hal/wifilogger_diag.cpp @@ -2057,14 +2057,17 @@ wifi_error diag_message_handler(hal_info *info, nl_msg *msg) buf = (uint8_t *)(wnl + 1); diag_host_type = *(uint32_t *)(buf); +#ifdef QC_HAL_DEBUG ALOGV("diag type = %d", diag_host_type); - +#endif buf += sizeof(uint32_t); //diag_type if (diag_host_type == DIAG_TYPE_HOST_EVENTS) { host_event_hdr_t *event_hdr = (host_event_hdr_t *)(buf); +#ifdef QC_HAL_DEBUG ALOGV("diag event_id = %x length %d", event_hdr->event_id, event_hdr->length); +#endif buf += sizeof(host_event_hdr_t); switch (event_hdr->event_id) { case EVENT_WLAN_WAKE_LOCK: @@ -2087,8 +2090,10 @@ wifi_error diag_message_handler(hal_info *info, nl_msg *msg) } } else if (diag_host_type == DIAG_TYPE_HOST_LOG_MSGS) { drv_msg_t *drv_msg = (drv_msg_t *) (buf); +#ifdef QC_HAL_DEBUG ALOGV("diag event_type = %0x length = %d", drv_msg->event_type, drv_msg->length); +#endif if (drv_msg->event_type == WLAN_PKT_LOG_STATS) { if ((info->prev_seq_no + 1) != drv_msg->u.pkt_stats_event.msg_seq_no) { |