qcacld-3.0: Refactor SAP ini items
Refactor ini items gSapForce11NFor11AC and gGoForce11NFor11AC into new mlme component. Change-Id: I85e2f7f9ae14a23c322572290b095aae0f29b0ec CRs-Fixed: 2354940
This commit is contained in:
@@ -1058,6 +1058,12 @@ static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_mlme_cfg_sap *sap_cfg)
|
||||
{
|
||||
uint8_t *ssid;
|
||||
|
||||
ssid = cfg_default(CFG_SSID);
|
||||
qdf_mem_zero(sap_cfg->cfg_ssid, MLME_CFG_SSID_LEN);
|
||||
sap_cfg->cfg_ssid_len = STR_SSID_DEFAULT_LEN;
|
||||
qdf_mem_copy(sap_cfg->cfg_ssid, ssid, STR_SSID_DEFAULT_LEN);
|
||||
sap_cfg->beacon_interval = cfg_get(psoc, CFG_BEACON_INTERVAL);
|
||||
sap_cfg->dtim_interval = cfg_default(CFG_DTIM_PERIOD);
|
||||
sap_cfg->listen_interval = cfg_default(CFG_LISTEN_INTERVAL);
|
||||
@@ -1094,6 +1100,10 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
cfg_get(psoc, CFG_COUNTRY_CODE_PRIORITY);
|
||||
sap_cfg->sap_pref_chan_location =
|
||||
cfg_get(psoc, CFG_SAP_PREF_CHANNEL_LOCATION);
|
||||
sap_cfg->sap_force_11n_for_11ac =
|
||||
cfg_get(psoc, CFG_SAP_FORCE_11N_FOR_11AC);
|
||||
sap_cfg->go_force_11n_for_11ac =
|
||||
cfg_get(psoc, CFG_GO_FORCE_11N_FOR_11AC);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -23,11 +23,14 @@
|
||||
#ifndef __CFG_MLME_SAP_H
|
||||
#define __CFG_MLME_SAP_H
|
||||
|
||||
#define STR_SSID_DEFAULT "1234567890"
|
||||
#define STR_SSID_DEFAULT_LEN sizeof(STR_SSID_DEFAULT)
|
||||
|
||||
#define CFG_SSID CFG_STRING( \
|
||||
"cfg_ssid", \
|
||||
0, \
|
||||
32, \
|
||||
"1,2,3,4,5,6,7,8,9,0", \
|
||||
STR_SSID_DEFAULT_LEN, \
|
||||
STR_SSID_DEFAULT, \
|
||||
"CFG_SSID")
|
||||
|
||||
#define CFG_BEACON_INTERVAL CFG_INI_UINT( \
|
||||
@@ -526,6 +529,53 @@
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Sap preferred channel location")
|
||||
/*
|
||||
* <ini>
|
||||
* gSapForce11NFor11AC - Restrict SAP to 11n if set 1 even though
|
||||
* hostapd.conf request for 11ac.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* Restrict SAP to 11n if set 1 even though hostapd.conf request for 11ac.
|
||||
*
|
||||
* 0- Do not force 11n for 11ac.
|
||||
* 1- Force 11n for 11ac.
|
||||
*
|
||||
* Supported Feature: SAP
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_SAP_FORCE_11N_FOR_11AC CFG_INI_BOOL( \
|
||||
"gSapForce11NFor11AC", \
|
||||
0, \
|
||||
"Sap force 11n for 11ac")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gGoForce11NFor11AC - Restrict GO to 11n if set 1 even though
|
||||
* hostapd.conf request for 11ac.
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* Restrict GO to 11n if set 1 even though hostapd.conf request for 11ac.
|
||||
*
|
||||
* 0- Do not force 11n for 11ac.
|
||||
* 1- Force 11n for 11ac.
|
||||
*
|
||||
* Supported Feature: GO
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_GO_FORCE_11N_FOR_11AC CFG_INI_BOOL( \
|
||||
"gGoForce11NFor11AC", \
|
||||
0, \
|
||||
"GO force 11n for 11ac")
|
||||
|
||||
|
||||
#define CFG_SAP_ALL \
|
||||
@@ -554,6 +604,8 @@
|
||||
CFG(CFG_REDUCED_BEACON_INTERVAL) \
|
||||
CFG(CFG_MAX_LI_MODULATED_DTIM) \
|
||||
CFG(CFG_COUNTRY_CODE_PRIORITY) \
|
||||
CFG(CFG_SAP_PREF_CHANNEL_LOCATION)
|
||||
CFG(CFG_SAP_PREF_CHANNEL_LOCATION) \
|
||||
CFG(CFG_SAP_FORCE_11N_FOR_11AC) \
|
||||
CFG(CFG_GO_FORCE_11N_FOR_11AC)
|
||||
|
||||
#endif /* __CFG_MLME_SAP_H */
|
||||
|
@@ -637,6 +637,28 @@ QDF_STATUS wlan_mlme_get_sap_reduced_beacon_interval(struct wlan_objmgr_psoc
|
||||
QDF_STATUS wlan_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
|
||||
*psoc, bool *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_sap_force_11n_for_11ac() - get the sap 11n for 11ac
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_sap_force_11n_for_11ac(struct wlan_objmgr_psoc
|
||||
*psoc, bool *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_go_force_11n_for_11ac() - get the go 11n for 11ac
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
|
||||
*psoc, bool *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_oce_sta_enabled_info() - Get the OCE feature enable
|
||||
* info for STA
|
||||
|
@@ -498,6 +498,8 @@ struct wlan_mlme_wps_params {
|
||||
#define MLME_CFG_TX_MGMT_RATE_DEF 0xFF
|
||||
#define MLME_CFG_TX_MGMT_2G_RATE_DEF 0xFF
|
||||
#define MLME_CFG_TX_MGMT_5G_RATE_DEF 0xFF
|
||||
#define MLME_CFG_SSID_LEN 32
|
||||
|
||||
/**
|
||||
* struct wlan_mlme_cfg_sap - SAP related config items
|
||||
* @cfg_ssid: SSID to be configured
|
||||
@@ -528,7 +530,8 @@ struct wlan_mlme_wps_params {
|
||||
* @sap_pref_chan_location: SAP Preferred channel location.
|
||||
*/
|
||||
struct wlan_mlme_cfg_sap {
|
||||
uint8_t cfg_ssid[32];
|
||||
uint8_t cfg_ssid[MLME_CFG_SSID_LEN];
|
||||
uint8_t cfg_ssid_len;
|
||||
uint16_t beacon_interval;
|
||||
uint16_t dtim_interval;
|
||||
uint16_t listen_interval;
|
||||
@@ -554,6 +557,8 @@ struct wlan_mlme_cfg_sap {
|
||||
uint8_t max_li_modulated_dtim_time;
|
||||
bool country_code_priority;
|
||||
uint8_t sap_pref_chan_location;
|
||||
bool sap_force_11n_for_11ac;
|
||||
bool go_force_11n_for_11ac;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -1070,6 +1070,40 @@ QDF_STATUS ucfg_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
|
||||
return wlan_mlme_get_sap_chan_switch_rate_enabled(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_sap_force_11n_for_11ac() - get the sap 11n for 11ac
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Inline UCFG API to be used by HDD/OSIF callers
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_get_sap_force_11n_for_11ac(struct wlan_objmgr_psoc
|
||||
*psoc, bool *value)
|
||||
{
|
||||
return wlan_mlme_get_sap_force_11n_for_11ac(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_go_force_11n_for_11ac() - get the GO 11n for 11ac
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Inline UCFG API to be used by HDD/OSIF callers
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
|
||||
*psoc, bool *value)
|
||||
{
|
||||
return wlan_mlme_get_go_force_11n_for_11ac(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_oce_sta_enabled_info() - Get OCE feature enable/disable
|
||||
* info for STA
|
||||
|
@@ -1875,6 +1875,38 @@ QDF_STATUS wlan_mlme_get_sap_chan_switch_rate_enabled(struct wlan_objmgr_psoc
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_mlme_get_sap_force_11n_for_11ac(struct wlan_objmgr_psoc
|
||||
*psoc, bool *value)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
mlme_err("Failed to get MLME Obj");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*value = mlme_obj->cfg.sap_cfg.sap_force_11n_for_11ac;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_mlme_get_go_force_11n_for_11ac(struct wlan_objmgr_psoc
|
||||
*psoc, bool *value)
|
||||
{
|
||||
struct wlan_mlme_psoc_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_obj(psoc);
|
||||
if (!mlme_obj) {
|
||||
mlme_err("Failed to get MLME Obj");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*value = mlme_obj->cfg.sap_cfg.go_force_11n_for_11ac;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user