mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] wl1251: specify max. IE length
@ 2021-12-12 22:13 Merlijn Wajer
  2021-12-16  8:29 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Merlijn Wajer @ 2021-12-12 22:13 UTC (permalink / raw)
  To: merlijn
  Cc: Paul Fertser, Kalle Valo, David S. Miller, Jakub Kicinski,
	linux-wireless, netdev, linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] wl1251: specify max. IE length
  2021-12-12 22:13 [PATCH] wl1251: specify max. IE length Merlijn Wajer
@ 2021-12-16  8:29 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-12-16  8:29 UTC (permalink / raw)
  To: Merlijn Wajer
  Cc: merlijn, Paul Fertser, Kalle Valo, David S. Miller,
	Jakub Kicinski, linux-wireless, netdev, linux-kernel

Merlijn Wajer <merlijn@wizzup.org> wrote:

> 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>

Patch applied to wireless-drivers-next.git, thanks.

97affcfa15bb wl1251: specify max. IE length

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211212221310.5453-1-merlijn@wizzup.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-16  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-12 22:13 [PATCH] wl1251: specify max. IE length Merlijn Wajer
2021-12-16  8:29 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®