Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb6a0b3b authored by Ashish Kumar Dhanotiya's avatar Ashish Kumar Dhanotiya Committed by Gerrit - the friendly Code Review server
Browse files

qcacld-3.0: Add ini support to enable NAN on indoor channels

Currently there is no  support to enable NAN on indoor channels,
as per the new requirement add an ini support to enable NAN on
indoor channels.

Change-Id: Ia3acbc133cab4865d8ad69992e893be91439f50f
CRs-Fixed: 2943668
parent d4870245
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2359,6 +2359,9 @@ static void mlme_init_reg_cfg(struct wlan_objmgr_psoc *psoc,
			      &valid_channel_list_num);
	reg->valid_channel_list_num = (uint8_t)valid_channel_list_num;

	reg->enable_nan_on_indoor_channels =
		cfg_get(psoc, CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN);

	pdev = wlan_objmgr_get_pdev_by_id(psoc, 0, WLAN_MLME_NB_ID);
	if (!pdev) {
		mlme_legacy_err("null pdev");
+24 −0
Original line number Diff line number Diff line
@@ -104,6 +104,29 @@
	CFG_VALUE_OR_DEFAULT, \
	"enable/disable ETSI SRD channels in master mode")

/*
 * <ini>
 * enable_nan_indoor_channel - Enable Indoor channels for NAN
 * @Min: 0
 * @Max: 1
 * @Default: 0
 *
 * This ini is used to support to indoor channels for NAN interface
 * Customer can config this item to enable/disable NAN in indoor channel
 *
 * Related: None
 *
 * Supported Feature: NAN
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN CFG_INI_BOOL( \
	"enable_nan_indoor_channel", \
	0, \
	"enable/disable indoor channels for NAN")

#ifdef SAP_AVOID_ACS_FREQ_LIST
#define SAP_AVOID_ACS_FREQ_LIST_DEFAULT ""

@@ -334,6 +357,7 @@
	CFG(CFG_ENABLE_PENDING_CHAN_LIST_REQ) \
	CFG(CFG_ENABLE_11D_IN_WORLD_MODE) \
	CFG(CFG_ETSI_SRD_CHAN_IN_MASTER_MODE) \
	CFG(CFG_INDOOR_CHANNEL_SUPPORT_FOR_NAN) \
	CFG(CFG_RESTART_BEACONING_ON_CH_AVOID) \
	CFG(CFG_INDOOR_CHANNEL_SUPPORT) \
	CFG(CFG_SCAN_11D_INTERVAL) \
+11 −0
Original line number Diff line number Diff line
@@ -1926,6 +1926,17 @@ wlan_mlme_get_srd_master_mode_for_vdev(struct wlan_objmgr_psoc *psoc,
				       enum QDF_OPMODE vdev_opmode,
				       bool *value);

/**
 * wlan_mlme_get_indoor_support_for_nan  - Get indoor channel support for NAN
 * @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_indoor_support_for_nan(struct wlan_objmgr_psoc *psoc,
				     bool *value);

/**
 * wlan_mlme_get_vht_enable2x2() - Enables/disables VHT Tx/Rx MCS values for 2x2
 * @psoc: psoc context
+2 −0
Original line number Diff line number Diff line
@@ -2252,6 +2252,7 @@ enum mlme_reg_srd_master_modes {
 * @enable_pending_chan_list_req: enables/disables scan channel
 * list command to FW till the current scan is complete.
 * @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain.
 * @enable_nan_on_indoor_channels: Enable nan on Indoor channels
 */
struct wlan_mlme_reg {
	uint32_t self_gen_frm_pwr;
@@ -2272,6 +2273,7 @@ struct wlan_mlme_reg {
	bool ignore_fw_reg_offload_ind;
	bool enable_pending_chan_list_req;
	bool retain_nol_across_regdmn_update;
	bool enable_nan_on_indoor_channels;
};

/**
+18 −0
Original line number Diff line number Diff line
@@ -2985,6 +2985,24 @@ wlan_mlme_get_vht20_mcs9(struct wlan_objmgr_psoc *psoc, bool *value)
	return QDF_STATUS_SUCCESS;
}

QDF_STATUS
wlan_mlme_get_indoor_support_for_nan(struct wlan_objmgr_psoc *psoc,
				     bool *value)
{
	struct wlan_mlme_psoc_ext_obj *mlme_obj;

	mlme_obj = mlme_get_psoc_ext_obj(psoc);
	if (!mlme_obj) {
		*value = false;
		mlme_legacy_err("Failed to get MLME Obj");
		return QDF_STATUS_E_INVAL;
	}

	*value = mlme_obj->cfg.reg.enable_nan_on_indoor_channels;

	return QDF_STATUS_SUCCESS;
}

QDF_STATUS
wlan_mlme_get_srd_master_mode_for_vdev(struct wlan_objmgr_psoc *psoc,
				       enum QDF_OPMODE vdev_opmode,
Loading