qcacmn: Add NULL check in dp_mlo_get_soc_ref_by_chip_id

In dp_mlo_get_soc_ref_by_chip_id API add null check
for ml_ctxt

Also correct intraBSS code for mlo disabled cases

Change-Id: I25eb07e9ccd714ba819730c765dc07b00dd15482
This commit is contained in:
Chaithanya Garrepalli
2022-01-13 19:57:51 +05:30
committed by Madan Koyyalamudi
parent 9d402b668b
commit 362e95bae6
2 changed files with 17 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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 above
@@ -109,6 +109,11 @@ dp_mlo_get_soc_ref_by_chip_id(struct dp_mlo_ctxt *ml_ctxt,
{
struct dp_soc *soc = NULL;
if (!ml_ctxt) {
dp_warn("MLO context not created, MLO not enabled");
return NULL;
}
qdf_spin_lock_bh(&ml_ctxt->ml_soc_list_lock);
soc = ml_ctxt->ml_soc_list[chip_id];