linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Merlijn Wajer <merlijn@wizzup.org>
To: merlijn@wizzup.org
Cc: Paul Fertser <fercerpav@gmail.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] wl1251: specify max. IE length
Date: Sun, 12 Dec 2021 23:13:08 +0100	[thread overview]
Message-ID: <20211212221310.5453-1-merlijn@wizzup.org> (raw)

This fix is similar to commit 77c91295ea53 ("wil6210: specify max. IE
length").  Without the max IE length set, wpa_supplicant cannot operate
using the nl80211 interface.

This patch is a workaround - the number 512 is taken from the wlcore
driver, but note that per Paul Fertser:

    there's no correct number because the driver will ignore the data
    passed in extra IEs.

Suggested-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
---
 drivers/net/wireless/ti/wl1251/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 136a0d3b23c9..a25a6143e65f 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -1520,6 +1520,12 @@ int wl1251_init_ieee80211(struct wl1251 *wl)
 	wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
 					 BIT(NL80211_IFTYPE_ADHOC);
 	wl->hw->wiphy->max_scan_ssids = 1;
+
+	/* We set max_scan_ie_len to a random value to make wpa_supplicant scans not
+	 * fail, as the driver will the ignore the extra passed IEs anyway
+	 */
+	wl->hw->wiphy->max_scan_ie_len = 512;
+
 	wl->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wl1251_band_2ghz;
 
 	wl->hw->queues = 4;
-- 
2.32.0


             reply	other threads:[~2021-12-12 22:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-12 22:13 Merlijn Wajer [this message]
2021-12-16  8:29 ` [PATCH] wl1251: specify max. IE length Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211212221310.5453-1-merlijn@wizzup.org \
    --to=merlijn@wizzup.org \
    --cc=davem@davemloft.net \
    --cc=fercerpav@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).