qcacld-3.0: wma: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel checkpatch script, pointers should not be explicitly compared to NULL. Therefore within wma replace any such comparisons with logical operations performed on the pointer itself. Change-Id: I2b4125bc4ec229fbe466e6ce0ca4c3191f6cae59 CRs-Fixed: 2418387
This commit is contained in:
parent
3eb39032e3
commit
fb6d0cade0
@ -2264,7 +2264,7 @@ int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data,
|
||||
tx_fail_cnt = fix_param->seq_no;
|
||||
|
||||
/*call HDD callback */
|
||||
if (wma->hddTxFailCb != NULL)
|
||||
if (wma->hddTxFailCb)
|
||||
wma->hddTxFailCb(peer_mac, tx_fail_cnt);
|
||||
else
|
||||
WMA_LOGE("%s: HDD callback is %pK", __func__, wma->hddTxFailCb);
|
||||
|
@ -636,7 +636,7 @@ static QDF_STATUS wma_self_peer_remove(tp_wma_handle wma_handle,
|
||||
del_sta_self_req_param->self_mac_addr);
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
qdf_status = QDF_STATUS_E_FAULT;
|
||||
goto error;
|
||||
@ -1465,7 +1465,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
|
||||
}
|
||||
|
||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||
if (NULL == mac_ctx) {
|
||||
if (!mac_ctx) {
|
||||
WMA_LOGE("%s: Failed to get mac_ctx", __func__);
|
||||
policy_mgr_set_do_hw_mode_change_flag(
|
||||
psoc, false);
|
||||
@ -1847,7 +1847,7 @@ QDF_STATUS wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
|
||||
cdp_cfg_get_peer_unmap_conf_support(soc);
|
||||
|
||||
peer_mac_addr = cdp_peer_get_peer_mac_addr(soc, peer);
|
||||
if (peer_mac_addr == NULL) {
|
||||
if (!peer_mac_addr) {
|
||||
WMA_LOGE("%s: peer mac addr is NULL, Can't remove peer with peer_addr %pM vdevid %d peer_count %d",
|
||||
__func__, bssid, vdev_id,
|
||||
wma->interfaces[vdev_id].peer_count);
|
||||
@ -2189,7 +2189,7 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
|
||||
__func__, peer_addr, vdev_id);
|
||||
|
||||
mac_addr_raw = cdp_get_vdev_mac_addr(dp_soc, vdev);
|
||||
if (mac_addr_raw == NULL) {
|
||||
if (!mac_addr_raw) {
|
||||
WMA_LOGE("%s: peer mac addr is NULL", __func__);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
@ -2387,7 +2387,7 @@ wma_check_and_find_mcc_ap(tp_wma_handle wma, uint8_t vdev_id)
|
||||
{
|
||||
struct mac_context *mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (NULL == mac_ctx) {
|
||||
if (!mac_ctx) {
|
||||
WMA_LOGE("%s: Failed to get mac_ctx", __func__);
|
||||
return;
|
||||
}
|
||||
@ -2647,7 +2647,7 @@ __wma_handle_vdev_stop_rsp(wmi_vdev_stopped_event_fixed_param *resp_event)
|
||||
tpDeleteBssParams params =
|
||||
(tpDeleteBssParams) req_msg->user_data;
|
||||
|
||||
if (iface->handle == NULL) {
|
||||
if (!iface->handle) {
|
||||
WMA_LOGE("%s vdev id %d is already deleted",
|
||||
__func__, resp_event->vdev_id);
|
||||
wma_cleanup_target_req_param(req_msg);
|
||||
@ -2829,7 +2829,7 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
||||
self_sta_req->self_mac_addr, self_sta_req->session_id,
|
||||
self_sta_req->type, self_sta_req->sub_type,
|
||||
self_sta_req->nss_2g, self_sta_req->nss_5g);
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: Failed to get mac", __func__);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto end;
|
||||
@ -3273,7 +3273,7 @@ QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
||||
}
|
||||
|
||||
mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
|
||||
if (mac_ctx == NULL) {
|
||||
if (!mac_ctx) {
|
||||
WMA_LOGE("%s: vdev start failed as mac_ctx is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3773,7 +3773,7 @@ void wma_hold_req_timer(void *data)
|
||||
QDF_STATUS status;
|
||||
|
||||
wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE(FL("Failed to get wma"));
|
||||
return;
|
||||
}
|
||||
@ -4112,7 +4112,7 @@ void wma_vdev_resp_timer(void *data)
|
||||
|
||||
wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: Failed to get wma", __func__);
|
||||
wma_cleanup_target_req_param(tgt_req);
|
||||
goto free_tgt_req;
|
||||
@ -4134,7 +4134,7 @@ void wma_vdev_resp_timer(void *data)
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
wma_cleanup_target_req_param(tgt_req);
|
||||
qdf_mc_timer_stop(&tgt_req->event_timeout);
|
||||
@ -4167,7 +4167,7 @@ void wma_vdev_resp_timer(void *data)
|
||||
}
|
||||
|
||||
iface = &wma->interfaces[tgt_req->vdev_id];
|
||||
if (iface->handle == NULL) {
|
||||
if (!iface->handle) {
|
||||
WMA_LOGE("%s vdev id %d is already deleted",
|
||||
__func__, tgt_req->vdev_id);
|
||||
wma_cleanup_target_req_param(tgt_req);
|
||||
@ -4491,7 +4491,7 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
goto send_fail_resp;
|
||||
}
|
||||
@ -4631,7 +4631,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
WMA_LOGD("%s: add_bss->sessionId = %d", __func__, vdev_id);
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
goto send_fail_resp;
|
||||
}
|
||||
@ -4780,14 +4780,14 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
bool peer_assoc_sent = false;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: Unable to get PE context", __func__);
|
||||
goto send_fail_resp;
|
||||
}
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s Failed to get pdev", __func__);
|
||||
goto send_fail_resp;
|
||||
}
|
||||
@ -5008,7 +5008,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
send_bss_resp:
|
||||
|
||||
wma_vdev_set_he_config(wma, vdev_id, add_bss);
|
||||
if (NULL == cdp_peer_find_by_addr(soc, pdev, add_bss->bssId,
|
||||
if (!cdp_peer_find_by_addr(soc, pdev, add_bss->bssId,
|
||||
&add_bss->staContext.staIdx))
|
||||
add_bss->status = QDF_STATUS_E_FAILURE;
|
||||
else
|
||||
@ -5119,7 +5119,7 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to find pdev", __func__);
|
||||
add_sta->status = QDF_STATUS_E_FAILURE;
|
||||
goto send_rsp;
|
||||
@ -5353,7 +5353,7 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta)
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to find pdev", __func__);
|
||||
add_sta->status = QDF_STATUS_E_FAILURE;
|
||||
goto send_rsp;
|
||||
@ -5585,7 +5585,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Unable to get pdev", __func__);
|
||||
goto out;
|
||||
}
|
||||
@ -5599,7 +5599,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
|
||||
peer = cdp_peer_find_by_addr(soc,
|
||||
pdev,
|
||||
params->bssId, ¶ms->staIdx);
|
||||
if (peer == NULL) {
|
||||
if (!peer) {
|
||||
WMA_LOGE("%s: Peer is not present vdev id %d for %pM", __func__,
|
||||
params->smesessionId, params->bssId);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
@ -5620,7 +5620,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (peer != NULL &&
|
||||
if (peer &&
|
||||
(cdp_peer_state_get(soc, peer) == OL_TXRX_PEER_STATE_DISC)) {
|
||||
/*
|
||||
* This is the case for reassociation.
|
||||
@ -5834,7 +5834,7 @@ static void wma_delete_sta_req_ap_mode(tp_wma_handle wma,
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
del_sta->status = QDF_STATUS_E_FAILURE;
|
||||
goto send_del_rsp;
|
||||
@ -6166,7 +6166,7 @@ void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params)
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s:Unable to get TXRX context", __func__);
|
||||
goto fail_del_bss_ho_fail;
|
||||
}
|
||||
@ -6298,7 +6298,7 @@ static void wma_wait_tx_complete(tp_wma_handle wma,
|
||||
}
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
if (pdev == NULL) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: pdev is not valid: %d",
|
||||
__func__, session_id);
|
||||
return;
|
||||
@ -6336,7 +6336,7 @@ void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params)
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s:Unable to get TXRX context", __func__);
|
||||
goto out;
|
||||
}
|
||||
@ -6477,7 +6477,7 @@ int32_t wma_find_vdev_by_type(tp_wma_handle wma, int32_t type)
|
||||
struct wma_txrx_node *intf = wma->interfaces;
|
||||
|
||||
for (vdev_id = 0; vdev_id < wma->max_bssid; vdev_id++) {
|
||||
if (NULL != intf) {
|
||||
if (intf) {
|
||||
if (intf[vdev_id].type == type)
|
||||
return vdev_id;
|
||||
}
|
||||
@ -6539,7 +6539,7 @@ static void wma_vdev_reset_beacon_interval_timer(void *data)
|
||||
uint8_t vdev_id = req->vdev_id;
|
||||
|
||||
wma = (tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: Failed to get wma", __func__);
|
||||
goto end;
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ QDF_STATUS wma_send_snr_request(tp_wma_handle wma_handle,
|
||||
tAniGetRssiReq *pRssiBkUp = NULL;
|
||||
|
||||
/* command is in progress */
|
||||
if (NULL != wma_handle->pGetRssiReq)
|
||||
if (wma_handle->pGetRssiReq)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
/* create a copy of csrRssiCallback to send rssi value
|
||||
@ -296,14 +296,14 @@ QDF_STATUS wma_get_snr(tAniGetSnrReq *psnr_req)
|
||||
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s : Failed to get wma_handle", __func__);
|
||||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
intr = &wma_handle->interfaces[psnr_req->sessionId];
|
||||
/* command is in progress */
|
||||
if (NULL != intr->psnr_req) {
|
||||
if (intr->psnr_req) {
|
||||
WMA_LOGE("%s : previous snr request is pending", __func__);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@ -380,7 +380,7 @@ int wma_vdev_tsf_handler(void *handle, uint8_t *data, uint32_t data_len)
|
||||
wmi_vdev_tsf_report_event_fixed_param *tsf_event;
|
||||
struct stsf *ptsf;
|
||||
|
||||
if (data == NULL) {
|
||||
if (!data) {
|
||||
WMA_LOGE("%s: invalid pointer", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -3025,7 +3025,7 @@ static QDF_STATUS wma_set_tsm_interval(struct add_ts_param *req)
|
||||
uint32_t interval_milliseconds;
|
||||
struct cdp_pdev *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3109,7 +3109,7 @@ QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
|
||||
struct cdp_pdev *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
qdf_mem_free(pTsmStatsMsg);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
@ -3227,7 +3227,7 @@ QDF_STATUS wma_process_get_peer_info_req
|
||||
uint8_t bcast_mac[IEEE80211_ADDR_LEN] = { 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff };
|
||||
|
||||
if (NULL == soc) {
|
||||
if (!soc) {
|
||||
WMA_LOGE("%s: SOC context is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3240,7 +3240,7 @@ QDF_STATUS wma_process_get_peer_info_req
|
||||
}
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev context", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3258,7 +3258,7 @@ QDF_STATUS wma_process_get_peer_info_req
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
peer_mac_raw = cdp_peer_get_peer_mac_addr(soc, peer);
|
||||
if (peer_mac_raw == NULL) {
|
||||
if (!peer_mac_raw) {
|
||||
WMA_LOGE("peer_mac_raw is NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3457,7 +3457,7 @@ QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma)
|
||||
wmi_rmc_set_action_period_cmd_fixed_param *p_rmc_cmd;
|
||||
struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: MAC mac does not exist", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3792,7 +3792,7 @@ QDF_STATUS
|
||||
wma_set_auto_shutdown_timer_req(tp_wma_handle wma_handle,
|
||||
struct auto_shutdown_cmd *auto_sh_cmd)
|
||||
{
|
||||
if (auto_sh_cmd == NULL) {
|
||||
if (!auto_sh_cmd) {
|
||||
WMA_LOGE("%s : Invalid Autoshutdown cfg cmd", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3900,7 +3900,7 @@ QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle,
|
||||
WMA_LOGE("%s: wma handle is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
if (ch_avoid_update_req == NULL) {
|
||||
if (!ch_avoid_update_req) {
|
||||
WMA_LOGE("%s : ch_avoid_update_req is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3931,7 +3931,7 @@ void wma_send_regdomain_info_to_fw(uint32_t reg_dmn, uint16_t regdmn2G,
|
||||
WMA_LOGD("reg_dmn: %d regdmn2g: %d regdmn5g :%d ctl2g: %d ctl5g: %d",
|
||||
reg_dmn, regdmn2G, regdmn5G, ctl2G, ctl5G);
|
||||
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: wma context is NULL", __func__);
|
||||
return;
|
||||
}
|
||||
@ -4070,7 +4070,7 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle,
|
||||
/* in case of teardown, remove peer from fw */
|
||||
if (TDLS_PEER_STATE_TEARDOWN == peer_state->peer_state) {
|
||||
peer_mac_addr = cdp_peer_get_peer_mac_addr(soc, peer);
|
||||
if (peer_mac_addr == NULL) {
|
||||
if (!peer_mac_addr) {
|
||||
WMA_LOGE("peer_mac_addr is NULL");
|
||||
ret = -EIO;
|
||||
goto end_tdls_peer_state;
|
||||
@ -4976,7 +4976,7 @@ QDF_STATUS wma_set_sar_limit(WMA_HANDLE handle,
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (sar_limit_params == NULL) {
|
||||
if (!sar_limit_params) {
|
||||
WMA_LOGE("%s: set sar limit ptr NULL",
|
||||
__func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
@ -5037,7 +5037,7 @@ int wma_get_arp_stats_handler(void *handle, uint8_t *data,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (data == NULL) {
|
||||
if (!data) {
|
||||
WMA_LOGE("%s: invalid pointer", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -5248,7 +5248,7 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
|
||||
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
|
||||
if (wma != NULL && wma->cds_context != NULL)
|
||||
if (wma && wma->cds_context)
|
||||
mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (!mac) {
|
||||
|
@ -313,7 +313,7 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev)
|
||||
|
||||
wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: Invalid wma handle", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -956,7 +956,7 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
||||
WMA_LOGD("wmihandle %pK", wma->wmi_handle);
|
||||
qdf_mem_zero(&aggr, sizeof(aggr));
|
||||
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: Failed to get mac", __func__);
|
||||
return;
|
||||
}
|
||||
@ -1834,7 +1834,7 @@ static uint8_t wma_init_max_no_of_peers(tp_wma_handle wma_handle,
|
||||
uint8_t max_supported_peers = (tgt_version == AR6320_REV1_1_VERSION) ?
|
||||
MAX_SUPPORTED_PEERS_REV1_1 : MAX_SUPPORTED_PEERS_REV1_3;
|
||||
|
||||
if (cfg == NULL) {
|
||||
if (!cfg) {
|
||||
WMA_LOGE("%s: NULL WMA ini handle", __func__);
|
||||
return 0;
|
||||
}
|
||||
@ -1995,7 +1995,7 @@ static void wma_state_info_dump(char **buf_ptr, uint16_t *size)
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(wma->psoc,
|
||||
vdev_id, WLAN_LEGACY_WMA_ID);
|
||||
if (vdev == NULL)
|
||||
if (!vdev)
|
||||
continue;
|
||||
ucfg_mc_cp_stats_get_vdev_wake_lock_stats(vdev, &stats);
|
||||
len += qdf_scnprintf(buf + len, *size - len,
|
||||
@ -2680,7 +2680,7 @@ static QDF_STATUS spectral_phyerr_event_handler(void *handle,
|
||||
struct target_if_spectral_chan_info chan_info;
|
||||
struct target_if_spectral_acs_stats acs_stats;
|
||||
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s:wma handle is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -3782,7 +3782,7 @@ QDF_STATUS wma_pre_start(void)
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
/* Validate the wma_handle */
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: invalid wma handle", __func__);
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
goto end;
|
||||
@ -4302,7 +4302,7 @@ QDF_STATUS wma_start(void)
|
||||
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
/* validate the wma_handle */
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: Invalid wma handle", __func__);
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
goto end;
|
||||
@ -4580,7 +4580,7 @@ QDF_STATUS wma_stop(void)
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
/* validate the wma_handle */
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: Invalid handle", __func__);
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
goto end;
|
||||
@ -4664,13 +4664,13 @@ QDF_STATUS wma_wmi_service_close(void)
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
/* validate the wma_handle */
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: Invalid wma handle", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
/* validate the wmi handle */
|
||||
if (NULL == wma_handle->wmi_handle) {
|
||||
if (!wma_handle->wmi_handle) {
|
||||
WMA_LOGE("%s: Invalid wmi handle", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
@ -4714,13 +4714,13 @@ QDF_STATUS wma_wmi_work_close(void)
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
/* validate the wma_handle */
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: Invalid wma handle", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
/* validate the wmi handle */
|
||||
if (NULL == wma_handle->wmi_handle) {
|
||||
if (!wma_handle->wmi_handle) {
|
||||
WMA_LOGE("%s: Invalid wmi handle", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
@ -4749,13 +4749,13 @@ QDF_STATUS wma_close(void)
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
/* validate the wma_handle */
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: Invalid wma handle", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
/* validate the wmi handle */
|
||||
if (NULL == wma_handle->wmi_handle) {
|
||||
if (!wma_handle->wmi_handle) {
|
||||
WMA_LOGE("%s: Invalid wmi handle", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
@ -4803,7 +4803,7 @@ QDF_STATUS wma_close(void)
|
||||
qdf_spinlock_destroy(&wma_handle->vdev_respq_lock);
|
||||
qdf_spinlock_destroy(&wma_handle->wma_hold_req_q_lock);
|
||||
|
||||
if (NULL != wma_handle->pGetRssiReq) {
|
||||
if (wma_handle->pGetRssiReq) {
|
||||
qdf_mem_free(wma_handle->pGetRssiReq);
|
||||
wma_handle->pGetRssiReq = NULL;
|
||||
}
|
||||
@ -5172,7 +5172,7 @@ static void wma_derive_ext_ht_cap(
|
||||
{
|
||||
struct wma_tgt_ht_cap tmp = {0};
|
||||
|
||||
if (ht_cap == NULL)
|
||||
if (!ht_cap)
|
||||
return;
|
||||
|
||||
if (!qdf_mem_cmp(ht_cap, &tmp, sizeof(struct wma_tgt_ht_cap))) {
|
||||
@ -5288,7 +5288,7 @@ static void wma_derive_ext_vht_cap(
|
||||
struct wma_tgt_vht_cap tmp_cap = {0};
|
||||
uint32_t tmp = 0;
|
||||
|
||||
if (vht_cap == NULL)
|
||||
if (!vht_cap)
|
||||
return;
|
||||
|
||||
if (!qdf_mem_cmp(vht_cap, &tmp_cap,
|
||||
@ -6804,7 +6804,7 @@ void wma_setneedshutdown(void)
|
||||
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: Invalid arguments", __func__);
|
||||
QDF_ASSERT(0);
|
||||
return;
|
||||
@ -6827,7 +6827,7 @@ bool wma_needshutdown(void)
|
||||
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: Invalid arguments", __func__);
|
||||
QDF_ASSERT(0);
|
||||
return false;
|
||||
@ -6882,7 +6882,7 @@ QDF_STATUS wma_set_ppsconfig(uint8_t vdev_id, uint16_t pps_param,
|
||||
int ret = -EIO;
|
||||
uint32_t pps_val;
|
||||
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: Failed to get wma", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
@ -6958,7 +6958,7 @@ static QDF_STATUS wma_process_set_mas(tp_wma_handle wma,
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
if (NULL == wma || NULL == mas_val) {
|
||||
if (!wma || !mas_val) {
|
||||
WMA_LOGE("%s: Invalid input to enable/disable MAS", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -6987,7 +6987,7 @@ static QDF_STATUS wma_process_set_mas(tp_wma_handle wma,
|
||||
static QDF_STATUS wma_process_set_miracast(tp_wma_handle wma,
|
||||
uint32_t *miracast_val)
|
||||
{
|
||||
if (NULL == wma || NULL == miracast_val) {
|
||||
if (!wma || !miracast_val) {
|
||||
WMA_LOGE("%s: Invalid input to store miracast value", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -7013,7 +7013,7 @@ static QDF_STATUS wma_config_stats_factor(tp_wma_handle wma,
|
||||
{
|
||||
QDF_STATUS ret;
|
||||
|
||||
if (NULL == wma || NULL == avg_factor) {
|
||||
if (!wma || !avg_factor) {
|
||||
WMA_LOGE("%s: Invalid input of stats avg factor", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -7048,7 +7048,7 @@ static QDF_STATUS wma_config_guard_time(tp_wma_handle wma,
|
||||
{
|
||||
QDF_STATUS ret;
|
||||
|
||||
if (NULL == wma || NULL == guard_time) {
|
||||
if (!wma || !guard_time) {
|
||||
WMA_LOGE("%s: Invalid input of guard time", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -7144,7 +7144,7 @@ static void wma_set_wifi_start_packet_stats(void *wma_handle,
|
||||
}
|
||||
|
||||
scn = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
if (scn == NULL) {
|
||||
if (!scn) {
|
||||
WMA_LOGE("%s: Invalid HIF handle", __func__);
|
||||
return;
|
||||
}
|
||||
@ -8248,7 +8248,7 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
|
||||
extern uint8_t *mac_trace_get_wma_msg_string(uint16_t wmaMsg);
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
|
||||
if (NULL == msg) {
|
||||
if (!msg) {
|
||||
WMA_LOGE("msg is NULL");
|
||||
QDF_ASSERT(0);
|
||||
qdf_status = QDF_STATUS_E_INVAL;
|
||||
@ -8260,7 +8260,7 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
|
||||
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: wma_handle is NULL", __func__);
|
||||
QDF_ASSERT(0);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
|
@ -708,7 +708,7 @@ void wma_set_vdev_mgmt_rate(tp_wma_handle wma, uint8_t vdev_id)
|
||||
enum cds_band_type band = 0;
|
||||
struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: Failed to get mac", __func__);
|
||||
return;
|
||||
}
|
||||
@ -777,7 +777,7 @@ void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id)
|
||||
struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
QDF_STATUS status;
|
||||
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: Failed to get mac", __func__);
|
||||
return;
|
||||
}
|
||||
@ -1264,7 +1264,7 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
qdf_mem_free(cmd);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
@ -1949,7 +1949,7 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE(FL("Invalid wma_handle for vdev_id: %d"),
|
||||
key_params->vdev_id);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
@ -2303,7 +2303,7 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
|
||||
} else {
|
||||
mac_addr = cdp_get_vdev_mac_addr(soc,
|
||||
txrx_vdev);
|
||||
if (mac_addr == NULL) {
|
||||
if (!mac_addr) {
|
||||
WMA_LOGE("%s: mac_addr is NULL for vdev with id %d",
|
||||
__func__, key_info->smesessionId);
|
||||
goto out;
|
||||
@ -3256,7 +3256,7 @@ static int wma_process_mgmt_tx_completion(tp_wma_handle wma_handle,
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
#endif
|
||||
|
||||
if (wma_handle == NULL) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: wma handle is NULL", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -3265,7 +3265,7 @@ static int wma_process_mgmt_tx_completion(tp_wma_handle wma_handle,
|
||||
wma_get_status_str(status), desc_id);
|
||||
|
||||
pdev = wma_handle->pdev;
|
||||
if (pdev == NULL) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: psoc ptr is NULL", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -3534,7 +3534,7 @@ QDF_STATUS wma_set_htconfig(uint8_t vdev_id, uint16_t ht_capab, int value)
|
||||
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
QDF_STATUS ret = QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: Failed to get wma", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2019 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
|
||||
@ -147,7 +147,7 @@ void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
|
||||
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE(FL("Failed to find pdev"));
|
||||
add_sta->status = QDF_STATUS_E_FAILURE;
|
||||
goto send_rsp;
|
||||
|
@ -107,7 +107,7 @@ QDF_STATUS wma_unified_set_sta_ps_param(wmi_unified_t wmi_handle,
|
||||
QDF_STATUS status;
|
||||
|
||||
wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
if (NULL == wma) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: wma is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -424,7 +424,7 @@ void wma_set_max_tx_power(WMA_HANDLE handle,
|
||||
|
||||
vdev = wma_find_vdev_by_addr(wma_handle, tx_pwr_params->bssId.bytes,
|
||||
&vdev_id);
|
||||
if (vdev == NULL) {
|
||||
if (!vdev) {
|
||||
/* not in SAP array. Try the station/p2p array */
|
||||
vdev = wma_find_vdev_by_bssid(wma_handle,
|
||||
tx_pwr_params->bssId.bytes,
|
||||
@ -556,7 +556,7 @@ static QDF_STATUS wma_set_force_sleep(tp_wma_handle wma,
|
||||
|
||||
WMA_LOGD("Set Force Sleep vdevId %d val %d", vdev_id, enable);
|
||||
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: Unable to get PE context", __func__);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
@ -1627,7 +1627,7 @@ QDF_STATUS wma_set_tx_power_scale(uint8_t vdev_id, int value)
|
||||
tp_wma_handle wma_handle =
|
||||
(tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: wma_handle is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -1658,7 +1658,7 @@ QDF_STATUS wma_set_tx_power_scale_decr_db(uint8_t vdev_id, int value)
|
||||
tp_wma_handle wma_handle =
|
||||
(tp_wma_handle)cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: wma_handle is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
@ -841,7 +841,7 @@ wma_roam_scan_fill_ap_profile(struct roam_offload_scan_req *roam_req,
|
||||
uint32_t rsn_authmode;
|
||||
|
||||
qdf_mem_zero(profile, sizeof(*profile));
|
||||
if (roam_req == NULL) {
|
||||
if (!roam_req) {
|
||||
profile->ssid.length = 0;
|
||||
profile->ssid.mac_ssid[0] = 0;
|
||||
profile->rsn_authmode = WMI_AUTH_NONE;
|
||||
@ -1030,7 +1030,7 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
|
||||
{
|
||||
uint8_t channels_per_burst = 0;
|
||||
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: mac is NULL", __func__);
|
||||
return;
|
||||
}
|
||||
@ -1039,7 +1039,7 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
|
||||
scan_params->scan_ctrl_flags = WMI_SCAN_ADD_CCK_RATES |
|
||||
WMI_SCAN_ADD_OFDM_RATES |
|
||||
WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ;
|
||||
if (roam_req != NULL) {
|
||||
if (roam_req) {
|
||||
/* Parameters updated after association is complete */
|
||||
WMA_LOGD("%s: NeighborScanChannelMinTime: %d NeighborScanChannelMaxTime: %d",
|
||||
__func__,
|
||||
@ -1528,7 +1528,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
struct wma_txrx_node *intr = NULL;
|
||||
struct wmi_bss_load_config *bss_load_cfg;
|
||||
|
||||
if (NULL == mac) {
|
||||
if (!mac) {
|
||||
WMA_LOGE("%s: mac is NULL", __func__);
|
||||
qdf_mem_free(roam_req);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@ -2221,21 +2221,21 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
|
||||
if (!iface->roam_synch_frame_ind.bcn_probe_rsp) {
|
||||
WMA_LOGE("LFR3: bcn_probe_rsp is NULL");
|
||||
QDF_ASSERT(iface->roam_synch_frame_ind.
|
||||
bcn_probe_rsp != NULL);
|
||||
bcn_probe_rsp);
|
||||
wma_free_roam_synch_frame_ind(iface);
|
||||
return status;
|
||||
}
|
||||
if (!iface->roam_synch_frame_ind.reassoc_rsp) {
|
||||
WMA_LOGE("LFR3: reassoc_rsp is NULL");
|
||||
QDF_ASSERT(iface->roam_synch_frame_ind.
|
||||
reassoc_rsp != NULL);
|
||||
reassoc_rsp);
|
||||
wma_free_roam_synch_frame_ind(iface);
|
||||
return status;
|
||||
}
|
||||
if (!iface->roam_synch_frame_ind.reassoc_req) {
|
||||
WMA_LOGE("LFR3: reassoc_req is NULL");
|
||||
QDF_ASSERT(iface->roam_synch_frame_ind.
|
||||
reassoc_req != NULL);
|
||||
reassoc_req);
|
||||
wma_free_roam_synch_frame_ind(iface);
|
||||
return status;
|
||||
}
|
||||
@ -2248,7 +2248,7 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
|
||||
if (chan)
|
||||
roam_synch_ind_ptr->chan_freq = chan->mhz;
|
||||
key = param_buf->key;
|
||||
if (key != NULL) {
|
||||
if (key) {
|
||||
qdf_mem_copy(roam_synch_ind_ptr->kck, key->kck,
|
||||
SIR_KCK_KEY_LEN);
|
||||
roam_synch_ind_ptr->kek_len = SIR_KEK_KEY_LEN;
|
||||
@ -2521,7 +2521,7 @@ int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
|
||||
|
||||
roam_synch_ind_ptr = qdf_mem_malloc(roam_synch_data_len);
|
||||
if (!roam_synch_ind_ptr) {
|
||||
QDF_ASSERT(roam_synch_ind_ptr != NULL);
|
||||
QDF_ASSERT(roam_synch_ind_ptr);
|
||||
status = -ENOMEM;
|
||||
goto cleanup_label;
|
||||
}
|
||||
@ -2541,7 +2541,7 @@ int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
|
||||
}
|
||||
bss_desc_ptr = qdf_mem_malloc(sizeof(tSirBssDescription) + ie_len);
|
||||
if (!bss_desc_ptr) {
|
||||
QDF_ASSERT(bss_desc_ptr != NULL);
|
||||
QDF_ASSERT(bss_desc_ptr);
|
||||
status = -ENOMEM;
|
||||
goto cleanup_label;
|
||||
}
|
||||
@ -2696,7 +2696,7 @@ int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
|
||||
bcn_probe_rsp_len);
|
||||
if (!iface->roam_synch_frame_ind.bcn_probe_rsp) {
|
||||
QDF_ASSERT(iface->roam_synch_frame_ind.
|
||||
bcn_probe_rsp != NULL);
|
||||
bcn_probe_rsp);
|
||||
status = -ENOMEM;
|
||||
wma_free_roam_synch_frame_ind(iface);
|
||||
return status;
|
||||
@ -2718,7 +2718,7 @@ int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
|
||||
reassoc_req_len);
|
||||
if (!iface->roam_synch_frame_ind.reassoc_req) {
|
||||
QDF_ASSERT(iface->roam_synch_frame_ind.
|
||||
reassoc_req != NULL);
|
||||
reassoc_req);
|
||||
status = -ENOMEM;
|
||||
wma_free_roam_synch_frame_ind(iface);
|
||||
return status;
|
||||
@ -2740,7 +2740,7 @@ int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
|
||||
reassoc_rsp_len);
|
||||
if (!iface->roam_synch_frame_ind.reassoc_rsp) {
|
||||
QDF_ASSERT(iface->roam_synch_frame_ind.
|
||||
reassoc_rsp != NULL);
|
||||
reassoc_rsp);
|
||||
status = -ENOMEM;
|
||||
wma_free_roam_synch_frame_ind(iface);
|
||||
return status;
|
||||
@ -3136,7 +3136,7 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
|
||||
goto send_resp;
|
||||
}
|
||||
pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
if (NULL == pdev) {
|
||||
if (!pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto send_resp;
|
||||
|
@ -1987,7 +1987,7 @@ static inline int wma_peer_ps_evt_handler(void *handle, u_int8_t *event,
|
||||
*/
|
||||
void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle)
|
||||
{
|
||||
if (NULL == wma_handle) {
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: wma_handle is NULL", __func__);
|
||||
return;
|
||||
}
|
||||
@ -2511,7 +2511,7 @@ static void wma_vdev_stats_lost_link_helper(tp_wma_handle wma,
|
||||
!qdf_mem_cmp(node->bssid, zero_mac, QDF_MAC_ADDR_SIZE)) {
|
||||
req_msg = wma_peek_vdev_req(wma, vdev_stats->vdev_id,
|
||||
WMA_TARGET_REQ_TYPE_VDEV_STOP);
|
||||
if ((NULL == req_msg) ||
|
||||
if ((!req_msg) ||
|
||||
(WMA_DELETE_BSS_REQ != req_msg->msg_type)) {
|
||||
WMA_LOGD(FL("cannot find DELETE_BSS request message"));
|
||||
return;
|
||||
@ -2607,7 +2607,7 @@ static void wma_update_vdev_stats(tp_wma_handle wma,
|
||||
pGetRssiReq->sessionId);
|
||||
|
||||
/* update the average rssi value to UMAC layer */
|
||||
if (NULL != pGetRssiReq->rssiCallback) {
|
||||
if (pGetRssiReq->rssiCallback) {
|
||||
((tCsrRssiCallback) (pGetRssiReq->rssiCallback))(rssi,
|
||||
pGetRssiReq->staId,
|
||||
pGetRssiReq->pDevContext);
|
||||
@ -4003,7 +4003,7 @@ QDF_STATUS wma_get_connection_info(uint8_t vdev_id,
|
||||
struct wma_txrx_node *wma_conn_table_entry;
|
||||
|
||||
wma_conn_table_entry = wma_get_interface_by_vdev_id(vdev_id);
|
||||
if (NULL == wma_conn_table_entry) {
|
||||
if (!wma_conn_table_entry) {
|
||||
WMA_LOGE("%s: can't find vdev_id %d in WMA table", __func__, vdev_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -4022,7 +4022,7 @@ QDF_STATUS wma_ndi_update_connection_info(uint8_t vdev_id,
|
||||
struct wma_txrx_node *wma_iface_entry;
|
||||
|
||||
wma_iface_entry = wma_get_interface_by_vdev_id(vdev_id);
|
||||
if (NULL == wma_iface_entry) {
|
||||
if (!wma_iface_entry) {
|
||||
WMA_LOGE("%s: can't find vdev_id %d in WMA table", __func__, vdev_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@ -4138,7 +4138,7 @@ uint32_t wma_get_vht_ch_width(void)
|
||||
struct target_psoc_info *tgt_hdl;
|
||||
int vht_cap_info;
|
||||
|
||||
if (NULL == wm_hdl)
|
||||
if (!wm_hdl)
|
||||
return fw_ch_wd;
|
||||
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(wm_hdl->psoc);
|
||||
@ -4361,7 +4361,7 @@ QDF_STATUS wma_get_rcpi_req(WMA_HANDLE handle,
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
iface = &wma_handle->interfaces[rcpi_request->session_id];
|
||||
/* command is in progress */
|
||||
if (iface->rcpi_req != NULL) {
|
||||
if (iface->rcpi_req) {
|
||||
WMA_LOGE("%s : previous rcpi request is pending", __func__);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@ -4678,7 +4678,7 @@ int wma_chip_power_save_failure_detected_handler(void *handle,
|
||||
struct chip_pwr_save_fail_detected_params pwr_save_fail_params;
|
||||
struct mac_context *mac = (struct mac_context *)cds_get_context(
|
||||
QDF_MODULE_ID_PE);
|
||||
if (wma == NULL) {
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: wma_handle is NULL", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2016, 2018-2019 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
|
||||
@ -50,7 +50,7 @@ void wma_set_dbs_capability_ut(uint32_t dbs)
|
||||
/* DBS list was not configured by the FW, so
|
||||
* for UT, we can configure a single entry
|
||||
*/
|
||||
if (wma->hw_mode.hw_mode_list == NULL) {
|
||||
if (!wma->hw_mode.hw_mode_list) {
|
||||
wma->num_dbs_hw_modes = 1;
|
||||
wma->hw_mode.hw_mode_list =
|
||||
qdf_mem_malloc(sizeof(*wma->hw_mode.hw_mode_list) *
|
||||
|
Loading…
Reference in New Issue
Block a user