esp_wifi: Add support for NAN Discovery and Datapath

Update wifi lib with below -
1. Create NAN Discovery SM for beaconing & cluster formation
2. Create NAN interface for Tx/Rx of beacons & action frames
3. Add commands & events for NAN Services Publish/Subscribe/Followup
4. Add NAN Datapath definitions, Events, Peer structures
5. Support for forming and parsing of Datapath related attributes
6. Modules for NDP Req, Resp, Confirm, Term, Peer management
7. NAN Interface related additions in Datapath, Data Tx Q's

In addition include below changes -
1. Add netif and driver support for NAN Interface
2. Add simple examples for Publisher-Subscriber usecases
3. Add an advanced console example that supports commands
   for NAN Discovery, Services & Datapath
4. Add wifi_apps for providing better NAN API's and Peer management

Co-authored-by: Shyamal Khachane <shyamal.khachane@espressif.com>
This commit is contained in:
Nachiket Kukade
2023-02-14 10:06:40 +05:30
parent cec892d355
commit 4c76af3f68
53 changed files with 3302 additions and 43 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -46,6 +46,13 @@ static esp_err_t wifi_ap_receive(void *buffer, uint16_t len, void *eb)
}
#endif
#ifdef CONFIG_ESP_WIFI_NAN_ENABLE
static esp_err_t wifi_nan_receive(void *buffer, uint16_t len, void *eb)
{
return s_wifi_rxcbs[WIFI_IF_NAN](s_wifi_netifs[WIFI_IF_NAN], buffer, len, eb);
}
#endif
static void wifi_free(void *h, void* buffer)
{
if (buffer) {
@@ -146,6 +153,12 @@ esp_err_t esp_wifi_register_if_rxcb(wifi_netif_driver_t ifx, esp_netif_receive_t
break;
#endif
#ifdef CONFIG_ESP_WIFI_NAN_ENABLE
case WIFI_IF_NAN:
rxcb = wifi_nan_receive;
break;
#endif
default:
break;
}