S666LN: patches: Add WPA3 Fix

Signed-off-by: KimelaZX <mmikailrei@gmail.com>
This commit is contained in:
vannxavero
2025-12-17 23:06:46 +07:00
committed by KimelaZX
parent e98f566884
commit 021933fd77
3 changed files with 65 additions and 1 deletions

20
applypatch.sh Normal file
View File

@@ -0,0 +1,20 @@
[ -z "$1" ] && echo "please specify patch dir" && exit 2
maindir=$(pwd)
patchesDir=$1
if [ -f "$maindir/TMP_PATCHES" ]; then
echo "patches seems to already be applied, skipping"
exit 0
fi
cd "$patchesDir" || { echo "patchesDir doesnt exists" && exit 1 ; }
find . -type f -name \*.patch | rev | cut -d/ -f2- | rev | uniq | cut -d/ -f2- > "$maindir/TMP_PATCHES"
cd "$maindir"
while read -r pdir; do
{ cd "$pdir" && echo -e "\napplying patches to $pdir\n" ; } || exit 1
git am "$patchesDir/$pdir"/*.patch || while ! git am --skip ; do : ; done
cd "$maindir"
done < "$maindir/TMP_PATCHES"
exit 0

View File

@@ -0,0 +1,40 @@
From 220688d0768625ec4982ee3f7b924607486fcf78 Mon Sep 17 00:00:00 2001
From: web1n <9633157+web1n@users.noreply.github.com>
Date: Sat, 25 Jan 2025 10:12:30 +0800
Subject: [PATCH] nl80211: Do not set NL80211_WPA_VERSION_3
Revert: "nl80211: Avoid NL80211_WPA_VERSION_3 on older kernel versions"
Revert: "nl80211: Set NL80211_WPA_VERSION_2 vs. _3 based on AKM"
Change-Id: I3d370b084b985b16a705ce28a3ff242993708de2
---
src/drivers/driver_nl80211.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index a45f55f3..463f3edc 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6910,20 +6910,8 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
if (params->wpa_proto & WPA_PROTO_WPA)
ver |= NL80211_WPA_VERSION_1;
- if (params->wpa_proto & WPA_PROTO_RSN) {
-#if !defined(CONFIG_DRIVER_NL80211_BRCM) && !defined(CONFIG_DRIVER_NL80211_SYNA)
- /*
- * NL80211_ATTR_SAE_PASSWORD is related and was added
- * at the same time as NL80211_WPA_VERSION_3.
- */
- if (nl80211_attr_supported(drv,
- NL80211_ATTR_SAE_PASSWORD) &&
- wpa_key_mgmt_sae(params->key_mgmt_suite))
- ver |= NL80211_WPA_VERSION_3;
- else
-#endif
- ver |= NL80211_WPA_VERSION_2;
- }
+ if (params->wpa_proto & WPA_PROTO_RSN)
+ ver |= NL80211_WPA_VERSION_2;
wpa_printf(MSG_DEBUG, " * WPA Versions 0x%x", ver);
if (nla_put_u32(msg, NL80211_ATTR_WPA_VERSIONS, ver))

View File

@@ -12,4 +12,8 @@ if [ $RET -ne 0 ]; then
echo "ERROR: Patch is not applied! Maybe it's already patched, or you'll have to adapt it to this specific rom source?"
else
echo "OK: All patched"
fi
fi
deviceDir=$(gettop)/device/itel/S666LN
${deviceDir}/applypatch.sh ${deviceDir}/patches