mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Fix hdd_pre_enable_configure() layering violation
Currently hdd_pre_enable_configure() calls cfg_set_str() to update WNI_CFG_STA_ID in the cfg database. Buf cfg_set_str() is an internal MAC API which should not be called by HDD, and this code fails to compile when strict parameter checking is enabled because HDD is passing a tHalHandle to a function which expects a tpAniSirGlobal. Update hdd_pre_enable_configure() to instead call sme_cfg_set_str(). Change-Id: Ic3f249f18319c3e54786938f76fe61b2af37f25f CRs-Fixed: 2254950
This commit is contained in:
parent
0a078b5a23
commit
bae59f9607
1 changed files with 5 additions and 7 deletions
|
|
@ -9768,7 +9768,6 @@ static int hdd_pre_enable_configure(struct hdd_context *hdd_ctx)
|
|||
{
|
||||
int ret;
|
||||
QDF_STATUS status;
|
||||
tSirRetStatus hal_status;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
|
||||
cdp_register_pause_cb(soc, wlan_hdd_txrx_pause_cb);
|
||||
|
|
@ -9848,13 +9847,12 @@ static int hdd_pre_enable_configure(struct hdd_context *hdd_ctx)
|
|||
* Set the MAC Address Currently this is used by HAL to add self sta.
|
||||
* Remove this once self sta is added as part of session open.
|
||||
*/
|
||||
hal_status = cfg_set_str(hdd_ctx->hHal, WNI_CFG_STA_ID,
|
||||
hdd_ctx->config->intfMacAddr[0].bytes,
|
||||
sizeof(hdd_ctx->config->intfMacAddr[0]));
|
||||
status = sme_cfg_set_str(hdd_ctx->hHal, WNI_CFG_STA_ID,
|
||||
hdd_ctx->config->intfMacAddr[0].bytes,
|
||||
sizeof(hdd_ctx->config->intfMacAddr[0]));
|
||||
|
||||
if (!IS_SIR_STATUS_SUCCESS(hal_status)) {
|
||||
hdd_err("Failed to set MAC Address. HALStatus is %08d [x%08x]",
|
||||
hal_status, hal_status);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
hdd_err("Failed to set MAC Address, status %d", status);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue