summaryrefslogtreecommitdiff
path: root/aports/wpa_supplicant
diff options
context:
space:
mode:
authorPÁLI Gábor János <pali.gabor@gmail.com>2023-07-27 11:05:17 +0200
committerPÁLI Gábor János <pali.gabor@gmail.com>2023-07-27 11:05:17 +0200
commit084335e136581edc28137b152cc559778224570e (patch)
tree269c2e37b0abd971aeccdc1291bc1c3ca9c96aed /aports/wpa_supplicant
parent1f7bcc1ae14273fce0b5d3dded52d599aa035433 (diff)
downloadfreebsd-wifibox-alpine-084335e136581edc28137b152cc559778224570e.zip
Make Broadcom wireless cards work
- Import Arch Linux patches for the `broadcom-wl` driver and WPA Supplicant - Implement support for Message Signaled Interrupts (MSI) to allow the card to be used with PCI pass-through References: - https://gitlab.archlinux.org/archlinux/packaging/packages/broadcom-wl-dkms/ - https://gitlab.archlinux.org/archlinux/packaging/packages/wpa_supplicant/ Tested by: venoom27 <venoom27@fromgithub>
Diffstat (limited to 'aports/wpa_supplicant')
-rw-r--r--aports/wpa_supplicant/0001-nl80211-add-extra-ies-only-if-allowed-by-driver.patch69
-rw-r--r--aports/wpa_supplicant/APKBUILD4
2 files changed, 72 insertions, 1 deletions
diff --git a/aports/wpa_supplicant/0001-nl80211-add-extra-ies-only-if-allowed-by-driver.patch b/aports/wpa_supplicant/0001-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
new file mode 100644
index 0000000..5a395d5
--- /dev/null
+++ b/aports/wpa_supplicant/0001-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
@@ -0,0 +1,69 @@
+From: David Bauer <mail@david-bauer.net>
+Date: Sun, 30 Jan 2022 20:22:00 +0100
+Subject: nl80211: add extra-ies only if allowed by driver
+
+Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl
+based adapters. The reason for it is hostapd tries to install additional
+IEs for scanning while the driver does not support this.
+
+The kernel indicates the maximum number of bytes for additional scan IEs
+using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and
+only add additional scan IEs in case the driver can accommodate these
+additional IEs.
+
+Reported-by: Étienne Morice <neon.emorice@mail.com>
+Tested-by: Étienne Morice <neon.emorice@mail.com>
+Signed-off-by: David Bauer <mail@david-bauer.net>
+
+Bug: http://lists.infradead.org/pipermail/hostap/2022-January/040178.html
+Bug-ArchLinux: https://bugs.archlinux.org/task/73495
+Bug-Debian: https://bugs.debian.org/1004524
+Origin: http://lists.infradead.org/pipermail/hostap/2022-January/040185.html
+---
+ src/drivers/driver.h | 3 +++
+ src/drivers/driver_nl80211_capa.c | 4 ++++
+ src/drivers/driver_nl80211_scan.c | 2 +-
+ 3 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/drivers/driver.h b/src/drivers/driver.h
+index d3312a3..b5b6264 100644
+--- a/src/drivers/driver.h
++++ b/src/drivers/driver.h
+@@ -2052,6 +2052,9 @@ struct wpa_driver_capa {
+ /** Maximum number of iterations in a single scan plan */
+ u32 max_sched_scan_plan_iterations;
+
++ /** Maximum number of extra IE bytes for scans */
++ u16 max_scan_ie_len;
++
+ /** Whether sched_scan (offloaded scanning) is supported */
+ int sched_scan_supported;
+
+diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
+index 83868b7..b33b6ba 100644
+--- a/src/drivers/driver_nl80211_capa.c
++++ b/src/drivers/driver_nl80211_capa.c
+@@ -885,6 +885,10 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
+ nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]);
+ }
+
++ if (tb[NL80211_ATTR_MAX_SCAN_IE_LEN])
++ capa->max_scan_ie_len =
++ nla_get_u16(tb[NL80211_ATTR_MAX_SCAN_IE_LEN]);
++
+ if (tb[NL80211_ATTR_MAX_MATCH_SETS])
+ capa->max_match_sets =
+ nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]);
+diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
+index 1316084..b0f0951 100644
+--- a/src/drivers/driver_nl80211_scan.c
++++ b/src/drivers/driver_nl80211_scan.c
+@@ -207,7 +207,7 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
+ wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested");
+ }
+
+- if (params->extra_ies) {
++ if (params->extra_ies && drv->capa.max_scan_ie_len >= params->extra_ies_len) {
+ wpa_hexdump(MSG_MSGDUMP, "nl80211: Scan extra IEs",
+ params->extra_ies, params->extra_ies_len);
+ if (nla_put(msg, NL80211_ATTR_IE, params->extra_ies_len,
diff --git a/aports/wpa_supplicant/APKBUILD b/aports/wpa_supplicant/APKBUILD
index 7313749..749ba5a 100644
--- a/aports/wpa_supplicant/APKBUILD
+++ b/aports/wpa_supplicant/APKBUILD
@@ -2,7 +2,7 @@
pkgname=wpa_supplicant
pkgver=2.10
-pkgrel=3 # base: 5
+pkgrel=4 # base: 5
pkgdesc="utility providing key negotiation for WPA wireless networks"
url="https://w1.fi/wpa_supplicant/"
arch="all"
@@ -11,6 +11,7 @@ license="BSD-3-Clause"
subpackages=
makedepends="linux-headers openssl-dev>3 dbus-dev libnl3-dev pcsc-lite-dev"
source="https://w1.fi/releases/wpa_supplicant-$pkgver.tar.gz
+ 0001-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
wpa_supplicant.initd
wpa_supplicant.confd
eloop.patch
@@ -76,6 +77,7 @@ package() {
sha512sums="
021c2a48f45d39c1dc6557730be5debaee071bc0ff82a271638beee6e32314e353e49d39e2f0dc8dff6e094dcc7008cfe1c32d0c7a34a1a345a12a3f1c1e11a1 wpa_supplicant-2.10.tar.gz
+fb328872087268056b035802f71df2f7af8d11699822fe68611201a07dc693c4fdb8c50dd4fd509ed6db4cca89f6003ce3303770951686a35633977f466f4fb5 0001-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
92c4cbaa9776a354275640c9411d2f547f4c0e00415af4ab30039f1a0be6a11082d49e2514905010f0abcc4a9276353276da9864e3d5f7264a0f0767c8cc9d78 wpa_supplicant.initd
c7e4041fe41743c5e63a07edc9234d0c44c4c0f193a180b27342b43f3be45fb87b42ee0f9e4a20614cf6ad58cf64d25f74d1e75e2e1d521c2f6d45cdc5737eae wpa_supplicant.confd
2be055dd1f7da5a3d8e79c2f2c0220ddd31df309452da18f290144d2112d6dbde0fc633bb2ad02c386a39d7785323acaf5f70e5969995a1e8303a094eb5fe232 eloop.patch