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

Commit 8f26ab44 authored by Michael Bestas's avatar Michael Bestas Committed by KakatkarAkshay
Browse files

Reapply "qcacld-3.0: Use freq hint in scan for ssid"

This reverts commit 8dfdb2d77ce742a1b9b25eae5965b5bc0fc319fc.

Change-Id: I4eaa721a79fddcedf1ce60be0b62c5b893e0648a
parent 7583ebbd
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -18883,7 +18883,8 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
				    const u8 *ssid, size_t ssid_len,
				    const u8 *bssid, const u8 *bssid_hint,
				    uint32_t oper_freq,
				    enum nl80211_chan_width ch_width)
				    enum nl80211_chan_width ch_width,
				    uint32_t ch_freq_hint)
{
	int status = 0;
	QDF_STATUS qdf_status;
@@ -19099,6 +19100,8 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
					  &roam_profile->ch_params);
		}
		roam_profile->freq_hint = ch_freq_hint;
		if (wlan_hdd_cfg80211_check_pmf_valid(roam_profile)) {
			status = -EINVAL;
			goto conn_failure;
@@ -21346,6 +21349,7 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
	struct hdd_context *hdd_ctx;
	uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS], i;
	bool disable_nan = true;
	uint32_t ch_freq_hint = 0;
	hdd_enter();
@@ -21470,11 +21474,15 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
	else
		ch_freq = 0;
	if (req->channel_hint)
		ch_freq_hint = req->channel_hint->center_freq;
	wlan_hdd_check_ht20_ht40_ind(hdd_ctx, adapter, req);
	status = wlan_hdd_cfg80211_connect_start(adapter, req->ssid,
						 req->ssid_len, req->bssid,
						 bssid_hint, ch_freq, 0);
						 bssid_hint, ch_freq, 0,
						 ch_freq_hint);
	if (status) {
		wlan_hdd_cfg80211_clear_privacy(adapter);
		hdd_err("connect failed");
+2 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2023 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
@@ -713,6 +714,7 @@ struct csr_roam_profile {
	tCsrKeys Keys;
	tCsrChannelInfo ChannelInfo;
	uint32_t op_freq;
	uint32_t freq_hint;
	struct ch_params ch_params;
	/* If this is 0, SME will fill in for caller. */
	uint16_t beaconInterval;
+10 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2023 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
@@ -1427,6 +1428,15 @@ QDF_STATUS csr_scan_for_ssid(struct mac_context *mac_ctx, uint32_t session_id,
		req->scan_req.chan_list.num_chan = num_chan;
	}

	/* Add freq hint for scan for ssid */
	if (!num_chan && profile->freq_hint &&
	    csr_roam_is_valid_channel(mac_ctx, profile->freq_hint)) {
		sme_debug("add freq hint %d", profile->freq_hint);
		req->scan_req.chan_list.chan[0].freq =
						profile->freq_hint;
		req->scan_req.chan_list.num_chan = 1;
	}

	/* Extend it for multiple SSID */
	if (profile->SSIDs.numOfSSIDs) {
		if (profile->SSIDs.SSIDList[0].SSID.length > WLAN_SSID_MAX_LEN) {