mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Pass user configuration to pmo
Pass user configuration / ini param to pmo component. Change-Id: I056b25050cbf5773468cf0457912cc6544aeccc3 CRs-Fixed: 2002630
This commit is contained in:
parent
c5de677a6e
commit
9d797a0cb5
2 changed files with 99 additions and 0 deletions
|
|
@ -68,6 +68,7 @@
|
|||
#include <wlan_objmgr_pdev_obj.h>
|
||||
#include <wlan_objmgr_vdev_obj.h>
|
||||
#include <wlan_objmgr_peer_obj.h>
|
||||
#include "wlan_pmo_ucfg_api.h"
|
||||
|
||||
/*
|
||||
* Preprocessor definitions and constants
|
||||
|
|
@ -1917,6 +1918,15 @@ uint8_t wlan_hdd_find_opclass(tHalHandle hal, uint8_t channel,
|
|||
uint8_t bw_offset);
|
||||
int hdd_update_config(hdd_context_t *hdd_ctx);
|
||||
|
||||
/**
|
||||
* hdd_update_components_config() - Initialize driver per module ini parameters
|
||||
* @hdd_ctx: HDD Context
|
||||
*
|
||||
* API is used to initialize components configuration parameters
|
||||
* Return: 0 for success, errno for failure
|
||||
*/
|
||||
int hdd_update_components_config(hdd_context_t *hdd_ctx);
|
||||
|
||||
QDF_STATUS hdd_chan_change_notify(hdd_adapter_t *adapter,
|
||||
struct net_device *dev,
|
||||
struct hdd_chan_change_params chan_change);
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@
|
|||
#include "cds_utils.h"
|
||||
#include <cdp_txrx_handle.h>
|
||||
#include <qca_vendor.h>
|
||||
#include "wlan_pmo_ucfg_api.h"
|
||||
|
||||
#ifdef MODULE
|
||||
#define WLAN_MODULE_NAME module_name(THIS_MODULE)
|
||||
|
|
@ -1835,6 +1836,14 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
|
|||
goto destroy_psoc_object;
|
||||
}
|
||||
|
||||
/* initalize components configurations after psoc open */
|
||||
ret = hdd_update_components_config(hdd_ctx);
|
||||
if (ret) {
|
||||
hdd_err("Failed to update components configs :%d",
|
||||
ret);
|
||||
goto close;
|
||||
}
|
||||
|
||||
hdd_ctx->driver_status = DRIVER_MODULES_OPENED;
|
||||
|
||||
hdd_ctx->hHal = cds_get_context(QDF_MODULE_ID_SME);
|
||||
|
|
@ -10155,6 +10164,86 @@ int hdd_update_config(hdd_context_t *hdd_ctx)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
/**
|
||||
* hdd_ra_populate_cds_config() - Populate RA filtering cds configuration
|
||||
* @psoc_cfg: pmo psoc Configuration
|
||||
* @hdd_ctx: Pointer to hdd context
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static inline void hdd_ra_populate_pmo_config(
|
||||
struct pmo_psoc_cfg *psoc_cfg,
|
||||
hdd_context_t *hdd_ctx)
|
||||
{
|
||||
psoc_cfg->ra_ratelimit_interval =
|
||||
hdd_ctx->config->RArateLimitInterval;
|
||||
psoc_cfg->ra_ratelimit_enable =
|
||||
hdd_ctx->config->IsRArateLimitEnabled;
|
||||
}
|
||||
#else
|
||||
static inline void hdd_ra_populate_pmo_config(
|
||||
struct cds_config_info *cds_cfg,
|
||||
hdd_context_t *hdd_ctx)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* hdd_update_pmo_config - API to update pmo configuration parameters
|
||||
* @hdd_ctx: HDD context
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static int hdd_update_pmo_config(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc;
|
||||
struct pmo_psoc_cfg psoc_cfg;
|
||||
QDF_STATUS status;
|
||||
|
||||
/*
|
||||
* Value of hdd_ctx->wowEnable can be,
|
||||
* 0 - Disable both magic pattern match and pattern byte match.
|
||||
* 1 - Enable magic pattern match on all interfaces.
|
||||
* 2 - Enable pattern byte match on all interfaces.
|
||||
* 3 - Enable both magic patter and pattern byte match on
|
||||
* all interfaces.
|
||||
*/
|
||||
psoc_cfg.magic_ptrn_enable =
|
||||
(hdd_ctx->config->wowEnable & 0x01) ? true : false;
|
||||
psoc_cfg.ptrn_match_enable_all_vdev =
|
||||
(hdd_ctx->config->wowEnable & 0x02) ? true : false;
|
||||
psoc_cfg.bpf_enable =
|
||||
hdd_ctx->config->bpf_packet_filter_enable;
|
||||
psoc_cfg.arp_offload_enable = hdd_ctx->config->fhostArpOffload;
|
||||
psoc_cfg.ns_offload_enable_static = hdd_ctx->config->fhostNSOffload;
|
||||
if (hdd_ctx->config->fhostNSOffload)
|
||||
psoc_cfg.ns_offload_enable_dynamic = true;
|
||||
psoc_cfg.ssdp = hdd_ctx->config->ssdp;
|
||||
psoc_cfg.enable_mc_list = hdd_ctx->config->fEnableMCAddrList;
|
||||
psoc_cfg.active_mode_offload =
|
||||
hdd_ctx->config->active_mode_offload;
|
||||
psoc_cfg.ap_arpns_support = hdd_ctx->ap_arpns_support;
|
||||
psoc_cfg.max_wow_filters = hdd_ctx->config->maxWoWFilters;
|
||||
|
||||
hdd_ra_populate_pmo_config(&psoc_cfg, hdd_ctx);
|
||||
status = pmo_ucfg_update_psoc_config(psoc, &psoc_cfg);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
hdd_err("failed pmo psoc configuration");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int hdd_update_components_config(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = hdd_update_pmo_config(hdd_ctx);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_hdd_get_dfs_mode() - get ACS DFS mode
|
||||
* @mode : cfg80211 DFS mode
|
||||
|
|
|
|||
Loading…
Reference in a new issue