|
@@ -825,7 +825,7 @@ void wma_ndp_add_wow_wakeup_event(tp_wma_handle wma_handle,
|
|
|
* Return: 0 if TLV tag is invalid
|
|
|
* else return corresponding WMI event id
|
|
|
*/
|
|
|
-static int wma_ndp_get_eventid_from_tlvtag(uint32_t tag)
|
|
|
+uint32_t wma_ndp_get_eventid_from_tlvtag(uint32_t tag)
|
|
|
{
|
|
|
uint32_t event_id;
|
|
|
|
|
@@ -869,6 +869,7 @@ static int wma_ndp_get_eventid_from_tlvtag(uint32_t tag)
|
|
|
* @handle: WMA handle
|
|
|
* @event: event buffer
|
|
|
* @len: length of @event buffer
|
|
|
+ * @event_id: event id for ndp wow event
|
|
|
*
|
|
|
* The wow event WOW_REASON_NAN_DATA is followed by the payload of the event
|
|
|
* which generated the wow event.
|
|
@@ -879,66 +880,41 @@ static int wma_ndp_get_eventid_from_tlvtag(uint32_t tag)
|
|
|
*
|
|
|
* Return: none
|
|
|
*/
|
|
|
-void wma_ndp_wow_event_callback(void *handle, void *event,
|
|
|
- uint32_t len)
|
|
|
+void wma_ndp_wow_event_callback(void *handle, void *event, uint32_t len,
|
|
|
+ uint32_t event_id)
|
|
|
{
|
|
|
- uint32_t id;
|
|
|
- int tlv_ok_status = 0;
|
|
|
- void *wmi_cmd_struct_ptr = NULL;
|
|
|
- uint32_t tag = WMITLV_GET_TLVTAG(WMITLV_GET_HDR(event));
|
|
|
-
|
|
|
- /* Reverse map fixed params tag to EVENT_ID */
|
|
|
- id = wma_ndp_get_eventid_from_tlvtag(tag);
|
|
|
- if (!id) {
|
|
|
- WMA_LOGE(FL("Invalid Tag: %d"), tag);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- tlv_ok_status = wmitlv_check_and_pad_event_tlvs(handle, event, len,
|
|
|
- id,
|
|
|
- &wmi_cmd_struct_ptr);
|
|
|
- if (tlv_ok_status != 0) {
|
|
|
- WMA_LOGE(FL("Invalid Tag: %d could not check and pad tlvs"),
|
|
|
- tag);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- switch (id) {
|
|
|
+ WMA_LOGD(FL("ndp_wow_event dump"));
|
|
|
+ qdf_trace_hex_dump(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_DEBUG,
|
|
|
+ event, len);
|
|
|
+ switch (event_id) {
|
|
|
case WMI_NDP_INITIATOR_RSP_EVENTID:
|
|
|
- wma_ndp_initiator_rsp_event_handler(handle,
|
|
|
- wmi_cmd_struct_ptr, len);
|
|
|
+ wma_ndp_initiator_rsp_event_handler(handle, event, len);
|
|
|
break;
|
|
|
|
|
|
case WMI_NDP_RESPONDER_RSP_EVENTID:
|
|
|
- wma_ndp_responder_rsp_event_handler(handle,
|
|
|
- wmi_cmd_struct_ptr, len);
|
|
|
+ wma_ndp_responder_rsp_event_handler(handle, event, len);
|
|
|
break;
|
|
|
|
|
|
case WMI_NDP_END_RSP_EVENTID:
|
|
|
- wma_ndp_end_response_event_handler(handle,
|
|
|
- wmi_cmd_struct_ptr, len);
|
|
|
+ wma_ndp_end_response_event_handler(handle, event, len);
|
|
|
break;
|
|
|
|
|
|
case WMI_NDP_INDICATION_EVENTID:
|
|
|
- wma_ndp_indication_event_handler(handle,
|
|
|
- wmi_cmd_struct_ptr, len);
|
|
|
+ wma_ndp_indication_event_handler(handle, event, len);
|
|
|
break;
|
|
|
|
|
|
case WMI_NDP_CONFIRM_EVENTID:
|
|
|
- wma_ndp_confirm_event_handler(handle,
|
|
|
- wmi_cmd_struct_ptr, len);
|
|
|
+ wma_ndp_confirm_event_handler(handle, event, len);
|
|
|
break;
|
|
|
|
|
|
case WMI_NDP_END_INDICATION_EVENTID:
|
|
|
- wma_ndp_end_indication_event_handler(handle,
|
|
|
- wmi_cmd_struct_ptr, len);
|
|
|
+ wma_ndp_end_indication_event_handler(handle, event, len);
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
- WMA_LOGE(FL("Unknown tag: %d"), tag);
|
|
|
+ WMA_LOGE(FL("Unknown event: %d"), event_id);
|
|
|
break;
|
|
|
}
|
|
|
- wmitlv_free_allocated_event_tlvs(id, &wmi_cmd_struct_ptr);
|
|
|
}
|
|
|
|
|
|
/**
|