Forráskód Böngészése

qcacld-3.0: Move IBSS INI params to converged CFG component

Update qcacld driver to move IBSS INI params to converged CFG
component and cleanup HDD ini entriesi

Change-Id: Id8e4c0505113e556a8d64915a648f17fc5c0daf5
CRs-fixed: 2358493
Manikandan Mohan 6 éve
szülő
commit
9d41d601b7

+ 10 - 0
mlme/core/inc/wlan_mlme_main.h

@@ -186,4 +186,14 @@ struct wlan_mlme_psoc_obj *mlme_get_psoc_obj_fl(struct wlan_objmgr_psoc *psoc,
 						const char *func,
 						uint32_t line);
 
+/**
+ * mlme_init_ibss_cfg() - Init IBSS config data structure with default CFG value
+ * @psoc: pointer to the psoc object
+ * @ibss_cfg: Pointer to IBSS cfg data structure to return values
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_init_ibss_cfg(struct wlan_objmgr_psoc *psoc,
+			      struct wlan_mlme_ibss_cfg *ibss_cfg);
+
 #endif

+ 30 - 0
mlme/core/src/wlan_mlme_main.c

@@ -1209,6 +1209,35 @@ static void mlme_init_acs_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_EXTERNAL_ACS_POLICY);
 }
 
+QDF_STATUS mlme_init_ibss_cfg(struct wlan_objmgr_psoc *psoc,
+			      struct wlan_mlme_ibss_cfg *ibss_cfg)
+{
+	if (!ibss_cfg)
+		return QDF_STATUS_E_FAILURE;
+
+	ibss_cfg->auto_bssid = cfg_default(CFG_IBSS_AUTO_BSSID);
+	ibss_cfg->atim_win_size = cfg_get(psoc, CFG_IBSS_ATIM_WIN_SIZE);
+	ibss_cfg->adhoc_ch_5g = cfg_get(psoc, CFG_IBSS_ADHOC_CHANNEL_5GHZ);
+	ibss_cfg->adhoc_ch_2g = cfg_get(psoc, CFG_IBSS_ADHOC_CHANNEL_24GHZ);
+	ibss_cfg->coalesing_enable = cfg_get(psoc, CFG_IBSS_COALESING);
+	ibss_cfg->power_save_allow = cfg_get(psoc,
+					     CFG_IBSS_IS_POWER_SAVE_ALLOWED);
+	ibss_cfg->power_collapse_allow =
+			 cfg_get(psoc, CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED);
+	ibss_cfg->awake_on_tx_rx = cfg_get(psoc, CFG_IBSS_AWAKE_ON_TX_RX);
+	ibss_cfg->inactivity_bcon_count =
+			 cfg_get(psoc, CFG_IBSS_INACTIVITY_TIME);
+	ibss_cfg->txsp_end_timeout =
+			 cfg_get(psoc, CFG_IBSS_TXSP_END_INACTIVITY);
+	ibss_cfg->ps_warm_up_time = cfg_get(psoc, CFG_IBSS_PS_WARMUP_TIME);
+	ibss_cfg->ps_1rx_chain_atim_win =
+			 cfg_get(psoc, CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW);
+	qdf_copy_macaddr(&ibss_cfg->bssid, (struct qdf_mac_addr *)
+			 &cfg_get(psoc, CFG_IBSS_BSSID));
+
+	return QDF_STATUS_SUCCESS;
+}
+
 static void
 mlme_init_product_details_cfg(struct wlan_mlme_product_details_cfg
 			      *product_details)
@@ -2031,6 +2060,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
 	mlme_init_stats_cfg(psoc, &mlme_cfg->stats);
 	mlme_init_twt_cfg(psoc, &mlme_cfg->twt_cfg);
 	mlme_init_lfr_cfg(psoc, &mlme_cfg->lfr);
+	mlme_init_ibss_cfg(psoc, &mlme_cfg->ibss);
 	mlme_init_feature_flag_in_cfg(psoc, &mlme_cfg->feature_flags);
 	mlme_init_scoring_cfg(psoc, &mlme_cfg->scoring);
 	mlme_init_threshold_cfg(psoc, &mlme_cfg->threshold);

+ 2 - 0
mlme/dispatcher/inc/cfg_mlme.h

@@ -26,6 +26,7 @@
 #include "cfg_mlme_chainmask.h"
 #include "cfg_mlme_edca_params.h"
 #include "cfg_mlme_generic.h"
+#include "cfg_mlme_ibss.h"
 #include "cfg_mlme_acs.h"
 #include "cfg_mlme_power.h"
 #include "cfg_mlme_ht_caps.h"
@@ -72,6 +73,7 @@
 	CFG_GENERIC_ALL \
 	CFG_HT_CAPS_ALL \
 	CFG_HE_CAPS_ALL \
+	CFG_IBSS_ALL \
 	CFG_LFR_ALL \
 	CFG_MBO_ALL \
 	CFG_MLME_POWER_ALL \

+ 379 - 0
mlme/dispatcher/inc/cfg_mlme_ibss.h

@@ -0,0 +1,379 @@
+/*
+ * 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_IBSS_H
+#define __CFG_MLME_IBSS_H
+
+/*
+ * <ini>
+ * g_IBSS_AUTO_BSSID - Control IBSS Auto BSSID setup
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * Control IBSS Auto BSSID enable / disable
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_AUTO_BSSID CFG_BOOL( \
+			"gIbssAutoBssid", \
+			1, \
+			"Enable Auto BSSID for IBSS")
+
+/*
+ * <ini>
+ * gAdHocChannel5G - Default 5Ghz IBSS channel if channel is not
+ * provided by supplicant.
+ * @Min: 36
+ * @Max: 165
+ * @Default: 44
+ *
+ * This ini is used to set default 5Ghz IBSS channel
+ * if channel is not provided by supplicant and band is 5Ghz
+ *
+ * Related: None
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_ADHOC_CHANNEL_5GHZ CFG_INI_UINT( \
+		"gAdHocChannel5G", \
+		36, \
+		165, \
+		44, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Default 5Ghz IBSS channel if not provided by supplicant")
+
+/*
+ * <ini>
+ * gAdHocChannel24G - Default 2.4Ghz IBSS channel if channel is not
+ * provided by supplicant.
+ * @Min: 1
+ * @Max: 14
+ * @Default: 6
+ *
+ * This ini is used to set default 2.4Ghz IBSS channel
+ * if channel is not provided by supplicant and band is 2.4Ghz
+ *
+ * Related: None
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_ADHOC_CHANNEL_24GHZ CFG_INI_UINT( \
+		"gAdHocChannel24G", \
+		1, \
+		14, \
+		6, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Default 2.4Ghz IBSS channel if not provided by supplicant")
+
+/*
+ * <ini>
+ * gCoalesingInIBSS - If IBSS coalesing is enabled.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to set IBSS coalesing
+ *
+ * Related: None
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_COALESING CFG_INI_BOOL( \
+		"gCoalesingInIBSS", \
+		0, \
+		"IBSS coalesing control param")
+
+/*
+ * <ini>
+ * gIbssATIMWinSize - Set IBSS ATIM window size
+ * @Min: 0
+ * @Max: 50
+ * @Default: 0
+ *
+ * This ini is used to set IBSS ATIM window size
+ *
+ * Related: None
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_ATIM_WIN_SIZE CFG_INI_UINT( \
+		"gIbssATIMWinSize", \
+		0, \
+		50, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Set IBSS ATIM window size")
+
+/*
+ * <ini>
+ * gIbssIsPowerSaveAllowed - Indicates if IBSS Power Save is
+ * supported or not
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to Indicates if IBSS Power Save is
+ * supported or not. When not allowed,IBSS station has
+ * to stay awake all the time and should never set PM=1
+ * in its transmitted frames.
+ *
+ * Related: valid only when gIbssATIMWinSize is non-zero
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_IS_POWER_SAVE_ALLOWED CFG_INI_BOOL( \
+		"gIbssIsPowerSaveAllowed", \
+		1, \
+		"IBSS Power Save control")
+
+/*
+ * <ini>
+ * gIbssIsPowerCollapseAllowed - Indicates if IBSS Power Collapse
+ * is allowed
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to indicates if IBSS Power Collapse
+ * is allowed
+ *
+ * Related: None
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED CFG_INI_BOOL( \
+		"gIbssIsPowerCollapseAllowed", \
+		1, \
+		"Indicates if IBSS Power Collapse is allowed")
+
+/*
+ * <ini>
+ * gIbssAwakeOnTxRx - Indicates whether IBSS station
+ * can exit power save mode and enter power active
+ * state whenever there is a TX/RX activity.
+ *
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to ndicates whether IBSS station
+ * can exit power save mode and enter power active
+ * state whenever there is a TX/RX activity.
+ *
+ * Related: None
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_AWAKE_ON_TX_RX CFG_INI_BOOL( \
+		"gIbssAwakeOnTxRx", \
+		0, \
+		"IBSS sta power save mode on TX/RX activity")
+
+/*
+ * <ini>
+ * gIbssInactivityTime - Indicates the data
+ * inactivity time in number of beacon intervals
+ * after which IBSS station re-inters power save
+ *
+ * @Min: 1
+ * @Max: 10
+ * @Default: 1
+ *
+ * In IBSS mode if Awake on TX/RX activity is enabled
+ * Ibss Inactivity parameter indicates the data
+ * inactivity time in number of beacon intervals
+ * after which IBSS station re-inters power save
+ * by sending Null frame with PM=1
+ *
+ * Related: Aplicable if gIbssAwakeOnTxRx is enabled
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_INACTIVITY_TIME CFG_INI_UINT( \
+		"gIbssInactivityTime", \
+		1, \
+		10, \
+		1, \
+		CFG_VALUE_OR_DEFAULT, \
+		"No of Beacons intervals of data inactivity for power save")
+
+/*
+ * <ini>
+ * gIbssTxSpEndInactivityTime - Indicates the time after
+ * which TX Service Period is terminated by
+ * sending a Qos Null frame with EOSP.
+ *
+ * @Min: 0
+ * @Max: 100
+ * @Default: 0
+ *
+ * In IBSS mode Tx Service Period Inactivity
+ * time in msecs indicates the time after
+ * which TX Service Period is terminated by
+ * sending a Qos Null frame with EOSP.
+ * If value is 0, TX SP is terminated with the
+ * last buffered packet itself instead of waiting
+ * for the inactivity.
+ *
+ * Related: None
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_TXSP_END_INACTIVITY CFG_INI_UINT( \
+		"gIbssTxSpEndInactivityTime", \
+		0, \
+		100, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"TX service period inactivity timeout")
+
+/*
+ * <ini>
+ * gIbssPsWarmupTime - PS-supporting device
+ * does not enter protocol sleep state during first
+ * gIbssPsWarmupTime seconds.
+ *
+ * @Min: 0
+ * @Max: 65535
+ * @Default: 0
+ *
+ * When IBSS network is initialized, PS-supporting device
+ * does not enter protocol sleep state during first
+ * gIbssPsWarmupTime seconds.
+ *
+ * Related: valid if gIbssIsPowerSaveAllowed is set
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_PS_WARMUP_TIME CFG_INI_UINT( \
+		"gIbssPsWarmupTime", \
+		0, \
+		65535, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"IBSS Power save skip time")
+
+/*
+ * <ini>
+ * gIbssPs1RxChainInAtim - IBSS Power Save Enable/Disable 1 RX
+ * chain usage during the ATIM window
+ *
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * IBSS Power Save Enable/Disable 1 RX
+ * chain usage during the ATIM window
+ *
+ * Related: Depend on gIbssIsPowerSaveAllowed
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW CFG_INI_BOOL( \
+		"gIbssPs1RxChainInAtim", \
+		0, \
+		"Control IBSS Power save in 1RX chain during ATIM")
+
+/*
+ * <ini>
+ * gIbssBssid - Default IBSS BSSID if BSSID is not provided by supplicant
+ * @Min: "000000000000"
+ * @Max: "ffffffffffff"
+ * @Default: "000AF5040506"
+ *
+ * This ini is used to set Default IBSS BSSID if BSSID
+ * is not provided by supplicant and Coalesing is disabled
+ *
+ * Related: Only applicable if gCoalesingInIBSS is 0
+ *
+ * Supported Feature: IBSS
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define IBSS_BSSID_DEFAULT { .bytes = { 0x00, 0x0a, 0xf5, 0x04, 0x05, 0x06 } }
+#define CFG_IBSS_BSSID CFG_INI_MAC("gIbssBssid", \
+		IBSS_BSSID_DEFAULT, \
+		"IBSS BSSID if not provided by supplicant")
+
+#define CFG_IBSS_ALL \
+	CFG(CFG_IBSS_ADHOC_CHANNEL_5GHZ) \
+	CFG(CFG_IBSS_ADHOC_CHANNEL_24GHZ) \
+	CFG(CFG_IBSS_ATIM_WIN_SIZE) \
+	CFG(CFG_IBSS_AUTO_BSSID) \
+	CFG(CFG_IBSS_AWAKE_ON_TX_RX) \
+	CFG(CFG_IBSS_BSSID) \
+	CFG(CFG_IBSS_COALESING) \
+	CFG(CFG_IBSS_INACTIVITY_TIME) \
+	CFG(CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED) \
+	CFG(CFG_IBSS_IS_POWER_SAVE_ALLOWED) \
+	CFG(CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW) \
+	CFG(CFG_IBSS_PS_WARMUP_TIME) \
+	CFG(CFG_IBSS_TXSP_END_INACTIVITY)
+#endif

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

@@ -1884,6 +1884,16 @@ wlan_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value);
 QDF_STATUS
 wlan_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value);
 
+/**
+ * wlan_mlme_ibss_power_save_setup() - Set IBSS power save params
+ * @psoc: pointer to psoc object
+ * @vdev_id: IBSS Vdev ID
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS wlan_mlme_ibss_power_save_setup(struct wlan_objmgr_psoc *psoc,
+					   uint32_t vdev_id);
+
 /**
  * wlan_mlme_set_11d_enabled() - Set the 11h flag
  * @psoc: psoc context
@@ -2071,5 +2081,4 @@ wlan_mlme_get_wps_uuid(struct wlan_mlme_wps_params *wps_params, uint8_t *data);
 QDF_STATUS
 wlan_mlme_get_self_gen_frm_pwr(struct wlan_objmgr_psoc *psoc,
 			       uint32_t *value);
-
 #endif /* _WLAN_MLME_API_H_ */

+ 34 - 0
mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1834,6 +1834,38 @@ struct wlan_mlme_reg {
 	uint32_t scan_11d_interval;
 };
 
+/**
+ * struct wlan_mlme_ibss_cfg - IBSS config params
+ * @auto_bssid: Enable Auto BSSID for IBSS
+ * @atim_win_size: Set IBSS ATIM window size
+ * @adhoc_ch_5g: Default 5Ghz IBSS channel if not provided by supplicant
+ * @adhoc_ch_2g: Default 2.4Ghz IBSS channel if not provided by supplicant
+ * @coalesing_enable: IBSS coalesing control param
+ * @power_save_allow: IBSS Power Save control
+ * @power_collapse_allow: IBSS Power collapse control
+ * @awake_on_tx_rx: IBSS sta power save mode on TX/RX activity
+ * @inactivity_bcon_count: No of Beacons of data inactivity for power save
+ * @txsp_end_timeout: TX service period inactivity timeout
+ * @ps_warm_up_time: IBSS Power save skip time
+ * @ps_1rx_chain_atim_win: Control IBSS Power save in 1RX chain during ATIM
+ * @bssid: BSSID Mac address: IBSS BSSID if not provided by supplicant
+ */
+struct wlan_mlme_ibss_cfg {
+	bool auto_bssid;
+	uint32_t atim_win_size;
+	uint32_t adhoc_ch_5g;
+	uint32_t adhoc_ch_2g;
+	bool coalesing_enable;
+	bool power_save_allow;
+	bool power_collapse_allow;
+	bool awake_on_tx_rx;
+	uint32_t inactivity_bcon_count;
+	uint32_t txsp_end_timeout;
+	uint32_t ps_warm_up_time;
+	uint32_t ps_1rx_chain_atim_win;
+	struct qdf_mac_addr bssid;
+};
+
 /**
  * struct wlan_mlme_cfg - MLME config items
  * @chainmask_cfg: VHT chainmask related cfg items
@@ -1842,6 +1874,7 @@ struct wlan_mlme_reg {
  * @ht_caps: HT related CFG Items
  * @he_caps: HE related cfg items
  * @lfr: LFR related CFG Items
+ * @ibss: IBSS related CFG items
  * @obss_ht40:obss ht40 CFG Items
  * @mbo_cfg: Multiband Operation related CFG items
  * @vht_caps: VHT related CFG Items
@@ -1882,6 +1915,7 @@ struct wlan_mlme_cfg {
 	struct wlan_mlme_he_caps he_caps;
 #endif
 	struct wlan_mlme_lfr_cfg lfr;
+	struct wlan_mlme_ibss_cfg ibss;
 	struct wlan_mlme_obss_ht40 obss_ht40;
 	struct wlan_mlme_mbo mbo_cfg;
 	struct wlan_mlme_vht_caps vht_caps;

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

@@ -2542,6 +2542,40 @@ ucfg_mlme_stats_is_link_speed_report_max(struct wlan_objmgr_psoc *psoc);
 bool
 ucfg_mlme_stats_is_link_speed_report_max_scaled(struct wlan_objmgr_psoc *psoc);
 
+/**
+ * ucfg_mlme_get_ibss_cfg() - Get IBSS config params data structure
+ * @psoc: pointer to psoc object
+ * @auto_bssid: Pointer to return the IBSS config data structure
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS ucfg_mlme_get_ibss_cfg(struct wlan_objmgr_psoc *psoc,
+				  struct wlan_mlme_ibss_cfg *ibss_cfg);
+
+/**
+ * ucfg_mlme_set_ibss_auto_bssid() - Set IBSS Auto BSSID config
+ * @psoc: pointer to psoc object
+ * @auto_bssid: IBSS Auto BSSID config value
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS ucfg_mlme_set_ibss_auto_bssid(struct wlan_objmgr_psoc *psoc,
+					 uint32_t auto_bssid);
+
+/**
+ * ucfg_mlme_ibss_power_save_setup() - Set IBSS power save params
+ * @psoc: pointer to psoc object
+ * @vdev_id: IBSS Vdev ID
+ *
+ * Return: QDF Status
+ */
+static inline
+QDF_STATUS ucfg_mlme_ibss_power_save_setup(struct wlan_objmgr_psoc *psoc,
+					   uint32_t vdev_id)
+{
+	return wlan_mlme_ibss_power_save_setup(psoc, vdev_id);
+}
+
 /**
  * ucfg_mlme_get_wmm_dir_ac_vi() - Get TSPEC direction
  * for VI

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

@@ -3038,3 +3038,90 @@ wlan_mlme_get_self_gen_frm_pwr(struct wlan_objmgr_psoc *psoc,
 
 	return QDF_STATUS_SUCCESS;
 }
+
+QDF_STATUS wlan_mlme_ibss_power_save_setup(struct wlan_objmgr_psoc *psoc,
+					   uint32_t vdev_id)
+{
+	struct wlan_mlme_ibss_cfg *ibss_cfg;
+	int ret;
+	struct wlan_mlme_psoc_obj *mlme_obj = mlme_get_psoc_obj(psoc);
+
+	if (!mlme_obj)
+		return QDF_STATUS_E_FAILURE;
+
+	ibss_cfg = &mlme_obj->cfg.ibss;
+
+	ret = wma_cli_set_command(vdev_id,
+				  WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE,
+				  ibss_cfg->atim_win_size,
+				  VDEV_CMD);
+	if (ret) {
+		mlme_err("atim window set failed: %d", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	ret = wma_cli_set_command(vdev_id,
+				  WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED,
+				  ibss_cfg->power_save_allow,
+				  VDEV_CMD);
+	if (ret) {
+		mlme_err("power save allow failed %d", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	ret = wma_cli_set_command(vdev_id,
+				  WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED,
+				  ibss_cfg->power_collapse_allow,
+				  VDEV_CMD);
+	if (ret) {
+		mlme_err("power collapse allow failed %d", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	ret = wma_cli_set_command(vdev_id,
+				  WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX,
+				  ibss_cfg->awake_on_tx_rx,
+				  VDEV_CMD);
+	if (ret) {
+		mlme_err("set awake on tx/rx failed %d", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	ret = wma_cli_set_command(vdev_id,
+				  WMA_VDEV_IBSS_SET_INACTIVITY_TIME,
+				  ibss_cfg->inactivity_bcon_count,
+				  VDEV_CMD);
+	if (ret) {
+		mlme_err("set inactivity time failed %d", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	ret = wma_cli_set_command(vdev_id,
+				  WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME,
+				  ibss_cfg->txsp_end_timeout,
+				  VDEV_CMD);
+	if (ret) {
+		mlme_err("set txsp end failed %d", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	ret = wma_cli_set_command(vdev_id,
+				  WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS,
+				  ibss_cfg->ps_warm_up_time,
+				  VDEV_CMD);
+	if (ret) {
+		mlme_err("set ps warmup failed %d", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	ret = wma_cli_set_command(vdev_id,
+				  WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW,
+				  ibss_cfg->ps_1rx_chain_atim_win,
+				  VDEV_CMD);
+	if (ret) {
+		mlme_err("set 1rx chain atim failed %d", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	return QDF_STATUS_SUCCESS;
+}

+ 37 - 1
mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -1310,6 +1310,43 @@ ucfg_mlme_get_latency_enable(struct wlan_objmgr_psoc *psoc, bool *value)
 	return QDF_STATUS_SUCCESS;
 }
 
+QDF_STATUS ucfg_mlme_get_ibss_cfg(struct wlan_objmgr_psoc *psoc,
+				  struct wlan_mlme_ibss_cfg *ibss_cfg)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	if (!ibss_cfg)
+		return QDF_STATUS_E_FAILURE;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("MLME Obj null on get IBSS config");
+		mlme_init_ibss_cfg(psoc, ibss_cfg);
+		return QDF_STATUS_E_INVAL;
+	}
+	*ibss_cfg = mlme_obj->cfg.ibss;
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS ucfg_mlme_set_ibss_auto_bssid(struct wlan_objmgr_psoc *psoc,
+					 uint32_t auto_bssid)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("MLME Obj null on get IBSS config");
+		return QDF_STATUS_E_INVAL;
+	}
+	if (!cfg_in_range(CFG_IBSS_AUTO_BSSID, auto_bssid)) {
+		mlme_err("Invalid IBSS Auto BSSID control value: %d",
+			 auto_bssid);
+		return QDF_STATUS_E_INVAL;
+	}
+	mlme_obj->cfg.ibss.auto_bssid = auto_bssid;
+	return QDF_STATUS_SUCCESS;
+}
+
 #ifdef MWS_COEX
 QDF_STATUS
 ucfg_mlme_get_mws_coex_4g_quick_tdm(struct wlan_objmgr_psoc *psoc,
@@ -1416,6 +1453,5 @@ ucfg_mlme_get_scan_11d_interval(struct wlan_objmgr_psoc *psoc,
 	}
 
 	*value = mlme_obj->cfg.reg.scan_11d_interval;
-
 	return QDF_STATUS_SUCCESS;
 }