瀏覽代碼

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
Dustin Brown 8 年之前
父節點
當前提交
e2206fb9d6
共有 5 個文件被更改,包括 453 次插入459 次删除
  1. 1 1
      core/wma/inc/wma_internal.h
  2. 420 419
      core/wma/src/wma_features.c
  3. 10 16
      core/wma/src/wma_nan_datapath.c
  4. 7 4
      core/wma/src/wma_nan_datapath.h
  5. 15 19
      core/wma/src/wma_scan_roam.c

+ 1 - 1
core/wma/inc/wma_internal.h

@@ -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,

文件差異過大導致無法顯示
+ 420 - 419
core/wma/src/wma_features.c


+ 10 - 16
core/wma/src/wma_nan_datapath.c

@@ -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 */

+ 7 - 4
core/wma/src/wma_nan_datapath.h

@@ -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)
 {

+ 15 - 19
core/wma/src/wma_scan_roam.c

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

部分文件因文件數量過多而無法顯示