mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
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:
parent
e6e6ea9d84
commit
a1585b7253
3 changed files with 21 additions and 3 deletions
|
|
@ -668,7 +668,6 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
|
|||
struct wma_tgt_services *cfg)
|
||||
{
|
||||
struct hdd_config *config = hdd_ctx->config;
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hdd_ctx->hHal);
|
||||
|
||||
/* Set up UAPSD */
|
||||
config->apUapsdEnabled &= cfg->uapsd;
|
||||
|
|
@ -690,7 +689,6 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
|
|||
if (cfg->pno_offload)
|
||||
config->PnoOffload = true;
|
||||
#endif
|
||||
pMac->lteCoexAntShare = cfg->lte_coex_ant_share;
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
config->fEnableTDLSSupport &= cfg->en_tdls;
|
||||
config->fEnableTDLSOffChannel &= cfg->en_tdls_offchan;
|
||||
|
|
@ -701,10 +699,10 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
|
|||
config->fEnableTDLSSleepSta = false;
|
||||
}
|
||||
#endif
|
||||
pMac->beacon_offload = cfg->beacon_offload;
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
config->isRoamOffloadEnabled &= cfg->en_roam_offload;
|
||||
#endif
|
||||
sme_update_tgt_services(hdd_ctx->hHal, cfg);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#include "p2p_api.h"
|
||||
#include "cds_regdomain.h"
|
||||
#include "sme_internal.h"
|
||||
#include "wma_tgt_cfg.h"
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
#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,
|
||||
sme_set_thermal_level_callback callback);
|
||||
|
||||
void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg);
|
||||
#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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue