Commit Graph

1637 Commits

Author SHA1 Message Date
Sarvesh Bodakhe
caba5dcfea refactor(wifi): NAN datapath header cleanups and docs
- Rename NAN_IPV6_ADDR_ID_LEN / IS_ZERO_NAN_ADDR_ID to ..._IPV6_IDENTIFIER
  so the names no longer read like MAC-address constants; drop the
  duplicate macro definition in esp_nan.h.
- Replace literal lengths with named macros: WIFI_OUI_LEN for
  nan_vendor_ie_t.vendor_oui, and a new WIFI_MAC_ADDR_LEN (private)
  applied to the NAN-related structs and callbacks in esp_private/wifi.h.
- Document each callback in struct nan_sync_callbacks and each helper
  in struct nan_secure_dp_funcs: when fired / when invoked, what each
  argument means, and the matching spec section where useful.
- Note in wifi_nan_datapath_req_t / wifi_nan_datapath_resp_t that they
  cover the NCS-SK credential model only; pairing-based cipher suites
  (NCS-PK-PASN) install per-peer ND-PMKs via a separate pairing API
  without changing these structs. Record why per-NDP credential
  injection at response time is not viable: the responder's PMKID
  lookup happens at M1 receive time, before the indication event
  surfaces to the host.
2026-05-19 16:54:12 +05:30
Sarvesh Bodakhe
cfecf60986 feat(wifi): NAN multi-credential discovery security
Replace scalar passphrase/PMK in wifi_nan_discovery_security_params_t
with wifi_nan_credential_t[N] array (cap 4) per Wi-Fi Aware v4.0
§9.5.21.4. Drop public PMKID array and service-level csid_bitmap.

Rename wifi_nan_datapath_security_params_t -> wifi_nan_security_params_t;
add wifi_nan_peer_sdf_security_t for multi-PMKID peer-RX. The
derive_security_params callback takes (svc_name, sec_cfg, out_derived[])
and runs once per credential on the WiFi task. Split nan_record_own_svc
into claim/finalize so the WiFi-task callback finds the pending slot
by name and mirrors derived material — no main-task PBKDF2.
2026-05-19 11:11:55 +05:30
Sarvesh Bodakhe
2da41618f5 test(wifi): NAN PMK derivation crypto test
Unit-test the ND-PMK derivation path against known-good vectors using
the wpa_supplicant-ported pbkdf2_sha256.
2026-05-19 11:07:07 +05:30
Sarvesh Bodakhe
94f226d73b feat(wifi): NAN encrypted datapath (Wi-Fi Aware M1-M4 handshake)
Implement the NAN Data Path encrypted datapath per Wi-Fi Aware v4.0
(§7.1.3.5, §9.5.16):

- Responder + initiator sides of the M1-M4 Shared-Key Descriptor
  exchange, with MIC compute/verify, PTK derivation, and PMK/PMKID
  derivation via PBKDF2-SHA256 over passphrase or pre-shared PMK.
- CSIA / SCIA attribute build + parse, NCS-SK-128 cipher suite.
- Per-NDL security context on ndl_info::security_ctx; per-svc PMK cache.
- ndp_response_indication callback for initiator peer-NDI binding.
- host<->blob ABI migrated from 27 direct esp_nan_* externs to a single
  nan_secure_dp_funcs callback struct in esp_private/wifi.h.
- nan_security.c split out of nan_app.c (~340 lines de-duplicated into
  shared M1-M4 helpers).
- CONFIG_ESP_WIFI_NAN_ENCRYPTED_DATAPATH gates the secure path so non-
  security builds compile out the crypto/handshake code.
- ROM patch (esp32s31): mask ieee80211_encap_esfbuf to match the
  c5/c6/c61 pattern for NAN-capable chips.

Hardening: PMK stack copies zeroized on every return, NDP attribute
parsers bounds-checked, CSID range-checked before shifting, NDL slot
reuse only when handshake state is IDLE, get_csia/scia_len aligned with
their builders on empty input.

API surface: NDP security types moved out of esp_wifi_types_generic.h
into esp_private/wifi.h (internal-only). security pointer dropped from
struct ndp_cb_peer_info. Discovery-side wifi_nan_security_type_t and
the NDP Info callbacks removed (subsumed by csid_bitmap and SSI
respectively).
2026-05-19 11:07:06 +05:30
muhaidong
a1d2b468e8 fix(wifi): update auth mode threshold doc 2026-05-18 15:49:34 +08:00
muhaidong
b173349c3b fix(wifi): update wifi scan threshold doc 2026-05-18 14:36:01 +08:00
Jiang Jiang Jian
ef338c61b4 Merge branch 'feat/support_weak_func_wifi_assert' into 'master'
fix(wifi): support weak func for wifi lmac assert

Closes WIFIBUG-1715

See merge request espressif/esp-idf!45496
2026-05-15 20:46:48 +08:00
Jiang Jiang Jian
900a72f7b6 Merge branch 'bugfix/roaming_app_track_data' into 'master'
fix(roaming): prevent timeout payload double-free on deinit

Closes WIFIBUG-1880

See merge request espressif/esp-idf!48361
2026-05-15 19:43:12 +08:00
muhaidong
2dcab6cc00 fix(wifi): support weak func for wifi lmac assert 2026-05-15 14:48:04 +08:00
Jiang Jiang Jian
a99398a52e Merge branch 'ci/add_static_tx_buffer_case' into 'master'
Add wifi connect case when static tx buffer enable

See merge request espressif/esp-idf!48494
2026-05-15 10:08:50 +08:00
Jiang Jiang Jian
0f96f27d35 Merge branch 'feat/add_ci_ut_test_for_auto_mode_connect_passive_channel_hidden_ap' into 'master'
feat(ci): add ci test for auto mode connect passive chnnel hidden ap

Closes WIFI-7298

See merge request espressif/esp-idf!47140
2026-05-14 20:34:16 +08:00
Jiang Jiang Jian
0ccf6a6a7b Merge branch 'bugfix/fix_some_s31_coex_iso_issues' into 'master'
fix(coex): fix some s31 coex iso issues

See merge request espressif/esp-idf!48508
2026-05-14 20:32:04 +08:00
Chen Yudong
7e30792058 ci: use case attributes to filter cases 2026-05-14 17:21:35 +08:00
David Čermák
31a70d6a36 Merge branch 'fix/wifi_remote_update' into 'master'
fix(wifi_remote): Forward porting some fixes

See merge request espressif/esp-idf!48485
2026-05-14 17:16:26 +08:00
muhaidong
1c640fb30e feat(ci): add ci test for auto mode connect passive chnnel hidden ap 2026-05-14 15:54:24 +08:00
muhaidong
d11192503b fix(coex): fix some s31 coex iso issues 2026-05-14 14:04:35 +08:00
Alexey Gerenkov
edb75262a1 Merge branch 'feature/update-esp-clang-to-esp-21.1.3_20260304' into 'master'
feat(tools): update esp-clang version to esp-21.1.3_20260408

Closes IDF-14965, LLVM-501, and LLVM-531

See merge request espressif/esp-idf!46361
2026-05-13 22:54:10 +08:00
ding huan
3a46a77370 ci: Add wifi static buffer case 2026-05-13 19:45:25 +08:00
David Cermak
a2b3dc1192 feat(wifi_remote): Add support for manual disable
Forward porting https://github.com/espressif/esp-wifi-remote/commit/efdc2f8
2026-05-13 11:35:30 +02:00
David Cermak
0e45d0e7b5 fix(wifi_remote): Free Rx buffer if packet path not defined
Forward porting: https://github.com/espressif/esp-wifi-remote/commit/d1e908d6
2026-05-13 11:32:30 +02:00
Akshat Agrawal
d66ccc2479 feat(wifi): Add multiple NAN Service Discovery improvements
- Add Country Code, Vendor IE to NAN frames
 - Support parsing of multiple availibility & SDA attributes
 - Add parsing of service response filter
 - Support Bloom filter parsing and generation
 - Record peer_svc for nan_indication_cb
 - Add support for NDPE Extension attribute
2026-05-13 12:08:17 +05:30
muhaidong
facb230352 fix(wifi): fix hidden ap rssi update and owe beacon timeout issue 2026-05-13 10:54:47 +08:00
yinqingzhao
61dac506e6 fix(wifi): fix dfs channel check wrong 2026-05-12 16:05:44 +08:00
Kapil Gupta
331fa92f68 fix(roaming): prevent timeout payload double-free on deinit
Track timeout user_data before registration, untrack on register failure
2026-05-12 13:50:14 +08:00
sibeibei
45a6998129 fix(wifi): IRAM for regdma path used in modem pd light sleep 2026-05-09 14:48:24 +08:00
Sarvesh Bodakhe
1ec6064637 fix(wifi): stop NAN timers from re-arming after esp_wifi_stop 2026-05-08 18:40:51 +05:30
Akshat Agrawal
3197b50dd9 fix(nan): Prevent overwriting of matching filter by SSI
- Closes https://github.com/espressif/esp-idf/issues/18231
2026-05-08 11:37:11 +05:30
yinqingzhao
34ff741b6e feat(regdomain): update regdomain according to wireless-regdb 2026-05-08 12:44:38 +08:00
Alexey Gerenkov
f16bb34ff7 fix(build): fix Clang 21 build warnings/errors 2026-05-07 17:42:38 +03:00
Nachiket Kukade
4e86f21be9 refactor(ftm): Add dummy FTM calibration values for S31 2026-05-07 18:53:00 +05:30
Akshat Agrawal
e36a818a75 refactor(ftm): Update the FTM Comp Header file 2026-05-07 18:51:29 +05:30
Sajia
e2e93cc572 refactor(ftm): Use ROC mechanism for offchan ftm 2026-05-07 18:51:27 +05:30
Jiang Jiang Jian
1aae08cb12 Merge branch 'fix/fix_lost_ip_event_issue' into 'master'
fix(lwip): add some feature for dhcp and improve api

Closes WIFI-7304

See merge request espressif/esp-idf!47221
2026-05-07 20:53:23 +08:00
Jiang Jiang Jian
e6d31c9b60 Merge branch 'fix/roam_backoff_reschedule' into 'master'
Reschedule roam based on backoff time

See merge request espressif/esp-idf!45636
2026-05-07 19:33:12 +08:00
yinqingzhao
be8bc4f247 feat(wifi): support disable 11ac and 11ax in efuse 2026-05-07 12:27:46 +08:00
muhaidong
47e680d2cd fix(wifi): fix max connection number issue 2026-05-06 20:48:22 +08:00
Jiang Jiang Jian
f7a5ef7ad5 Merge branch 'feature/softap_owe_support' into 'master'
Add support for OWE Only in SoftAP mode

Closes WIFI-4281 and IDFGH-12437

See merge request espressif/esp-idf!47341
2026-05-06 19:38:29 +08:00
tarun.kumar
66429b1ba7 fix(wifi) : Reschedule roam in based on backoff time 2026-05-06 15:19:03 +05:30
Jiang Jiang Jian
43a7fdee43 Merge branch 'bugfix/roaming_app_issues' into 'master'
fix(esp_wifi): Fixed some issues in roaming app found using static analysis

Closes WIFIBUG-1836 and WIFIBUG-1842

See merge request espressif/esp-idf!47372
2026-05-06 15:50:55 +08:00
Kapil Gupta
b585c0b364 fix(esp_wifi): Fixed some issues in roaming app found using static analysis 2026-05-06 15:50:54 +08:00
Kapil Gupta
1085d83c48 fix(esp_wifi): Update wifi lib pointer 2026-05-06 12:09:41 +05:30
tarun.kumar
2c3cd560c4 fix(wifi) : Made changes based on more review comments
-Require STA DH IE for OWE associations.
    - Send failures using Association Response (no silent deauth-only path).
    - Include RSNE in OWE Association Response alongside DH Parameter IE.
    - Check wpabuf_resize return values when building OWE Assoc Response IEs.
    - Recognize OWE AKM in RSN IE when CONFIG_OWE_SOFTAP without CONFIG_OWE_STA.
    - Docs: SoftAP OWE-only; no transition mode; trim misleading OPEN→OWE note.
2026-05-06 01:07:57 +05:30
tarun.kumar
d698d5345a feat(wifi) : OWE softAP review follow ups
- OWE: clear PRK on HKDF failure; wipe PMK with bin_clear_free; reuse PMK
      buffer when size matches.
    - 4-way handshake: drop extra OWE check so WPA2-PSK can try the next passphrase.
    - SoftAP: simpler OWE key setup and assoc response IEs (skip useless RSNXE step).
2026-05-05 21:40:56 +05:30
Aditi
7d0551257c feat(esp_wifi): Add changes for addressing some review comments
Closes https://github.com/espressif/esp-idf/issues/13457
2026-05-05 21:40:29 +05:30
Aditi
5df4063496 feat(esp_wifi): Add CONFIG option for CONFIG_OWE_SOFTAP 2026-05-05 21:40:29 +05:30
Kapil Gupta
1d14e269b8 fix(esp_wifi): Drop broadcast fragmented frames 2026-05-05 13:49:02 +05:30
Jiang Jiang Jian
dc90e75315 Merge branch 'feat/add_dfs_channel_limition_for_softap_when_support_5g' into 'master'
feat(wifi): Add DFS channel handling and CSA support

Closes WIFIBUG-1247, WIFI-6867, and WIFI-7276

See merge request espressif/esp-idf!40852
2026-04-30 20:15:14 +08:00
Kapil Gupta
fba7f6df97 Merge branch 'ci/wifi_remote_hook_cleanup' into 'master'
ci(esp_wifi): Update cleanup in script

See merge request espressif/esp-idf!48057
2026-04-30 16:37:12 +05:30
yinqingzhao
2746df37bf feat(wifi): Add DFS channel handling and CSA support 2026-04-30 14:49:22 +08:00
Kapil Gupta
cbac39c984 ci(esp_wifi_remote): silently exit if related files are not modified 2026-04-30 09:42:29 +05:30