diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 81f2d760fc..40bc62a5f6 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -555,7 +555,7 @@ ppEnqueueRxq = 0x40001bec; ppEnqueueTxDone = 0x40001bf0; ppGetTxQFirstAvail_Locked = 0x40001bf4; ppGetTxframe = 0x40001bf8; -ppMapTxQueue = 0x40001bfc; +/*ppMapTxQueue = 0x40001bfc;*/ ppProcTxSecFrame = 0x40001c00; ppProcessRxPktHdr = 0x40001c04; /*ppProcessTxQ = 0x40001c08;*/ diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index 4e9eea47cc..e955153d63 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -773,10 +773,43 @@ typedef struct { uint8_t dest_mac[6]; /**< Destination MAC address */ bool no_ack; /**< Indicates no ack required */ wifi_action_rx_cb_t rx_cb; /**< Rx Callback to receive any response */ + uint8_t op_id; /**< Unique Identifier for operation provided by wifi driver */ uint32_t data_len; /**< Length of the appended Data */ uint8_t data[0]; /**< Appended Data payload */ } wifi_action_tx_req_t; +/** Status codes for WIFI_EVENT_ROC_DONE evt */ +typedef enum { + WIFI_ROC_DONE = 0, /**< ROC operation was completed successfully */ + WIFI_ROC_FAIL, /**< ROC operation was cancelled */ +} wifi_roc_done_status_t; + +/** + * @brief The callback function executed when ROC operation has ended + * + * @param context rxcb registered for the corresponding ROC operation + * @param op_id ID of the corresponding ROC operation + * @param status status code of the ROC operation denoted + * + */ +typedef void (* wifi_action_roc_done_cb_t)(uint32_t context, uint8_t op_id, + wifi_roc_done_status_t status); + +/** + * @brief Remain on Channel request + * + * + */ +typedef struct { + wifi_interface_t ifx; /**< WiFi interface to send request to */ + uint8_t type; /**< ROC operation type */ + uint8_t channel; /**< Channel on which to perform ROC Operation */ + uint32_t wait_time_ms; /**< Duration to wait for on target channel */ + wifi_action_rx_cb_t rx_cb; /**< Rx Callback to receive any response */ + uint8_t op_id; /**< ID of this specific ROC operation provided by wifi driver */ + wifi_action_roc_done_cb_t done_cb; /**< Callback to function that will be called upon ROC done. If assigned, WIFI_EVENT_ROC_DONE event will not be posted */ +} wifi_roc_req_t; + /** * @brief FTM Initiator configuration * @@ -1198,21 +1231,30 @@ typedef struct { #define WIFI_STATIS_PS (1<<4) /**< Power save status */ #define WIFI_STATIS_ALL (-1) /**< All status */ -/** - * @brief Argument structure for WIFI_EVENT_ACTION_TX_STATUS event - */ +/** Status codes for WIFI_EVENT_ACTION_TX_STATUS evt */ +typedef enum { + WIFI_ACTION_TX_DONE = 0, /**< ACTION_TX operation was completed successfully */ + WIFI_ACTION_TX_FAILED, /**< ACTION_TX operation failed during tx */ + WIFI_ACTION_TX_DURATION_COMPLETED, /**< ACTION_TX operation completed it's wait duration */ + WIFI_ACTION_TX_OP_CANCELLED, /**< ACTION_TX operation was cancelled by application or higher priority operation */ +} wifi_action_tx_status_type_t; + +/** Argument structure for WIFI_EVENT_ACTION_TX_STATUS event */ typedef struct { - wifi_interface_t ifx; /**< Wi-Fi interface to send request to */ - uint32_t context; /**< Context to identify the request */ - uint8_t da[6]; /**< Destination MAC address */ - uint8_t status; /**< Status of the operation */ + wifi_interface_t ifx; /**< WiFi interface to send request to */ + uint32_t context; /**< Context to identify the request */ + wifi_action_tx_status_type_t status; /**< Status of the operation */ + uint8_t op_id; /**< ID of the corresponding operation that was provided during action tx request */ + uint8_t channel; /**< Channel provided in tx request */ } wifi_event_action_tx_status_t; /** * @brief Argument structure for WIFI_EVENT_ROC_DONE event */ typedef struct { - uint32_t context; /**< Context to identify the request */ + uint32_t context; /**< Context to identify the initiator of the request */ + wifi_roc_done_status_t status; /**< API request Identifier provided in ROC req */ + uint8_t op_id; /**< ID of the corresponding ROC operation */ } wifi_event_roc_done_t; /** diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h index e18f5c7e78..c5d64eb1ad 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h @@ -285,9 +285,8 @@ esp_err_t esp_wifi_register_mgmt_frame_internal(uint32_t type, uint32_t subtype) esp_err_t esp_wifi_send_mgmt_frm_internal(const wifi_mgmt_frm_req_t *req); uint8_t esp_wifi_ap_get_prof_pairwise_cipher_internal(void); esp_err_t esp_wifi_action_tx_req(uint8_t type, uint8_t channel, - uint32_t wait_time_ms, const wifi_action_tx_req_t *req); -esp_err_t esp_wifi_remain_on_channel(uint8_t ifx, uint8_t type, uint8_t channel, - uint32_t wait_time_ms, wifi_action_rx_cb_t rx_cb); + uint32_t wait_time_ms, wifi_action_tx_req_t *req); +esp_err_t esp_wifi_remain_on_channel(wifi_roc_req_t * req); bool esp_wifi_is_mbo_enabled_internal(uint8_t if_index); void esp_wifi_get_pmf_config_internal(wifi_pmf_config_t *pmf_cfg, uint8_t ifx); bool esp_wifi_is_ft_enabled_internal(uint8_t if_index);