mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-14 14:06:54 +00:00
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:
@@ -19,6 +19,9 @@
|
||||
#include "esp_coexist_internal.h"
|
||||
#include "esp_phy_init.h"
|
||||
#include "esp_private/phy.h"
|
||||
#ifdef CONFIG_ESP_WIFI_NAN_ENABLE
|
||||
#include "apps_private/wifi_apps_private.h"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_ESP_WIFI_RX_BA_WIN > CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM)
|
||||
#error "WiFi configuration check: WARNING, WIFI_RX_BA_WIN should not be larger than WIFI_DYNAMIC_RX_BUFFER_NUM!"
|
||||
@@ -127,6 +130,10 @@ esp_err_t esp_wifi_deinit(void)
|
||||
ESP_LOGW(TAG, "Failed to unregister Rx callbacks");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESP_WIFI_NAN_ENABLE
|
||||
esp_nan_app_deinit();
|
||||
#endif
|
||||
|
||||
esp_supplicant_deinit();
|
||||
err = esp_wifi_deinit_internal();
|
||||
if (err != ESP_OK) {
|
||||
@@ -305,6 +312,11 @@ esp_err_t esp_wifi_init(const wifi_init_config_t *config)
|
||||
adc2_cal_include(); //This enables the ADC2 calibration constructor at start up.
|
||||
|
||||
esp_wifi_config_info();
|
||||
|
||||
#ifdef CONFIG_ESP_WIFI_NAN_ENABLE
|
||||
esp_nan_app_init();
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -337,3 +349,30 @@ void net80211_softap_funcs_init(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ESP_WIFI_NAN_ENABLE
|
||||
|
||||
esp_err_t nan_start(void)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t nan_stop(void)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
int nan_input(void *p1, int p2, int p3)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nan_sm_handle_event(void *p1, int p2)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user