Эх сурвалжийг харах

Merge "qcacld-3.0: Move few INIs' ownership from HDD to MLME" into wlan-cld3.driver.lnx.2.0

CNSS_WLAN Service 6 жил өмнө
parent
commit
e0d51209f1

+ 9 - 1
mlme/core/src/wlan_mlme_main.c

@@ -896,6 +896,11 @@ static void mlme_init_feature_flag_in_cfg(
 				cfg_default(CFG_CHANNEL_BONDING_MODE);
 	feature_flags->enable_block_ack = cfg_default(CFG_BLOCK_ACK_ENABLED);
 	feature_flags->enable_ampdu = cfg_get(psoc, CFG_ENABLE_AMPDUPS);
+	feature_flags->mcc_rts_cts_prot = cfg_get(psoc,
+						  CFG_FW_MCC_RTS_CTS_PROT);
+	feature_flags->mcc_bcast_prob_rsp = cfg_get(psoc,
+						    CFG_FW_MCC_BCAST_PROB_RESP);
+	feature_flags->enable_mcc = cfg_get(psoc, CFG_MCC_FEATURE);
 }
 
 static void mlme_init_sap_protection_cfg(struct wlan_objmgr_psoc *psoc,
@@ -1154,7 +1159,8 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_GO_FORCE_11N_FOR_11AC);
 	sap_cfg->ap_random_bssid_enable =
 		cfg_get(psoc, CFG_AP_ENABLE_RANDOM_BSSID);
-
+	sap_cfg->sap_mcc_chnl_avoid =
+		cfg_get(psoc, CFG_SAP_MCC_CHANNEL_AVOIDANCE);
 }
 
 static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,
@@ -1250,6 +1256,8 @@ static void mlme_init_sta_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_FORCE_RSNE_OVERRIDE);
 	sta->single_tid =
 		cfg_get(psoc, CFG_SINGLE_TID_RC);
+	sta->sta_miracast_mcc_rest_time =
+		cfg_get(psoc, CFG_STA_MCAST_MCC_REST_TIME);
 	sta->wait_cnf_timeout =
 		(uint32_t)cfg_default(CFG_WT_CNF_TIMEOUT);
 	sta->current_rssi =

+ 75 - 0
mlme/dispatcher/inc/cfg_mlme_feature_flag.h

@@ -86,10 +86,85 @@
 				0, \
 				"Enable AMPDU")
 
+/*
+ * <ini>
+ * gFWMccRtsCtsProtection - RTS-CTS protection in MCC.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable use of long duration RTS-CTS protection
+ * when SAP goes off channel in MCC mode.
+ *
+ * Related: None.
+ *
+ * Supported Feature: Concurrency
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_FW_MCC_RTS_CTS_PROT CFG_INI_UINT( \
+		"gFWMccRtsCtsProtection", \
+		0, 1, 0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"RTS-CTS protection in MCC")
+
+/*
+ * <ini>
+ * gFWMccBCastProbeResponse - Broadcast Probe Response in MCC.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable use of broadcast probe response to
+ * increase the detectability of SAP in MCC mode.
+ *
+ * Related: None.
+ *
+ * Supported Feature: Concurrency
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+
+#define CFG_FW_MCC_BCAST_PROB_RESP CFG_INI_UINT( \
+		"gFWMccBCastProbeResponse", \
+		0, 1, 0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Broadcast Probe Response in MCC")
+
+/*
+ * <ini>
+ * gEnableMCCMode - Enable/Disable MCC feature.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable/disable MCC feature.
+ *
+ * Related: None.
+ *
+ * Supported Feature: Concurrency
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_MCC_FEATURE CFG_INI_UINT( \
+		"gEnableMCCMode", \
+		0, 1, 1, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Enable/Disable MCC feature.")
+
 #define CFG_FEATURE_FLAG_ALL \
 	CFG(CFG_ACCEPT_SHORT_SLOT_ASSOC_ONLY) \
 	CFG(CFG_HCF_ENABLED) \
 	CFG(CFG_RSN_ENABLED) \
+	CFG(CFG_FW_MCC_RTS_CTS_PROT) \
+	CFG(CFG_FW_MCC_BCAST_PROB_RESP) \
+	CFG(CFG_MCC_FEATURE) \
 	CFG(CFG_11G_SHORT_PREAMBLE_ENABLED) \
 	CFG(CFG_11G_SHORT_SLOT_TIME_ENABLED) \
 	CFG(CFG_CHANNEL_BONDING_MODE) \

+ 26 - 0
mlme/dispatcher/inc/cfg_mlme_sap.h

@@ -601,6 +601,31 @@
 	0, \
 	"Create ramdom BSSID")
 
+/*
+ * <ini>
+ * gSapChannelAvoidance - SAP MCC channel avoidance.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to sets sap mcc channel avoidance.
+ *
+ * Related: None.
+ *
+ * Supported Feature: Concurrency
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_SAP_MCC_CHANNEL_AVOIDANCE CFG_INI_UINT( \
+			"gSapChannelAvoidance", \
+			0, \
+			1, \
+			0, \
+			CFG_VALUE_OR_DEFAULT, \
+			"SAP MCC channel avoidance")
+
  #define CFG_SAP_ALL \
 	CFG(CFG_AP_ENABLE_RANDOM_BSSID) \
 	CFG(CFG_SSID) \
@@ -616,6 +641,7 @@
 	CFG(CFG_RATE_FOR_TX_MGMT_5G) \
 	CFG(CFG_TELE_BCN_WAKEUP_EN) \
 	CFG(CFG_TELE_BCN_MAX_LI) \
+	CFG(CFG_SAP_MCC_CHANNEL_AVOIDANCE) \
 	CFG(CFG_SAP_GET_PEER_INFO) \
 	CFG(CFG_SAP_ALLOW_ALL_CHANNEL_PARAM) \
 	CFG(CFG_SAP_MAX_NO_PEERS) \

+ 28 - 0
mlme/dispatcher/inc/cfg_mlme_sta.h

@@ -354,6 +354,33 @@
 	CFG_VALUE_OR_DEFAULT, \
 	"Wait confirm timeout")
 
+/*
+ * <ini>
+ * gStaMiracastMccRestTimeVal - Rest time when Miracast is running.
+ * @Min: 100
+ * @Max: 500
+ * @Default: 400
+ *
+ * This ini is used to set rest time for home channel for Miracast before
+ * going for scan.
+ *
+ * Related: None.
+ *
+ * Supported Feature: Concurrency
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+
+#define CFG_STA_MCAST_MCC_REST_TIME CFG_INI_UINT( \
+	"gStaMiracastMccRestTimeVal", \
+	100, \
+	500, \
+	400, \
+	CFG_VALUE_OR_DEFAULT, \
+	"Rest time when Miracast is running")
+
 /*
  * current_rssi - current rssi
  * @Min: 0
@@ -435,6 +462,7 @@
 	CFG(CFG_DOT11P_MODE) \
 	CFG(CFG_ENABLE_GO_CTS2SELF_FOR_STA) \
 	CFG(CFG_QCN_IE_SUPPORT) \
+	CFG(CFG_STA_MCAST_MCC_REST_TIME) \
 	CFG(CFG_FILS_MAX_CHAN_GUARD_TIME) \
 	CFG(CFG_FORCE_RSNE_OVERRIDE) \
 	CFG(CFG_SINGLE_TID_RC) \

+ 70 - 1
mlme/dispatcher/inc/wlan_mlme_api.h

@@ -1857,7 +1857,6 @@ QDF_STATUS wlan_mlme_is_sap_uapsd_enabled(struct wlan_objmgr_psoc *psoc,
  */
 QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc,
 					bool value);
-
 /**
  * wlan_mlme_is_11h_enabled() - Get the 11h flag
  * @psoc: psoc context
@@ -1894,4 +1893,74 @@ wlan_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value);
 QDF_STATUS
 wlan_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value);
 
+/**
+ * wlan_mlme_get_sta_miracast_mcc_rest_time() - Get STA/MIRACAST MCC rest time
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * This API gives rest time to be used when STA and MIRACAST MCC conc happens
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_get_sta_miracast_mcc_rest_time(struct wlan_objmgr_psoc *psoc,
+					 uint32_t *value);
+/**
+ * wlan_mlme_get_sap_mcc_chnl_avoid() - Check if SAP MCC needs to be avoided
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * This API fetches the user setting to determine if SAP MCC with other persona
+ * to be avoided.
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_get_sap_mcc_chnl_avoid(struct wlan_objmgr_psoc *psoc,
+				 uint8_t *value);
+/**
+ * wlan_mlme_get_mcc_bcast_prob_resp() - Get broadcast probe rsp in MCC
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * To get INI value which helps to determe whether to enable/disable use of
+ * broadcast probe response to increase the detectability of SAP in MCC mode.
+ *
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_get_mcc_bcast_prob_resp(struct wlan_objmgr_psoc *psoc,
+				  uint8_t *value);
+/**
+ * wlan_mlme_get_mcc_rts_cts_prot() - To get RTS-CTS protection in MCC.
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * To get INI value which helps to determine whether to enable/disable
+ * use of long duration RTS-CTS protection when SAP goes off
+ * channel in MCC mode.
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_get_mcc_rts_cts_prot(struct wlan_objmgr_psoc *psoc,
+			       uint8_t *value);
+/**
+ * wlan_mlme_get_mcc_feature() - To find out to enable/disable MCC feature
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * To get INI value which helps to determine whether to enable MCC feature
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_get_mcc_feature(struct wlan_objmgr_psoc *psoc,
+			  uint8_t *value);
 #endif /* _WLAN_MLME_API_H_ */

+ 8 - 1
mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -537,6 +537,7 @@ struct wlan_mlme_wps_params {
  * @max_li_modulated_dtim_time: Max modulated DTIM time.
  * @country_code_priority: Country code priority.
  * @sap_pref_chan_location: SAP Preferred channel location.
+ * @sap_mcc_chnl_avoid: SAP MCC channel avoidance flag
  */
 struct wlan_mlme_cfg_sap {
 	uint8_t cfg_ssid[MLME_CFG_SSID_LEN];
@@ -569,6 +570,7 @@ struct wlan_mlme_cfg_sap {
 	bool sap_force_11n_for_11ac;
 	bool go_force_11n_for_11ac;
 	bool ap_random_bssid_enable;
+	uint8_t sap_mcc_chnl_avoid;
 };
 
 /**
@@ -837,9 +839,12 @@ struct wlan_mlme_feature_flag {
 	bool enable_rsn;
 	bool enable_short_preamble_11g;
 	bool enable_short_slot_time_11g;
+	bool enable_ampdu;
+	bool enable_mcc;
+	uint8_t mcc_rts_cts_prot;
+	uint8_t mcc_bcast_prob_rsp;
 	uint32_t channel_bonding_mode;
 	uint32_t enable_block_ack;
-	bool enable_ampdu;
 };
 
 /*
@@ -1067,6 +1072,7 @@ enum station_keepalive_method {
  * @tgt_gtx_usr_cfg:                Target gtx user config
  * @pmkid_modes:                    Enable PMKID modes
  * @wait_cnf_timeout:               Wait assoc cnf timeout
+ * @sta_miracast_mcc_rest_time:     STA+MIRACAST(P2P) MCC rest time
  * @dot11p_mode:                    Set 802.11p mode
  * @fils_max_chan_guard_time:       Set maximum channel guard time
  * @current_rssi:                   Current rssi
@@ -1085,6 +1091,7 @@ struct wlan_mlme_sta_cfg {
 	uint32_t tgt_gtx_usr_cfg;
 	uint32_t pmkid_modes;
 	uint32_t wait_cnf_timeout;
+	uint32_t sta_miracast_mcc_rest_time;
 	enum dot11p_mode dot11p_mode;
 	uint8_t fils_max_chan_guard_time;
 	uint8_t current_rssi;

+ 89 - 0
mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -3105,4 +3105,93 @@ QDF_STATUS
 ucfg_mlme_get_ap_random_bssid_enable(struct wlan_objmgr_psoc *psoc,
 				     bool *value);
 
+/**
+ * ucfg_mlme_get_sta_miracast_mcc_rest_time() - Get STA/MIRACAST MCC rest time
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * This API gives rest time to be used when STA and MIRACAST MCC conc happens
+ *
+ * Return: QDF_STATUS
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_sta_miracast_mcc_rest_time(struct wlan_objmgr_psoc *psoc,
+					 uint32_t *value)
+{
+	return wlan_mlme_get_sta_miracast_mcc_rest_time(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_sap_mcc_chnl_avoid() - Check if SAP MCC needs to be avoided
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * This API fetches the user setting to determine if SAP MCC with other persona
+ * to be avoided.
+ *
+ * Return: QDF_STATUS
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_sap_mcc_chnl_avoid(struct wlan_objmgr_psoc *psoc,
+				 uint8_t *value)
+{
+	return wlan_mlme_get_sap_mcc_chnl_avoid(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_mcc_bcast_prob_resp() - Get broadcast probe rsp in MCC
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * To get INI value which helps to determe whether to enable/disable use of
+ * broadcast probe response to increase the detectability of SAP in MCC mode.
+ *
+ *
+ * Return: QDF_STATUS
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_mcc_bcast_prob_resp(struct wlan_objmgr_psoc *psoc,
+				  uint8_t *value)
+{
+	return wlan_mlme_get_mcc_bcast_prob_resp(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_mcc_rts_cts_prot() - To get RTS-CTS protection in MCC.
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * To get INI value which helps to determine whether to enable/disable
+ * use of long duration RTS-CTS protection when SAP goes off
+ * channel in MCC mode.
+ *
+ * Return: QDF_STATUS
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_mcc_rts_cts_prot(struct wlan_objmgr_psoc *psoc,
+			       uint8_t *value)
+{
+	return wlan_mlme_get_mcc_rts_cts_prot(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_mcc_feature() - To find out to enable/disable MCC feature
+ *
+ * @psoc: pointer to psoc object
+ * @value: value which needs to filled by API
+ *
+ * To get INI value which helps to determine whether to enable MCC feature
+ *
+ * Return: QDF_STATUS
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_mcc_feature(struct wlan_objmgr_psoc *psoc,
+			  uint8_t *value)
+{
+	return wlan_mlme_get_mcc_feature(psoc, value);
+}
 #endif /* _WLAN_MLME_UCFG_API_H_ */

+ 85 - 0
mlme/dispatcher/src/wlan_mlme_api.c

@@ -2140,6 +2140,91 @@ QDF_STATUS wlan_mlme_set_enable_bcast_probe_rsp(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 
+QDF_STATUS
+wlan_mlme_get_sta_miracast_mcc_rest_time(struct wlan_objmgr_psoc *psoc,
+					 uint32_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.sta.sta_miracast_mcc_rest_time;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_get_sap_mcc_chnl_avoid(struct wlan_objmgr_psoc *psoc,
+				 uint8_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_cfg.sap_mcc_chnl_avoid;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_get_mcc_bcast_prob_resp(struct wlan_objmgr_psoc *psoc,
+				  uint8_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.feature_flags.mcc_bcast_prob_rsp;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_get_mcc_rts_cts_prot(struct wlan_objmgr_psoc *psoc,
+			       uint8_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.feature_flags.mcc_rts_cts_prot;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_get_mcc_feature(struct wlan_objmgr_psoc *psoc,
+			  uint8_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.feature_flags.enable_mcc;
+
+	return QDF_STATUS_SUCCESS;
+}
+
 QDF_STATUS wlan_mlme_get_edca_params(struct wlan_mlme_edca_params *edca_params,
 				     uint8_t *data, enum e_edca_type edca_ac)
 {