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

Commit 130951bc authored by Gururaj Pandurangi's avatar Gururaj Pandurangi
Browse files

qcacmn: Enable/Disable 6G edge channels ch2 and ch233

Enable lower 6G edge channel ch2 (5935MHz) for APL2 6G regdmn
using a service bit WMI_SERVICE_ENABLE_LOWER_6G_EDGE_CH_SUPP,
which is not enabled by default.
Also, disable upper 6G edge channel (7115MHz) using another
service bit WMI_SERVICE_DISABLE_UPPER_6G_EDGE_CH_SUPP, that
is enabled by default.

Change-Id: Ia7cb7f7d3165375178adbe70adb19b8671496b6d
CRs-Fixed: 2885623
parent b2d534cc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -314,6 +314,10 @@ static int init_deinit_service_ext2_ready_event_handler(ol_scn_t scn_handle,

	target_if_regulatory_set_ext_tpc(psoc);

	target_if_reg_set_lower_6g_edge_ch_info(psoc);

	target_if_reg_set_disable_upper_6g_edge_ch_info(psoc);

	/* send init command */
	init_deinit_set_send_init_cmd(psoc, tgt_hdl);

+32 −0
Original line number Diff line number Diff line
@@ -100,4 +100,36 @@ QDF_STATUS target_if_regulatory_set_ext_tpc(struct wlan_objmgr_psoc *psoc);
 */
struct wlan_lmac_if_reg_tx_ops *
target_if_regulatory_get_tx_ops(struct wlan_objmgr_psoc *psoc);

#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
/**
 * target_if_reg_set_lower_6g_edge_ch_info() - populate lower 6ghz edge channel
 * enablement info
 * @psoc: psoc pointer
 * Return: Success or Failure
 */
QDF_STATUS
target_if_reg_set_lower_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc);

/**
 * target_if_reg_set_disable_upper_6g_edge_ch_info() - populate upper 6ghz
 * edge channel disablement info
 * @psoc: psoc pointer
 * Return: Success or Failure
 */
QDF_STATUS
target_if_reg_set_disable_upper_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc);
#else
static inline QDF_STATUS
target_if_reg_set_lower_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc)
{
	return QDF_STATUS_E_FAILURE;
}

static inline QDF_STATUS
target_if_reg_set_disable_upper_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc)
{
	return QDF_STATUS_E_FAILURE;
}
#endif
#endif /* __TARGET_IF_REG_H__ */
+92 −1
Original line number Diff line number Diff line
@@ -723,7 +723,8 @@ tgt_if_regulatory_is_ext_tpc_supported(struct wlan_objmgr_psoc *psoc)
	if (!wmi_handle)
		return false;

	return wmi_service_enabled(wmi_handle, wmi_service_ext_tpc_reg_support);
	return wmi_service_enabled(wmi_handle,
				   wmi_service_ext_tpc_reg_support);
}

QDF_STATUS target_if_regulatory_set_ext_tpc(struct wlan_objmgr_psoc *psoc)
@@ -744,6 +745,96 @@ QDF_STATUS target_if_regulatory_set_ext_tpc(struct wlan_objmgr_psoc *psoc)
	return QDF_STATUS_SUCCESS;
}

#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
/**
 * tgt_if_regulatory_is_lower_6g_edge_ch_supp() - Check if lower 6ghz
 * edge channel (5935MHz) is supported
 * @psoc: Pointer to psoc
 *
 * Return: true if channel is supported, else false
 */
static bool
tgt_if_regulatory_is_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc)
{
	wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);

	if (!wmi_handle)
		return false;

	return wmi_service_enabled(wmi_handle,
				   wmi_service_lower_6g_edge_ch_supp);
}

/**
 * tgt_if_regulatory_is_upper_6g_edge_ch_disabled() - Check if upper
 * 6ghz edge channel (7115MHz) is disabled
 * @psoc: Pointer to psoc
 *
 * Return: true if channel is disabled, else false
 */
static bool
tgt_if_regulatory_is_upper_6g_edge_ch_disabled(struct wlan_objmgr_psoc *psoc)
{
	wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);

	if (!wmi_handle)
		return false;

	return wmi_service_enabled(wmi_handle,
				   wmi_service_disable_upper_6g_edge_ch_supp);
}

QDF_STATUS
target_if_reg_set_lower_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc)
{
	struct wlan_lmac_if_reg_rx_ops *reg_rx_ops;

	reg_rx_ops = target_if_regulatory_get_rx_ops(psoc);
	if (!reg_rx_ops) {
		target_if_err("reg_rx_ops is NULL");
		return QDF_STATUS_E_FAILURE;
	}

	if (reg_rx_ops->reg_set_lower_6g_edge_ch_supp)
		reg_rx_ops->reg_set_lower_6g_edge_ch_supp(
			psoc,
			tgt_if_regulatory_is_lower_6g_edge_ch_supp(psoc));

	return QDF_STATUS_SUCCESS;
}

QDF_STATUS
target_if_reg_set_disable_upper_6g_edge_ch_info(struct wlan_objmgr_psoc *psoc)
{
	struct wlan_lmac_if_reg_rx_ops *reg_rx_ops;

	reg_rx_ops = target_if_regulatory_get_rx_ops(psoc);
	if (!reg_rx_ops) {
		target_if_err("reg_rx_ops is NULL");
		return QDF_STATUS_E_FAILURE;
	}

	if (reg_rx_ops->reg_set_disable_upper_6g_edge_ch_supp)
		reg_rx_ops->reg_set_disable_upper_6g_edge_ch_supp(
			psoc,
			tgt_if_regulatory_is_upper_6g_edge_ch_disabled(psoc));

	return QDF_STATUS_SUCCESS;
}
#else
static inline bool
tgt_if_regulatory_is_lower_6g_edge_ch_supp(struct wlan_objmgr_psoc *psoc)
{
	return false;
}

static inline bool
tgt_if_regulatory_is_upper_6g_edge_ch_disabled(struct wlan_objmgr_psoc *psoc)
{
	return false;
}
#endif

QDF_STATUS target_if_register_regulatory_tx_ops(
		struct wlan_lmac_if_tx_ops *tx_ops)
{
+8 −0
Original line number Diff line number Diff line
@@ -1253,6 +1253,14 @@ struct wlan_lmac_if_reg_rx_ops {
					     uint8_t *bitmap);
	QDF_STATUS (*reg_set_ext_tpc_supported)(struct wlan_objmgr_psoc *psoc,
						bool val);
#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
	QDF_STATUS
	(*reg_set_lower_6g_edge_ch_supp)(struct wlan_objmgr_psoc *psoc,
					 bool val);
	QDF_STATUS
	(*reg_set_disable_upper_6g_edge_ch_supp)(struct wlan_objmgr_psoc *psoc,
						 bool val);
#endif
};

#ifdef CONVERGED_P2P_ENABLE
+19 −0
Original line number Diff line number Diff line
@@ -317,6 +317,23 @@ static inline void wlan_lmac_if_register_master_list_ext_handler(
}
#endif

#if defined(CONFIG_BAND_6GHZ) && defined(CONFIG_REG_CLIENT)
static void wlan_lmac_if_register_6g_edge_chan_supp(
					struct wlan_lmac_if_rx_ops *rx_ops)
{
	rx_ops->reg_rx_ops.reg_set_lower_6g_edge_ch_supp =
		tgt_reg_set_lower_6g_edge_ch_supp;

	rx_ops->reg_rx_ops.reg_set_disable_upper_6g_edge_ch_supp =
		tgt_reg_set_disable_upper_6g_edge_ch_supp;
}
#else
static inline void wlan_lmac_if_register_6g_edge_chan_supp(
					struct wlan_lmac_if_rx_ops *rx_ops)
{
}
#endif

static void wlan_lmac_if_umac_reg_rx_ops_register(
	struct wlan_lmac_if_rx_ops *rx_ops)
{
@@ -384,6 +401,8 @@ static void wlan_lmac_if_umac_reg_rx_ops_register(

	rx_ops->reg_rx_ops.reg_set_ext_tpc_supported =
		tgt_reg_set_ext_tpc_supported;

	wlan_lmac_if_register_6g_edge_chan_supp(rx_ops);
}

#ifdef CONVERGED_P2P_ENABLE
Loading