aboutsummaryrefslogtreecommitdiff
path: root/SOURCES/t2linux.patch
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2024-04-07 01:14:55 +0200
committerJan200101 <sentrycraft123@gmail.com>2024-04-07 01:14:55 +0200
commitdd696168dad584560000bba8e5ef940cf748a4b5 (patch)
tree7a09012fd6c83e0ff7eb6e4a3f16fbbb99c7b4e0 /SOURCES/t2linux.patch
parent684f5ef56790771b425c7007c9dfcfbd8ea1a300 (diff)
downloadkernel-fsync-dd696168dad584560000bba8e5ef940cf748a4b5.tar.gz
kernel-fsync-dd696168dad584560000bba8e5ef940cf748a4b5.zip
kernel 6.8.4
Diffstat (limited to 'SOURCES/t2linux.patch')
-rw-r--r--SOURCES/t2linux.patch107
1 files changed, 0 insertions, 107 deletions
diff --git a/SOURCES/t2linux.patch b/SOURCES/t2linux.patch
index 4313c53..e167e73 100644
--- a/SOURCES/t2linux.patch
+++ b/SOURCES/t2linux.patch
@@ -11901,110 +11901,3 @@ index 442396f6ed1f..baf7264d7b94 100644
/* Dell Inspiron N4010 */
--
2.42.1
-
-From 923cfe9b86c71761b164f995631817e9af169f29 Mon Sep 17 00:00:00 2001
-From: Hector Martin <marcan@marcan.st>
-Date: Tue, 14 Feb 2023 18:33:19 +0900
-Subject: [PATCH] brcmfmac: cfg80211: Use WSEC to set SAE password
-
-Using the WSEC command instead of sae_password seems to be the supported
-mechanism on newer firmware, and also how the brcmdhd driver does it.
-
-Signed-off-by: Hector Martin <marcan@marcan.st>
----
- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 46 ++++++++-----------
- .../broadcom/brcm80211/brcmfmac/fwil_types.h | 2 +-
- 2 files changed, 20 insertions(+), 28 deletions(-)
-
-diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-index 87f4d53fb..7ccdbafca 100644
---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -1682,52 +1682,44 @@ static u16 brcmf_map_fw_linkdown_reason(const struct brcmf_event_msg *e)
- return reason;
- }
-
--static int brcmf_set_pmk(struct brcmf_if *ifp, const u8 *pmk_data, u16 pmk_len)
-+static int brcmf_set_wsec(struct brcmf_if *ifp, const u8 *key, u16 key_len, u16 flags)
- {
- struct brcmf_pub *drvr = ifp->drvr;
- struct brcmf_wsec_pmk_le pmk;
- int err;
-
-+ if (key_len > sizeof(pmk.key)) {
-+ bphy_err(drvr, "key must be less than %zu bytes\n",
-+ sizeof(pmk.key));
-+ return -EINVAL;
-+ }
-+
- memset(&pmk, 0, sizeof(pmk));
-
-- /* pass pmk directly */
-- pmk.key_len = cpu_to_le16(pmk_len);
-- pmk.flags = cpu_to_le16(0);
-- memcpy(pmk.key, pmk_data, pmk_len);
-+ /* pass key material directly */
-+ pmk.key_len = cpu_to_le16(key_len);
-+ pmk.flags = cpu_to_le16(flags);
-+ memcpy(pmk.key, key, key_len);
-
-- /* store psk in firmware */
-+ /* store key material in firmware */
- err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_WSEC_PMK,
- &pmk, sizeof(pmk));
- if (err < 0)
- bphy_err(drvr, "failed to change PSK in firmware (len=%u)\n",
-- pmk_len);
-+ key_len);
-
- return err;
- }
-
-+static int brcmf_set_pmk(struct brcmf_if *ifp, const u8 *pmk_data, u16 pmk_len)
-+{
-+ return brcmf_set_wsec(ifp, pmk_data, pmk_len, 0);
-+}
-+
- static int brcmf_set_sae_password(struct brcmf_if *ifp, const u8 *pwd_data,
- u16 pwd_len)
- {
-- struct brcmf_pub *drvr = ifp->drvr;
-- struct brcmf_wsec_sae_pwd_le sae_pwd;
-- int err;
--
-- if (pwd_len > BRCMF_WSEC_MAX_SAE_PASSWORD_LEN) {
-- bphy_err(drvr, "sae_password must be less than %d\n",
-- BRCMF_WSEC_MAX_SAE_PASSWORD_LEN);
-- return -EINVAL;
-- }
--
-- sae_pwd.key_len = cpu_to_le16(pwd_len);
-- memcpy(sae_pwd.key, pwd_data, pwd_len);
--
-- err = brcmf_fil_iovar_data_set(ifp, "sae_password", &sae_pwd,
-- sizeof(sae_pwd));
-- if (err < 0)
-- bphy_err(drvr, "failed to set SAE password in firmware (len=%u)\n",
-- pwd_len);
--
-- return err;
-+ return brcmf_set_wsec(ifp, pwd_data, pwd_len, BRCMF_WSEC_PASSPHRASE);
- }
-
- static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason,
-diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
-index 792adaf88..3ba90878c 100644
---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
-+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h
-@@ -574,7 +574,7 @@ struct brcmf_wsec_key_le {
- struct brcmf_wsec_pmk_le {
- __le16 key_len;
- __le16 flags;
-- u8 key[2 * BRCMF_WSEC_MAX_PSK_LEN + 1];
-+ u8 key[BRCMF_WSEC_MAX_SAE_PASSWORD_LEN];
- };
-
- /**
---
-2.37.2
-