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

Unverified Commit 66488d19 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'LA.UM.9.14.r1-23100-LAHAINA.QSSI14.0' of...

Merge tag 'LA.UM.9.14.r1-23100-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0 into android13-5.4-lahaina

"LA.UM.9.14.r1-23100-LAHAINA.QSSI14.0"

* tag 'LA.UM.9.14.r1-23100-LAHAINA.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0:
  Release 2.0.8.33V
  qcacld-3.0: Do not allow SAP SCC on non-PSC/non-VLP channels
  Release 2.0.8.33U
  qcacld-3.0: Fix cb mode calculation for 2.4 GHz
  qcacld-3.0: Add extended capabilities IE length check
  qcacld-3.0: Modify condition to send 6GHz HE caps
  qcacld-3.0: Send 6G HE caps to userspace
  Release 2.0.8.33T
  qcacld-3.0: Allow SAP to move to unsafe channel if ini allows
  Release 2.0.8.33S
  qcacld-3.0: Fix possible overflow for pcl weight list
  Release 2.0.8.33R
  qcacld-3.0: Skip FISA aggregation if RDI is zero
  Release 2.0.8.33Q
  qcacld-3.0: Fix read current country code
  Release 2.0.8.33P
  qcacld-3.0: Issue disconnect on STA while start/stop SAP
  Release 2.0.8.33O
  qcacld-3.0: Update VHT Channel width in assoc resp
  Release 2.0.8.33N
  qcacld-3.0: Fill proper SGI for VHT Rx data packet

Change-Id: Ie2fdb0163d03e7733878579b33929bc027757eca
parents c0fb9397 1535fc8b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2097,7 +2097,8 @@ static bool policy_mgr_valid_sta_channel_check(struct wlan_objmgr_psoc *psoc,
	     !sta_sap_scc_on_dfs_chan) ||
	    wlan_reg_is_passive_or_disable_for_freq(
	    pm_ctx->pdev, sta_ch_freq) ||
	    !policy_mgr_is_safe_channel(psoc, sta_ch_freq)) {
	    (!policy_mgr_sta_sap_scc_on_lte_coex_chan(psoc) &&
	     !policy_mgr_is_safe_channel(psoc, sta_ch_freq))) {
		if (policy_mgr_is_hw_dbs_capable(psoc))
			return true;
		else
+8 −4
Original line number Diff line number Diff line
@@ -2324,11 +2324,15 @@ policy_mgr_add_24g_to_pcl(uint32_t *pcl_freqs, uint8_t *pcl_weights,
{
	uint32_t num_to_add, i;

	if (*index >= NUM_CHANNELS || *index >= pcl_sz)
		return;
	num_to_add = QDF_MIN((*index + chlist_24g_len), pcl_sz) - *index;
	qdf_mem_copy(&pcl_freqs[*index], chlist_24g,
		     num_to_add * sizeof(*chlist_24g));
	for (i = *index; i < *index + num_to_add; i++)
		pcl_weights[i] = weight;
	for (i = 0; i < num_to_add; i++) {
		if ((i + *index) >= NUM_CHANNELS || (i + *index) >= pcl_sz)
			break;
		pcl_weights[i + *index] = weight;
		pcl_freqs[i + *index] = chlist_24g[i];
	}

	*index = i;
	policy_mgr_debug("Add 24g chlist len %d len %d index %d",
+105 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include "wlan_mlme_ucfg_api.h"
#include "csr_neighbor_roam.h"
#include "wlan_scan_api.h"
#include <wlan_reg_ucfg_api.h>

/**
 * first_connection_pcl_table - table which provides PCL for the
@@ -733,6 +734,96 @@ policy_mgr_modify_pcl_based_on_indoor(struct wlan_objmgr_psoc *psoc,
	return QDF_STATUS_SUCCESS;
}

/**
 * policy_mgr_modify_sap_pcl_for_6G_channels() - filter out the
 * 6GHz channels where SCC is not supported.
 * @psoc: pointer to soc
 * @pcl_list_org: channel list to filter out
 * @weight_list_org: weight of channel list
 * @pcl_len_org: length of channel list
 *
 * Return: QDF_STATUS
 */
static QDF_STATUS
policy_mgr_modify_sap_pcl_for_6G_channels(struct wlan_objmgr_psoc *psoc,
					  uint32_t *pcl_list_org,
					  uint8_t *weight_list_org,
					  uint32_t *pcl_len_org)
{
	struct policy_mgr_psoc_priv_obj *pm_ctx;
	uint32_t pcl_list[NUM_CHANNELS];
	uint8_t weight_list[NUM_CHANNELS];
	uint32_t vdev_id = 0, pcl_len = 0, i;
	struct wlan_objmgr_vdev *vdev;
	qdf_freq_t sta_gc_freq = 0;
	uint32_t ap_pwr_type_6g = 0;

	pm_ctx = policy_mgr_get_context(psoc);
	if (!pm_ctx) {
		policy_mgr_err("Invalid Context");
		return QDF_STATUS_E_FAILURE;
	}

	if (*pcl_len_org > NUM_CHANNELS) {
		policy_mgr_err("Invalid PCL List Length %d", *pcl_len_org);
		return QDF_STATUS_E_FAILURE;
	}

	if (policy_mgr_mode_specific_connection_count(psoc,
						      PM_STA_MODE, NULL)) {
		sta_gc_freq =
			policy_mgr_mode_specific_get_channel(psoc, PM_STA_MODE);
		vdev_id = policy_mgr_mode_specific_vdev_id(psoc, PM_STA_MODE);
	} else if (policy_mgr_mode_specific_connection_count(psoc,
							     PM_P2P_CLIENT_MODE,
							     NULL)) {
		sta_gc_freq = policy_mgr_mode_specific_get_channel(
						psoc, PM_P2P_CLIENT_MODE);
		vdev_id = policy_mgr_mode_specific_vdev_id(psoc,
							   PM_P2P_CLIENT_MODE);
	}

	if (!sta_gc_freq || !WLAN_REG_IS_6GHZ_CHAN_FREQ(sta_gc_freq))
		return QDF_STATUS_SUCCESS;

	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
						    WLAN_POLICY_MGR_ID);
	if (!vdev) {
		policy_mgr_err("vdev %d is not present", vdev_id);
		return QDF_STATUS_E_FAILURE;
	}

	/* If STA is present in 6GHz, STA+SAP SCC is allowed
	 * only on PSC channels in VLP mode. Therefore, remove
	 * all other 6GHz channels from the PCL list.
	 *
	 * VLP STA in PSC + SAP     - Allowed
	 * VLP STA in non-PSC + SAP - Not allowed
	 * non-VLP STA + SAP        - Not allowed
	 */
	ucfg_reg_get_cur_6g_ap_pwr_type(pm_ctx->pdev, &ap_pwr_type_6g);
	policy_mgr_debug("STA power type : %d", ap_pwr_type_6g);
	for (i = 0; i < *pcl_len_org; i++) {
		if (WLAN_REG_IS_6GHZ_CHAN_FREQ(pcl_list_org[i])) {
			if (ap_pwr_type_6g != REG_VERY_LOW_POWER_AP)
				continue;
			else if (!WLAN_REG_IS_6GHZ_PSC_CHAN_FREQ(pcl_list_org[i]))
				continue;
		}
		pcl_list[pcl_len] = pcl_list_org[i];
		weight_list[pcl_len++] = weight_list_org[i];
	}

	qdf_mem_zero(pcl_list_org, *pcl_len_org * sizeof(*pcl_list_org));
	qdf_mem_zero(weight_list_org, *pcl_len_org * sizeof(*weight_list_org));
	qdf_mem_copy(pcl_list_org, pcl_list, pcl_len * sizeof(*pcl_list_org));
	qdf_mem_copy(weight_list_org, weight_list, pcl_len);
	*pcl_len_org = pcl_len;

	wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID);
	return QDF_STATUS_SUCCESS;
}

static QDF_STATUS policy_mgr_pcl_modification_for_sap(
			struct wlan_objmgr_psoc *psoc,
			uint32_t *pcl_channels, uint8_t *pcl_weight,
@@ -793,6 +884,14 @@ static QDF_STATUS policy_mgr_pcl_modification_for_sap(
	}
	indoor_modified_pcl = true;

	status = policy_mgr_modify_sap_pcl_for_6G_channels(psoc,
							   pcl_channels,
							   pcl_weight, len);
	if (QDF_IS_STATUS_ERROR(status)) {
		policy_mgr_err("failed to modify pcl for 6G channels");
		return status;
	}

	modified_final_pcl = true;
	policy_mgr_debug(" %d %d %d %d %d",
			 mandatory_modified_pcl,
@@ -1031,6 +1130,8 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,

	policy_mgr_dump_channel_list(*len, pcl_channels, pcl_weight);

	policy_mgr_debug("PCL before modification");
	policy_mgr_dump_channel_list(*len, pcl_channels, pcl_weight);
	policy_mgr_mode_specific_modification_on_pcl(
		psoc, pcl_channels, pcl_weight, len, mode);

@@ -1041,6 +1142,10 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
		policy_mgr_err("failed to get modified pcl based on DNBS");
		return status;
	}

	policy_mgr_debug("PCL after modification");
	policy_mgr_dump_channel_list(*len, pcl_channels, pcl_weight);

	return QDF_STATUS_SUCCESS;
}

+10 −0
Original line number Diff line number Diff line
@@ -1468,6 +1468,16 @@ QDF_STATUS
wlan_mlme_cfg_set_vht_max_mpdu_len(struct wlan_objmgr_psoc *psoc,
				   uint8_t value);

/**
 * wlan_mlme_cfg_get_ht_smps() - gets HT SM Power Save mode from cfg item
 * @psoc: psoc context
 * @value: data to be set
 *
 * Return: QDF_STATUS
 */
QDF_STATUS wlan_mlme_cfg_get_ht_smps(struct wlan_objmgr_psoc *psoc,
				     uint8_t *value);

/**
 * wlan_mlme_cfg_get_vht_chan_width() - gets vht supported channel width from
 * cfg item
+20 −0
Original line number Diff line number Diff line
@@ -4262,4 +4262,24 @@ ucfg_mlme_is_sta_mon_conc_supported(struct wlan_objmgr_psoc *psoc)
	return wlan_mlme_is_sta_mon_conc_supported(psoc);
}

static inline QDF_STATUS
ucfg_mlme_cfg_get_vht_ampdu_len_exp(struct wlan_objmgr_psoc *psoc,
				    uint8_t *value)
{
	return wlan_mlme_cfg_get_vht_ampdu_len_exp(psoc, value);
}

static inline QDF_STATUS
ucfg_mlme_cfg_get_vht_max_mpdu_len(struct wlan_objmgr_psoc *psoc,
				   uint8_t *value)
{
	return wlan_mlme_cfg_get_vht_max_mpdu_len(psoc, value);
}

static inline QDF_STATUS
ucfg_mlme_cfg_get_ht_smps(struct wlan_objmgr_psoc *psoc,
			  uint8_t *value)
{
	return wlan_mlme_cfg_get_ht_smps(psoc, value);
}
#endif /* _WLAN_MLME_UCFG_API_H_ */
Loading