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

Commit e4108d06 authored by Priyadarshnee Srinivasan's avatar Priyadarshnee Srinivasan Committed by Gerrit - the friendly Code Review server
Browse files

qcacmn: FW-Host Handshake for REG_CHAN_LIST_CC_EVENT

In order to support different power levels of 6G AP and client,
the channel list event from FW namely "REG_CHAN_LIST_CC_EVENTID"
is modified to add few parameters specific to 6GHZ devices.
Hence the existing event is replaced by REG_CHAN_LIST_CC_EVENT_EXT for
all 2G/5G/6G pdevs in FW. Therefore, after the service ready event, FW
sends the channel list for the configured country/regdomain via
REG_CHAN_LIST_CC_EVENT_EXT. This mandates that all host software need
to have the processing capability of REG_CHAN_LIST_CC_EVENT_EXT to bring
up the AP.

As there can be host software which has not yet implemented the
version of "REG_CHAN_LIST_CC_EVENT_EXT", backward compatibility is lost
if "ONLY REG_CHAN_LIST_CC_EVENT_EXT" is sent by FW.
Hence a 3 way handshake between host and FW is established.

1. FW advertises its capability of processing REG_CHAN_LIST_CC_EVENT_EXT
id via wmi service bit 'wmi_service_reg_cc_ext_event_support'.
2. If the host is capable of processing the "REG_CHAN_LIST_CC_EVENT_EXT"
event id (which is done based on registration of this event), host
sends the capability in WMI_INIT_CMDID setting a bit in host_service_flags.
3. Based on host capability advertised in WMI_INIT_CMDID, FW decides to
send the old event ("REG_CHAN_LIST_CC_EVENTID") or the new event
("REG_CHAN_LIST_CC_EVENT_EXT").
4. If there is no flag indicated by host to FW in WMI_INIT_CMDID, FW
by default sends the old event ("REG_CHAN_LIST_CC_EVENTID").

CRs-Fixed: 2876360
Change-Id: Ibe95f414ad9fff0e5641bcc6e60450ef9afe245b
parent 801739b2
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2537,4 +2537,14 @@ static inline void target_psoc_get_mu_max_users(
	mu_caps->mumimo_ul = service_ext2_param->max_users_ul_mumimo;
}

/**
 * target_if_set_reg_cc_ext_supp() - Set reg_cc_ext_supp capability
 * in WMI_INIT_CMD based on host capability of reg_cc_ext_event.
 *
 * @tgt_hdl: Pointer to struct target_psoc_info.
 * @psoc: Pointer to struct wlan_objmgr_psoc.
 *
 */
void target_if_set_reg_cc_ext_supp(struct target_psoc_info *tgt_hdl,
				   struct wlan_objmgr_psoc *psoc);
#endif
+14 −0
Original line number Diff line number Diff line
@@ -825,3 +825,17 @@ target_pdev_scan_radio_is_dfs_enabled(struct wlan_objmgr_pdev *pdev,

	return QDF_STATUS_E_INVAL;
}

void target_if_set_reg_cc_ext_supp(struct target_psoc_info *tgt_hdl,
				   struct wlan_objmgr_psoc *psoc)
{
	struct tgt_info *info;

	if (!tgt_hdl)
		return;

	info = (&tgt_hdl->info);

	info->wlan_res_cfg.is_reg_cc_ext_event_supported =
		target_if_reg_is_reg_cc_ext_event_host_supported(psoc);
}
+4 −0
Original line number Diff line number Diff line
@@ -276,6 +276,10 @@ static int init_deinit_service_ext2_ready_event_handler(ol_scn_t scn_handle,
	if (err_code)
		goto exit;

	if (wmi_service_enabled(wmi_handle,
				wmi_service_reg_cc_ext_event_support))
		target_if_set_reg_cc_ext_supp(tgt_hdl, psoc);

	/* dbr_ring_caps could have already come as part of EXT event */
	if (info->service_ext2_param.num_dbr_ring_caps) {
		err_code = init_deinit_populate_dbr_ring_cap_ext2(psoc,
+19 −0
Original line number Diff line number Diff line
@@ -64,6 +64,16 @@ QDF_STATUS target_if_reg_set_6ghz_info(struct wlan_objmgr_psoc *psoc);
 */
QDF_STATUS target_if_reg_set_5dot9_ghz_info(struct wlan_objmgr_psoc *psoc);

/**
 * target_if_reg_is_reg_cc_ext_event_host_supported() - Populate if reg_cc_ext
 * event is supported by host.
 * @psoc: psoc pointer
 *
 * Return: True if host supports, false otherwise.
 */
bool
target_if_reg_is_reg_cc_ext_event_host_supported(struct wlan_objmgr_psoc *psoc);

/**
 * target_if_regulatory_get_rx_ops() - Get regdb rx ops
 * @psoc: pointer to psoc object
@@ -81,4 +91,13 @@ target_if_regulatory_get_rx_ops(struct wlan_objmgr_psoc *psoc);
 * Return: Success or Failure
 */
QDF_STATUS target_if_regulatory_set_ext_tpc(struct wlan_objmgr_psoc *psoc);

/**
 * target_if_regulatory_get_tx_ops() - Get regdb tx ops
 * @psoc: pointer to psoc object
 *
 * Return: Reg tx_ops
 */
struct wlan_lmac_if_reg_tx_ops *
target_if_regulatory_get_tx_ops(struct wlan_objmgr_psoc *psoc);
#endif /* __TARGET_IF_REG_H__ */
+32 −0
Original line number Diff line number Diff line
@@ -144,6 +144,20 @@ target_if_regulatory_get_rx_ops(struct wlan_objmgr_psoc *psoc)
	return &rx_ops->reg_rx_ops;
}

struct wlan_lmac_if_reg_tx_ops *
target_if_regulatory_get_tx_ops(struct wlan_objmgr_psoc *psoc)
{
	struct wlan_lmac_if_tx_ops *tx_ops;

	tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
	if (!tx_ops) {
		target_if_err("tx_ops is NULL");
		return NULL;
	}

	return &tx_ops->reg_ops;
}

QDF_STATUS target_if_reg_set_offloaded_info(struct wlan_objmgr_psoc *psoc)
{
	struct wlan_lmac_if_reg_rx_ops *reg_rx_ops;
@@ -202,6 +216,24 @@ QDF_STATUS target_if_reg_set_5dot9_ghz_info(struct wlan_objmgr_psoc *psoc)
	return QDF_STATUS_SUCCESS;
}

bool
target_if_reg_is_reg_cc_ext_event_host_supported(struct wlan_objmgr_psoc *psoc)
{
	struct wlan_lmac_if_reg_tx_ops *reg_tx_ops;
	bool reg_ext_cc_supp = false;

	reg_tx_ops = target_if_regulatory_get_tx_ops(psoc);
	if (!reg_tx_ops) {
		target_if_err("reg_tx_ops is NULL");
		return reg_ext_cc_supp;
	}

	if (reg_tx_ops->register_master_ext_handler)
		reg_ext_cc_supp = true;

	return reg_ext_cc_supp;
}

/**
 * tgt_reg_chan_list_update_handler() - Channel list update handler
 * @handle: scn handle
Loading