qcacld-3.0: Add MLME CFG items of sap/sta erp protection
Add the following SAP/STA protection ini and cfg parameters to MLME cfg: CFG_PROTECTION_ENABLED - CFG CFG_FORCE_POLICY_PROTECTION - CFG CFG_IGNORE_PEER_HT_MODE_NAME - INI Change-Id: I3763d62c6aa4ae79a5a31dfac248e8367b6369ad CRs-Fixed: 2310378
This commit is contained in:

committed by
nshrivas

vanhempi
7b8b76c56b
commit
f4cc58b320
@@ -26,11 +26,13 @@
|
||||
#include "cfg_mlme_ht_caps.h"
|
||||
#include "cfg_mlme_vht_caps.h"
|
||||
#include "cfg_mlme_rates.h"
|
||||
#include "cfg_sap_protection.h"
|
||||
|
||||
#define CFG_MLME_ALL \
|
||||
CFG_HT_CAPS_ALL \
|
||||
CFG_VHT_CAPS_ALL \
|
||||
CFG_RATES_ALL
|
||||
CFG_RATES_ALL \
|
||||
CFG_SAP_PROTECTION_ALL
|
||||
|
||||
#endif /* __CFG_MLME_H */
|
||||
|
||||
|
69
components/mlme/dispatcher/inc/cfg_sap_protection.h
Normal file
69
components/mlme/dispatcher/inc/cfg_sap_protection.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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 sap erp protection related
|
||||
* converged configurations.
|
||||
*/
|
||||
|
||||
#ifndef __CFG_MLME_SAP_PROTECTION_H
|
||||
#define __CFG_MLME_SAP_PROTECTION_H
|
||||
|
||||
#define CFG_PROTECTION_ENABLED CFG_UINT( \
|
||||
"protection_enabled", \
|
||||
0, \
|
||||
65535, \
|
||||
65535, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"sap protection enabled")
|
||||
|
||||
#define CFG_FORCE_POLICY_PROTECTION CFG_UINT( \
|
||||
"protection_force_policy", \
|
||||
0, \
|
||||
5, \
|
||||
5, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"force policy protection")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gignore_peer_ht_opmode
|
||||
*
|
||||
* @min 0
|
||||
* @max 1
|
||||
* @default 1
|
||||
*
|
||||
* Enabling gignore_peer_ht_opmode will enable 11g
|
||||
* protection only when there is a 11g AP in vicinity.
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: SAP Protection
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_IGNORE_PEER_HT_MODE CFG_INI_BOOL( \
|
||||
"gignore_peer_ht_opmode", \
|
||||
0, \
|
||||
"ignore the peer ht mode")
|
||||
|
||||
#define CFG_SAP_PROTECTION_ALL \
|
||||
CFG(CFG_PROTECTION_ENABLED) \
|
||||
CFG(CFG_FORCE_POLICY_PROTECTION) \
|
||||
CFG(CFG_IGNORE_PEER_HT_MODE)
|
||||
|
||||
#endif /* __CFG_MLME_SAP_PROTECTION_H */
|
@@ -47,4 +47,14 @@ QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||
struct mlme_ht_capabilities_info
|
||||
ht_cap_info);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht opmode flag
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value);
|
||||
#endif /* _WLAN_MLME_API_H_ */
|
||||
|
@@ -108,16 +108,33 @@ struct wlan_mlme_rates {
|
||||
uint8_t disable_high_ht_mcs_2x2;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
|
||||
*
|
||||
* @protection_enabled - Force enable protection. static via cfg
|
||||
* @protection_always_11g - Force protection enable for 11g. Static via cfg
|
||||
* @protection_force_policy - Protection force policy. Static via cfg
|
||||
* @ignore_peer_ht_mode - ignore the ht opmode of the peer. Dynamic via INI.
|
||||
*
|
||||
*/
|
||||
struct wlan_mlme_sap_protection {
|
||||
uint32_t protection_enabled;
|
||||
uint8_t protection_force_policy;
|
||||
bool ignore_peer_ht_mode;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_mlme_cfg - MLME config items
|
||||
* @ht_cfg: HT related CFG Items
|
||||
* @vht_cfg: VHT related CFG Items
|
||||
* @rates: Rates related cfg items
|
||||
* @sap_protection_cfg: SAP erp protection related CFG items
|
||||
*/
|
||||
struct wlan_mlme_cfg {
|
||||
struct wlan_mlme_ht_caps ht_caps;
|
||||
struct wlan_mlme_vht_caps vht_caps;
|
||||
struct wlan_mlme_rates rates;
|
||||
struct wlan_mlme_sap_protection sap_protection_cfg;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -99,4 +99,22 @@ QDF_STATUS ucfg_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return wlan_mlme_set_ht_cap_info(psoc, ht_cap_info);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_ignore_peer_ht_mode() - Get the ignore peer ht mode flag
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set
|
||||
*
|
||||
* Inline UCFG API to be used by HDD/OSIF callers to get the
|
||||
* ignore_peer_ht_opmode flag value
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value)
|
||||
{
|
||||
return wlan_mlme_get_ignore_peer_ht_mode(psoc, value);
|
||||
}
|
||||
#endif /* _WLAN_MLME_UCFG_API_H_ */
|
||||
|
Viittaa uudesa ongelmassa
Block a user