fix(wifi): Fix wrong wifi reason codes reported on station and softAP

- Fix wrong reason code reported when softAP issues a disconnect for station
- Fix wrong reason code reported when association timeout happens at station
- Deprecate enums WIFI_REASON_ASSOC_EXPIRE, WIFI_REASON_NOT_AUTHED, WIFI_REASON_NOT_ASSOCED
  and use WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY,
  WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA,
  WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA respectively
- Update wifi documentation related to reason codes
This commit is contained in:
Sarvesh Bodakhe
2024-08-30 13:19:10 +05:30
parent 9475109311
commit e35035aa9a
5 changed files with 20 additions and 21 deletions

View File

@@ -779,7 +779,7 @@ Association Phase
+++++++++++++++++++++
- s3.1: The association request is sent and the association timer is enabled.
- s3.2: If the association response is not received before the association timer times out, `WIFI_EVENT_STA_DISCONNECTED`_ will arise and the reason code will be ``WIFI_REASON_ASSOC_EXPIRE``. Refer to `Wi-Fi Reason Code`_.
- s3.2: If the association response is not received before the association timer times out, `WIFI_EVENT_STA_DISCONNECTED`_ will arise and the reason code will be ``WIFI_REASON_DISASSOC_DUE_TO_INACTIVITY``. Refer to `Wi-Fi Reason Code`_.
- s3.3: The association response is received and the association timer is stopped.
- s3.4: The AP rejects the association in the response and `WIFI_EVENT_STA_DISCONNECTED`_ arises, while the reason code is the one specified in the association response. Refer to `Wi-Fi Reason Code`_.
@@ -836,20 +836,16 @@ The table below shows the reason-code defined in {IDF_TARGET_NAME}. The first co
For the ESP station, this reason is reported when:
- it is received from the AP.
* - ASSOC_EXPIRE
* - DISASSOC_DUE_TO_INACTIVITY
- 4
- 4
- Disassociated due to inactivity.
For the ESP station, this reason is reported when:
- assoc is timed out.
- it is received from the AP.
For the ESP AP, this reason is reported when:
- the AP has not received any packets from the station in the past five minutes.
- the AP is stopped by calling :cpp:func:`esp_wifi_stop()`.
- the station is de-authed by calling :cpp:func:`esp_wifi_deauth_sta()`.
* - ASSOC_TOOMANY
- 5
- 5
@@ -862,7 +858,7 @@ The table below shows the reason-code defined in {IDF_TARGET_NAME}. The first co
For the ESP AP, this reason is reported when:
- the stations associated with the AP reach the maximum number that the AP can support.
* - NOT_AUTHED
* - CLASS2_FRAME_FROM_NONAUTH_STA
- 6
- 6
- Class-2 frame received from a non-authenticated STA.
@@ -874,7 +870,7 @@ The table below shows the reason-code defined in {IDF_TARGET_NAME}. The first co
For the ESP AP, this reason is reported when:
- the AP receives a packet with data from a non-authenticated station.
* - NOT_ASSOCED
* - CLASS3_FRAME_FROM_NONASSOC_STA
- 7
- 7
- Class-3 frame received from a non-associated STA.
@@ -1139,7 +1135,7 @@ The table below shows the reason-code defined in {IDF_TARGET_NAME}. The first co
* - ASSOC_FAIL
- 203
- reserved
- Espressif-specific Wi-Fi reason code: the association fails, but not because of ASSOC_EXPIRE or ASSOC_TOOMANY.
- Espressif-specific Wi-Fi reason code: the association fails, but not because of DISASSOC_DUE_TO_INACTIVITY or ASSOC_TOOMANY.
* - HANDSHAKE_TIMEOUT
- 204
- reserved