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

Commit 3aec11e9 authored by Ashish Kumar Dhanotiya's avatar Ashish Kumar Dhanotiya Committed by snandini
Browse files

qcacld-3.0: Add ini to retain the NOL across reg domain change

Currently driver sets the NOL state of the channels to false
on every regulatory updated, which indicates the channel is
not in NOL. Which may lead to some issues where the channel
is actually in NOL but host treats it as non-NOL channel.

Ideally NOL list should be maintained throughout the driver
lifetime and across the regulatory changes.

To address this issue add a logic to not update the NOL state
of the channels whenever the regulatory update is received.

CRs-Fixed: 2744916
Change-Id: If96b22ab29a60a2aa752bbf01aaae46fc37362eb
parent 9ea19c8b
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -2333,6 +2333,8 @@ static void mlme_init_reg_cfg(struct wlan_objmgr_psoc *psoc,
	reg->ignore_fw_reg_offload_ind = cfg_get(
	reg->ignore_fw_reg_offload_ind = cfg_get(
						psoc,
						psoc,
						CFG_IGNORE_FW_REG_OFFLOAD_IND);
						CFG_IGNORE_FW_REG_OFFLOAD_IND);
	reg->retain_nol_across_regdmn_update =
		cfg_get(psoc, CFG_RETAIN_NOL_ACROSS_REG_DOMAIN);


	qdf_uint8_array_parse(cfg_default(CFG_VALID_CHANNEL_LIST),
	qdf_uint8_array_parse(cfg_default(CFG_VALID_CHANNEL_LIST),
			      channel_list,
			      channel_list,
+24 −0
Original line number Original line Diff line number Diff line
@@ -297,6 +297,29 @@
			0, \
			0, \
			"Enable Pending list req")
			"Enable Pending list req")


/*
 * <ini>
 * retain_nol_across_regdmn - Retain NOL across reg domain
 * @Min: 0
 * @Max: 1
 * @Default: 1
 *
 * This ini is used to set if NOL needs to be retained
 * on the reg domain change.
 *
 * Related: None
 *
 * Supported Feature: SAP
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_RETAIN_NOL_ACROSS_REG_DOMAIN CFG_INI_BOOL( \
		"retain_nol_across_regdmn", \
		1, \
		"Retain NOL even if the regdomain changes")

#define CFG_REG_ALL \
#define CFG_REG_ALL \
	CFG(CFG_SELF_GEN_FRM_PWR) \
	CFG(CFG_SELF_GEN_FRM_PWR) \
	CFG(CFG_ENABLE_PENDING_CHAN_LIST_REQ) \
	CFG(CFG_ENABLE_PENDING_CHAN_LIST_REQ) \
@@ -308,6 +331,7 @@
	CFG(CFG_VALID_CHANNEL_LIST) \
	CFG(CFG_VALID_CHANNEL_LIST) \
	CFG(CFG_COUNTRY_CODE) \
	CFG(CFG_COUNTRY_CODE) \
	CFG(CFG_IGNORE_FW_REG_OFFLOAD_IND) \
	CFG(CFG_IGNORE_FW_REG_OFFLOAD_IND) \
	CFG(CFG_RETAIN_NOL_ACROSS_REG_DOMAIN) \
	CFG_SAP_AVOID_ACS_FREQ_LIST_ALL
	CFG_SAP_AVOID_ACS_FREQ_LIST_ALL


#endif /* CFG_MLME_REG_H__ */
#endif /* CFG_MLME_REG_H__ */
+2 −0
Original line number Original line Diff line number Diff line
@@ -2207,6 +2207,7 @@ struct wlan_mlme_mwc {
 * @ignore_fw_reg_offload_ind: Ignore fw regulatory offload indication
 * @ignore_fw_reg_offload_ind: Ignore fw regulatory offload indication
 * @enable_pending_chan_list_req: enables/disables scan channel
 * @enable_pending_chan_list_req: enables/disables scan channel
 * list command to FW till the current scan is complete.
 * list command to FW till the current scan is complete.
 * @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain.
 */
 */
struct wlan_mlme_reg {
struct wlan_mlme_reg {
	uint32_t self_gen_frm_pwr;
	uint32_t self_gen_frm_pwr;
@@ -2226,6 +2227,7 @@ struct wlan_mlme_reg {
#endif
#endif
	bool ignore_fw_reg_offload_ind;
	bool ignore_fw_reg_offload_ind;
	bool enable_pending_chan_list_req;
	bool enable_pending_chan_list_req;
	bool retain_nol_across_regdmn_update;
};
};


/**
/**
+11 −0
Original line number Original line Diff line number Diff line
@@ -3830,6 +3830,17 @@ QDF_STATUS
ucfg_mlme_get_scan_11d_interval(struct wlan_objmgr_psoc *psoc,
ucfg_mlme_get_scan_11d_interval(struct wlan_objmgr_psoc *psoc,
				uint32_t *value);
				uint32_t *value);


/**
 * ucfg_mlme_get_nol_across_regdmn() - get scan 11d interval
 * @psoc: pointer to psoc object
 * @value:  Pointer to the value which will be filled for the caller
 *
 * Return: QDF Status
 */

QDF_STATUS
ucfg_mlme_get_nol_across_regdmn(struct wlan_objmgr_psoc *psoc, bool *value);

/**
/**
 * ucfg_mlme_get_valid_channel_freq_list() - get valid channel
 * ucfg_mlme_get_valid_channel_freq_list() - get valid channel
 * list
 * list
+16 −0
Original line number Original line Diff line number Diff line
@@ -1653,6 +1653,22 @@ ucfg_mlme_get_scan_11d_interval(struct wlan_objmgr_psoc *psoc,
	return QDF_STATUS_SUCCESS;
	return QDF_STATUS_SUCCESS;
}
}


QDF_STATUS
ucfg_mlme_get_nol_across_regdmn(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 = cfg_default(CFG_RETAIN_NOL_ACROSS_REG_DOMAIN);
		mlme_legacy_err("Failed to get MLME Obj");
		return QDF_STATUS_E_INVAL;
	}

	*value = mlme_obj->cfg.reg.retain_nol_across_regdmn_update;
	return QDF_STATUS_SUCCESS;
}

QDF_STATUS
QDF_STATUS
ucfg_mlme_get_valid_channel_freq_list(struct wlan_objmgr_psoc *psoc,
ucfg_mlme_get_valid_channel_freq_list(struct wlan_objmgr_psoc *psoc,
				      uint32_t *channel_list,
				      uint32_t *channel_list,
Loading