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

Commit 30d7a094 authored by Srikanth Marepalli's avatar Srikanth Marepalli
Browse files

qcacld-3.0: Add vendor attribute to include 6 GHz in roam full scan

During the roam scan, if there are no desired APs found in the partial
frequency list, an immediate full scan on all the supported frequencies
is initiated as a fallback. This would include the 6 GHz PSC
frequencies by default.
This attribute allow that behavior to be modified to include PSCs only
if 6 GHz use has been detected in the environment.

Change-Id: I6dc380419f14b920737fd87cd9a487c28364563b
CRs-Fixed: 3351697
parent 2ac31155
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1725,6 +1725,8 @@ struct fw_scan_channels {
 * @roam_ho_delay_config: Roam HO delay value
 * @roam_ho_delay_config: Roam HO delay value
 * @exclude_rm_partial_scan_freq: Exclude the channels in roam full scan that
 * @exclude_rm_partial_scan_freq: Exclude the channels in roam full scan that
 * are already scanned as part of partial scan.
 * are already scanned as part of partial scan.
 * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan
 * only on prior discovery of any 6 GHz support in the environment.
 */
 */
struct wlan_mlme_lfr_cfg {
struct wlan_mlme_lfr_cfg {
	bool mawc_roam_enabled;
	bool mawc_roam_enabled;
@@ -1845,6 +1847,7 @@ struct wlan_mlme_lfr_cfg {
	bool enable_ft_over_ds;
	bool enable_ft_over_ds;
	uint16_t roam_ho_delay_config;
	uint16_t roam_ho_delay_config;
	uint8_t exclude_rm_partial_scan_freq;
	uint8_t exclude_rm_partial_scan_freq;
	uint8_t roam_full_scan_6ghz_on_disc;
};
};


/**
/**
+51 −0
Original line number Original line Diff line number Diff line
@@ -197,6 +197,40 @@ target_if_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_vdev *vdev,
	return status;
	return status;
}
}


/**
 * target_if_cm_roam_full_scan_6ghz_on_disc() - Indicate to FW whether to
 * include the 6 GHz channels in roam full scan only on prior discovery of any
 * 6 GHz support in the environment or by default.
 * @vdev: vdev object
 * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan:
 * 1 - Include only on prior discovery of any 6 GHz support in the environment
 * 0 - Include all the supported 6 GHz channels by default
 *
 * Return: QDF_STATUS
 */
static QDF_STATUS
target_if_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_vdev *vdev,
					 uint8_t roam_full_scan_6ghz_on_disc)
{
	QDF_STATUS status = QDF_STATUS_E_FAILURE;
	uint8_t vdev_id;
	wmi_unified_t wmi_handle;

	wmi_handle = target_if_cm_roam_get_wmi_handle_from_vdev(vdev);
	if (!wmi_handle)
		return status;

	vdev_id = wlan_vdev_get_id(vdev);
	status = target_if_roam_set_param(wmi_handle, vdev_id,
					  WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR,
					  roam_full_scan_6ghz_on_disc);

	if (QDF_IS_STATUS_ERROR(status))
		target_if_err("Failed to set WMI_ROAM_PARAM_ROAM_CONTROL_FULL_SCAN_6GHZ_PSC_ONLY_WITH_RNR");

	return status;
}

static void
static void
target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
{
{
@@ -205,6 +239,8 @@ target_if_cm_roam_register_lfr3_ops(struct wlan_cm_roam_tx_ops *tx_ops)
	tx_ops->send_roam_ho_delay_config = target_if_cm_roam_ho_delay_config;
	tx_ops->send_roam_ho_delay_config = target_if_cm_roam_ho_delay_config;
	tx_ops->send_exclude_rm_partial_scan_freq =
	tx_ops->send_exclude_rm_partial_scan_freq =
				target_if_cm_exclude_rm_partial_scan_freq;
				target_if_cm_exclude_rm_partial_scan_freq;
	tx_ops->send_roam_full_scan_6ghz_on_disc =
				target_if_cm_roam_full_scan_6ghz_on_disc;
}
}
#else
#else
static inline void
static inline void
@@ -231,6 +267,13 @@ target_if_cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_vdev *vdev,
{
{
	return QDF_STATUS_E_NOSUPPORT;
	return QDF_STATUS_E_NOSUPPORT;
}
}

static QDF_STATUS
target_if_cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_vdev *vdev,
					 uint8_t roam_full_scan_6ghz_on_disc)
{
	return QDF_STATUS_E_NOSUPPORT;
}
#endif
#endif


/**
/**
@@ -1124,6 +1167,10 @@ target_if_cm_roam_send_start(struct wlan_objmgr_vdev *vdev,
	if (req->wlan_exclude_rm_partial_scan_freq)
	if (req->wlan_exclude_rm_partial_scan_freq)
		target_if_cm_exclude_rm_partial_scan_freq(
		target_if_cm_exclude_rm_partial_scan_freq(
				vdev, req->wlan_exclude_rm_partial_scan_freq);
				vdev, req->wlan_exclude_rm_partial_scan_freq);

	if (req->wlan_roam_full_scan_6ghz_on_disc)
		target_if_cm_roam_full_scan_6ghz_on_disc(
				vdev, req->wlan_roam_full_scan_6ghz_on_disc);
	/* add other wmi commands */
	/* add other wmi commands */
end:
end:
	return status;
	return status;
@@ -1355,6 +1402,10 @@ target_if_cm_roam_send_update_config(struct wlan_objmgr_vdev *vdev,
		if (req->wlan_exclude_rm_partial_scan_freq)
		if (req->wlan_exclude_rm_partial_scan_freq)
			target_if_cm_exclude_rm_partial_scan_freq(
			target_if_cm_exclude_rm_partial_scan_freq(
				vdev, req->wlan_exclude_rm_partial_scan_freq);
				vdev, req->wlan_exclude_rm_partial_scan_freq);

		if (req->wlan_roam_full_scan_6ghz_on_disc)
			target_if_cm_roam_full_scan_6ghz_on_disc(
				vdev, req->wlan_roam_full_scan_6ghz_on_disc);
	}
	}
end:
end:
	return status;
	return status;
+21 −0
Original line number Original line Diff line number Diff line
@@ -302,6 +302,21 @@ cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,


	return status;
	return status;
}
}

QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
					  uint8_t vdev_id,
					  uint8_t param_value)
{
	QDF_STATUS status;

	wlan_cm_roam_set_full_scan_6ghz_on_disc(psoc, param_value);
	status = wlan_cm_tgt_send_roam_full_scan_6ghz_on_disc(psoc, vdev_id,
							      param_value);
	if (QDF_IS_STATUS_ERROR(status))
		mlme_debug("fail to send 6 GHz channels inclusion in full scan");

	return status;
}
#else
#else
static inline void
static inline void
cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
@@ -562,6 +577,9 @@ cm_roam_start_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
	start_req->wlan_exclude_rm_partial_scan_freq =
	start_req->wlan_exclude_rm_partial_scan_freq =
				wlan_cm_get_exclude_rm_partial_scan_freq(psoc);
				wlan_cm_get_exclude_rm_partial_scan_freq(psoc);


	start_req->wlan_roam_full_scan_6ghz_on_disc =
				wlan_cm_roam_get_full_scan_6ghz_on_disc(psoc);

	status = wlan_cm_tgt_send_roam_start_req(psoc, vdev_id, start_req);
	status = wlan_cm_tgt_send_roam_start_req(psoc, vdev_id, start_req);
	if (QDF_IS_STATUS_ERROR(status))
	if (QDF_IS_STATUS_ERROR(status))
		mlme_debug("fail to send roam start");
		mlme_debug("fail to send roam start");
@@ -617,6 +635,9 @@ cm_roam_update_config_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
	update_req->wlan_exclude_rm_partial_scan_freq =
	update_req->wlan_exclude_rm_partial_scan_freq =
				wlan_cm_get_exclude_rm_partial_scan_freq(psoc);
				wlan_cm_get_exclude_rm_partial_scan_freq(psoc);


	update_req->wlan_roam_full_scan_6ghz_on_disc =
				wlan_cm_roam_get_full_scan_6ghz_on_disc(psoc);

	status = wlan_cm_tgt_send_roam_update_req(psoc, vdev_id, update_req);
	status = wlan_cm_tgt_send_roam_update_req(psoc, vdev_id, update_req);
	if (QDF_IS_STATUS_ERROR(status))
	if (QDF_IS_STATUS_ERROR(status))
		mlme_debug("fail to send update config");
		mlme_debug("fail to send update config");
+21 −0
Original line number Original line Diff line number Diff line
@@ -142,6 +142,20 @@ cm_roam_send_ho_delay_config(struct wlan_objmgr_psoc *psoc,
QDF_STATUS
QDF_STATUS
cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
				uint8_t vdev_id, uint8_t param_value);
				uint8_t vdev_id, uint8_t param_value);

/**
 * cm_roam_full_scan_6ghz_on_disc() - Include the 6 GHz channels in roam full
 * scan only on prior discovery of any 6 GHz support in the environment
 * @psoc: PSOC pointer
 * @vdev_id: vdev id
 * @param_value: Include the 6 GHz channels in roam full scan:
 * 1 - Include only on prior discovery of any 6 GHz support in the environment
 * 0 - Include all the supported 6 GHz channels by default
 *
 * Return: QDF_STATUS
 */
QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
					  uint8_t vdev_id, uint8_t param_value);
#else
#else
static inline QDF_STATUS
static inline QDF_STATUS
cm_roam_send_rt_stats_config(struct wlan_objmgr_psoc *psoc,
cm_roam_send_rt_stats_config(struct wlan_objmgr_psoc *psoc,
@@ -163,6 +177,13 @@ cm_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
{
{
	return QDF_STATUS_E_NOSUPPORT;
	return QDF_STATUS_E_NOSUPPORT;
}
}

static inline
QDF_STATUS cm_roam_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
					  uint8_t vdev_id, uint8_t param_value)
{
	return QDF_STATUS_E_NOSUPPORT;
}
#endif
#endif


/**
/**
+33 −0
Original line number Original line Diff line number Diff line
@@ -183,6 +183,33 @@ wlan_cm_set_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc,
uint8_t
uint8_t
wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc);
wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc);


/**
 * wlan_cm_roam_set_full_scan_6ghz_on_disc() - set value to include the 6 GHz
 * channels in roam full scan only on prior discovery of any 6 GHz support in
 * the environment.
 * @psoc: PSOC pointer
 * @roam_full_scan_6ghz_on_disc: Include the 6 GHz channels in roam full scan:
 * 1 - Include only on prior discovery of any 6 GHz support in the environment
 * 0 - Include all the supported 6 GHz channels by default
 *
 * Return: none
 */
void
wlan_cm_roam_set_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc,
					uint8_t roam_full_scan_6ghz_on_disc);

/**
 * wlan_cm_roam_get_full_scan_6ghz_on_disc() - Get value to include the 6 GHz
 * channels in roam full scan only on prior discovery of any 6 GHz support in
 * the environment.
 * @psoc: PSOC pointer
 *
 * Return:
 * 1 - Include only on prior discovery of any 6 GHz support in the environment
 * 0 - Include all the supported 6 GHz channels by default
 */
uint8_t wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc);

#else
#else
static inline QDF_STATUS
static inline QDF_STATUS
wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
@@ -793,5 +820,11 @@ wlan_cm_get_exclude_rm_partial_scan_freq(struct wlan_objmgr_psoc *psoc)
{
{
	return 0;
	return 0;
}
}

static inline uint8_t
wlan_cm_roam_get_full_scan_6ghz_on_disc(struct wlan_objmgr_psoc *psoc)
{
	return 0;
}
#endif  /* FEATURE_ROAM_OFFLOAD */
#endif  /* FEATURE_ROAM_OFFLOAD */
#endif  /* WLAN_CM_ROAM_API_H__ */
#endif  /* WLAN_CM_ROAM_API_H__ */
Loading