qcacld-3.0: Add MLME OCE CFG items

Add OCE CFG items based on converged cfg component,
remove related legacy code.

Change-Id: I976981048be2df3f429003fc5db13f48a6ad27d0
CRs-Fixed: 2313157
This commit is contained in:
Karthik Kantamneni
2018-09-11 15:45:55 +05:30
committed by Nitesh Shrivastav
orang tua 19a690098e
melakukan 2231a23f44
14 mengubah file dengan 623 tambahan dan 415 penghapusan

Melihat File

@@ -36,6 +36,7 @@
#include "cfg_sap_protection.h"
#include "cfg_mlme_sap.h"
#include "cfg_mlme_scoring.h"
#include "cfg_mlme_oce.h"
/* Please Maintain Alphabetic Order here */
#define CFG_MLME_ALL \
@@ -45,6 +46,7 @@
CFG_LFR_ALL \
CFG_MBO_ALL \
CFG_OBSS_HT40_ALL \
CFG_OCE_ALL \
CFG_QOS_ALL \
CFG_RATES_ALL \
CFG_SAP_ALL \

Melihat File

@@ -0,0 +1,287 @@
/*
* Copyright (c) 2012-2018 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
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/**
* DOC: This file contains centralized definitions of converged configuration.
*/
#ifndef __CFG_MLME_OCE_H
#define __CFG_MLME_OCE_H
/*
* <ini>
* g_enable_bcast_probe_rsp - Enable Broadcast probe response.
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable broadcast probe response.
* If this is disabled then OCE ini oce_sta_enable will also be
* disabled and OCE IE will not be sent in frames.
*
* Related: None
*
* Supported Feature: FILS
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_BCAST_PROBE_RESP CFG_INI_BOOL( \
"g_enable_bcast_probe_rsp", \
1, \
"Enable Broadcast probe response")
/*
* <ini>
* oce_sta_enable - Enable/disable oce feature for STA
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable oce feature for STA
*
* Related: None
*
* Supported Feature: OCE
*
* Usage: External
*
* </ini>
*/
#define CFG_OCE_ENABLE_STA CFG_INI_BOOL( \
"oce_sta_enable", \
1, \
"Enable/disable oce feature for STA")
/*
* <ini>
* oce_sap_enable - Enable/disable oce feature for SAP
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable oce feature for SAP
*
* Related: None
*
* Supported Feature: OCE
*
* Usage: External
*
* </ini>
*/
#define CFG_OCE_ENABLE_SAP CFG_INI_BOOL( \
"oce_sap_enable", \
1, \
"Enable/disable oce feature for SAP")
/*
* oce_enable_rssi_assoc_reject - Enable/disable rssi based assoc rejection
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable rssi based assoc rejection. If this is
* disabled then OCE ini oce_sta_enable will also be disabled and OCE IE will
* not be sent in frames.
*
* Related: None
*
* Supported Feature: OCE
*
* Usage: External
*
* </ini>
*/
#define CFG_OCE_ENABLE_RSSI_BASED_ASSOC_REJECT CFG_INI_BOOL( \
"oce_enable_rssi_assoc_reject", \
1, \
"Enable/disable rssi based assoc rejection")
/*
* <ini>
* oce_enable_probe_req_rate - Set probe request rate
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to set probe request rate to 5.5Mbps as per OCE requirement
* in 2.4G band
*
* Related: None
*
* Supported Feature: OCE
*
* Usage: External
*
* </ini>
*/
#define CFG_OCE_PROBE_REQ_RATE CFG_INI_BOOL( \
"oce_enable_probe_req_rate", \
0, \
"Set probe request rate for OCE")
/*
* <ini>
* oce_enable_probe_resp_rate - Set probe response rate
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to set probe response rate to 5.5Mbps as per OCE requirement
* in 2.4G band
*
* Related: None
*
* Supported Feature: OCE
*
* Usage: External
*
* </ini>
*/
#define CFG_OCE_PROBE_RSP_RATE CFG_INI_BOOL( \
"oce_enable_probe_resp_rate", \
0, \
"Set probe response rate for OCE")
/*
* <ini>
* oce_enable_beacon_rate - Set beacon rate
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to set beacon rate to 5.5Mbps as per OCE requirement in
* 2.4G band
*
* Related: None
*
* Supported Feature: OCE
*
* Usage: External
*
* </ini>
*/
#define CFG_OCE_BEACON_RATE CFG_INI_BOOL( \
"oce_enable_beacon_rate", \
0, \
"Set Beacon rate for OCE")
/*
* <ini>
* oce_enable_probe_req_deferral - Enable/disable probe request deferral
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable probe request deferral as per OCE spec
*
* Related: None
*
* Supported Feature: OCE
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_PROBE_REQ_DEFERRAL CFG_INI_BOOL( \
"oce_enable_probe_req_deferral", \
0, \
"Enable/disable probe request deferral for OCE")
/*
* <ini>
* oce_enable_fils_discovery_sap - Enable/disable fils discovery in sap mode
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable fils discovery in sap mode
*
* Related: None
*
* Supported Feature: FILS
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_FILS_DISCOVERY_SAP CFG_INI_BOOL( \
"oce_enable_fils_discovery_sap", \
1, \
"Enable/disable fils discovery in sap mode")
/*
* <ini>
* enable_esp_for_roam - Enable/disable esp feature
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable ESP(Estimated service parameters) IE
* parsing and decides whether firmware will include this in its scoring algo.
*
* Related: None
*
* Supported Feature: STA
*
* Usage: External
*
* </ini>
*/
#define CFG_ENABLE_ESP_FEATURE CFG_INI_BOOL( \
"enable_esp_for_roam", \
0, \
"Enable/disable esp feature")
/*
* <ini>
* g_is_fils_enabled - Enable/Disable FILS support in driver
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to enable/disable FILS support in driver
* Driver will update config to supplicant based on this config.
*
* Related: None
*
* Supported Feature: FILS
*
* Usage: External
*
* </ini>
*/
#define CFG_IS_FILS_ENABLED CFG_INI_BOOL( \
"g_is_fils_enabled", \
1, \
"Enable/disable support")
#define CFG_OCE_ALL \
CFG(CFG_ENABLE_BCAST_PROBE_RESP) \
CFG(CFG_OCE_ENABLE_STA) \
CFG(CFG_OCE_ENABLE_SAP) \
CFG(CFG_OCE_ENABLE_RSSI_BASED_ASSOC_REJECT) \
CFG(CFG_OCE_PROBE_REQ_RATE) \
CFG(CFG_OCE_PROBE_RSP_RATE) \
CFG(CFG_OCE_BEACON_RATE) \
CFG(CFG_ENABLE_PROBE_REQ_DEFERRAL) \
CFG(CFG_ENABLE_FILS_DISCOVERY_SAP) \
CFG(CFG_ENABLE_ESP_FEATURE) \
CFG(CFG_IS_FILS_ENABLED)
#endif /* __CFG_MLME_OCE_H */

Melihat File

@@ -273,4 +273,54 @@ 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_oce_sta_enabled_info() - Get the OCE feature enable
* info for STA
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value);
/**
* wlan_mlme_get_oce_sap_enabled_info() - Get the OCE feature enable
* info 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_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value);
/**
* wlan_mlme_get_fils_enabled_info() - Get the fils enable info for driver
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_get_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value);
/**
* wlan_mlme_set_fils_enabled_info() - Set the fils enable info for driver
* @psoc: pointer to psoc object
* @value: value that needs to be set from the caller
*
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_set_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
bool value);
/**
* wlan_mlme_set_enable_bcast_probe_rsp() - Set enable bcast probe resp info
* @psoc: pointer to psoc object
* @value: value that needs to be set from the caller
*
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_set_enable_bcast_probe_rsp(struct wlan_objmgr_psoc *psoc,
bool value);
#endif /* _WLAN_MLME_API_H_ */

Melihat File

@@ -617,6 +617,23 @@ struct wlan_mlme_scoring_cfg {
uint32_t band_weight_per_index;
};
/**
* struct wlan_mlme_oce - OCE related config items
* @enable_bcast_probe_rsp: enable broadcast probe response
* @oce_sta_enabled: enable/disable oce feature for sta
* @oce_sap_enabled: enable/disable oce feature for sap
* @fils_enabled: enable/disable fils support
* @feature_bitmap: oce feature bitmap
*
*/
struct wlan_mlme_oce {
bool enable_bcast_probe_rsp;
bool oce_sta_enabled;
bool oce_sap_enabled;
bool fils_enabled;
uint8_t feature_bitmap;
};
/**
* struct wlan_mlme_cfg - MLME config items
* @ht_cfg: HT related CFG Items
@@ -643,6 +660,7 @@ struct wlan_mlme_cfg {
struct wlan_mlme_cfg_sap sap_cfg;
struct wlan_mlme_sta_cfg sta;
struct wlan_mlme_scoring_cfg scoring;
struct wlan_mlme_oce oce;
};
#endif

Melihat File

@@ -575,4 +575,95 @@ 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_oce_sta_enabled_info() - Get OCE feature enable/disable
* info for STA
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Inline UCFG API to be used by HDD/OSIF callers to get the
* OCE STA feature enable value
*
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
*/
static inline
QDF_STATUS ucfg_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value)
{
return wlan_mlme_get_oce_sta_enabled_info(psoc, value);
}
/**
* ucfg_mlme_get_oce_sap_enabled_info() - Get OCE feature enable/disable
* info for SAP
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Inline UCFG API to be used by HDD/OSIF callers to get the
* OCE SAP feature enable value
*
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
*/
static inline
QDF_STATUS ucfg_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value)
{
return wlan_mlme_get_oce_sap_enabled_info(psoc, value);
}
/**
* ucfg_mlme_get_fils_enabled_info() - Get fils enable/disable info
*
* @psoc: pointer to psoc object
* @value: pointer to the value which will be filled for the caller
*
* Inline UCFG API to be used by HDD/OSIF callers to get the
* fils enable value
*
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
*/
static inline
QDF_STATUS ucfg_mlme_get_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
bool *value)
{
return wlan_mlme_get_fils_enabled_info(psoc, value);
}
/**
* ucfg_mlme_set_fils_enabled_info() - Set fils enable info
*
* @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 to set the
* fils enable value
*
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
*/
static inline
QDF_STATUS ucfg_mlme_set_fils_enabled_info(struct wlan_objmgr_psoc *psoc,
bool value)
{
return wlan_mlme_set_fils_enabled_info(psoc, value);
}
/**
* ucfg_mlme_set_enable_bcast_probe_rsp() - Set enable bcast probe resp info
*
* @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 to set the
* enable bcast probe resp info
*
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
*/
static inline
QDF_STATUS ucfg_mlme_set_enable_bcast_probe_rsp(struct wlan_objmgr_psoc *psoc,
bool value)
{
return wlan_mlme_set_enable_bcast_probe_rsp(psoc, value);
}
#endif /* _WLAN_MLME_UCFG_API_H_ */