mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Make OEM response events wakeable
qcacld-2.0 to qcacld-3.0 propagation 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. Git-commit: 4de9b661e45a0bde4dfefc760edf03d1b8f4dd68 Change-Id: I71b77cfa09c5039b487e9a93490837a084314fb3 CRs-Fixed: 1018887
This commit is contained in:
parent
d7d1c9cf24
commit
172cabce97
2 changed files with 20 additions and 3 deletions
|
|
@ -1393,6 +1393,7 @@ typedef struct {
|
|||
uint32_t wow_ipv6_mcast_ra_stats;
|
||||
uint32_t wow_ipv6_mcast_ns_stats;
|
||||
uint32_t wow_ipv6_mcast_na_stats;
|
||||
uint32_t wow_oem_response_wake_up_count;
|
||||
|
||||
/* OCB request contexts */
|
||||
struct sir_ocb_config *ocb_config_req;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,8 @@
|
|||
(1 << WOW_HTT_EVENT) |\
|
||||
(1 << WOW_RA_MATCH_EVENT) |\
|
||||
(1 << WOW_NLO_DETECTED_EVENT) |\
|
||||
(1 << WOW_EXTSCAN_EVENT))\
|
||||
(1 << WOW_EXTSCAN_EVENT)) |\
|
||||
(1 << WOW_OEM_RESPONSE_EVENT)\
|
||||
|
||||
#define WMA_WOW_SAP_WAKE_UP_EVENTS ((1 << WOW_PROBE_REQ_WPS_IE_EVENT) |\
|
||||
(1 << WOW_PATTERN_MATCH_EVENT) |\
|
||||
|
|
@ -2345,6 +2346,8 @@ static const u8 *wma_wow_wake_reason_str(A_INT32 wake_reason)
|
|||
return "WOW_REASON_NLO_SCAN_COMPLETE";
|
||||
case WOW_REASON_NAN_EVENT:
|
||||
return "WOW_REASON_NAN_EVENT";
|
||||
case WOW_REASON_OEM_RESPONSE_EVENT:
|
||||
return "WOW_OEM_RESPONSE_EVENT";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
|
@ -2357,7 +2360,7 @@ static const u8 *wma_wow_wake_reason_str(A_INT32 wake_reason)
|
|||
*/
|
||||
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",
|
||||
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 oem %d",
|
||||
wma->wow_ucast_wake_up_count,
|
||||
wma->wow_bcast_wake_up_count,
|
||||
wma->wow_ipv4_mcast_wake_up_count,
|
||||
|
|
@ -2369,7 +2372,8 @@ static void wma_wow_wake_up_stats_display(tp_wma_handle wma)
|
|||
wma->wow_pno_complete_wake_up_count,
|
||||
wma->wow_gscan_wake_up_count,
|
||||
wma->wow_low_rssi_wake_up_count,
|
||||
wma->wow_rssi_breach_wake_up_count);
|
||||
wma->wow_rssi_breach_wake_up_count,
|
||||
wma->wow_oem_response_wake_up_count);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -2467,6 +2471,9 @@ static void wma_wow_wake_up_stats(tp_wma_handle wma, uint8_t *data,
|
|||
case WOW_REASON_RSSI_BREACH_EVENT:
|
||||
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");
|
||||
|
|
@ -2852,6 +2859,15 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
|
|||
WMA_LOGE(FL("wow_packet_buffer is empty"));
|
||||
}
|
||||
break;
|
||||
case WOW_REASON_OEM_RESPONSE_EVENT:
|
||||
wma_wow_wake_up_stats(wma, NULL, 0,
|
||||
WOW_REASON_OEM_RESPONSE_EVENT);
|
||||
/*
|
||||
* Actual OEM Response event will follow after this
|
||||
* WOW Wakeup event
|
||||
*/
|
||||
WMA_LOGD(FL("Host woken up for OEM Response event"));
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE(FL("WOW reason %s(%d)- not handled"),
|
||||
wma_wow_wake_reason_str(wake_info->wake_reason),
|
||||
|
|
|
|||
Loading…
Reference in a new issue