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

Commit 44e489aa authored by Balaji Pothunoori's avatar Balaji Pothunoori
Browse files

qcacld-3.0: select min bw during csa if channel bonding disabled

During CSA max bw is selected for SAP in STA + SAP concurrency
for non-dfs channel and SAP is tear down after 60 sec of operation
due to STA is in 20Mhz and SAP is in 40Mhz with
IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag disabled.

This change is to select 20Mhz BW during CSA if channel bonding is
disabled.

Change-Id: If4ed3d9a080ed976a0f4be6704848ae4494c7bbc
CRs-Fixed: 3126074
parent 9e549fae
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -3221,4 +3221,16 @@ QDF_STATUS
wlan_mlme_get_tx_retry_multiplier(struct wlan_objmgr_psoc *psoc,
				  uint32_t *tx_retry_multiplier);

/**
 * wlan_mlme_get_channel_bonding_5ghz  - Get the channel bonding
 * val for 5ghz freq
 * @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_channel_bonding_5ghz(struct wlan_objmgr_psoc *psoc,
				   uint32_t *value);

#endif /* _WLAN_MLME_API_H_ */
+16 −0
Original line number Diff line number Diff line
@@ -4990,3 +4990,19 @@ wlan_mlme_get_tx_retry_multiplier(struct wlan_objmgr_psoc *psoc,
	*tx_retry_multiplier = mlme_obj->cfg.gen.tx_retry_multiplier;
	return QDF_STATUS_SUCCESS;
}

QDF_STATUS
wlan_mlme_get_channel_bonding_5ghz(struct wlan_objmgr_psoc *psoc,
				   uint32_t *value)
{
	struct wlan_mlme_psoc_ext_obj *mlme_obj;

	mlme_obj = mlme_get_psoc_ext_obj(psoc);
	if (!mlme_obj) {
		*value = cfg_default(CFG_CHANNEL_BONDING_MODE_5GHZ);
		return QDF_STATUS_E_INVAL;
	}

	*value = mlme_obj->cfg.feature_flags.channel_bonding_mode_5ghz;
	return QDF_STATUS_SUCCESS;
}
+1 −10
Original line number Diff line number Diff line
@@ -1642,16 +1642,7 @@ QDF_STATUS
ucfg_mlme_get_channel_bonding_5ghz(struct wlan_objmgr_psoc *psoc,
				   uint32_t *value)
{
	struct wlan_mlme_psoc_ext_obj *mlme_obj;

	mlme_obj = mlme_get_psoc_ext_obj(psoc);
	if (!mlme_obj) {
		*value = cfg_default(CFG_CHANNEL_BONDING_MODE_5GHZ);
		return QDF_STATUS_E_INVAL;
	}
	*value = mlme_obj->cfg.feature_flags.channel_bonding_mode_5ghz;

	return QDF_STATUS_SUCCESS;
	return wlan_mlme_get_channel_bonding_5ghz(psoc, value);
}

QDF_STATUS
+12 −3
Original line number Diff line number Diff line
@@ -1235,6 +1235,7 @@ wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
	enum phy_ch_width ch_width, concurrent_bw = 0;
	struct mac_context *mac;
	struct ch_params ch_params = {0};
	uint32_t channel_bonding_mode = 0;

	mac = sap_get_mac_context();
	if (!mac) {
@@ -1250,7 +1251,14 @@ wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
		 */
		ch_width = CH_WIDTH_20MHZ;
	} else {
		wlan_mlme_get_channel_bonding_5ghz(mac->psoc,
						   &channel_bonding_mode);
		if (WLAN_REG_IS_5GHZ_CH_FREQ(chan_freq) &&
		    (!channel_bonding_mode))
			ch_width = CH_WIDTH_20MHZ;
		else
			ch_width = wlansap_get_max_bw_by_phymode(sap_context);

		concurrent_bw = wlan_sap_get_concurrent_bw(
				mac->pdev, mac->psoc, chan_freq,
				ch_width);
@@ -1264,11 +1272,12 @@ wlansap_get_csa_chanwidth_from_phymode(struct sap_context *sap_context,
	ch_width = ch_params.ch_width;
	if (tgt_ch_params)
		*tgt_ch_params = ch_params;
	sap_nofl_debug("freq %d bw %d (phymode %d, con bw %d, tgt bw %d)",
	sap_nofl_debug("freq %d bw %d (phymode %d, con bw %d, tgt bw %d) channel bonding 5g %d",
		       chan_freq, ch_width,
		       sap_context->csr_roamProfile.phyMode,
		       concurrent_bw,
		       tgt_ch_params ? tgt_ch_params->ch_width : CH_WIDTH_MAX);
		       tgt_ch_params ? tgt_ch_params->ch_width : CH_WIDTH_MAX,
		       channel_bonding_mode);

	return ch_width;
}