diff options
| author | Selvaraj, Sridhar <sselvara@qti.qualcomm.com> | 2016-05-20 10:59:35 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-06-22 14:44:39 +0530 |
| commit | 4de9b661e45a0bde4dfefc760edf03d1b8f4dd68 (patch) | |
| tree | 99a4918aa5a4c42f325d0d3d349d1c106f6084c6 | |
| parent | 4355d51f81762944dbb02642b19889b4830ed379 (diff) | |
qcacld-2.0: Make OEM response events wakeable
While RTT ranging happens, userspace application initiates FTM
request via host to FW. After sending the FTM request, host
might go to sleep mode sometimes so FW will not be able to send
the OEM response event resulting in poor ranging results.
This change registers OEM response event as WOW wakeable so FW
wakes up host whenever it receives OEM response which helps OEM
response to reach userspace application on time for better
ranging results.
Change-Id: I71b77cfa09c5039b487e9a93490837a084314fb3
CRs-Fixed: 1018887
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 38 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 1 |
2 files changed, 37 insertions, 2 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index b32eb7d8d83f..ab165541bf67 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -7255,6 +7255,9 @@ static void wma_state_info_dump(char **buf_ptr, uint16_t *size) len += vos_scnprintf(buf + len, *size - len, "\n wow_ipv6_mcast_na_stats %d", wma_handle->wow_ipv6_mcast_na_stats); + len += vos_scnprintf(buf + len, *size - len, + "\n wow_oem_response_wake_up_count %d", + wma_handle->wow_oem_response_wake_up_count); *size -= len; *buf_ptr += len; @@ -20293,6 +20296,8 @@ static const u8 *wma_wow_wake_reason_str(A_INT32 wake_reason, tp_wma_handle wma) return "REASSOC_RES_RECV"; case WOW_REASON_ACTION_FRAME_RECV: return "ACTION_FRAME_RECV"; + case WOW_REASON_OEM_RESPONSE_EVENT: + return "WOW_REASON_OEM_RESPONSE_EVENT"; } return "unknown"; } @@ -20803,7 +20808,7 @@ static void wma_extscan_wow_event_callback(void *handle, void *event, */ static void wma_wow_wake_up_stats_display(tp_wma_handle wma) { - WMA_LOGA("uc %d bc %d v4_mc %d v6_mc %d ra %d ns %d na %d pno_match %d pno_complete %d gscan %d low_rssi %d rssi_breach %d icmp %d icmpv6 %d", + WMA_LOGA("uc %d bc %d v4_mc %d v6_mc %d ra %d ns %d na %d pno_match %d pno_complete %d gscan %d low_rssi %d rssi_breach %d icmp %d icmpv6 %d oem %d", wma->wow_ucast_wake_up_count, wma->wow_bcast_wake_up_count, wma->wow_ipv4_mcast_wake_up_count, @@ -20817,7 +20822,8 @@ static void wma_wow_wake_up_stats_display(tp_wma_handle wma) wma->wow_low_rssi_wake_up_count, wma->wow_rssi_breach_wake_up_count, wma->wow_icmpv4_count, - wma->wow_icmpv6_uc_bc_count); + wma->wow_icmpv6_uc_bc_count, + wma->wow_oem_response_wake_up_count); return; } @@ -20934,6 +20940,10 @@ static void wma_wow_wake_up_stats(tp_wma_handle wma, uint8_t *data, wma->wow_rssi_breach_wake_up_count++; break; + case WOW_REASON_OEM_RESPONSE_EVENT: + wma->wow_oem_response_wake_up_count++; + break; + default: WMA_LOGE("Unknown wake up reason"); break; @@ -21689,6 +21699,26 @@ static int wma_wow_wakeup_host_event(void *handle, u_int8_t *event, } break; #endif + + case WOW_REASON_OEM_RESPONSE_EVENT: + wma_wow_wake_up_stats(wma, NULL, 0, + WOW_REASON_OEM_RESPONSE_EVENT); + if (param_buf->wow_packet_buffer) { + WMA_LOGD(FL("Host woken up by OEM Response event")); + wow_buf_pkt_len = + *(uint32_t *)param_buf->wow_packet_buffer; + vos_trace_hex_dump(VOS_MODULE_ID_WDA, + VOS_TRACE_LEVEL_DEBUG, + param_buf->wow_packet_buffer, + wow_buf_pkt_len); + wma_oem_data_response_handler(handle, + (uint8_t*)(param_buf->wow_packet_buffer), + wow_buf_pkt_len); + } else { + WMA_LOGD(FL("No wow_packet_buffer for OEM response")); + } + break; + default: break; } @@ -21778,6 +21808,8 @@ static const u8 *wma_wow_wakeup_event_str(WOW_WAKE_EVENT_TYPE event) return "WOW_NAN_DATA_EVENT"; case WOW_TDLS_CONN_TRACKER_EVENT: return "WOW_TDLS_CONN_TRACKER_EVENT"; + case WOW_OEM_RESPONSE_EVENT: + return "WOW_OEM_RESPONSE_EVENT"; default: return "UNSPECIFIED_EVENT"; } @@ -22995,6 +23027,8 @@ static VOS_STATUS wma_feed_wow_config_to_fw(tp_wma_handle wma, wma_add_wow_wakeup_event(wma, WOW_TDLS_CONN_TRACKER_EVENT, TRUE); #endif + wma_add_wow_wakeup_event(wma, WOW_OEM_RESPONSE_EVENT, TRUE); + /* Enable wow wakeup events in FW */ ret = wma_send_wakeup_mask(wma, TRUE); if (ret) { diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 07029837234a..990ecf5f4259 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -889,6 +889,7 @@ typedef struct wma_handle { uint32_t wow_ipv6_mcast_na_stats; uint32_t wow_icmpv4_count; uint32_t wow_icmpv6_uc_bc_count; + uint32_t wow_oem_response_wake_up_count; uint32_t wow_wakeup_enable_mask; uint32_t wow_wakeup_disable_mask; uint16_t max_mgmt_tx_fail_count; |
