mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 02:20:57 +02:00
fix(esp_wifi): Partially revert NAN event API change from b0498569c8
This commit is contained in:
@@ -1366,7 +1366,7 @@ typedef struct {
|
|||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint8_t ssi_version; /**< Indicates version of SSI in Publish instance, 0 if not available */
|
uint8_t ssi_version; /**< Indicates version of SSI in Publish instance, 0 if not available */
|
||||||
uint16_t ssi_len; /**< Length of service specific info */
|
uint16_t ssi_len; /**< Length of service specific info */
|
||||||
uint8_t *ssi; /**< Service specific info of Publisher */
|
uint8_t ssi[]; /**< Service specific info of Publisher */
|
||||||
} wifi_event_nan_svc_match_t;
|
} wifi_event_nan_svc_match_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1379,7 +1379,7 @@ typedef struct {
|
|||||||
uint32_t reserved_1; /**< Reserved */
|
uint32_t reserved_1; /**< Reserved */
|
||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of service specific info */
|
uint16_t ssi_len; /**< Length of service specific info */
|
||||||
uint8_t *ssi; /**< Service specific info of Subscriber */
|
uint8_t ssi[]; /**< Service specific info of Subscriber */
|
||||||
} wifi_event_nan_replied_t;
|
} wifi_event_nan_replied_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1392,7 +1392,7 @@ typedef struct {
|
|||||||
uint32_t reserved_1; /**< Reserved */
|
uint32_t reserved_1; /**< Reserved */
|
||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of service specific info */
|
uint16_t ssi_len; /**< Length of service specific info */
|
||||||
uint8_t *ssi; /**< Service specific info from Follow-up */
|
uint8_t ssi[]; /**< Service specific info from Follow-up */
|
||||||
} wifi_event_nan_receive_t;
|
} wifi_event_nan_receive_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1406,7 +1406,7 @@ typedef struct {
|
|||||||
uint32_t reserved_1; /**< Reserved */
|
uint32_t reserved_1; /**< Reserved */
|
||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of service specific info */
|
uint16_t ssi_len; /**< Length of service specific info */
|
||||||
uint8_t *ssi; /**< Service specific info from NDP/NDPE Attribute */
|
uint8_t ssi[]; /**< Service specific info from NDP/NDPE Attribute */
|
||||||
} wifi_event_ndp_indication_t;
|
} wifi_event_ndp_indication_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1421,7 +1421,7 @@ typedef struct {
|
|||||||
uint32_t reserved_1; /**< Reserved */
|
uint32_t reserved_1; /**< Reserved */
|
||||||
uint32_t reserved_2; /**< Reserved */
|
uint32_t reserved_2; /**< Reserved */
|
||||||
uint16_t ssi_len; /**< Length of Service Specific Info */
|
uint16_t ssi_len; /**< Length of Service Specific Info */
|
||||||
uint8_t *ssi; /**< Service specific info from NDP/NDPE Attribute */
|
uint8_t ssi[]; /**< Service specific info from NDP/NDPE Attribute */
|
||||||
} wifi_event_ndp_confirm_t;
|
} wifi_event_ndp_confirm_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -474,7 +474,6 @@ void nan_app_service_match_cb(uint8_t sub_id, uint8_t pub_id, uint8_t pub_mac[6]
|
|||||||
if (ssi_ver) {
|
if (ssi_ver) {
|
||||||
evt->ssi_version = ssi_ver;
|
evt->ssi_version = ssi_ver;
|
||||||
}
|
}
|
||||||
evt->ssi = (uint8_t *)(evt + 1);
|
|
||||||
memcpy(evt->ssi, ssi, ssi_len);
|
memcpy(evt->ssi, ssi, ssi_len);
|
||||||
evt->ssi_len = ssi_len;
|
evt->ssi_len = ssi_len;
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, ssi, ssi_len, ESP_LOG_DEBUG);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, ssi, ssi_len, ESP_LOG_DEBUG);
|
||||||
@@ -508,7 +507,6 @@ void nan_app_replied_cb(uint8_t pub_id, uint8_t sub_id, uint8_t sub_nmi[6], uint
|
|||||||
|
|
||||||
ESP_LOGI(TAG, "Sent Publish to Peer "MACSTR" [Peer Subscribe id - %d]", MAC2STR(sub_nmi), sub_id);
|
ESP_LOGI(TAG, "Sent Publish to Peer "MACSTR" [Peer Subscribe id - %d]", MAC2STR(sub_nmi), sub_id);
|
||||||
if (ssi && ssi_len) {
|
if (ssi && ssi_len) {
|
||||||
evt->ssi = (uint8_t *)(evt + 1);
|
|
||||||
memcpy(evt->ssi, ssi, ssi_len);
|
memcpy(evt->ssi, ssi, ssi_len);
|
||||||
evt->ssi_len = ssi_len;
|
evt->ssi_len = ssi_len;
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, ssi, ssi_len, ESP_LOG_DEBUG);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, ssi, ssi_len, ESP_LOG_DEBUG);
|
||||||
@@ -537,7 +535,6 @@ void nan_app_receive_cb(uint8_t svc_id, uint8_t peer_svc_id, uint8_t peer_mac[6]
|
|||||||
evt->peer_inst_id = peer_svc_id;
|
evt->peer_inst_id = peer_svc_id;
|
||||||
MACADDR_COPY(evt->peer_if_mac, peer_mac);
|
MACADDR_COPY(evt->peer_if_mac, peer_mac);
|
||||||
if (ssi && ssi_len) {
|
if (ssi && ssi_len) {
|
||||||
evt->ssi = (uint8_t *)(evt + 1);
|
|
||||||
memcpy(evt->ssi, ssi, ssi_len);
|
memcpy(evt->ssi, ssi, ssi_len);
|
||||||
evt->ssi_len = ssi_len;
|
evt->ssi_len = ssi_len;
|
||||||
ESP_LOGD(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(peer_mac), peer_svc_id);
|
ESP_LOGD(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(peer_mac), peer_svc_id);
|
||||||
@@ -593,7 +590,6 @@ void nan_app_ndp_indication_cb(uint8_t pub_id, uint8_t ndp_id, uint8_t peer_nmi[
|
|||||||
MACADDR_COPY(evt->peer_nmi, peer_nmi);
|
MACADDR_COPY(evt->peer_nmi, peer_nmi);
|
||||||
MACADDR_COPY(evt->peer_ndi, peer_ndi);
|
MACADDR_COPY(evt->peer_ndi, peer_ndi);
|
||||||
if (ssi && ssi_len) {
|
if (ssi && ssi_len) {
|
||||||
evt->ssi = (uint8_t *)(evt + 1);
|
|
||||||
memcpy(evt->ssi, ssi, ssi_len);
|
memcpy(evt->ssi, ssi, ssi_len);
|
||||||
evt->ssi_len = ssi_len;
|
evt->ssi_len = ssi_len;
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, ssi, ssi_len, ESP_LOG_DEBUG);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, ssi, ssi_len, ESP_LOG_DEBUG);
|
||||||
@@ -653,7 +649,6 @@ void nan_app_ndp_confirm_cb(uint8_t status, uint8_t ndp_id, uint8_t peer_nmi[6],
|
|||||||
MACADDR_COPY(evt->peer_ndi, peer_ndi);
|
MACADDR_COPY(evt->peer_ndi, peer_ndi);
|
||||||
MACADDR_COPY(evt->own_ndi, own_ndi);
|
MACADDR_COPY(evt->own_ndi, own_ndi);
|
||||||
if (ssi && ssi_len) {
|
if (ssi && ssi_len) {
|
||||||
evt->ssi = (uint8_t *)(evt + 1);
|
|
||||||
memcpy(evt->ssi, ssi, ssi_len);
|
memcpy(evt->ssi, ssi, ssi_len);
|
||||||
evt->ssi_len = ssi_len;
|
evt->ssi_len = ssi_len;
|
||||||
ESP_LOG_BUFFER_HEXDUMP(TAG, ssi, ssi_len, ESP_LOG_DEBUG);
|
ESP_LOG_BUFFER_HEXDUMP(TAG, ssi, ssi_len, ESP_LOG_DEBUG);
|
||||||
|
Reference in New Issue
Block a user