qcacld-3.0: Refactor 11AC override CFG items

Refactor following CFG items
1. CFG_SAP_11AC_OVERRIDE
2. CFG_GO_11AC_OVERRIDE

Change-Id: I63497fcc4440fb079fa0f8d8879758baad2d8fc2
CRs-Fixed: 2391667
This commit is contained in:
Sandeep Puligilla
2019-01-04 17:42:42 -08:00
committed by nshrivas
父節點 a7f08d8ef9
當前提交 3461878302
共有 12 個文件被更改,包括 248 次插入83 次删除

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -626,7 +626,59 @@
CFG_VALUE_OR_DEFAULT, \
"SAP MCC channel avoidance")
#define CFG_SAP_ALL \
/*
* <ini>
* gSAP11ACOverride - Override bw to 11ac for SAP in driver even if supplicant
* or hostapd configures HT.
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable 11AC override for SAP.
* Android UI does not provide advanced configuration options
* for SoftAP for Android O and below.
* Default override disabled for android. Can be enabled from
* ini for Android O and below.
*
*
* Supported Feature: SAP
*
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_SAP_11AC_OVERRIDE CFG_INI_BOOL( \
"gSAP11ACOverride", \
0, \
"Override bw to 11ac for SAP")
/*
* <ini>
* gGO11ACOverride - Override bw to 11ac for P2P GO
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable 11AC override for GO.
* P2P GO also follows start_bss and since P2P GO could not be
* configured to setup VHT channel width in wpa_supplicant, driver
* can override 11AC.
*
*
* Supported Feature: P2P
*
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_GO_11AC_OVERRIDE CFG_INI_BOOL( \
"gGO11ACOverride", \
1, \
"Override bw to 11ac for P2P GO")
#define CFG_SAP_ALL \
CFG(CFG_AP_ENABLE_RANDOM_BSSID) \
CFG(CFG_SSID) \
CFG(CFG_BEACON_INTERVAL) \
@@ -656,6 +708,8 @@
CFG(CFG_COUNTRY_CODE_PRIORITY) \
CFG(CFG_SAP_PREF_CHANNEL_LOCATION) \
CFG(CFG_SAP_FORCE_11N_FOR_11AC) \
CFG(CFG_GO_FORCE_11N_FOR_11AC)
CFG(CFG_SAP_11AC_OVERRIDE) \
CFG(CFG_GO_FORCE_11N_FOR_11AC) \
CFG(CFG_GO_11AC_OVERRIDE)
#endif /* __CFG_MLME_SAP_H */

查看文件

@@ -684,6 +684,50 @@ QDF_STATUS wlan_mlme_get_sap_force_11n_for_11ac(struct wlan_objmgr_psoc
QDF_STATUS wlan_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
*psoc, bool *value);
/**
* wlan_mlme_is_go_11ac_override() - Override 11ac bandwdith for P2P GO
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_is_go_11ac_override(struct wlan_objmgr_psoc *psoc,
bool *value);
/**
* wlan_mlme_is_sap_11ac_override() - Override 11ac bandwdith for SAP
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_is_sap_11ac_override(struct wlan_objmgr_psoc *psoc,
bool *value);
/**
* wlan_mlme_set_go_11ac_override() - set override 11ac bandwdith for P2P GO
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_set_go_11ac_override(struct wlan_objmgr_psoc *psoc,
bool value);
/**
* wlan_mlme_set_sap_11ac_override() - set override 11ac bandwdith for SAP
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_set_sap_11ac_override(struct wlan_objmgr_psoc *psoc,
bool value);
/**
* wlan_mlme_get_oce_sta_enabled_info() - Get the OCE feature enable
* info for STA

查看文件

@@ -580,6 +580,8 @@ struct wlan_mlme_wps_params {
* @country_code_priority: Country code priority.
* @sap_pref_chan_location: SAP Preferred channel location.
* @sap_mcc_chnl_avoid: SAP MCC channel avoidance flag
* @sap_11ac_override: Overrirde SAP bandwidth to 11ac
* @go_11ac_override: Override GO bandwidth to 11ac
*/
struct wlan_mlme_cfg_sap {
uint8_t cfg_ssid[MLME_CFG_SSID_LEN];
@@ -613,6 +615,8 @@ struct wlan_mlme_cfg_sap {
bool go_force_11n_for_11ac;
bool ap_random_bssid_enable;
uint8_t sap_mcc_chnl_avoid;
bool sap_11ac_override;
bool go_11ac_override;
};
/**

查看文件

@@ -1610,6 +1610,66 @@ QDF_STATUS ucfg_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
return wlan_mlme_get_go_force_11n_for_11ac(psoc, value);
}
/**
* ucfg_mlme_is_sap_11ac_override() - Override 11ac bandwdith for SAP
*
* @psoc: pointer to psoc object
* @value: Value that needs to be set from the caller
*
* Return: QDF Status
*/
static inline
QDF_STATUS ucfg_mlme_is_sap_11ac_override(struct wlan_objmgr_psoc *psoc,
bool *value)
{
return wlan_mlme_is_sap_11ac_override(psoc, value);
}
/**
* ucfg_mlme_is_go_11ac_override() - Override 11ac bandwdith for P2P GO
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
static inline
QDF_STATUS ucfg_mlme_is_go_11ac_override(struct wlan_objmgr_psoc *psoc,
bool *value)
{
return wlan_mlme_is_go_11ac_override(psoc, value);
}
/**
* ucfg_mlme_set_sap_11ac_override() - Set override 11ac bandwdith for SAP
*
* @psoc: pointer to psoc object
* @value: Value that needs to be set from the caller
*
* Return: QDF Status
*/
static inline
QDF_STATUS ucfg_mlme_set_sap_11ac_override(struct wlan_objmgr_psoc *psoc,
bool value)
{
return wlan_mlme_set_sap_11ac_override(psoc, value);
}
/**
* ucfg_mlme_set_go_11ac_override() - Set override 11ac bandwdith for P2P GO
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
static inline
QDF_STATUS ucfg_mlme_set_go_11ac_override(struct wlan_objmgr_psoc *psoc,
bool value)
{
return wlan_mlme_set_go_11ac_override(psoc, value);
}
/**
* ucfg_mlme_get_oce_sta_enabled_info() - Get OCE feature enable/disable
* info for STA

查看文件

@@ -1769,6 +1769,62 @@ QDF_STATUS wlan_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_is_sap_11ac_override(struct wlan_objmgr_psoc *psoc,
bool *value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*value = cfg_default(CFG_SAP_11AC_OVERRIDE);
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.sap_cfg.sap_11ac_override;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_is_go_11ac_override(struct wlan_objmgr_psoc *psoc,
bool *value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*value = cfg_default(CFG_GO_11AC_OVERRIDE);
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.sap_cfg.go_11ac_override;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_set_sap_11ac_override(struct wlan_objmgr_psoc *psoc,
bool value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_FAILURE;
mlme_obj->cfg.sap_cfg.sap_11ac_override = value;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_set_go_11ac_override(struct wlan_objmgr_psoc *psoc,
bool value)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_FAILURE;
mlme_obj->cfg.sap_cfg.go_11ac_override = value;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value)
{