qcacld-3.0: Break wake event handler into pieces

wma_wow_wakeup_host_event is a large monolithic function with many
responsibilities. Break this function up into smaller pieces for each
of those responsibilities to make moving this logic to the component
model easier.

Change-Id: I5583aad21280a6fbf97c7634c9c9763be61fedc3
CRs-Fixed: 2038488
This commit is contained in:
Dustin Brown 2017-04-20 13:39:25 -07:00 • committed by snandini
commit e2206fb9d6
5 changed files with 633 additions and 606 deletions

View file

@ -576,7 +576,7 @@ int wma_beacon_swba_handler(void *handle, uint8_t *event, uint32_t len);
int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len);
void wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len);
int wma_unified_bcntx_status_event_handler(void *handle,
uint8_t *cmd_param_info,

File diff suppressed because it is too large Load diff

View file

@ -908,42 +908,36 @@ uint32_t wma_ndp_get_eventid_from_tlvtag(uint32_t tag)
* of tag (higher 2 bytes) and length (lower 2 bytes). The tag is used to
* identify the event which triggered wow event.
*
* Return: none
* Return: Errno
*/
void wma_ndp_wow_event_callback(void *handle, void *event, uint32_t len,
uint32_t event_id)
int wma_ndp_wow_event_callback(void *handle, void *event, uint32_t len,
uint32_t event_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, event, len);
break;
return wma_ndp_initiator_rsp_event_handler(handle, event, len);
case WMI_NDP_RESPONDER_RSP_EVENTID:
wma_ndp_responder_rsp_event_handler(handle, event, len);
break;
return wma_ndp_responder_rsp_event_handler(handle, event, len);
case WMI_NDP_END_RSP_EVENTID:
wma_ndp_end_response_event_handler(handle, event, len);
break;
return wma_ndp_end_response_event_handler(handle, event, len);
case WMI_NDP_INDICATION_EVENTID:
wma_ndp_indication_event_handler(handle, event, len);
break;
return wma_ndp_indication_event_handler(handle, event, len);
case WMI_NDP_CONFIRM_EVENTID:
wma_ndp_confirm_event_handler(handle, event, len);
break;
return wma_ndp_confirm_event_handler(handle, event, len);
case WMI_NDP_END_INDICATION_EVENTID:
wma_ndp_end_indication_event_handler(handle, event, len);
break;
return wma_ndp_end_indication_event_handler(handle, event, len);
default:
WMA_LOGE(FL("Unknown event: %d"), event_id);
break;
return 0;
}
}
#endif /* WLAN_FEATURE_NAN_CONVERGENCE */

View file

@ -39,8 +39,8 @@ QDF_STATUS wma_handle_ndp_responder_req(tp_wma_handle wma_handle,
void wma_ndp_register_all_event_handlers(tp_wma_handle wma_handle);
void wma_ndp_unregister_all_event_handlers(tp_wma_handle wma_handle);
void wma_ndp_wow_event_callback(void *handle, void *event,
uint32_t len, uint32_t event_id);
int wma_ndp_wow_event_callback(void *handle, void *event,
uint32_t len, uint32_t event_id);
QDF_STATUS wma_handle_ndp_initiator_req(tp_wma_handle wma_handle, void *req);
QDF_STATUS wma_handle_ndp_end_req(tp_wma_handle wma_handle, void *req);
@ -50,8 +50,11 @@ static inline void wma_ndp_register_all_event_handlers(
tp_wma_handle wma_handle) {}
static inline void wma_ndp_unregister_all_event_handlers(
tp_wma_handle wma_handle) {}
static inline void wma_ndp_wow_event_callback(void *handle, void *event,
uint32_t len, uint32_t event_id) {}
static inline int wma_ndp_wow_event_callback(void *handle, void *event,
uint32_t len, uint32_t event_id)
{
return 0;
}
static inline QDF_STATUS wma_handle_ndp_initiator_req(tp_wma_handle wma_handle,
void *req)
{

View file

@ -3185,47 +3185,43 @@ void wma_config_plm(tp_wma_handle wma, tpSirPlmReq plm)
* Payload is extracted and converted into generic tlv structure before
* being passed to this function.
*
* @Return: none
* @Return: Errno
*/
void wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len)
int wma_extscan_wow_event_callback(void *handle, void *event, uint32_t len)
{
uint32_t tag = WMITLV_GET_TLVTAG(WMITLV_GET_HDR(event));
switch (tag) {
case WMITLV_TAG_STRUC_wmi_extscan_start_stop_event_fixed_param:
wma_extscan_start_stop_event_handler(handle, event, len);
break;
return wma_extscan_start_stop_event_handler(handle, event, len);
case WMITLV_TAG_STRUC_wmi_extscan_operation_event_fixed_param:
wma_extscan_operations_event_handler(handle, event, len);
break;
return wma_extscan_operations_event_handler(handle, event, len);
case WMITLV_TAG_STRUC_wmi_extscan_table_usage_event_fixed_param:
wma_extscan_table_usage_event_handler(handle, event, len);
break;
return wma_extscan_table_usage_event_handler(handle, event,
len);
case WMITLV_TAG_STRUC_wmi_extscan_cached_results_event_fixed_param:
wma_extscan_cached_results_event_handler(handle, event, len);
break;
return wma_extscan_cached_results_event_handler(handle, event,
len);
case WMITLV_TAG_STRUC_wmi_extscan_wlan_change_results_event_fixed_param:
wma_extscan_change_results_event_handler(handle, event, len);
break;
return wma_extscan_change_results_event_handler(handle, event,
len);
case WMITLV_TAG_STRUC_wmi_extscan_hotlist_match_event_fixed_param:
wma_extscan_hotlist_match_event_handler(handle, event, len);
break;
return wma_extscan_hotlist_match_event_handler(handle, event,
len);
case WMITLV_TAG_STRUC_wmi_extscan_capabilities_event_fixed_param:
wma_extscan_capabilities_event_handler(handle, event, len);
break;
return wma_extscan_capabilities_event_handler(handle, event,
len);
default:
WMA_LOGE(FL("Unknown tag: %d"), tag);
break;
return 0;
}
return;
}
#endif