diff --git a/extra-repos/systemd/networkmanager/0001-hack-wifi-Disable-WPA-PSK-SHA256-for-brcmfmac-in-AP-.patch b/extra-repos/systemd/networkmanager/0001-hack-wifi-Disable-WPA-PSK-SHA256-for-brcmfmac-in-AP-.patch index f8382080a..2afa07bb9 100644 --- a/extra-repos/systemd/networkmanager/0001-hack-wifi-Disable-WPA-PSK-SHA256-for-brcmfmac-in-AP-.patch +++ b/extra-repos/systemd/networkmanager/0001-hack-wifi-Disable-WPA-PSK-SHA256-for-brcmfmac-in-AP-.patch @@ -1,13 +1,12 @@ -From 3280cfe4190c9ca33abfb777a29e69166244f922 Mon Sep 17 00:00:00 2001 -From: Alistair Francis -Date: Sun, 14 Dec 2025 20:25:12 +1000 +From 5c56eb74781b6aa7b5f4b0dbc50da414137d0074 Mon Sep 17 00:00:00 2001 +From: Jane Rachinger +Date: Wed, 16 Apr 2025 14:21:09 +0200 Subject: [PATCH] hack: wifi: Disable WPA-PSK-SHA256 for brcmfmac in AP mode This does the equivalent of purism's patch on librem 5 on pmOS, but doesn't affect other drivers. https://source.puri.sm/pureos/packages/network-manager/-/blob/pureos/latest/debian/patches/pureos/wifi-Disable-WPA-PSK-SHA256-in-AP-mode.patch -Signed-off-by: Alistair Francis --- src/core/devices/wifi/nm-device-wifi.c | 4 ++++ src/core/supplicant/nm-supplicant-config.c | 18 +++++++++++++++++- @@ -16,10 +15,10 @@ Signed-off-by: Alistair Francis 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/core/devices/wifi/nm-device-wifi.c b/src/core/devices/wifi/nm-device-wifi.c -index 148caa11d6..c6e09cda63 100644 +index 06eee14245..ec1bf8332f 100644 --- a/src/core/devices/wifi/nm-device-wifi.c +++ b/src/core/devices/wifi/nm-device-wifi.c -@@ -2940,12 +2940,15 @@ build_supplicant_config(NMDeviceWifi *self, +@@ -2929,12 +2929,15 @@ build_supplicant_config(NMDeviceWifi *self, NMSettingWirelessSecurityPmf pmf; NMSettingWirelessSecurityFils fils; NMTernary ap_isolation; @@ -32,30 +31,30 @@ index 148caa11d6..c6e09cda63 100644 + quirk_is_brcmfmac = nm_streq(nm_device_get_driver(NM_DEVICE(self)), "brcmfmac"); + - config = nm_supplicant_config_new(nm_supplicant_interface_get_capabilities(priv->sup_iface), - nm_utils_get_connection_first_permissions_user(connection)); + config = nm_supplicant_config_new(nm_supplicant_interface_get_capabilities(priv->sup_iface)); -@@ -3024,6 +3027,7 @@ build_supplicant_config(NMDeviceWifi *self, + /* Warn if AP mode may not be supported */ +@@ -3011,6 +3014,7 @@ build_supplicant_config(NMDeviceWifi *self, + mtu, pmf, fils, - nm_device_get_private_files(NM_DEVICE(self)), -+ quirk_is_brcmfmac, ++ quirk_is_brcmfmac, error)) { g_prefix_error(error, "802-11-wireless-security: "); goto error; diff --git a/src/core/supplicant/nm-supplicant-config.c b/src/core/supplicant/nm-supplicant-config.c -index 56cc832b57..735edd1836 100644 +index 951f153653..cb1a8a9eb8 100644 --- a/src/core/supplicant/nm-supplicant-config.c +++ b/src/core/supplicant/nm-supplicant-config.c -@@ -934,6 +934,7 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig +@@ -930,6 +930,7 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig + guint32 mtu, NMSettingWirelessSecurityPmf pmf, NMSettingWirelessSecurityFils fils, - GHashTable *files, -+ gboolean quirk_is_brcmfmac, ++ gboolean quirk_is_brcmfmac, GError **error) { NMSupplicantConfigPrivate *priv = NM_SUPPLICANT_CONFIG_GET_PRIVATE(self); -@@ -942,6 +943,7 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig +@@ -938,6 +939,7 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig const char *psk; gboolean set_pmf, wps_disabled; gboolean is_ap; @@ -63,13 +62,13 @@ index 56cc832b57..735edd1836 100644 g_return_val_if_fail(NM_IS_SUPPLICANT_CONFIG(self), FALSE); g_return_val_if_fail(setting != NULL, FALSE); -@@ -955,6 +957,20 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig +@@ -951,6 +953,20 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig */ is_ap = nm_streq0(mode, NM_SETTING_WIRELESS_MODE_AP); -+ /* Some Librem 5 have a sparklan wifi card, which cannot use ++ /* Some Librem 5 have a sparklan wifi card, which cannot use + * WPA-PSK-SHA256 in AP mode. This quirk shouldn't be in this -+ * highlevel program but rather in the kernel, but this was ++ * highlevel program but rather in the kernel, but this was + * faster and unbreaks AP for the Librem 5 without affecting + * other drivers. I sadly wasn't able to find a matching + * bugzilla entry in the kernel. Without more details I'm scoping @@ -84,7 +83,7 @@ index 56cc832b57..735edd1836 100644 /* Check if we actually support FILS */ if (!_get_capability(priv, NM_SUPPL_CAP_TYPE_FILS)) { if (fils == NM_SETTING_WIRELESS_SECURITY_FILS_REQUIRED) { -@@ -984,7 +1000,7 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig +@@ -980,7 +996,7 @@ nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig } else if (nm_streq(key_mgmt, "wpa-psk")) { if (pmf != NM_SETTING_WIRELESS_SECURITY_PMF_REQUIRED) g_string_append(key_mgmt_conf, "WPA-PSK"); @@ -94,29 +93,29 @@ index 56cc832b57..735edd1836 100644 if (!is_ap && _get_capability(priv, NM_SUPPL_CAP_TYPE_FT)) g_string_append(key_mgmt_conf, " FT-PSK"); diff --git a/src/core/supplicant/nm-supplicant-config.h b/src/core/supplicant/nm-supplicant-config.h -index 96460b86c7..2cb393bed3 100644 +index c52b756e78..1b441799f3 100644 --- a/src/core/supplicant/nm-supplicant-config.h +++ b/src/core/supplicant/nm-supplicant-config.h -@@ -58,6 +58,7 @@ gboolean nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig +@@ -57,6 +57,7 @@ gboolean nm_supplicant_config_add_setting_wireless_security(NMSupplicantConfig + guint32 mtu, NMSettingWirelessSecurityPmf pmf, NMSettingWirelessSecurityFils fils, - GHashTable *files, -+ gboolean quirk_is_brcmfmac, ++ gboolean quirk_is_brcmfmac, GError **error); gboolean nm_supplicant_config_add_no_security(NMSupplicantConfig *self, GError **error); diff --git a/src/core/supplicant/tests/test-supplicant-config.c b/src/core/supplicant/tests/test-supplicant-config.c -index 416fe0054f..d934ba1b58 100644 +index 1ca5b26e56..812e4d6e9d 100644 --- a/src/core/supplicant/tests/test-supplicant-config.c +++ b/src/core/supplicant/tests/test-supplicant-config.c -@@ -122,6 +122,7 @@ build_supplicant_config(NMConnection *connection, +@@ -120,6 +120,7 @@ build_supplicant_config(NMConnection *connection, + mtu, pmf, fils, - NULL, -+ FALSE, ++ FALSE, &error); } else { success = nm_supplicant_config_add_no_security(config, &error); -- -2.51.1 +2.49.0 diff --git a/extra-repos/systemd/networkmanager/APKBUILD b/extra-repos/systemd/networkmanager/APKBUILD index 6cb0d3097..22e14c729 100644 --- a/extra-repos/systemd/networkmanager/APKBUILD +++ b/extra-repos/systemd/networkmanager/APKBUILD @@ -2,7 +2,7 @@ # integrates with logind for sleepmonitor and sessionmonitor. maintainer="Jane Rachinger " pkgname=networkmanager -_pkgver=1.54.3 +_pkgver=1.52.1 pkgver=9999$_pkgver pkgrel=0 pkgdesc="Network Management daemon" @@ -240,8 +240,8 @@ _default_plugin() { } sha512sums=" -c40bdf3bf4ec8a17ec22d5c08d4035d3005d7c8c62b0f82649043834a7f7894f4e342c1e93957a86117dafbe6086d22eea3943180bee4774d3a54d5df4dbeeb5 networkmanager-1.54.3.tar.gz +ecbc4675d8c3972836920a76ba8e0ef14982785b72fd5de8213841490800c352c5ecf22091bbb5d3dfc1f93549c18564578149fccb4afbf6da59983d0d40c45f networkmanager-1.52.1.tar.gz 0f79016bf717dea43830962f524deae8d1cedc274376e40bd912ebe63208c5b1c3b7a5aa14379da19020c587dbd5588df2f0066ca1540070a226983a43e4159b networkmanager.conf 9820ed2ead0af689644842de57657bb10330a1eaff0e85b21ae9913f55e399e47d8b41b0a12956f30de80272b4424c6e55f33acbc88e156879003a260bf576f6 networkmanager.rules -528456c7b954e984781e8e038e125c9e0654adba0499512a767142d106909b5be3c32b14328eed505a3c313fb05a86bde0fb0985009ccc7c5ff3a719ad76c3e0 0001-hack-wifi-Disable-WPA-PSK-SHA256-for-brcmfmac-in-AP-.patch +e321f6f072901c4076543a6d1c4c46cf4a16b24be5fea6167c878bfeb9eced801fae94925ff208132f22a69a34d0f036b30f7b9253dea1757b98b40cbe3a896d 0001-hack-wifi-Disable-WPA-PSK-SHA256-for-brcmfmac-in-AP-.patch "