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)
This commit is contained in:
Krishna Kumaar Natarajan 2016-09-07 12:19:24 -07:00 committed by qcabuildsw
parent 6553ea16be
commit e1a59839df

View File

@ -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;
}
}