diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index 204497d995..3d79b91dd3 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -267,6 +267,9 @@ static void mlme_init_chainmask_cfg(struct wlan_objmgr_psoc *psoc,
chainmask_info->rx_chain_mask_5g =
cfg_get(psoc, CFG_RX_CHAIN_MASK_5G);
+
+ chainmask_info->enable_bt_chain_separation =
+ cfg_get(psoc, CFG_ENABLE_BT_CHAIN_SEPARATION);
}
#ifdef WLAN_FEATURE_11W
@@ -690,6 +693,8 @@ static void mlme_init_qos_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_TX_NON_AGGR_SW_RETRY_VO);
qos_aggr_params->sap_max_inactivity_override =
cfg_get(psoc, CFG_SAP_MAX_INACTIVITY_OVERRIDE);
+ qos_aggr_params->sap_uapsd_enabled =
+ cfg_get(psoc, CFG_SAP_QOS_UAPSD);
}
static void mlme_init_mbo_cfg(struct wlan_objmgr_psoc *psoc,
@@ -877,6 +882,10 @@ static void mlme_init_sap_protection_cfg(struct wlan_objmgr_psoc *psoc,
cfg_default(CFG_FORCE_POLICY_PROTECTION);
sap_protection_params->ignore_peer_ht_opmode =
cfg_get(psoc, CFG_IGNORE_PEER_HT_MODE);
+ sap_protection_params->enable_ap_obss_protection =
+ cfg_get(psoc, CFG_AP_OBSS_PROTECTION_ENABLE);
+ sap_protection_params->ap_protection_mode =
+ cfg_get(psoc, CFG_AP_PROTECTION_MODE);
}
#ifdef WLAN_FEATURE_11AX
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_chainmask.h b/components/mlme/dispatcher/inc/cfg_mlme_chainmask.h
index 21d8c96bd4..0aa1c48359 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_chainmask.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_chainmask.h
@@ -318,6 +318,32 @@
CFG_VALUE_OR_DEFAULT, \
"5Ghz Tx Chainmask")
+/*
+ *
+ * enable_bt_chain_separation - Enables/disables bt /wlan chainmask assignment
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini disables/enables chainmask setting on 2x2, mainly used for ROME
+ * BT/WLAN chainmask assignment.
+ *
+ * 0, Disable
+ * 1, Enable
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11n/11ac
+ *
+ * Usage: External
+ *
+ *
+ */
+#define CFG_ENABLE_BT_CHAIN_SEPARATION CFG_INI_BOOL( \
+ "enableBTChainSeparation", \
+ 0, \
+ "Enable/disable BT chainmask assignment")
+
#define CFG_CHAINMASK_ALL \
CFG(CFG_VHT_ENABLE_1x1_TX_CHAINMASK) \
CFG(CFG_VHT_ENABLE_1x1_RX_CHAINMASK) \
@@ -328,6 +354,7 @@
CFG(CFG_TX_CHAIN_MASK_2G) \
CFG(CFG_RX_CHAIN_MASK_2G) \
CFG(CFG_TX_CHAIN_MASK_5G) \
- CFG(CFG_RX_CHAIN_MASK_5G)
+ CFG(CFG_RX_CHAIN_MASK_5G) \
+ CFG(CFG_ENABLE_BT_CHAIN_SEPARATION)
#endif /* __CFG_CHAINMASK_H */
diff --git a/components/mlme/dispatcher/inc/cfg_qos.h b/components/mlme/dispatcher/inc/cfg_qos.h
index 0213b961fe..9069c33b49 100644
--- a/components/mlme/dispatcher/inc/cfg_qos.h
+++ b/components/mlme/dispatcher/inc/cfg_qos.h
@@ -425,6 +425,28 @@
0, \
"SAP maximum inactivity override flag")
+/*
+ *
+ * gEnableApUapsd - Enable/disable UAPSD for SoftAP
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to setup setup U-APSD for Acs at association
+ *
+ * Related: None.
+ *
+ * Supported Feature: SAP
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_SAP_QOS_UAPSD CFG_INI_BOOL( \
+ "gEnableApUapsd", \
+ 1, \
+ "Enable UAPSD for SAP")
+
#define CFG_QOS_ALL \
CFG(CFG_SAP_MAX_INACTIVITY_OVERRIDE) \
CFG(CFG_TX_AGGREGATION_SIZE) \
@@ -440,6 +462,7 @@
CFG(CFG_TX_NON_AGGR_SW_RETRY_BE) \
CFG(CFG_TX_NON_AGGR_SW_RETRY_BK) \
CFG(CFG_TX_NON_AGGR_SW_RETRY_VI) \
- CFG(CFG_TX_NON_AGGR_SW_RETRY_VO)
+ CFG(CFG_TX_NON_AGGR_SW_RETRY_VO) \
+ CFG(CFG_SAP_QOS_UAPSD)
#endif /* __CFG_MLME_QOS_H */
diff --git a/components/mlme/dispatcher/inc/cfg_sap_protection.h b/components/mlme/dispatcher/inc/cfg_sap_protection.h
index e80034f182..2a271db1a6 100644
--- a/components/mlme/dispatcher/inc/cfg_sap_protection.h
+++ b/components/mlme/dispatcher/inc/cfg_sap_protection.h
@@ -61,9 +61,66 @@
0, \
"ignore the peer ht mode")
+/*
+ *
+ * gApProtection - Set AP protection parameter
+ * @Min: 0x0
+ * @Max: 0xFFFF
+ * @Default: 0xBFFF
+ *
+ * This ini is used to set AP protection parameter
+ * Bit map for CFG_AP_PROTECTION_MODE_DEFAULT
+ * LOWER byte for associated stations
+ * UPPER byte for overlapping stations
+ * each byte will have the following info
+ * bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8
+ * OBSS RIFS LSIG_TXOP NON_GF HT20 FROM_11G FROM_11B FROM_11A
+ * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
+ * OBSS RIFS LSIG_TXOP NON_GF HT_20 FROM_11G FROM_11B FROM_11A
+ *
+ * Related: None.
+ *
+ * Supported Feature: SAP
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_AP_PROTECTION_MODE CFG_INI_UINT( \
+ "gApProtection", \
+ 0x0, \
+ 0xFFFF, \
+ 0xBFFF, \
+ CFG_VALUE_OR_DEFAULT, \
+ "AP protection mode bitmap")
+
+/*
+ *
+ * gEnableApOBSSProt - Enable/Disable AP OBSS protection
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable AP OBSS protection
+ *
+ * Related: None.
+ *
+ * Supported Feature: SAP
+ *
+ * Usage: Internal/External
+ *
+ *
+ */
+#define CFG_AP_OBSS_PROTECTION_ENABLE CFG_INI_BOOL( \
+ "gEnableApOBSSProt", \
+ 0, \
+ "Enable/Disable AP OBSS protection")
+
#define CFG_SAP_PROTECTION_ALL \
CFG(CFG_PROTECTION_ENABLED) \
CFG(CFG_FORCE_POLICY_PROTECTION) \
- CFG(CFG_IGNORE_PEER_HT_MODE)
+ CFG(CFG_IGNORE_PEER_HT_MODE) \
+ CFG(CFG_AP_PROTECTION_MODE) \
+ CFG(CFG_AP_OBSS_PROTECTION_ENABLE)
#endif /* __CFG_MLME_SAP_PROTECTION_H */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h
index f13e6985b5..7a1e6384bc 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h
@@ -372,7 +372,6 @@ wlan_mlme_get_acs_support_for_dfs_ltecoex(struct wlan_objmgr_psoc *psoc,
/**
* wlan_mlme_get_external_acs_policy() - Get the flag for external acs policy
- *
* @psoc: pointer to psoc object
* @value: Value that needs to be set from the caller
*
@@ -405,7 +404,6 @@ QDF_STATUS wlan_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
bool *value);
/**
* wlan_mlme_get_tx_chainmask_cck() - Get the tx_chainmask_cfg value
- *
* @psoc: pointer to psoc object
* @value: Value that needs to be set from the caller
*
@@ -416,9 +414,8 @@ QDF_STATUS wlan_mlme_get_tx_chainmask_cck(struct wlan_objmgr_psoc *psoc,
/**
* wlan_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value
- *
* @psoc: pointer to psoc object
- * @value: Value that needs to be set from the caller
+ * @value: Value that caller needs to get
*
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
*/
@@ -427,7 +424,6 @@ QDF_STATUS wlan_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
/**
* wlan_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains
- *
* @psoc: pointer to psoc object
* @value: Value that needs to be set from the caller
*
@@ -438,9 +434,8 @@ QDF_STATUS wlan_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
/**
* wlan_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains
- *
* @psoc: pointer to psoc object
- * @value: Value that needs to be set from the caller
+ * @value: Value that caller needs to get
*
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
*/
@@ -448,8 +443,17 @@ QDF_STATUS wlan_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
uint16_t *value);
/**
- * wlan_mlme_configure_chain_mask() - configure chainmask parameters
+ * wlan_mlme_get_bt_chain_separation_flag() - get the enable_bt_chain_separation
+ * flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
*
+ * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
+ */
+QDF_STATUS wlan_mlme_get_bt_chain_separation_flag(struct wlan_objmgr_psoc *psoc,
+ bool *value);
+/**
+ * wlan_mlme_configure_chain_mask() - configure chainmask parameters
* @psoc: pointer to psoc object
* @session_id: vdev_id
*
@@ -737,6 +741,27 @@ QDF_STATUS mlme_update_tgt_he_caps_in_cfg(struct wlan_objmgr_psoc *psoc,
struct wma_tgt_cfg *cfg);
#endif
+/**
+ * wlan_mlme_get_ap_protection_mode() - Get ap_protection_mode value
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which needs to be filled for the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_get_ap_protection_mode(struct wlan_objmgr_psoc *psoc,
+ uint16_t *value);
+
+/**
+ * wlan_mlme_is_ap_obss_prot_enabled() - Get ap_obss_protection is
+ * enabled/disabled
+ * @psoc: pointer to psoc object
+ * @value: pointer to the value which needs to be filled for the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_is_ap_obss_prot_enabled(struct wlan_objmgr_psoc *psoc,
+ bool *value);
+
/**
* wlan_mlme_get_rts_threshold() - Get the RTS threshold config
* @psoc: pointer to psoc object
@@ -1794,4 +1819,23 @@ QDF_STATUS mlme_update_vht_cap(struct wlan_objmgr_psoc *psoc,
*/
QDF_STATUS mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc);
+/**
+ * wlan_mlme_is_sap_uapsd_enabled() - Get if SAP UAPSD is enabled/disabled
+ * @psoc: psoc context
+ * @value: value to be filled for caller
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_mlme_is_sap_uapsd_enabled(struct wlan_objmgr_psoc *psoc,
+ bool *value);
+
+/**
+ * wlan_mlme_set_sap_uapsd_flag() - Enable/Disable SAP UAPSD
+ * @psoc: psoc context
+ * @value: Enable/Disable control value for sap_uapsd_enabled field
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc,
+ bool value);
#endif /* _WLAN_MLME_API_H_ */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index bdfe8e6f1e..161f6ae2ac 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -697,6 +697,7 @@ struct wlan_mlme_vht_caps {
* @tx_non_aggr_sw_retry_threshold_vo: non aggr sw retry threshold for VO
* @sap_max_inactivity_override: Override updating ap_sta_inactivity from
* hostapd.conf
+ * @sap_uapsd_enabled: Flag to enable/disable UAPSD for SAP
*/
struct wlan_mlme_qos {
uint32_t tx_aggregation_size;
@@ -714,6 +715,7 @@ struct wlan_mlme_qos {
uint32_t tx_non_aggr_sw_retry_threshold_vi;
uint32_t tx_non_aggr_sw_retry_threshold_vo;
bool sap_max_inactivity_override;
+ bool sap_uapsd_enabled;
};
#ifdef WLAN_FEATURE_11AX
@@ -818,21 +820,22 @@ struct wlan_mlme_feature_flag {
/*
* struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
- *
- * @protection_enabled: Force enable protection. static via cfg
- * @protection_force_policy: Protection force policy. Static via cfg
* @ignore_peer_ht_opmode: Ignore the ht opmode of the peer. Dynamic via INI
- *
+ * @enable_ap_obss_protection: enable/disable AP OBSS protection
+ * @protection_force_policy: Protection force policy. Static via cfg
+ * @ap_protection_mode: AP protection bitmap
+ * @protection_enabled: Force enable protection. static via cfg
*/
struct wlan_mlme_sap_protection {
- uint32_t protection_enabled;
- uint8_t protection_force_policy;
bool ignore_peer_ht_opmode;
+ bool enable_ap_obss_protection;
+ uint8_t protection_force_policy;
+ uint16_t ap_protection_mode;
+ uint32_t protection_enabled;
};
/*
* struct wlan_mlme_chainmask - All chainmask related cfg items
- *
* @txchainmask1x1: To set transmit chainmask
* @rxchainmask1x1: To set rx chainmask
* @tx_chain_mask_cck: Used to enable/disable Cck ChainMask
@@ -843,6 +846,7 @@ struct wlan_mlme_sap_protection {
* @rx_chain_mask_2g: Tx chain mask for 2g
* @tx_chain_mask_5g: Tx chain mask for 5g
* @rx_chain_mask_5g: Rx chain mask for 5g
+ * @enable_bt_chain_separation: Enable/Disable BT/WLAN Host chain seperation
*/
struct wlan_mlme_chainmask {
uint8_t txchainmask1x1;
@@ -855,6 +859,7 @@ struct wlan_mlme_chainmask {
uint8_t rx_chain_mask_2g;
uint8_t tx_chain_mask_5g;
uint8_t rx_chain_mask_5g;
+ bool enable_bt_chain_separation;
};
/* struct wlan_mlme_generic - Generic CFG config items
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
index bc73a35fd4..1aeeb7f344 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
@@ -626,6 +626,20 @@ QDF_STATUS ucfg_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_get_num_11ag_tx_chains(psoc, value);
}
+/**
+ * ucfg_mlme_get_bt_chain_separation_flag() - bt chain separation enable/disable
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be got for the caller
+ *
+ * Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_bt_chain_separation_flag(struct wlan_objmgr_psoc *psoc,
+ bool *value)
+{
+ return wlan_mlme_get_bt_chain_separation_flag(psoc, value);
+}
+
/**
* ucfg_mlme_configure_chain_mask() - configure chainmask parameters
*
@@ -1152,6 +1166,40 @@ QDF_STATUS ucfg_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_get_oce_sap_enabled_info(psoc, value);
}
+/**
+ * ucfg_mlme_get_ap_protection_mode() - Get ap protection mode 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
+ * ap protection mode value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline
+QDF_STATUS ucfg_mlme_get_ap_protection_mode(struct wlan_objmgr_psoc *psoc,
+ uint16_t *value)
+{
+ return wlan_mlme_get_ap_protection_mode(psoc, value);
+}
+
+/**
+ * ucfg_mlme_is_ap_obss_prot_enabled() - Get ap obss protection enable/disable
+ * @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
+ * obss protection enable value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline
+QDF_STATUS ucfg_mlme_is_ap_obss_prot_enabled(struct wlan_objmgr_psoc *psoc,
+ bool *value)
+{
+ return wlan_mlme_is_ap_obss_prot_enabled(psoc, value);
+}
+
/**
* ucfg_mlme_get_rts_threshold() - Get the rts threshold config
* @psoc: pointer to psoc object
@@ -2458,6 +2506,7 @@ ucfg_mlme_get_ts_info_ack_policy(struct wlan_objmgr_psoc *psoc,
* @psoc: pointer to psoc object
* @value: Value that needs to be get from the caller
*
+ *
* Inline UCFG API to be used by HDD/OSIF callers
*
* Return: QDF Status
@@ -2468,4 +2517,34 @@ ucfg_mlme_get_ts_acm_value_for_ac(struct wlan_objmgr_psoc *psoc, bool *value)
return wlan_mlme_get_ts_acm_value_for_ac(psoc, value);
}
+/*
+ * ucfg_mlme_is_sap_uapsd_enabled() - SAP UAPSD enabled status.
+ * @psoc: pointer to psoc object
+ * @value: sap uapsd enabled flag value requested from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_is_sap_uapsd_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ return wlan_mlme_is_sap_uapsd_enabled(psoc, value);
+}
+
+/*
+ * ucfg_mlme_set_sap_uapsd_flag() - SAP UAPSD enabled status.
+ * @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_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc, bool value)
+{
+ return wlan_mlme_set_sap_uapsd_flag(psoc, value);
+}
+
#endif /* _WLAN_MLME_UCFG_API_H_ */
diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c
index 8b0f5436a7..906b7b41d9 100644
--- a/components/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/components/mlme/dispatcher/src/wlan_mlme_api.c
@@ -816,6 +816,20 @@ QDF_STATUS wlan_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS wlan_mlme_get_bt_chain_separation_flag(struct wlan_objmgr_psoc *psoc,
+ bool *value)
+{
+ struct wlan_mlme_psoc_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.chainmask_cfg.enable_bt_chain_separation;
+ return QDF_STATUS_SUCCESS;
+}
+
QDF_STATUS wlan_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
uint16_t *value)
{
@@ -1935,6 +1949,36 @@ QDF_STATUS wlan_mlme_get_oce_sap_enabled_info(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS wlan_mlme_get_ap_protection_mode(struct wlan_objmgr_psoc *psoc,
+ uint16_t *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_protection_cfg.ap_protection_mode;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_is_ap_obss_prot_enabled(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_protection_cfg.enable_ap_obss_protection;
+
+ return QDF_STATUS_SUCCESS;
+}
+
QDF_STATUS wlan_mlme_get_rts_threshold(struct wlan_objmgr_psoc *psoc,
uint32_t *value)
{
@@ -2921,3 +2965,33 @@ QDF_STATUS mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc)
return QDF_STATUS_SUCCESS;
}
+
+QDF_STATUS wlan_mlme_is_sap_uapsd_enabled(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("Get MLME Obj failed");
+ return QDF_STATUS_E_FAILURE;
+ }
+ *value = mlme_obj->cfg.qos_mlme_params.sap_uapsd_enabled;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS wlan_mlme_set_sap_uapsd_flag(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("Get MLME Obj failed");
+ return QDF_STATUS_E_FAILURE;
+ }
+ mlme_obj->cfg.qos_mlme_params.sap_uapsd_enabled &= value;
+
+ return QDF_STATUS_SUCCESS;
+}
diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h
index ff80a5436a..53b9a1e364 100644
--- a/core/cds/inc/cds_config.h
+++ b/core/cds/inc/cds_config.h
@@ -112,7 +112,6 @@ struct cds_config_info {
uint8_t sta_maxlimod_dtim;
enum qdf_driver_type driver_type;
uint8_t dfs_phyerr_filter_offload;
- uint8_t ap_disable_intrabss_fwd;
uint8_t ap_maxoffload_peers;
uint8_t ap_maxoffload_reorderbuffs;
#ifdef FEATURE_WLAN_RA_FILTERING
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 4a6a0c6f4c..d6f6bc3a8d 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -2168,28 +2168,6 @@ enum hdd_dot11_mode {
#define CFG_DOT11_MODE_DEFAULT eHDD_DOT11_MODE_11ax
#define CFG_DOT11_MODE_MAX eHDD_DOT11_MODE_11ax
-/*
- *
- * gEnableApUapsd - Enable/disable UAPSD for SoftAP
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to setup setup U-APSD for Acs at association
- *
- * Related: None.
- *
- * Supported Feature: SAP
- *
- * Usage: Internal/External
- *
- *
- */
-#define CFG_AP_QOS_UAPSD_MODE_NAME "gEnableApUapsd"
-#define CFG_AP_QOS_UAPSD_MODE_MIN (0)
-#define CFG_AP_QOS_UAPSD_MODE_MAX (1)
-#define CFG_AP_QOS_UAPSD_MODE_DEFAULT (1)
-
/*
*
* gEnableApRandomBssid - Create ramdom BSSID
@@ -2235,58 +2213,6 @@ enum hdd_dot11_mode {
#define CFG_AP_ENABLE_PROTECTION_MODE_MAX (1)
#define CFG_AP_ENABLE_PROTECTION_MODE_DEFAULT (1)
-/*
- *
- * gApProtection - Set AP protection parameter
- * @Min: 0x0
- * @Max: 0xFFFF
- * @Default: 0xBFFF
- *
- * This ini is used to set AP protection parameter
- * Bit map for CFG_AP_PROTECTION_MODE_DEFAULT
- * LOWER byte for associated stations
- * UPPER byte for overlapping stations
- * each byte will have the following info
- * bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8
- * OBSS RIFS LSIG_TXOP NON_GF HT20 FROM_11G FROM_11B FROM_11A
- * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
- * OBSS RIFS LSIG_TXOP NON_GF HT_20 FROM_11G FROM_11B FROM_11A
- *
- * Related: None.
- *
- * Supported Feature: SAP
- *
- * Usage: Internal/External
- *
- *
- */
-#define CFG_AP_PROTECTION_MODE_NAME "gApProtection"
-#define CFG_AP_PROTECTION_MODE_MIN (0x0)
-#define CFG_AP_PROTECTION_MODE_MAX (0xFFFF)
-#define CFG_AP_PROTECTION_MODE_DEFAULT (0xBFFF)
-
-/*
- *
- * gEnableApOBSSProt - Enable/Disable AP OBSS protection
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to enable/disable AP OBSS protection
- *
- * Related: None.
- *
- * Supported Feature: SAP
- *
- * Usage: Internal/External
- *
- *
- */
-#define CFG_AP_OBSS_PROTECTION_MODE_NAME "gEnableApOBSSProt"
-#define CFG_AP_OBSS_PROTECTION_MODE_MIN (0)
-#define CFG_AP_OBSS_PROTECTION_MODE_MAX (1)
-#define CFG_AP_OBSS_PROTECTION_MODE_DEFAULT (0)
-
#define CFG_DISABLE_PACKET_FILTER "gDisablePacketFilter"
#define CFG_DISABLE_PACKET_FILTER_MIN (0)
#define CFG_DISABLE_PACKET_FILTER_MAX (1)
@@ -2999,33 +2925,6 @@ enum hdd_link_speed_rpt_type {
eHDD_LINK_SPEED_REPORT_MAX_SCALED = 2,
};
-/*
- *
- * enableBTChainSeparation - Enables/disables bt /wlan chainmask assignment
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini disables/enables chainmask setting on 2x2, mainly used for ROME
- * BT/WLAN chainmask assignment.
- *
- * 0, Disable
- * 1, Enable
- *
- * Related: NA
- *
- * Supported Feature: 11n/11ac
- *
- * Usage: External
- *
- *
- */
-
-#define CFG_ENABLE_BT_CHAIN_SEPARATION "enableBTChainSeparation"
-#define CFG_ENABLE_BT_CHAIN_SEPARATION_MIN (0)
-#define CFG_ENABLE_BT_CHAIN_SEPARATION_MAX (1)
-#define CFG_ENABLE_BT_CHAIN_SEPARATION_DEFAULT (0)
-
/*
*
* gDisableDFSChSwitch - Disable channel switch if radar is found
@@ -6026,11 +5925,8 @@ struct hdd_config {
uint8_t intfAddrMask;
struct qdf_mac_addr intfMacAddr[QDF_MAX_CONCURRENCY_PERSONA];
- bool apUapsdEnabled;
bool apRandomBssidEnabled;
bool apProtEnabled;
- uint16_t apProtection;
- bool apOBSSProtEnabled;
enum station_keepalive_method sta_keepalive_method;
uint8_t nTxPowerCap; /* In dBm */
bool allow_tpc_from_ap;
@@ -6372,7 +6268,6 @@ struct hdd_config {
bool action_oui_enable;
uint8_t action_oui_str[ACTION_OUI_MAXIMUM_ID][ACTION_OUI_MAX_STR_LEN];
uint16_t wmi_wq_watchdog_timeout;
- bool enable_bt_chain_separation;
uint8_t enable_tx_sch_delay;
uint32_t enable_secondary_rate;
bool is_unit_test_framework_enabled;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 3da51a11a0..2b8b95319f 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -476,13 +476,6 @@ struct reg_table_entry g_registry_table[] = {
VAR_FLAGS_OPTIONAL,
(void *)CFG_INTF3_MAC_ADDR_DEFAULT),
- REG_VARIABLE(CFG_AP_QOS_UAPSD_MODE_NAME, WLAN_PARAM_Integer,
- struct hdd_config, apUapsdEnabled,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_AP_QOS_UAPSD_MODE_DEFAULT,
- CFG_AP_QOS_UAPSD_MODE_MIN,
- CFG_AP_QOS_UAPSD_MODE_MAX),
-
REG_VARIABLE(CFG_AP_ENABLE_RANDOM_BSSID_NAME, WLAN_PARAM_Integer,
struct hdd_config, apRandomBssidEnabled,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -497,20 +490,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_AP_ENABLE_PROTECTION_MODE_MIN,
CFG_AP_ENABLE_PROTECTION_MODE_MAX),
- REG_VARIABLE(CFG_AP_PROTECTION_MODE_NAME, WLAN_PARAM_HexInteger,
- struct hdd_config, apProtection,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_AP_PROTECTION_MODE_DEFAULT,
- CFG_AP_PROTECTION_MODE_MIN,
- CFG_AP_PROTECTION_MODE_MAX),
-
- REG_VARIABLE(CFG_AP_OBSS_PROTECTION_MODE_NAME, WLAN_PARAM_Integer,
- struct hdd_config, apOBSSProtEnabled,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_AP_OBSS_PROTECTION_MODE_DEFAULT,
- CFG_AP_OBSS_PROTECTION_MODE_MIN,
- CFG_AP_OBSS_PROTECTION_MODE_MAX),
-
#ifdef FEATURE_WLAN_DYNAMIC_CVM
REG_VARIABLE(CFG_VC_MODE_BITMAP, WLAN_PARAM_HexInteger,
struct hdd_config, vc_mode_cfg_bitmap,
@@ -1277,13 +1256,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_THROTTLE_DUTY_CYCLE_LEVEL3_MIN,
CFG_THROTTLE_DUTY_CYCLE_LEVEL3_MAX),
- REG_VARIABLE(CFG_ENABLE_BT_CHAIN_SEPARATION, WLAN_PARAM_Integer,
- struct hdd_config, enable_bt_chain_separation,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_BT_CHAIN_SEPARATION_DEFAULT,
- CFG_ENABLE_BT_CHAIN_SEPARATION_MIN,
- CFG_ENABLE_BT_CHAIN_SEPARATION_MAX),
-
REG_VARIABLE(CFG_DISABLE_DFS_CH_SWITCH, WLAN_PARAM_Integer,
struct hdd_config, disableDFSChSwitch,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 4ee692e5d0..3e1b6c66e6 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -4609,7 +4609,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
struct ieee80211_mgmt *pMgmt_frame;
struct ieee80211_mgmt mgmt;
const uint8_t *pIe = NULL;
- uint16_t capab_info;
+ uint16_t capab_info, ap_prot = cfg_default(CFG_AP_PROTECTION_MODE);
eCsrAuthType RSNAuthType;
eCsrEncryptionType RSNEncryptType;
eCsrEncryptionType mcRSNEncryptType;
@@ -4634,10 +4634,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
bool val;
uint32_t auto_channel_select_weight =
cfg_default(CFG_AUTO_CHANNEL_SELECT_WEIGHT);
- bool bval = false;
uint8_t pref_chan_location = 0;
bool sap_force_11n_for_11ac = 0;
bool go_force_11n_for_11ac = 0;
+ bool bval = false, ap_obss_prot = false, sap_uapsd = true;
hdd_enter();
@@ -5194,7 +5194,10 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
/* ht_capab is not what the name conveys,
* this is used for protection bitmap
*/
- pConfig->ht_capab = iniConfig->apProtection;
+ qdf_status = ucfg_mlme_get_ap_protection_mode(hdd_ctx->psoc, &ap_prot);
+ if (QDF_IS_STATUS_ERROR(qdf_status))
+ hdd_debug("Get ap protection mode failed using default value");
+ pConfig->ht_capab = ap_prot;
if (0 != wlan_hdd_cfg80211_update_apies(adapter)) {
hdd_err("SAP Not able to set AP IEs");
@@ -5202,9 +5205,17 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
goto error;
}
/* Uapsd Enabled Bit */
- pConfig->UapsdEnable = iniConfig->apUapsdEnabled;
+ qdf_status = ucfg_mlme_is_sap_uapsd_enabled(hdd_ctx->psoc, &sap_uapsd);
+ if (QDF_IS_STATUS_ERROR(qdf_status))
+ hdd_debug("Get ap UAPSD enabled/disabled failed");
+ pConfig->UapsdEnable = sap_uapsd;
+
/* Enable OBSS protection */
- pConfig->obssProtEnabled = iniConfig->apOBSSProtEnabled;
+ qdf_status = ucfg_mlme_is_ap_obss_prot_enabled(hdd_ctx->psoc,
+ &ap_obss_prot);
+ if (QDF_IS_STATUS_ERROR(qdf_status))
+ hdd_debug("Get ap obss protection failed");
+ pConfig->obssProtEnabled = ap_obss_prot;
#ifdef WLAN_FEATURE_11W
pConfig->mfpCapable = MFPCapable;
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 4e4ad329b5..2a5bc26f09 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1446,7 +1446,7 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
bool value;
#endif
/* Set up UAPSD */
- config->apUapsdEnabled &= cfg->uapsd;
+ ucfg_mlme_set_sap_uapsd_flag(hdd_ctx->psoc, cfg->uapsd);
/* 11AX mode support */
if ((config->dot11Mode == eHDD_DOT11_MODE_11ax ||
@@ -4558,17 +4558,21 @@ static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
QDF_STATUS status;
struct wma_caps_per_phy non_dbs_phy_cap;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- bool bval = false;
+ bool enable2x2 = false, enable_bt_chain_sep = false;
- status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
- if (!QDF_IS_STATUS_SUCCESS(status))
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &enable2x2);
+ if (QDF_IS_STATUS_ERROR(status))
hdd_err("unable to get vht_enable2x2");
+ status = ucfg_mlme_get_bt_chain_separation_flag(hdd_ctx->psoc,
+ &enable_bt_chain_sep);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_debug("unable to get BT chain separation. using default");
+
hdd_debug("enable2x2: %d, lte_coex: %d, disable_DBS: %d",
- bval, hdd_ctx->lte_coex_ant_share,
+ enable2x2, hdd_ctx->lte_coex_ant_share,
hdd_ctx->config->dual_mac_feature_disable);
- hdd_debug("enable_bt_chain_separation %d",
- hdd_ctx->config->enable_bt_chain_separation);
+ hdd_debug("enable_bt_chain_separation %d", enable_bt_chain_sep);
status = wma_get_caps_for_phyidx_hwmode(&non_dbs_phy_cap,
HW_MODE_DBS_NONE,
@@ -4586,7 +4590,7 @@ static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
return 0;
}
- if (bval && !hdd_ctx->config->enable_bt_chain_separation) {
+ if (enable2x2 && !enable_bt_chain_sep) {
hdd_debug("2x2 enabled. skip chain mask programming");
return 0;
}
@@ -9757,9 +9761,6 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx)
&value);
cds_cfg->ap_maxoffload_reorderbuffs = value;
- cds_cfg->ap_disable_intrabss_fwd =
- cfg_get(hdd_ctx->psoc, CFG_DP_AP_STA_SECURITY_SEPERATION);
-
cds_cfg->dfs_pri_multiplier =
hdd_ctx->config->dfsRadarPriMultiplier;
cds_cfg->reorder_offload =
diff --git a/core/mac/inc/wni_cfg.h b/core/mac/inc/wni_cfg.h
index 89d8854649..f8547eb34c 100644
--- a/core/mac/inc/wni_cfg.h
+++ b/core/mac/inc/wni_cfg.h
@@ -43,8 +43,6 @@ enum {
WNI_CFG_SCAN_IN_POWERSAVE,
WNI_CFG_IBSS_AUTO_BSSID,
WNI_CFG_WPS_UUID,
- WNI_CFG_TELE_BCN_WAKEUP_EN,
- WNI_CFG_TELE_BCN_MAX_LI,
WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP,
WNI_CFG_IBSS_ATIM_WIN_SIZE,
@@ -403,14 +401,6 @@ enum {
#define WNI_CFG_WPS_ENABLE_AP 1
-#define WNI_CFG_TELE_BCN_WAKEUP_EN_STAMIN 0
-#define WNI_CFG_TELE_BCN_WAKEUP_EN_STAMAX 1
-#define WNI_CFG_TELE_BCN_WAKEUP_EN_STADEF 0
-
-#define WNI_CFG_TELE_BCN_MAX_LI_STAMIN 0
-#define WNI_CFG_TELE_BCN_MAX_LI_STAMAX 7
-#define WNI_CFG_TELE_BCN_MAX_LI_STADEF 5
-
#define WNI_CFG_ASSOC_STA_LIMIT_STAMIN 1
#define WNI_CFG_ASSOC_STA_LIMIT_STAMAX 32
#define WNI_CFG_ASSOC_STA_LIMIT_STADEF 10
diff --git a/core/mac/src/cfg/cfg_param_name.c b/core/mac/src/cfg/cfg_param_name.c
index 3dc899063b..e95320a233 100644
--- a/core/mac/src/cfg/cfg_param_name.c
+++ b/core/mac/src/cfg/cfg_param_name.c
@@ -57,8 +57,6 @@ const char *cfg_get_string(uint16_t cfg_id)
CASE_RETURN_STRING(WNI_CFG_AS_CAP);
CASE_RETURN_STRING(WNI_CFG_IBSS_AUTO_BSSID);
CASE_RETURN_STRING(WNI_CFG_WPS_UUID);
- CASE_RETURN_STRING(WNI_CFG_TELE_BCN_WAKEUP_EN);
- CASE_RETURN_STRING(WNI_CFG_TELE_BCN_MAX_LI);
CASE_RETURN_STRING(WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED);
CASE_RETURN_STRING(WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP);
CASE_RETURN_STRING(WNI_CFG_IBSS_ATIM_WIN_SIZE);
diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c
index 915ded023a..46711ff8cb 100644
--- a/core/mac/src/cfg/cfg_proc_msg.c
+++ b/core/mac/src/cfg/cfg_proc_msg.c
@@ -116,16 +116,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
{WNI_CFG_WPS_UUID,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_NTF_LIM,
0, 0, 0},
- {WNI_CFG_TELE_BCN_WAKEUP_EN,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
- WNI_CFG_TELE_BCN_WAKEUP_EN_STAMIN,
- WNI_CFG_TELE_BCN_WAKEUP_EN_STAMAX,
- WNI_CFG_TELE_BCN_WAKEUP_EN_STADEF},
- {WNI_CFG_TELE_BCN_MAX_LI,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
- WNI_CFG_TELE_BCN_MAX_LI_STAMIN,
- WNI_CFG_TELE_BCN_MAX_LI_STAMAX,
- WNI_CFG_TELE_BCN_MAX_LI_STADEF},
{WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMIN,
diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h
index a906be0755..f5b42183dc 100644
--- a/core/wma/inc/wma_tgt_cfg.h
+++ b/core/wma/inc/wma_tgt_cfg.h
@@ -44,7 +44,7 @@
*/
struct wma_tgt_services {
uint32_t sta_power_save;
- uint32_t uapsd;
+ bool uapsd;
uint32_t ap_dfs;
uint32_t en_11ac;
uint32_t arp_offload;