mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
qcacld-3.0: Refactor HDD LPASS "populate CDS config" logic
Previously "qcacld-3.0: Refactor WLAN_FEATURE_LPSS" refactored some of the HDD LPASS logic. Continue that process by refactoring the "populate CDS config" logic such that the actual implementation is in the lpass feature file. Change-Id: I3dada0d446a994862f70392f8ebf5911bda583da CRs-Fixed: 1070700
This commit is contained in:
parent
7139669405
commit
9078bdcb27
4 changed files with 39 additions and 17 deletions
|
|
@ -48,6 +48,7 @@
|
|||
#include "i_cds_packet.h"
|
||||
#include "cds_reg_service.h"
|
||||
#include "wlan_hdd_main.h"
|
||||
#include "wlan_hdd_lpass.h"
|
||||
#include "qwlan_version.h"
|
||||
#include "wma_types.h"
|
||||
#include "cfg_api.h"
|
||||
|
|
@ -56,7 +57,6 @@
|
|||
#include "bmi.h"
|
||||
#include "ol_fw.h"
|
||||
#include "wlan_hdd_cfg80211.h"
|
||||
#include "wlan_hdd_main.h"
|
||||
#include "hif.h"
|
||||
#endif
|
||||
|
||||
|
|
@ -114,18 +114,6 @@ static uint32_t wlan_ftm_postmsg(uint8_t *cmd_ptr, uint16_t cmd_len)
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_LPSS
|
||||
static inline void hdd_is_lpass_supported(struct cds_config_info *cds_cfg,
|
||||
hdd_context_t *hdd_ctx)
|
||||
{
|
||||
cds_cfg->is_lpass_enabled = hdd_ctx->config->enable_lpass_support;
|
||||
}
|
||||
#else
|
||||
static inline void hdd_is_lpass_supported(struct cds_config_info *cds_cfg,
|
||||
hdd_context_t *hdd_ctx)
|
||||
{ }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_update_cds_config_ftm() - API to update cds configuration parameters
|
||||
* for FTM mode.
|
||||
|
|
@ -138,17 +126,16 @@ int hdd_update_cds_config_ftm(hdd_context_t *hdd_ctx)
|
|||
{
|
||||
struct cds_config_info *cds_cfg;
|
||||
|
||||
cds_cfg = qdf_mem_malloc(sizeof(struct cds_config_info));
|
||||
cds_cfg = qdf_mem_malloc(sizeof(*cds_cfg));
|
||||
if (!cds_cfg) {
|
||||
hdd_err("failed to allocate cds config");
|
||||
return -ENOMEM;
|
||||
}
|
||||
qdf_mem_zero(cds_cfg, sizeof(struct cds_config_info));
|
||||
|
||||
cds_cfg->driver_type = eDRIVER_TYPE_MFG;
|
||||
cds_cfg->powersave_offload_enabled =
|
||||
hdd_ctx->config->enablePowersaveOffload;
|
||||
hdd_is_lpass_supported(cds_cfg, hdd_ctx);
|
||||
hdd_lpass_populate_cds_config(cds_cfg, hdd_ctx);
|
||||
/* UMA is supported in hardware for performing the
|
||||
* frame translation 802.11 <-> 802.3
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -261,6 +261,22 @@ static void wlan_hdd_send_all_scan_intf_info(struct hdd_context_s *hdd_ctx)
|
|||
wlan_hdd_send_status_pkg(adapter, NULL, 1, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_lpass_populate_cds_config() - Populate LPASS configuration
|
||||
* @cds_config: CDS configuration to populate with lpass info
|
||||
* @hdd_ctx: HDD global context which contains lpass information
|
||||
*
|
||||
* This function seeds the CDS configuration structure with
|
||||
* lpass-specific information gleaned from the HDD context.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
|
||||
struct hdd_context_s *hdd_ctx)
|
||||
{
|
||||
cds_config->is_lpass_enabled = hdd_ctx->config->enable_lpass_support;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_lpass_notify_connect() - Notify LPASS of interface connect
|
||||
* @adapter: The adapter that connected
|
||||
|
|
|
|||
|
|
@ -28,10 +28,24 @@
|
|||
#if !defined(WLAN_HDD_LPASS_H)
|
||||
#define WLAN_HDD_LPASS_H
|
||||
|
||||
struct cds_config_info;
|
||||
struct hdd_context_s;
|
||||
struct hdd_adapter_s;
|
||||
|
||||
#ifdef WLAN_FEATURE_LPSS
|
||||
/**
|
||||
* hdd_lpass_populate_cds_config() - Populate LPASS configuration
|
||||
* @cds_config: CDS configuration to populate with lpass info
|
||||
* @hdd_ctx: HDD global context which contains lpass information
|
||||
*
|
||||
* This function seeds the CDS configuration structure with
|
||||
* lpass-specific information gleaned from the HDD context.
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
|
||||
struct hdd_context_s *hdd_ctx);
|
||||
|
||||
/**
|
||||
* hdd_lpass_notify_connect() - Notify LPASS of interface connect
|
||||
* @adapter: The adapter that connected
|
||||
|
|
@ -87,6 +101,11 @@ void hdd_lpass_notify_start(struct hdd_context_s *hdd_ctx);
|
|||
*/
|
||||
void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx);
|
||||
#else
|
||||
static inline
|
||||
void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
|
||||
struct hdd_context_s *hdd_ctx)
|
||||
{
|
||||
}
|
||||
static inline void hdd_lpass_notify_connect(struct hdd_adapter_s *adapter)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6745,7 +6745,7 @@ int hdd_update_cds_config(hdd_context_t *hdd_ctx)
|
|||
hdd_ra_populate_cds_config(cds_cfg, hdd_ctx);
|
||||
hdd_txrx_populate_cds_config(cds_cfg, hdd_ctx);
|
||||
hdd_nan_populate_cds_config(cds_cfg, hdd_ctx);
|
||||
|
||||
hdd_lpass_populate_cds_config(cds_cfg, hdd_ctx);
|
||||
cds_init_ini_config(cds_cfg);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue