qcacld-3.0: Fix layering violation in hdd_update_tgt_services
Fix layering violation in hdd_update_tgt_services by not accessing pMac structure directly from HDD. New SME API - sme_update_tgt_services() introducted to configure the parameters in pMAC structure. Change-Id: I7310e51001c5e17ed63730d7a86445548aa3d246 CRs-Fixed: 915267
This commit is contained in:

committed by
Prakash Dhavali

parent
e6e6ea9d84
commit
a1585b7253
@@ -668,7 +668,6 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
|
|||||||
struct wma_tgt_services *cfg)
|
struct wma_tgt_services *cfg)
|
||||||
{
|
{
|
||||||
struct hdd_config *config = hdd_ctx->config;
|
struct hdd_config *config = hdd_ctx->config;
|
||||||
tpAniSirGlobal pMac = PMAC_STRUCT(hdd_ctx->hHal);
|
|
||||||
|
|
||||||
/* Set up UAPSD */
|
/* Set up UAPSD */
|
||||||
config->apUapsdEnabled &= cfg->uapsd;
|
config->apUapsdEnabled &= cfg->uapsd;
|
||||||
@@ -690,7 +689,6 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
|
|||||||
if (cfg->pno_offload)
|
if (cfg->pno_offload)
|
||||||
config->PnoOffload = true;
|
config->PnoOffload = true;
|
||||||
#endif
|
#endif
|
||||||
pMac->lteCoexAntShare = cfg->lte_coex_ant_share;
|
|
||||||
#ifdef FEATURE_WLAN_TDLS
|
#ifdef FEATURE_WLAN_TDLS
|
||||||
config->fEnableTDLSSupport &= cfg->en_tdls;
|
config->fEnableTDLSSupport &= cfg->en_tdls;
|
||||||
config->fEnableTDLSOffChannel &= cfg->en_tdls_offchan;
|
config->fEnableTDLSOffChannel &= cfg->en_tdls_offchan;
|
||||||
@@ -701,10 +699,10 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
|
|||||||
config->fEnableTDLSSleepSta = false;
|
config->fEnableTDLSSleepSta = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
pMac->beacon_offload = cfg->beacon_offload;
|
|
||||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
config->isRoamOffloadEnabled &= cfg->en_roam_offload;
|
config->isRoamOffloadEnabled &= cfg->en_roam_offload;
|
||||||
#endif
|
#endif
|
||||||
|
sme_update_tgt_services(hdd_ctx->hHal, cfg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -46,6 +46,7 @@
|
|||||||
#include "p2p_api.h"
|
#include "p2p_api.h"
|
||||||
#include "cds_regdomain.h"
|
#include "cds_regdomain.h"
|
||||||
#include "sme_internal.h"
|
#include "sme_internal.h"
|
||||||
|
#include "wma_tgt_cfg.h"
|
||||||
|
|
||||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||||
#include "oem_data_api.h"
|
#include "oem_data_api.h"
|
||||||
@@ -1045,4 +1046,5 @@ CDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context,
|
|||||||
void sme_add_set_thermal_level_callback(tHalHandle hal,
|
void sme_add_set_thermal_level_callback(tHalHandle hal,
|
||||||
sme_set_thermal_level_callback callback);
|
sme_set_thermal_level_callback callback);
|
||||||
|
|
||||||
|
void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg);
|
||||||
#endif /* #if !defined( __SME_API_H ) */
|
#endif /* #if !defined( __SME_API_H ) */
|
||||||
|
@@ -14705,3 +14705,21 @@ CDF_STATUS sme_update_roam_scan_hi_rssi_scan_params(tHalHandle hal_handle,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sme_update_tgt_services() - update the target services config.
|
||||||
|
* @hal: HAL pointer.
|
||||||
|
* @cfg: wma_tgt_services parameters.
|
||||||
|
*
|
||||||
|
* update the target services config.
|
||||||
|
*
|
||||||
|
* Return: None.
|
||||||
|
*/
|
||||||
|
void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg)
|
||||||
|
{
|
||||||
|
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
|
||||||
|
|
||||||
|
mac_ctx->lteCoexAntShare = cfg->lte_coex_ant_share;
|
||||||
|
mac_ctx->beacon_offload = cfg->beacon_offload;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user