mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
qcacld-3.0: Fix fw offload ucfg APIs for wiphy features
WIPHY features are populated before FW offload object is initialized. Thus use direct config values for SAE and GCMP WIPHY features. Change-Id: Ic1b84c8709a0347fa22773786c0d5af32426e8fc CRs-fixed: 2376983
This commit is contained in:
parent
0faf628eaa
commit
66df7fcdf4
4 changed files with 16 additions and 58 deletions
|
|
@ -347,22 +347,18 @@ QDF_STATUS ucfg_fwol_get_lprx_enable(struct wlan_objmgr_psoc *psoc,
|
|||
/**
|
||||
* ucfg_fwol_get_sae_enable() - Get SAE feature enable status
|
||||
* @psoc: pointer to the psoc object
|
||||
* @sae_enable: Pointer to return SAE feature enable status
|
||||
*
|
||||
* Return: QDF Status
|
||||
* Return: True if enabled else false
|
||||
*/
|
||||
QDF_STATUS ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc,
|
||||
bool *sae_enable);
|
||||
bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_fwol_get_gcmp_enable() - Get GCMP feature enable status
|
||||
* @psoc: pointer to the psoc object
|
||||
* @gcmp_enable: Pointer to return GCMP feature enable status
|
||||
*
|
||||
* Return: QDF Status
|
||||
* Return: True if enabled else false
|
||||
*/
|
||||
QDF_STATUS ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc,
|
||||
bool *gcmp_enable);
|
||||
bool ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_fwol_get_enable_tx_sch_delay() - Get enable tx sch delay
|
||||
|
|
|
|||
|
|
@ -590,43 +590,20 @@ QDF_STATUS ucfg_fwol_get_lprx_enable(struct wlan_objmgr_psoc *psoc,
|
|||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_SAE
|
||||
QDF_STATUS ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc,
|
||||
bool *sae_enable)
|
||||
bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct wlan_fwol_psoc_obj *fwol_obj;
|
||||
|
||||
fwol_obj = fwol_get_psoc_obj(psoc);
|
||||
if (!fwol_obj) {
|
||||
fwol_err("Failed to get FWOL obj");
|
||||
*sae_enable = cfg_default(CFG_IS_SAE_ENABLED);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*sae_enable = fwol_obj->cfg.sae_enable;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
return cfg_get(psoc, CFG_IS_SAE_ENABLED);
|
||||
}
|
||||
#else
|
||||
QDF_STATUS ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc,
|
||||
bool *sae_enable)
|
||||
bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc,
|
||||
bool *gcmp_enable)
|
||||
bool ucfg_fwol_get_gcmp_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct wlan_fwol_psoc_obj *fwol_obj;
|
||||
|
||||
fwol_obj = fwol_get_psoc_obj(psoc);
|
||||
if (!fwol_obj) {
|
||||
fwol_err("Failed to get FWOL obj");
|
||||
*gcmp_enable = cfg_default(CFG_ENABLE_GCMP);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*gcmp_enable = fwol_obj->cfg.gcmp_enable;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
return cfg_get(psoc, CFG_ENABLE_GCMP);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_fwol_get_enable_tx_sch_delay(struct wlan_objmgr_psoc *psoc,
|
||||
|
|
|
|||
|
|
@ -12624,25 +12624,20 @@ static void wlan_hdd_cfg80211_set_wiphy_scan_flags(struct wiphy *wiphy)
|
|||
/**
|
||||
* wlan_hdd_cfg80211_set_wiphy_sae_feature() - Indicates support of SAE feature
|
||||
* @wiphy: Pointer to wiphy
|
||||
* @config: pointer to config
|
||||
*
|
||||
* This function is used to indicate the support of SAE
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy,
|
||||
struct hdd_config *config)
|
||||
static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
|
||||
bool sae_enable;
|
||||
|
||||
ucfg_fwol_get_sae_enable(hdd_ctx->psoc, &sae_enable);
|
||||
if (sae_enable)
|
||||
if (ucfg_fwol_get_sae_enable(hdd_ctx->psoc))
|
||||
wiphy->features |= NL80211_FEATURE_SAE;
|
||||
}
|
||||
#else
|
||||
static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy,
|
||||
struct hdd_config *config)
|
||||
static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
|
@ -12764,7 +12759,6 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||
int num_dsrc_ch, len_dsrc_ch, num_srd_ch, len_srd_ch;
|
||||
uint32_t *cipher_suites;
|
||||
uint8_t allow_mcc_go_diff_bi = 0, enable_mcc = 0;
|
||||
bool gcmp_enabled = false;
|
||||
|
||||
hdd_enter();
|
||||
|
||||
|
|
@ -12803,7 +12797,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||
|
||||
wlan_hdd_cfg80211_set_wiphy_scan_flags(wiphy);
|
||||
|
||||
wlan_hdd_cfg80211_set_wiphy_sae_feature(wiphy, pCfg);
|
||||
wlan_hdd_cfg80211_set_wiphy_sae_feature(wiphy);
|
||||
|
||||
hdd_config_sched_scan_plans_to_wiphy(wiphy, pCfg);
|
||||
wlan_hdd_cfg80211_add_connected_pno_support(wiphy);
|
||||
|
|
@ -12898,11 +12892,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||
}
|
||||
|
||||
/*Initialise the supported cipher suite details */
|
||||
if (QDF_IS_STATUS_ERROR(ucfg_fwol_get_gcmp_enable(hdd_ctx->psoc,
|
||||
&gcmp_enabled)))
|
||||
hdd_err("Unable to get GCMP feature enable config param");
|
||||
|
||||
if (gcmp_enabled) {
|
||||
if (ucfg_fwol_get_gcmp_enable(hdd_ctx->psoc)) {
|
||||
cipher_suites = qdf_mem_malloc(sizeof(hdd_cipher_suites) +
|
||||
sizeof(hdd_gcmp_cipher_suits));
|
||||
if (!cipher_suites)
|
||||
|
|
|
|||
|
|
@ -11307,13 +11307,8 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
|
|||
if (0 != wlan_hdd_set_wow_pulse(hdd_ctx, true))
|
||||
hdd_debug("Failed to set wow pulse");
|
||||
|
||||
bval = false;
|
||||
if (QDF_IS_STATUS_ERROR(ucfg_fwol_get_gcmp_enable(hdd_ctx->psoc,
|
||||
&bval)))
|
||||
hdd_err("Unable to get GCMP enable config param");
|
||||
|
||||
sme_cli_set_command(0, WMI_PDEV_PARAM_GCMP_SUPPORT_ENABLE,
|
||||
bval, PDEV_CMD);
|
||||
ucfg_fwol_get_gcmp_enable(hdd_ctx->psoc), PDEV_CMD);
|
||||
|
||||
auto_power_fail_mode =
|
||||
ucfg_pmo_get_auto_power_fail_mode(hdd_ctx->psoc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue