Forráskód Böngészése

qcacld-3.0: Replace obsolete WMA_LOGA() with wma_alert()

Replace obsolete WMA_LOGA() macro with wma_alert().
In some error cases, usage of wma_alert() is incorrect and
hence use wma_err().

Change-Id: Ife02033c4f981c31f5e6b165d5e8961e2ce1f9d8
CRs-Fixed: 2716176
Srinivas Girigowda 4 éve
szülő
commit
5e5cf5996f

+ 0 - 9
core/wma/inc/wma.h

@@ -98,15 +98,6 @@
 #define wma_nofl_debug(params...) \
 	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_WMA, params)
 
-#define WMA_DEBUG_ALWAYS
-
-#ifdef WMA_DEBUG_ALWAYS
-#define WMA_LOGA(params ...) \
-	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_WMA, params)
-#else
-#define WMA_LOGA(params ...)
-#endif
-
 #define WMA_WILDCARD_PDEV_ID 0x0
 
 #define WMA_HW_DEF_SCAN_MAX_DURATION      30000 /* 30 secs */

+ 6 - 6
core/wma/src/wma_dev_if.c

@@ -2089,8 +2089,8 @@ void wma_send_del_bss_response(tp_wma_handle wma, struct del_bss_resp *resp)
 
 	if (iface->del_staself_req && iface->is_del_sta_defered) {
 		iface->is_del_sta_defered = false;
-		WMA_LOGA("scheduling defered deletion (vdev id %x)",
-			 vdev_id);
+		wma_nofl_alert("scheduling defered deletion (vdev id %x)",
+			      vdev_id);
 		wma_vdev_detach(iface->del_staself_req);
 	}
 }
@@ -3026,14 +3026,14 @@ void wma_hold_req_timer(void *data)
 		wma_debug("Failed to lookup request message - %pK", tgt_req);
 		return;
 	}
-	WMA_LOGA(FL("request %d is timed out for vdev_id - %d"),
+	wma_alert("request %d is timed out for vdev_id - %d",
 		 tgt_req->msg_type, tgt_req->vdev_id);
 
 	if (tgt_req->msg_type == WMA_ADD_STA_REQ) {
 		tpAddStaParams params = (tpAddStaParams) tgt_req->user_data;
 
 		params->status = QDF_STATUS_E_TIMEOUT;
-		WMA_LOGA(FL("WMA_ADD_STA_REQ timed out"));
+		wma_alert("WMA_ADD_STA_REQ timed out");
 		wma_debug("Sending add sta rsp to umac (mac:%pM, status:%d)",
 			 params->staMac, params->status);
 		if (wma_crash_on_fw_timeout(wma->fw_timeout_crash))
@@ -3044,7 +3044,7 @@ void wma_hold_req_timer(void *data)
 					   (void *)params, 0);
 	} else if (tgt_req->msg_type == WMA_ADD_BSS_REQ) {
 
-		WMA_LOGA(FL("WMA_ADD_BSS_REQ timed out"));
+		wma_alert("WMA_ADD_BSS_REQ timed out");
 		wma_debug("Sending add bss rsp to umac (vdev %d, status:%d)",
 			 tgt_req->vdev_id, QDF_STATUS_E_TIMEOUT);
 
@@ -3077,7 +3077,7 @@ void wma_hold_req_timer(void *data)
 		del_sta = (struct del_sta_self_rsp_params *)tgt_req->user_data;
 
 		del_sta->self_sta_param->status = QDF_STATUS_E_TIMEOUT;
-		WMA_LOGA(FL("wma delete sta p2p request timed out"));
+		wma_alert("wma delete sta p2p request timed out");
 
 		if (wma_crash_on_fw_timeout(wma->fw_timeout_crash))
 			wma_trigger_recovery_assert_on_fw_timeout(

+ 46 - 46
core/wma/src/wma_features.c

@@ -1591,39 +1591,39 @@ static void wma_inc_wow_stats(t_wma_handle *wma,
 
 static void wma_wow_stats_display(struct wake_lock_stats *stats)
 {
-	WMA_LOGA("WLAN wake reason counters:");
-	WMA_LOGA("uc:%d bc:%d v4_mc:%d v6_mc:%d ra:%d ns:%d na:%d "
-		 "icmp:%d icmpv6:%d",
-		 stats->ucast_wake_up_count,
-		 stats->bcast_wake_up_count,
-		 stats->ipv4_mcast_wake_up_count,
-		 stats->ipv6_mcast_wake_up_count,
-		 stats->ipv6_mcast_ra_stats,
-		 stats->ipv6_mcast_ns_stats,
-		 stats->ipv6_mcast_na_stats,
-		 stats->icmpv4_count,
-		 stats->icmpv6_count);
-
-	WMA_LOGA("assoc:%d disassoc:%d assoc_resp:%d reassoc:%d "
-		 "reassoc_resp:%d auth:%d deauth:%d action:%d",
-		 stats->mgmt_assoc,
-		 stats->mgmt_disassoc,
-		 stats->mgmt_assoc_resp,
-		 stats->mgmt_reassoc,
-		 stats->mgmt_reassoc_resp,
-		 stats->mgmt_auth,
-		 stats->mgmt_deauth,
-		 stats->mgmt_action);
-
-	WMA_LOGA("pno_match:%d pno_complete:%d gscan:%d "
-		 "low_rssi:%d rssi_breach:%d oem:%d scan_11d:%d",
-		 stats->pno_match_wake_up_count,
-		 stats->pno_complete_wake_up_count,
-		 stats->gscan_wake_up_count,
-		 stats->low_rssi_wake_up_count,
-		 stats->rssi_breach_wake_up_count,
-		 stats->oem_response_wake_up_count,
-		 stats->scan_11d);
+	wma_nofl_alert("WLAN wake reason counters:");
+	wma_nofl_alert("uc:%d bc:%d v4_mc:%d v6_mc:%d ra:%d ns:%d na:%d "
+		      "icmp:%d icmpv6:%d",
+		      stats->ucast_wake_up_count,
+		      stats->bcast_wake_up_count,
+		      stats->ipv4_mcast_wake_up_count,
+		      stats->ipv6_mcast_wake_up_count,
+		      stats->ipv6_mcast_ra_stats,
+		      stats->ipv6_mcast_ns_stats,
+		      stats->ipv6_mcast_na_stats,
+		      stats->icmpv4_count,
+		      stats->icmpv6_count);
+
+	wma_nofl_alert("assoc:%d disassoc:%d assoc_resp:%d reassoc:%d "
+		      "reassoc_resp:%d auth:%d deauth:%d action:%d",
+		      stats->mgmt_assoc,
+		      stats->mgmt_disassoc,
+		      stats->mgmt_assoc_resp,
+		      stats->mgmt_reassoc,
+		      stats->mgmt_reassoc_resp,
+		      stats->mgmt_auth,
+		      stats->mgmt_deauth,
+		      stats->mgmt_action);
+
+	wma_nofl_alert("pno_match:%d pno_complete:%d gscan:%d "
+		      "low_rssi:%d rssi_breach:%d oem:%d scan_11d:%d",
+		      stats->pno_match_wake_up_count,
+		      stats->pno_complete_wake_up_count,
+		      stats->gscan_wake_up_count,
+		      stats->low_rssi_wake_up_count,
+		      stats->rssi_breach_wake_up_count,
+		      stats->oem_response_wake_up_count,
+		      stats->scan_11d);
 }
 
 static void wma_print_wow_stats(t_wma_handle *wma,
@@ -2351,7 +2351,7 @@ static void wma_acquire_wow_wakelock(t_wma_handle *wma, int wake_reason)
 		return;
 	}
 
-	WMA_LOGA("Holding %d msec wake_lock", ms);
+	wma_alert("Holding %d msec wake_lock", ms);
 	cds_host_diag_log_work(wl, ms, WIFI_POWER_EVENT_WAKELOCK_WOW);
 	qdf_wake_lock_timeout_acquire(wl, ms);
 }
@@ -2377,7 +2377,7 @@ wma_wake_reason_ap_assoc_lost(t_wma_handle *wma, void *event, uint32_t len)
 	}
 
 	roam_event = event_param->fixed_param;
-	WMA_LOGA(FL("Beacon miss indication on vdev %d"), roam_event->vdev_id);
+	wma_alert("Beacon miss indication on vdev %d", roam_event->vdev_id);
 
 	wma_beacon_miss_handler(wma, roam_event->vdev_id, roam_event->rssi);
 
@@ -2705,16 +2705,16 @@ static void wma_wake_event_log_reason(t_wma_handle *wma,
 	/* "Unspecified" means APPS triggered wake, else firmware triggered */
 	if (wake_info->wake_reason != WOW_REASON_UNSPECIFIED) {
 		vdev = &wma->interfaces[wake_info->vdev_id];
-		WMA_LOGA("WLAN triggered wakeup: %s (%d), vdev: %d (%s)",
-			 wma_wow_wake_reason_str(wake_info->wake_reason),
-			 wake_info->wake_reason,
-			 wake_info->vdev_id,
-			 wma_vdev_type_str(vdev->type));
+		wma_nofl_alert("WLAN triggered wakeup: %s (%d), vdev: %d (%s)",
+			      wma_wow_wake_reason_str(wake_info->wake_reason),
+			      wake_info->wake_reason,
+			      wake_info->vdev_id,
+			      wma_vdev_type_str(vdev->type));
 		wma_debug_assert_page_fault_wakeup(wake_info->wake_reason);
 	} else if (!wmi_get_runtime_pm_inprogress(wma->wmi_handle)) {
-		WMA_LOGA("Non-WLAN triggered wakeup: %s (%d)",
-			 wma_wow_wake_reason_str(wake_info->wake_reason),
-			 wake_info->wake_reason);
+		wma_nofl_alert("Non-WLAN triggered wakeup: %s (%d)",
+			      wma_wow_wake_reason_str(wake_info->wake_reason),
+			      wake_info->wake_reason);
 	}
 
 	qdf_wow_wakeup_host_event(wake_info->wake_reason);
@@ -2825,7 +2825,7 @@ int wma_pdev_resume_event_handler(void *handle, uint8_t *event, uint32_t len)
 {
 	tp_wma_handle wma = (tp_wma_handle) handle;
 
-	WMA_LOGA("Received PDEV resume event");
+	wma_nofl_alert("Received PDEV resume event");
 
 	ucfg_pmo_psoc_wakeup_host_event_received(wma->psoc);
 
@@ -4660,7 +4660,7 @@ int wma_unified_beacon_debug_stats_event_handler(void *handle,
 	param_tlvs =
 	   (WMI_VDEV_BCN_RECEPTION_STATS_EVENTID_param_tlvs *)cmd_param_info;
 	if (!param_tlvs) {
-		WMA_LOGA("%s: Invalid stats event", __func__);
+		wma_err("Invalid stats event");
 		return -EINVAL;
 	}
 
@@ -4735,7 +4735,7 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
 	}
 	event = param_buf->fixed_param;
 	if (!event) {
-		WMA_LOGA("%s: Invalid fixed param", __func__);
+		wma_err("Invalid fixed param");
 		return -EINVAL;
 	}
 

+ 9 - 10
core/wma/src/wma_main.c

@@ -152,8 +152,7 @@ static void wma_service_ready_ext_evt_timeout(void *data)
 {
 	tp_wma_handle wma_handle;
 
-	WMA_LOGA("%s: Timeout waiting for WMI_SERVICE_READY_EXT_EVENT",
-			__func__);
+	wma_alert("Timeout waiting for WMI_SERVICE_READY_EXT_EVENT");
 
 	wma_handle = (tp_wma_handle) data;
 
@@ -2943,7 +2942,7 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
 	target_if_register_legacy_service_ready_cb(
 					wma_legacy_service_ready_event_handler);
 
-	WMA_LOGA("WMA --> wmi_unified_attach - success");
+	wma_nofl_alert("WMA --> wmi_unified_attach - success");
 
 	/* store the wmi handle in tgt_if_handle */
 	tgt_psoc_info = wlan_psoc_get_tgt_if_handle(psoc);
@@ -8011,7 +8010,7 @@ int wma_motion_det_host_event_handler(void *handle, uint8_t *event,
 	}
 
 	motion_det_event_hdr = param_buf->fixed_param;
-	WMA_LOGA("motion detect host event received, vdev_id=%d, status=%d",
+	wma_alert("motion detect host event received, vdev_id=%d, status=%d",
 		 motion_det_event_hdr->vdev_id, motion_det_event_hdr->status);
 
 	md_event = qdf_mem_malloc(sizeof(*md_event));
@@ -8056,9 +8055,9 @@ int wma_motion_det_base_line_host_event_handler(void *handle,
 	}
 
 	motion_det_base_line_event_hdr = param_buf->fixed_param;
-	WMA_LOGA("motion detection base line event received, vdev_id=%d",
+	wma_alert("motion detection base line event received, vdev_id=%d",
 		 motion_det_base_line_event_hdr->vdev_id);
-	WMA_LOGA("baseline_value=%d bl_max_corr_resv=%d bl_min_corr_resv=%d",
+	wma_alert("baseline_value=%d bl_max_corr_resv=%d bl_min_corr_resv=%d",
 		 motion_det_base_line_event_hdr->bl_baseline_value,
 		 motion_det_base_line_event_hdr->bl_max_corr_reserved,
 		 motion_det_base_line_event_hdr->bl_min_corr_reserved);
@@ -8130,7 +8129,7 @@ static QDF_STATUS wma_set_motion_det_config(
 		wmi_buf_free(buf);
 		return QDF_STATUS_E_FAILURE;
 	}
-	WMA_LOGA("Set motion_det_config to vdevId %d\n"
+	wma_nofl_alert("Set motion_det_config to vdevId %d\n"
 		 "time_t1 %d\n"
 		 "time_t2 %d\n"
 		 "n1 %d\n"
@@ -8198,7 +8197,7 @@ static QDF_STATUS wma_set_motion_det_enable(tp_wma_handle wma_handle,
 		wmi_buf_free(buf);
 		return QDF_STATUS_E_FAILURE;
 	}
-	WMA_LOGA("Set motion_det_enable to vdevId %d %d", md_en->vdev_id,
+	wma_alert("Set motion_det_enable to vdevId %d %d", md_en->vdev_id,
 		 md_en->enable);
 	return QDF_STATUS_SUCCESS;
 }
@@ -8244,7 +8243,7 @@ static QDF_STATUS wma_set_motion_det_base_line_config(
 		wmi_buf_free(buf);
 		return QDF_STATUS_E_FAILURE;
 	}
-	WMA_LOGA("Set motion_det_baseline_config to vdevId %d\n"
+	wma_nofl_alert("Set motion_det_baseline_config to vdevId %d\n"
 		 "bl_time_t %d\n"
 		 "bl_packet_gap %d\n"
 		 "bl_n %d\n"
@@ -8295,7 +8294,7 @@ static QDF_STATUS wma_set_motion_det_base_line_enable(
 		wmi_buf_free(buf);
 		return QDF_STATUS_E_FAILURE;
 	}
-	WMA_LOGA("Set motion_det_base_line_enable to vdevId %d enable %d",
+	wma_alert("Set motion_det_base_line_enable to vdevId %d enable %d",
 		 md_base_line_en->vdev_id, md_base_line_en->enable);
 	return QDF_STATUS_SUCCESS;
 }

+ 12 - 13
core/wma/src/wma_utils.c

@@ -1632,7 +1632,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle,
 
 	param_tlvs = (WMI_PEER_LINK_STATS_EVENTID_param_tlvs *) cmd_param_info;
 	if (!param_tlvs) {
-		WMA_LOGA("%s: Invalid stats event", __func__);
+		wma_err("Invalid stats event");
 		return -EINVAL;
 	}
 	/*
@@ -1648,7 +1648,7 @@ static int wma_unified_link_peer_stats_event_handler(void *handle,
 
 	if (!fixed_param || !peer_stats ||
 	    (peer_stats->num_rates && !rate_stats)) {
-		WMA_LOGA("%s: Invalid param_tlvs for Peer Stats", __func__);
+		wma_err("Invalid param_tlvs for Peer Stats");
 		return -EINVAL;
 	}
 
@@ -1863,20 +1863,19 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
 	param_tlvs = (WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID_param_tlvs *)
 								cmd_param_info;
 	if (!param_tlvs) {
-		WMA_LOGA("%s: Invalid tx power level stats event", __func__);
+		wma_err("Invalid tx power level stats event");
 		return -EINVAL;
 	}
 
 	fixed_param = param_tlvs->fixed_param;
 	if (!fixed_param) {
-		WMA_LOGA("%s:Invalid param_tlvs for Radio tx_power level Stats",
-			 __func__);
+		wma_err("Invalid param_tlvs for Radio tx_power level Stats");
 		return -EINVAL;
 	}
 
 	link_stats_results = wma_handle->link_stats_results;
 	if (!link_stats_results) {
-		WMA_LOGA("%s: link_stats_results is NULL", __func__);
+		wma_err("link_stats_results is NULL");
 		return -EINVAL;
 	}
 
@@ -2027,7 +2026,7 @@ static int wma_unified_link_radio_stats_event_handler(void *handle,
 
 	param_tlvs = (WMI_RADIO_LINK_STATS_EVENTID_param_tlvs *) cmd_param_info;
 	if (!param_tlvs) {
-		WMA_LOGA("%s: Invalid stats event", __func__);
+		wma_err("Invalid stats event");
 		return -EINVAL;
 	}
 
@@ -2065,7 +2064,7 @@ static int wma_unified_link_radio_stats_event_handler(void *handle,
 
 	if (!fixed_param || !radio_stats ||
 	    (radio_stats->num_channels && !channel_stats)) {
-		WMA_LOGA("%s: Invalid param_tlvs for Radio Stats", __func__);
+		wma_err("Invalid param_tlvs for Radio Stats");
 		return -EINVAL;
 	}
 	if (radio_stats->num_channels >
@@ -2523,7 +2522,7 @@ int wma_unified_link_iface_stats_event_handler(void *handle,
 
 	param_tlvs = (WMI_IFACE_LINK_STATS_EVENTID_param_tlvs *) cmd_param_info;
 	if (!param_tlvs) {
-		WMA_LOGA("%s: Invalid stats event", __func__);
+		wma_err("Invalid stats event");
 		return -EINVAL;
 	}
 
@@ -2541,7 +2540,7 @@ int wma_unified_link_iface_stats_event_handler(void *handle,
 
 	if (!fixed_param || !link_stats || (link_stats->num_ac && !ac_stats) ||
 	    (fixed_param->num_offload_stats && !offload_stats)) {
-		WMA_LOGA("%s: Invalid param_tlvs for Iface Stats", __func__);
+		wma_err("Invalid param_tlvs for Iface Stats");
 		return -EINVAL;
 	}
 	if (link_stats->num_ac > WIFI_AC_MAX || link_stats->num_ac >
@@ -2791,7 +2790,7 @@ void wma_config_stats_ext_threshold(tp_wma_handle wma,
 		 rx->rx_probe_reqs, rx->rx_oth_mgmts);
 	len += sizeof(wmi_rx_stats_thresh);
 
-	WMA_LOGA("WMA --> WMI_PDEV_SET_STATS_THRESHOLD_CMDID(0x%x), length=%d",
+	wma_alert("WMA --> WMI_PDEV_SET_STATS_THRESHOLD_CMDID(0x%x), length=%d",
 		 WMI_PDEV_SET_STATS_THRESHOLD_CMDID, len);
 	status = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
 				      WMI_PDEV_SET_STATS_THRESHOLD_CMDID);
@@ -2842,7 +2841,7 @@ int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info,
 	param_buf =
 	      (WMI_UPDATE_VDEV_RATE_STATS_EVENTID_param_tlvs *) cmd_param_info;
 	if (!param_buf) {
-		WMA_LOGA("%s: Invalid stats event", __func__);
+		wma_err("Invalid stats event");
 		return -EINVAL;
 	}
 
@@ -3130,7 +3129,7 @@ int wma_peer_info_event_handler(void *handle, u_int8_t *cmd_param_info,
 	param_buf =
 		(WMI_PEER_STATS_INFO_EVENTID_param_tlvs *)cmd_param_info;
 	if (!param_buf) {
-		WMA_LOGA("%s: Invalid stats event", __func__);
+		wma_err("Invalid stats event");
 		return -EINVAL;
 	}