qcacld-3.0: Replace obsolete WMA_LOGE() with wma_err()

Replace obsolete WMA_LOGE() macro with wma_err().

Change-Id: Iaf11baa0f09cfb090806527184c6137f8b950aa8
CRs-Fixed: 2723709
This commit is contained in:
Srinivas Girigowda 2020-07-01 19:55:56 -07:00 • committed by nshrivas
commit 8cf89cb514
9 changed files with 54 additions and 58 deletions

View file

@ -2254,7 +2254,7 @@ QDF_STATUS wlan_mlme_set_rts_threshold(struct wlan_objmgr_psoc *psoc,
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
if (!wma_handle) {
WMA_LOGE("%s: wma_handle is NULL", __func__);
wma_err("wma_handle is NULL");
return QDF_STATUS_E_INVAL;
}
@ -2292,7 +2292,7 @@ QDF_STATUS wlan_mlme_set_frag_threshold(struct wlan_objmgr_psoc *psoc,
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
if (!wma_handle) {
WMA_LOGE("%s: wma_handle is NULL", __func__);
wma_err("wma_handle is NULL");
return QDF_STATUS_E_INVAL;
}

View file

@ -74,10 +74,6 @@
#define WMA_INVALID_VDEV_ID 0xFF
/* Deprecated logging macros, to be removed. Please do not use in new code */
#define WMA_LOGE(params ...) \
QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_WMA, params)
#define wma_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_WMA, params)
#define wma_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_WMA, params)
#define wma_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_WMA, params)
@ -1826,19 +1822,19 @@ void wma_vdev_update_pause_bitmap(uint8_t vdev_id, uint16_t value)
struct wma_txrx_node *iface;
if (!wma) {
WMA_LOGE("%s: WMA context is invald!", __func__);
wma_err("WMA context is invald!");
return;
}
if (vdev_id >= wma->max_bssid) {
WMA_LOGE("%s: Invalid vdev_id: %d", __func__, vdev_id);
wma_err("Invalid vdev_id: %d", vdev_id);
return;
}
iface = &wma->interfaces[vdev_id];
if (!iface) {
WMA_LOGE("%s: Interface is NULL", __func__);
wma_err("Interface is NULL");
return;
}
@ -1858,14 +1854,14 @@ uint16_t wma_vdev_get_pause_bitmap(uint8_t vdev_id)
struct wma_txrx_node *iface;
if (!wma) {
WMA_LOGE("%s: WMA context is invald!", __func__);
wma_err("WMA context is invald!");
return 0;
}
iface = &wma->interfaces[vdev_id];
if (!iface) {
WMA_LOGE("%s: Interface is NULL", __func__);
wma_err("Interface is NULL");
return 0;
}
@ -1884,14 +1880,14 @@ static inline bool wma_vdev_is_device_in_low_pwr_mode(uint8_t vdev_id)
struct wma_txrx_node *iface;
if (!wma) {
WMA_LOGE("%s: WMA context is invald!", __func__);
wma_err("WMA context is invalid!");
return 0;
}
iface = &wma->interfaces[vdev_id];
if (!iface) {
WMA_LOGE("%s: Interface is NULL", __func__);
wma_err("Interface is NULL");
return 0;
}
@ -1974,13 +1970,13 @@ wma_get_vdev_rate_flag(struct wlan_objmgr_vdev *vdev, uint32_t *rate_flag)
struct vdev_mlme_obj *mlme_obj;
if (!vdev) {
WMA_LOGE("%s vdev is NULL", __func__);
wma_err("vdev is NULL");
return QDF_STATUS_E_FAILURE;
}
mlme_obj = wlan_vdev_mlme_get_cmpt_obj(vdev);
if (!mlme_obj) {
WMA_LOGE("%s Failed to get mlme_obj", __func__);
wma_err("ailed to get mlme_obj");
return QDF_STATUS_E_FAILURE;
}
@ -2002,14 +1998,14 @@ void wma_vdev_set_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
struct wma_txrx_node *iface;
if (!wma) {
WMA_LOGE("%s: WMA context is invald!", __func__);
wma_err("WMA context is invalid!");
return;
}
iface = &wma->interfaces[vdev_id];
if (!iface) {
WMA_LOGE("%s: Interface is NULL", __func__);
wma_err("Interface is NULL");
return;
}
@ -2030,14 +2026,14 @@ void wma_vdev_clear_pause_bit(uint8_t vdev_id, wmi_tx_pause_type bit_pos)
struct wma_txrx_node *iface;
if (!wma) {
WMA_LOGE("%s: WMA context is invald!", __func__);
wma_err("WMA context is invalid!");
return;
}
iface = &wma->interfaces[vdev_id];
if (!iface) {
WMA_LOGE("%s: Interface is NULL", __func__);
wma_err("Interface is NULL");
return;
}

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -336,7 +336,7 @@ void wma_get_mws_coex_info_req(tp_wma_handle wma_handle,
req->vdev_id, req->cmd_id);
if (QDF_IS_STATUS_ERROR(status))
WMA_LOGE("Failed to send mws coex info");
wma_err("Failed to send mws coex info");
}
void wma_register_mws_coex_events(tp_wma_handle wma_handle)

View file

@ -40,13 +40,13 @@ wma_fips_event_handler(void *handle, uint8_t *event, uint32_t len)
wma_handle = handle;
if (!wma_handle) {
WMA_LOGE(FL("NULL wma_handle"));
wma_err("NULL wma_handle");
return QDF_STATUS_E_INVAL;
}
wmi_handle = wma_handle->wmi_handle;
if (!wmi_handle) {
WMA_LOGE(FL("NULL wmi_handle"));
wma_err("NULL wmi_handle");
return QDF_STATUS_E_INVAL;
}
@ -77,13 +77,13 @@ QDF_STATUS wma_fips_request(WMA_HANDLE handle,
QDF_STATUS status;
if (!wma_handle) {
WMA_LOGE(FL("NULL wma_handle"));
wma_err("NULL wma_handle");
return QDF_STATUS_E_INVAL;
}
wmi_handle = wma_handle->wmi_handle;
if (!wmi_handle) {
WMA_LOGE(FL("NULL wmi_handle"));
wma_err("NULL wmi_handle");
return QDF_STATUS_E_INVAL;
}
@ -91,8 +91,8 @@ QDF_STATUS wma_fips_request(WMA_HANDLE handle,
fips_context = context;
status = wmi_unified_pdev_fips_cmd_send(wmi_handle, param);
if (QDF_IS_STATUS_ERROR(status)) {
WMA_LOGE(FL("wmi_unified_pdev_fips_cmd_send() error: %u"),
status);
wma_err("wmi_unified_pdev_fips_cmd_send() error: %u",
status);
fips_callback = NULL;
}

View file

@ -32,7 +32,7 @@ QDF_STATUS wma_get_fw_state(tp_wma_handle wma_handle)
uint32_t len = sizeof(*cmd);
if (!wma_handle) {
WMA_LOGE(FL("WMA is closed, can not issue cmd"));
wma_err("WMA is closed, can not issue cmd");
return QDF_STATUS_E_INVAL;
}
@ -79,7 +79,7 @@ static int wma_echo_event_handler(void *handle, uint8_t *buf, uint32_t len)
QDF_MODULE_ID_SME,
QDF_MODULE_ID_SME, &sme_msg);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
WMA_LOGE("%s: Fail to post fw state reply msg", __func__);
wma_err("Fail to post fw state reply msg");
return -EINVAL;
}

View file

@ -129,7 +129,7 @@ static void wma_convert_he_ppet(uint8_t *he_ppet,
ppet_1 = NULL;
if (!ppet) {
WMA_LOGE(FL("PPET is NULL"));
wma_err("PPET is NULL");
qdf_mem_zero(he_ppet, HE_MAX_PPET_SIZE);
return;
}
@ -912,13 +912,13 @@ void wma_update_target_ext_he_cap(struct target_psoc_info *tgt_hdl,
total_mac_phy_cnt = target_psoc_get_total_mac_phy_cnt(tgt_hdl);
if (!mac_phy_cap) {
WMA_LOGE(FL("Invalid MAC PHY capabilities handle"));
wma_err("Invalid MAC PHY capabilities handle");
he_cap->present = false;
return;
}
if (!num_hw_modes) {
WMA_LOGE(FL("No extended HE cap for current SOC"));
wma_err("No extended HE cap for current SOC");
he_cap->present = false;
return;
}
@ -1376,7 +1376,7 @@ void wma_vdev_set_he_bss_params(tp_wma_handle wma, uint8_t vdev_id,
WMI_VDEV_PARAM_HEOPS_0_31, he_info->he_ops);
if (QDF_IS_STATUS_ERROR(ret))
WMA_LOGE(FL("Failed to set HE OPs"));
wma_err("Failed to set HE OPs");
}
void wma_vdev_set_he_config(tp_wma_handle wma, uint8_t vdev_id,
@ -1388,7 +1388,7 @@ void wma_vdev_set_he_config(tp_wma_handle wma, uint8_t vdev_id,
ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
WMI_VDEV_PARAM_OBSSPD, add_bss->he_sta_obsspd);
if (QDF_IS_STATUS_ERROR(ret))
WMA_LOGE(FL("Failed to set HE Config"));
wma_err("Failed to set HE Config");
pd_min = add_bss->he_sta_obsspd & 0xff,
pd_max = (add_bss->he_sta_obsspd & 0xff00) >> 8,
sec_ch_ed = (add_bss->he_sta_obsspd & 0xff0000) >> 16,
@ -1404,7 +1404,7 @@ QDF_STATUS wma_update_he_ops_ie(tp_wma_handle wma, uint8_t vdev_id,
uint32_t dword_he_op = 0;
if (!wma) {
WMA_LOGE(FL("wrong wma_handle...."));
wma_err("wrong wma_handle....");
return QDF_STATUS_E_FAILURE;
}
@ -1420,7 +1420,7 @@ QDF_STATUS wma_update_he_ops_ie(tp_wma_handle wma, uint8_t vdev_id,
WMI_VDEV_PARAM_HEOPS_0_31, dword_he_op);
if (QDF_IS_STATUS_ERROR(ret))
WMA_LOGE(FL("Failed to set HE OPs"));
wma_err("Failed to set HE OPs");
return ret;
}
@ -1469,7 +1469,7 @@ void wma_set_he_txbf_params(uint8_t vdev_id, bool su_bfer,
wma_debug("set HEMU_MODE (hemu_mode = 0x%x)", hemu_mode);
if (QDF_IS_STATUS_ERROR(status))
WMA_LOGE("failed to set HEMU_MODE(status = %d)", status);
wma_err("failed to set HEMU_MODE(status = %d)", status);
}
QDF_STATUS wma_get_he_capabilities(struct he_capability *he_cap)
@ -1478,7 +1478,7 @@ QDF_STATUS wma_get_he_capabilities(struct he_capability *he_cap)
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
if (!wma_handle) {
WMA_LOGE(FL("Invalid WMA handle"));
wma_err("Invalid WMA handle");
return QDF_STATUS_E_FAILURE;
}
@ -1508,7 +1508,7 @@ void wma_set_he_vdev_param(struct wma_txrx_node *intr, WMI_VDEV_PARAM param_id,
intr->config.range_ext = value;
break;
default:
WMA_LOGE(FL("Unhandled HE vdev param: %0x"), param_id);
wma_err("Unhandled HE vdev param: %0x", param_id);
break;
}
}
@ -1522,7 +1522,7 @@ uint32_t wma_get_he_vdev_param(struct wma_txrx_node *intr,
case WMI_VDEV_PARAM_HE_RANGE_EXT:
return intr->config.range_ext;
default:
WMA_LOGE(FL("Unhandled HE vdev param: %0x"), param_id);
wma_err("Unhandled HE vdev param: %0x", param_id);
break;
}
return 0;

View file

@ -56,7 +56,7 @@ void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
if (cdp_find_peer_exist_on_vdev(soc, add_sta->smesessionId,
add_sta->staMac)) {
WMA_LOGE(FL("NDI peer already exists, peer_addr %pM"),
wma_err("NDI peer already exists, peer_addr %pM",
add_sta->staMac);
add_sta->status = QDF_STATUS_E_EXISTS;
goto send_rsp;
@ -70,7 +70,7 @@ void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
* here.
*/
if (cdp_find_peer_exist(soc, pdev_id, add_sta->staMac)) {
WMA_LOGE(FL("peer exists on other vdev with peer_addr %pM"),
wma_err("peer exists on other vdev with peer_addr %pM",
add_sta->staMac);
add_sta->status = QDF_STATUS_E_EXISTS;
goto send_rsp;
@ -79,14 +79,14 @@ void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
status = wma_create_peer(wma, add_sta->staMac,
WMI_PEER_TYPE_NAN_DATA, add_sta->smesessionId);
if (status != QDF_STATUS_SUCCESS) {
WMA_LOGE(FL("Failed to create peer for %pM"), add_sta->staMac);
wma_err("Failed to create peer for %pM", add_sta->staMac);
add_sta->status = status;
goto send_rsp;
}
if (!cdp_find_peer_exist_on_vdev(soc, add_sta->smesessionId,
add_sta->staMac)) {
WMA_LOGE(FL("Failed to find peer handle using peer mac %pM"),
wma_err("Failed to find peer handle using peer mac %pM",
add_sta->staMac);
add_sta->status = QDF_STATUS_E_FAILURE;
wma_remove_peer(wma, add_sta->staMac, add_sta->smesessionId);

View file

@ -35,7 +35,7 @@ void wma_send_twt_enable_cmd(uint32_t pdev_id,
int32_t ret;
if (!wma) {
WMA_LOGE("Invalid WMA context, enable TWT failed");
wma_err("Invalid WMA context, enable TWT failed");
return;
}
twt_enable_params.pdev_id = pdev_id;
@ -44,7 +44,7 @@ void wma_send_twt_enable_cmd(uint32_t pdev_id,
ret = wmi_unified_twt_enable_cmd(wma->wmi_handle, &twt_enable_params);
if (ret)
WMA_LOGE("Failed to enable TWT");
wma_err("Failed to enable TWT");
}
int wma_twt_en_complete_event_handler(void *handle,
@ -57,16 +57,16 @@ int wma_twt_en_complete_event_handler(void *handle,
int status = -EINVAL;
if (!wma_handle) {
WMA_LOGE("Invalid wma handle for TWT complete");
wma_err("Invalid wma handle for TWT complete");
return status;
}
wmi_handle = (wmi_unified_t)wma_handle->wmi_handle;
if (!wmi_handle) {
WMA_LOGE("Invalid wmi handle for TWT complete");
wma_err("Invalid wmi handle for TWT complete");
return status;
}
if (!mac) {
WMA_LOGE("Invalid MAC context");
wma_err("Invalid MAC context");
return status;
}
if (wmi_handle->ops->extract_twt_enable_comp_event)
@ -89,14 +89,14 @@ void wma_send_twt_disable_cmd(uint32_t pdev_id)
int32_t ret;
if (!wma) {
WMA_LOGE("Invalid WMA context, Disable TWT failed");
wma_err("Invalid WMA context, Disable TWT failed");
return;
}
twt_disable_params.pdev_id = pdev_id;
ret = wmi_unified_twt_disable_cmd(wma->wmi_handle, &twt_disable_params);
if (ret)
WMA_LOGE("Failed to disable TWT");
wma_err("Failed to disable TWT");
}
int wma_twt_disable_comp_event_handler(void *handle, uint8_t *event,
@ -106,7 +106,7 @@ int wma_twt_disable_comp_event_handler(void *handle, uint8_t *event,
mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
if (!mac) {
WMA_LOGE("Invalid MAC context");
wma_err("Invalid MAC context");
return -EINVAL;
}
@ -133,13 +133,13 @@ QDF_STATUS wma_twt_process_add_dialog(
wmi_unified_t wmi_handle;
if (!wma_handle) {
WMA_LOGE("Invalid WMA context, twt add dialog failed");
wma_err("Invalid WMA context, twt add dialog failed");
return QDF_STATUS_E_INVAL;
}
wmi_handle = (wmi_unified_t)wma_handle->wmi_handle;
if (!wmi_handle) {
WMA_LOGE("Invalid wmi handle, twt add dialog failed");
wma_err("Invalid wmi handle, twt add dialog failed");
return QDF_STATUS_E_INVAL;
}
@ -153,13 +153,13 @@ QDF_STATUS wma_twt_process_del_dialog(
wmi_unified_t wmi_handle;
if (!wma_handle) {
WMA_LOGE("Invalid WMA context, twt del dialog failed");
wma_err("Invalid WMA context, twt del dialog failed");
return QDF_STATUS_E_INVAL;
}
wmi_handle = (wmi_unified_t)wma_handle->wmi_handle;
if (!wmi_handle) {
WMA_LOGE("Invalid wmi handle, twt del dialog failed");
wma_err("Invalid wmi handle, twt del dialog failed");
return QDF_STATUS_E_INVAL;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016, 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2016, 2018-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -43,7 +43,7 @@ void wma_set_dbs_capability_ut(uint32_t dbs)
wma = cds_get_context(QDF_MODULE_ID_WMA);
if (!wma) {
WMA_LOGE("%s: Invalid WMA handle", __func__);
wma_err("Invalid WMA handle");
return;
}