diff options
| author | Vitor Soares <vitor.soares@toradex.com> | 2025-06-04 11:24:01 +0100 | 
|---|---|---|
| committer | Vitor Soares <vitor.soares@toradex.com> | 2025-06-11 14:36:17 +0100 | 
| commit | ace16b6ed11fff02e0b25e5fea9590d19cab26b5 (patch) | |
| tree | 8255b40ae57e072c7d4f271c3de6da1da07e3008 | |
| parent | a2c83dca65c453f98b139609285d305febffc9ab (diff) | |
recipes-connectivity: hostapd-example: Add WPA2/WPA3 mixed mode
Add SAE key management and MFP example to support WPA3 clients while
maintaining compatibility with existing WPA2 devices.
Related-to: ELB-6472
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
(cherry picked from commit 73056dac05c537cea54aeeadef56c9ef22d7b4c5)
3 files changed, 36 insertions, 0 deletions
| diff --git a/recipes-connectivity/hostapd-example/hostapd-example.bb b/recipes-connectivity/hostapd-example/hostapd-example.bb index f3d0036..f40abf6 100644 --- a/recipes-connectivity/hostapd-example/hostapd-example.bb +++ b/recipes-connectivity/hostapd-example/hostapd-example.bb @@ -11,8 +11,10 @@ S = "${UNPACKDIR}"  SRC_URI = " \      file://enable-wifi.service \      file://hostapd-example.service \ +    file://hostapd-example-wpa3.service \      file://hostapd-example.network \      file://hostapd-tdx-demo-img.conf \ +    file://hostapd-tdx-demo-img-wpa3.conf \  "  inherit allarch systemd @@ -25,13 +27,17 @@ do_install() {      install -m 0644 enable-wifi.service ${D}${systemd_unitdir}/system/      install -m 0644 hostapd-example.network ${D}${systemd_unitdir}/network/      install -m 0644 hostapd-example.service ${D}${systemd_unitdir}/system/ +    install -m 0644 hostapd-example-wpa3.service ${D}${systemd_unitdir}/system/      install -m 0644 hostapd-tdx-demo-img.conf ${D}${sysconfdir}/ +    install -m 0644 hostapd-tdx-demo-img-wpa3.conf ${D}${sysconfdir}/      sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd-example.service +    sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd-example-wpa3.service  }  FILES:${PN} += " \      ${systemd_unitdir}/system/* \      ${systemd_unitdir}/network/hostapd-example.network \      ${sysconfdir}/hostapd-tdx-demo-img.conf \ +    ${sysconfdir}/hostapd-tdx-demo-img-wpa3.conf \  " diff --git a/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example-wpa3.service b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example-wpa3.service new file mode 100644 index 0000000..1971a5f --- /dev/null +++ b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-example-wpa3.service @@ -0,0 +1,11 @@ +[Unit] +Description=Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator +Requires=enable-wifi.service + +[Service] +Type=forking +PIDFile=/run/hostapd-wpa3.pid +ExecStart=@SBINDIR@/hostapd @SYSCONFDIR@/hostapd-tdx-demo-img-wpa3.conf -P /run/hostapd-wpa3.pid -B + +[Install] +WantedBy=multi-user.target diff --git a/recipes-connectivity/hostapd-example/hostapd-example/hostapd-tdx-demo-img-wpa3.conf b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-tdx-demo-img-wpa3.conf new file mode 100644 index 0000000..728fd58 --- /dev/null +++ b/recipes-connectivity/hostapd-example/hostapd-example/hostapd-tdx-demo-img-wpa3.conf @@ -0,0 +1,19 @@ +interface=uap0 +ssid=testwifi +hw_mode=g +channel=9 +ieee80211n=1 +own_ip_addr=192.168.8.1 + +# Mixed WPA2/WPA3 mode +wpa=2 +wpa_key_mgmt=WPA-PSK SAE +wpa_passphrase=testwifipw +rsn_pairwise=CCMP + +# Management Frame Protection (MFP) +# 0=disabled +# 1=optional (for WPA2 clients) +# 2=required +ieee80211w=1 +sae_require_mfp=1 | 
