diff options
| author | Krishna Kumaar Natarajan <kknatara@codeaurora.org> | 2016-09-07 12:19:24 -0700 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-09-10 19:05:40 -0700 |
| commit | e1a59839dffb9b8656beb90c76966feace665fdb (patch) | |
| tree | a11fcc1af4e3f3edb9a9d76625b630c1838ead95 | |
| parent | 6553ea16beb0c08fb4277ab1384d24f7ee3191fa (diff) | |
qcacld-3.0: Update tlv_check_required() to handle all WoW reason
Update tlv_check_required() to handle all WoW reason to prevent failure
of parsing the wow packet buffer.
WOW event AP_LOST_ASSOC reason is not handled in tlv_check_required function
which returns true to parse the wow packet buffer which is incorrect. Enhance
the tlv_check_required function by adding only the reasons that require
tlv parsing and return false for others.
Change-Id: I4079086c4a49279921f6af8dda72b32d923022c2
CRs-Fixed: 1064249
(cherry picked from commit 1cc8d077fb321e2b83a5f15bcd2a3bdb7d8ccb19)
| -rw-r--r-- | core/wma/src/wma_features.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 73d5ca8ec961..8324233a55db 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -2640,20 +2640,17 @@ static int wow_get_wmi_eventid(int32_t reason, uint32_t tag) static bool tlv_check_required(int32_t reason) { switch (reason) { - case WOW_REASON_PATTERN_MATCH_FOUND: - case WOW_REASON_BPF_ALLOW: - case WOW_REASON_AUTH_REQ_RECV: - case WOW_REASON_ASSOC_REQ_RECV: - case WOW_REASON_DEAUTH_RECVD: - case WOW_REASON_DISASSOC_RECVD: - case WOW_REASON_ASSOC_RES_RECV: - case WOW_REASON_REASSOC_REQ_RECV: - case WOW_REASON_REASSOC_RES_RECV: - case WOW_REASON_BEACON_RECV: - case WOW_REASON_ACTION_FRAME_RECV: - return false; - default: + case WOW_REASON_NLO_SCAN_COMPLETE: + case WOW_REASON_CSA_EVENT: + case WOW_REASON_LOW_RSSI: + case WOW_REASON_CLIENT_KICKOUT_EVENT: + case WOW_REASON_EXTSCAN: + case WOW_REASON_RSSI_BREACH_EVENT: + case WOW_REASON_NAN_EVENT: + case WOW_REASON_NAN_DATA: return true; + default: + return false; } } |
