* EVENT_SETUP_LINK_RECONFIG - Notification that new AP links added
*/
EVENT_SETUP_LINK_RECONFIG,
+
+ /**
+ * EVENT_NAN_CLUSTER_JOIN - Notification of a new cluster having been
+ * joined or started.
+ *
+ * This event is used to notify wpa_supplicant that a NAN cluster has
+ * been joined or started. The event data includes the NAN cluster ID
+ * and a boolean indicating whether a new cluster was started or an
+ * existing cluster was joined.
+ *
+ * Described in wpa_event_data.nan_cluster_join_info.
+ */
+ EVENT_NAN_CLUSTER_JOIN,
+
+ /**
+ * EVENT_NAN_NEXT_DW - Notification of NAN next Discovery Window
+ *
+ * This event is used to notify wpa_supplicant that the device/driver
+ * is ready for the next Discovery Window (DW) frames. It may be used
+ * to trigger transmission of multicast SDFs (active subscribe and
+ * unsolicited publish).
+ * The event data includes the DW frequency.
+ */
+ EVENT_NAN_NEXT_DW,
};
const u8 *resp_ie; /* Starting from Group Key Data */
size_t resp_ie_len;
} reconfig_info;
+
+ struct nan_cluster_join_info {
+ const u8 *bssid;
+ bool new_cluster;
+ } nan_cluster_join_info;
+
+ struct nan_next_dw_info {
+ int freq;
+ } nan_next_dw_info;
};
/**
E2S(LINK_RECONFIG);
E2S(MLD_INTERFACE_FREED);
E2S(SETUP_LINK_RECONFIG);
+ E2S(NAN_CLUSTER_JOIN);
+ E2S(NAN_NEXT_DW);
}
return "UNKNOWN";
if (data)
wpas_setup_link_reconfig(wpa_s, &data->reconfig_info);
break;
+#ifdef CONFIG_NAN
+ case EVENT_NAN_CLUSTER_JOIN:
+ wpas_nan_cluster_join(wpa_s, data->nan_cluster_join_info.bssid,
+ data->nan_cluster_join_info.new_cluster);
+ break;
+ case EVENT_NAN_NEXT_DW:
+ wpas_nan_next_dw(wpa_s, data->nan_next_dw_info.freq);
+ break;
+#endif /* CONFIG_NAN */
default:
wpa_msg(wpa_s, MSG_INFO, "Unknown event %d", event);
break;
nan_flush(wpa_s->nan);
}
+
+
+void wpas_nan_cluster_join(struct wpa_supplicant *wpa_s,
+ const u8 *cluster_id,
+ bool new_cluster)
+{
+ if (!wpas_nan_ready(wpa_s))
+ return;
+
+ /* TODO: Handle cluster merge */
+ wpa_printf(MSG_DEBUG, "NAN: Joined cluster " MACSTR " (new: %d)",
+ MAC2STR(cluster_id), new_cluster);
+}
+
+
+void wpas_nan_next_dw(struct wpa_supplicant *wpa_s, u32 freq)
+{
+ if (!wpas_nan_ready(wpa_s))
+ return;
+
+ /* TODO: Handle DW notification */
+ wpa_printf(MSG_DEBUG, "NAN: Next DW notification freq=%d", freq);
+}
int wpas_nan_start(struct wpa_supplicant *wpa_s);
int wpas_nan_stop(struct wpa_supplicant *wpa_s);
void wpas_nan_flush(struct wpa_supplicant *wpa_s);
+void wpas_nan_cluster_join(struct wpa_supplicant *wpa_s,
+ const u8 *cluster_id,
+ bool new_cluster);
+void wpas_nan_next_dw(struct wpa_supplicant *wpa_s, u32 freq);
#else /* CONFIG_NAN */