Commit Graph

382 Commits

Author SHA1 Message Date
Shreyas Sheth 94de5f1219 fix(esp_wifi): Set default NVS sae pwe value to SAE_PWE_BOTH for ap and station 2025-12-29 17:56:48 +05:30
yinqingzhao a6b2eb6ad0 refactor(wifi): remove enum values WIFI_BW_HT20 and WIFI_BW_HT40 2025-12-24 14:11:52 +08:00
zhangyanjiao e93e827185 fix(wifi): fixed the vendor ie length issue 2025-12-16 11:22:33 +08:00
zhangyanjiao 345fcf2834 fix(wifi/espnow): Remove doxygen groups as esp-docs is flat docs style 2025-10-24 10:08:02 +08:00
Sarvesh Bodakhe 4c3d6c1292 fix(wifi): Add refactoring and migration guide for USD, Offchan_tx, ROC
1. fix(wifi): Rename old NAN configuration to NAN-Sync
  - Rename CONFIG_ESP_WIFI_NAN_ENABLE to CONFIG_ESP_WIFI_NAN_SYNC_ENABLE to indicate
    the support for Synchronized NAN (Wi-Fi Aware).
  - Because the original flag really controls the synchronized feature set, rename it
    to CONFIG_ESP_WIFI_NAN_SYNC_ENABLE so the NAN-Sync and NAN-USD paths can be
    selected independently without confusion.
2. Document esp_wifi_start requirement and fix USD examples
3. Rename nan_callbacks to nan_sync_callbacks
4. Remove the discovery_flag, clarify docs for sync vs USD flows, and add USD start/stop APIs
5. Require esp_wifi_start() before USD start
6. docs(nan): add NAN-USD application examples
7. add migration guide and hints for NAN-USD proto field
8. Improve allow_broadcast documentation
9. Add attention to the API esp_wifi_remain_on_channel
10. fix(wifi): align NAN API renames and docs for v6.0
  - keep shared APIs under esp_wifi_nan_* while reserving
    sync/usd names for mode-specific entry points
  - clarify synchronized-cluster scope in headers, docs, and migration notes (EN/zh-CN)
  - update examples for renamed helpers and WIFI_NAN_SYNC_CONFIG_DEFAULT()
  - rename `wifi_nan_config_t` to `wifi_nan_sync_config_t`
11. Mark NAN-USD as esp-idf experimental feature
2025-10-20 12:46:55 +05:30
Sarvesh Bodakhe a5f6bc639b feat(wifi): Add support to set BSSID (A3) in esp_wifi_action_tx_req 2025-10-20 12:46:44 +05:30
Sarvesh Bodakhe 93347494b3 feat(wifi): Add support for Wi-Fi Aware: Unsynchronized Service Discover (USD)
1.  Remove redundant fixes in upstream wpa_supplicant for USD
    - Upstream supplicant has mostly fixed the issues regarding the
      unnecessary resetting pauseStateTimeout.
    - Upstream supplicant still needs one fix to avoid resetting the
      pauseStateTimeout when subscribe message is received from the peer
      which had triggered the pauseStateTimeout previously.

2.  Replace array-based channel list with bitmap for NaN-USD

    Use `wifi_scan_channel_bitmap_t` to represent the channel list for NaN-USD
    publisher and subscriber configurations. This replaces the previous approach
    that used a large array to store allowed channels.

    Also aligns with internal scan bitmap conventions across Wi-Fi stack.

3.  call esp_wifi_nan_stop() after USD exchange or STA stop

    Ensure esp_wifi_nan_stop() is called after publish/subscribe activity
    completes or when WIFI_EVENT_STA_STOP is received. This prevents NAN stop
    errors due to inactive interface. NaN-USD currently uses STA interface
    for Tx/Rx.

4.  Fix task watchdog timer triggered in active USD subscriber:

    As both USD supplicant and offchan TX component gets executed
    in the wifi task, it created a deadlock like scenario where offchan TX
    done callback was never getting executed and supplicant 'nan_de_timer'
    keeps running but failing to send any subscribe frame.

5.  Make sure that device is able to recieve action management frames
    of size more than 1400 bytes.

6.  Update proto field in SSI to match Wi-Fi Aware (NaN) spec format

    The 'proto' field in the 'wifi_nan_wfa_ssi_t' structure previously used an
    enum (wifi_nan_svc_proto_t), resulting in a 32-bit field. According to
    the Wi-Fi NAN Specification (Table 5.7), this field must be a single
    octet (8 bits). This commit updates the type to uint8_t to ensure
    compliance with the specification.

    This mismatch previously triggered warnings but did not cause functional
    errors.

7.  Set `allow_broadcast` to true in USD Remain on channel

    This enables the peer discovery as USD uses NAN-Network Multicast BSSID
    as A3 address in publish frames.

8.  Implement custom channel<->frequency conversion for NAN-USD

    NaN-USD only permits 20 MHz bandwidth channels in the 2.4 GHz and 5 GHz bands
    (as per section 4.5.3 of the Wi-Fi Aware Specification v4.0). To avoid linking
    a large portion of upstream supplicant code for frequency-to-channel and
    channel-to-frequency conversion, implement minimal custom helper functions.

9.  Limit NAN_DE_MAX_SERVICE to 2 for ESP_SUPPLICANT

10. Note: Upstream clamps negative `os_reltime` deltas to zero in `nan_de_srv_time_to_next()`,
    but our ESP_SUPPLICANT port keeps `os_time_t` unsigned, so that guard just provokes a
    compiler warning. We skip it for now because the scheduling loop validates past timestamps
    before computing the diff.

Co-authored-by: Shyamal Khachane <shyamal.khachane@espressif.com>
2025-10-20 12:18:28 +05:30
Sarvesh Bodakhe 6255a67654 fix(wifi): Add support to receive broadcast frames in ROC (Remain on Channel)
This commit adds the support to receive broadcast frames in ROC Rx
callback. Some use cases may need to receive broadcast packets for
discovery of other peers.

- This can be enabled/disabled through 'allow__broadcast' flag in
  'wifi_roc_req_t' structure.
- In default configration, broadcast packets will always be filtered out and
  will not be passed to the Rx callback to save CPU consumption.
2025-10-20 12:18:19 +05:30
Nachiket Kukade 5c73eef918 fix(esp_wifi): Partially revert NAN event API change from b0498569c8 2025-09-28 22:58:28 +05:30
Nachiket Kukade 783b80f9d5 fix(esp_wifi): NAN improvements and bugfixes
- Add NDP Peer inactivity detection and termination support
- Add NDP Action frames internal retries
- Fix NAN API return status to match with Tx status
- Fix false wait events during NAN datapath setup
- Replace NAN default event handlers with callbacks to
  avoid race conditions between wifi and user tasks
- Fix parsing Availability of third party devices

Closes https://github.com/espressif/esp-idf/issues/17529

Co-authored-by: akshat <akshat.agrawal@espressif.com>
2025-09-28 22:58:22 +05:30
Shreyas Sheth 0b0b38ea4c fix(esp_wifi): Set default nvs value for sae identifier to NULL
Resolves regression introduced in 6f7cf98ffe
which may impact WPA3 station connection in certain conditions
2025-09-28 10:37:19 +05:30
Shreyas Sheth 28219461ee fix(esp_wifi): Resolve comments for wpa3_compat mode documentation 2025-09-28 09:10:50 +05:30
Shreyas Sheth 3eca66cc0d fix(esp_wifi): Resolve comments for wpa3_compatible_mode 2025-09-28 09:10:30 +05:30
Shreyas Sheth a7f32f5a2a feat(esp_wifi): Add compile flag for wpa3 compatible mode 2025-09-28 09:10:29 +05:30
Shreyas Sheth 1b33c9daae fix(esp_wifi): Resolve comments for wpa3 compatible mode 2025-09-28 09:10:29 +05:30
Shreyas Sheth fbfa3aa0e0 feat(esp_wifi): Add support of wpa3 compatible more for ap and sta 2025-09-28 09:10:29 +05:30
Shreyas Sheth ee3723b922 feat(wifi): Add support for wpa3 compatible flag for softap 2025-09-28 09:10:29 +05:30
Kapil Gupta 7b665b6512 fix(esp_wifi): Correct some documentation 2025-09-26 21:43:32 +05:30
Nachiket Kukade b0498569c8 fix(esp_wifi): Remove deprecated fields in NAN & FTM API's
- Update wifi libs to remove references to deprecated API's, enums
and variables
2025-09-26 21:42:39 +05:30
Kapil Gupta 2563d6a2e8 fix(esp_wifi): Add dummy value for deprecated enums 2025-09-26 21:42:30 +05:30
Kapil Gupta 5898086eca fix(esp_wifi): Remove some more deprecated enum/functions 2025-09-26 21:42:30 +05:30
Kapil Gupta f189052386 fix(esp_wifi): Remove esp_interface.h 2025-09-26 21:42:30 +05:30
zhangyanjiao 0f80318327 feat(wifi/espnow): Added switch channel API and remain on channel API for espnow 2025-09-15 11:07:00 +08:00
Sarvesh Bodakhe 3cc59d2cd8 fix(wifi): add GCMP-128 cipher support for SoftAP mode
GCMP-256 SoftAP support was previously added as part of SAE Extended Key handling.
2025-07-31 10:40:28 +08:00
muhaidong a6a9c41573 fix(wifi): fix open mode rx fragment fail issue 2025-07-21 20:17:38 +08:00
yinqingzhao c1c78f5838 feat(wifi): add esp32c61 eco3 wifi support 2025-06-27 14:04:55 +08:00
yinqingzhao ca49c095e0 feat(wifi): add support for country EU 2025-06-20 16:10:11 +08:00
sibeibei 7191595d2a feat(coex): support backgorund scan for coex, fix some issues of scan when connected 2025-06-18 10:58:12 +08:00
wangtao@espressif.com ce3611db26 fix(wifi): add check for esp_wifi_set_config 2025-06-09 11:52:01 +08:00
Kapil Gupta 3c84fd7b4d fix(esp_wifi): Make sure old DPP listen is cancelled 2025-06-05 16:55:21 +08:00
Kapil Gupta 15c336bf49 fix(esp_wifi): Update dpp code to send events in freeRTOS context 2025-06-05 16:55:21 +08:00
tarun.kumar 6d7593c1be fix(wifi) : Add config param for gtk rekeying on softAP side 2025-05-20 15:33:05 +05:30
tarun.kumar c776b440ec fix(softAP): Adjusted authentication mode for wpa-eap version 1 2025-05-15 13:51:31 +08:00
tarun.kumar 4fae51e3c1 fix(wifi): Sending disconnect event in connect fail and add enterprise check in Suite-B 192-bit certification 2025-05-15 11:02:32 +08:00
yinqingzhao 5bed100761 feat(wifi): add tx error 0xa0 count 2025-05-13 11:54:59 +08:00
Jiang Jiang Jian c4aaceb430 Merge branch 'bugfix/scan_stop_when_conenct' into 'master'
fix(esp_wifi): Fix locking in inccorrect state when stop_scan is called after connect

See merge request espressif/esp-idf!38779
2025-05-13 10:36:12 +08:00
Shreyas Sheth 0103155f6f fix(esp_wifi): Fix locking in incorrect state when stop_scan is called after connect 2025-05-12 18:03:43 +05:30
Ivan Grokhotkov f019c5d549 change(docs): silence new Sphinx warnings after Doxygen upgrade
Co-authored-by: Marius Vikhammer <marius.vikhammer@espressif.com>
2025-05-12 11:39:41 +02:00
Shen Meng Jing 62d4115e08 docs: Fix some typos 2025-04-30 18:35:39 +08:00
yinqingzhao dd9f8bfcbc feat(wifi): chip esp32c5 eco2 support wifi 2025-04-28 10:52:55 +08:00
liuning c00d092bdb feat(wifi): support sample beacon feature
fix: adapt soc wakeup quick wake, fix light sleep beacon sample

feat(pm): giveup beacon and resample if rx prop too low (a16fa11)
2025-04-14 11:50:40 +08:00
liuning 2a0791b223 feat(wifi): support to configure wifi modem sleep parameters 2025-04-14 11:33:22 +08:00
zhangyanjiao a8bd4f0929 fix(wifi): Return more information in the espnow send callback 2025-04-10 14:05:12 +08:00
zhangyanjiao d19614738a feat(wifi): Added tx callback function for 80211 tx
Closes https://github.com/espressif/esp-idf/issues/13319
2025-04-10 14:05:07 +08:00
sibeibei 28290c8da3 fix(wifi):fix modem state rx bcn failed when tbtt update, support modem state for coexist 2025-04-09 11:41:56 +08:00
Sajia c4f592679b feat(wifi): Enable bss max idle support on all chips
- Fix issues in Max Idle period negotiation and protected keep alive
- Add BSS Max Idle config in SoftAP config and create a feature flag
- Add a unit test case to test both STA and SoftAP implementation
2025-04-08 12:40:15 +05:30
yinqingzhao cceb2c49b1 feat(wifi): wifi support regdomain for both 2.4G and 5G 2025-04-07 15:27:40 +08:00
zhangyanjiao db13e44255 fix(wifi): fix the noise floor error on ESP32C5
Closes https://github.com/espressif/esp-idf/issues/15594
2025-03-25 14:04:56 +08:00
tarun.kumar 4355fc8fbc feat(wifi): Add SAE-EXT-KEY feature on softAP 2025-03-24 20:04:57 +05:30
Nachiket Kukade 302d8e5fce feat(esp_wifi): Add extended SSI support for NAN Services
1. Allow SSI in publish and subscribe, populate Peer's SSI in match events
2. Allow SSI with length higher than 255 bytes by using SDEA for all NAN services
3. Update API's to support SSI changes and other SDEA parameters
4. Fix use after free issues with NAN Beacons and SDF's

Closes https://github.com/espressif/esp-idf/issues/12473
Closes https://github.com/espressif/esp-idf/issues/13366
2025-03-21 15:52:23 +08:00