mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Fix NULL pointer and uninitialization issues
Fix NULL pointer and uninitialization issues. Change-Id: I757b3b408f9ddc8716366a757ea2bf2bb7126a38 CRs-Fixed: 2162258
This commit is contained in:
parent
cfcba78b5f
commit
4c3fbb400e
3 changed files with 25 additions and 6 deletions
|
|
@ -3733,7 +3733,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
|||
struct wma_vdev_start_req req;
|
||||
struct wma_target_req *msg;
|
||||
uint8_t vdev_id = 0, peer_id;
|
||||
void *peer;
|
||||
void *peer = NULL;
|
||||
QDF_STATUS status;
|
||||
struct wma_txrx_node *iface;
|
||||
int pps_val = 0;
|
||||
|
|
@ -4007,8 +4007,9 @@ send_final_rsp:
|
|||
return;
|
||||
|
||||
peer_cleanup:
|
||||
wma_remove_peer(wma, add_bss->bssId, vdev_id, peer,
|
||||
roam_synch_in_progress);
|
||||
if (peer)
|
||||
wma_remove_peer(wma, add_bss->bssId, vdev_id, peer,
|
||||
roam_synch_in_progress);
|
||||
send_fail_resp:
|
||||
add_bss->status = QDF_STATUS_E_FAILURE;
|
||||
if (!wma_is_roam_synch_in_progress(wma, vdev_id))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -1228,6 +1228,12 @@ void wma_check_and_set_wake_timer(uint32_t time)
|
|||
struct wma_txrx_node *iface;
|
||||
t_wma_handle *wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: WMA is closed",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!WMI_SERVICE_EXT_IS_ENABLED(wma->wmi_service_bitmap,
|
||||
wma->wmi_service_ext_bitmap,
|
||||
WMI_SERVICE_WOW_WAKEUP_BY_TIMER_PATTERN)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -5517,6 +5517,11 @@ bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel)
|
|||
enum cds_band_type band;
|
||||
bool status;
|
||||
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("Invalid wma handle");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!WLAN_REG_IS_24GHZ_CH(channel))
|
||||
band = CDS_BAND_5GHZ;
|
||||
else
|
||||
|
|
@ -5882,7 +5887,14 @@ static void wma_init_wifi_pos_dma_rings(t_wma_handle *wma_handle,
|
|||
uint8_t num_mac, void *buf)
|
||||
{
|
||||
struct hif_softc *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
void *hal_soc = hif_get_hal_handle(hif_ctx);
|
||||
void *hal_soc;
|
||||
|
||||
if (!hif_ctx) {
|
||||
WMA_LOGE("invalid hif context");
|
||||
return;
|
||||
}
|
||||
|
||||
hal_soc = hif_get_hal_handle(hif_ctx);
|
||||
|
||||
wifi_pos_init_cir_cfr_rings(wma_handle->psoc, hal_soc, num_mac, buf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue