*/
struct pasn_auth pasn_auth;
+ /**
+ * struct port_authorized - Data for EVENT_PORT_AUTHORIZED
+ */
+ struct port_authorized {
+ const u8 *td_bitmap;
+ size_t td_bitmap_len;
+ } port_authorized;
};
/**
struct nlattr **tb)
{
const u8 *addr;
+ union wpa_event_data event;
+
+ os_memset(&event, 0, sizeof(event));
if (!tb[NL80211_ATTR_MAC] ||
nla_len(tb[NL80211_ATTR_MAC]) != ETH_ALEN) {
return;
}
- wpa_supplicant_event(drv->ctx, EVENT_PORT_AUTHORIZED, NULL);
+ if (tb[NL80211_ATTR_TD_BITMAP]) {
+ event.port_authorized.td_bitmap_len =
+ nla_len(tb[NL80211_ATTR_TD_BITMAP]);
+ if (event.port_authorized.td_bitmap_len > 0)
+ event.port_authorized.td_bitmap =
+ nla_data(tb[NL80211_ATTR_TD_BITMAP]);
+ }
+
+ wpa_supplicant_event(drv->ctx, EVENT_PORT_AUTHORIZED, &event);
}
break;
#endif /* CONFIG_PASN */
case EVENT_PORT_AUTHORIZED:
+#ifndef CONFIG_NO_WPA
+ if (data->port_authorized.td_bitmap_len) {
+ wpa_printf(MSG_DEBUG,
+ "WPA3: Transition Disable bitmap from the driver event: 0x%x",
+ data->port_authorized.td_bitmap[0]);
+ wpas_transition_disable(
+ wpa_s, data->port_authorized.td_bitmap[0]);
+ }
+#endif /* CONFIG_NO_WPA */
wpa_supplicant_event_port_authorized(wpa_s);
break;
case EVENT_STATION_OPMODE_CHANGED:
}
-static void wpa_supplicant_transition_disable(void *_wpa_s, u8 bitmap)
+void wpas_transition_disable(struct wpa_supplicant *wpa_s, u8 bitmap)
{
- struct wpa_supplicant *wpa_s = _wpa_s;
struct wpa_ssid *ssid;
int changed = 0;
}
+static void wpa_supplicant_transition_disable(void *_wpa_s, u8 bitmap)
+{
+ struct wpa_supplicant *wpa_s = _wpa_s;
+ wpas_transition_disable(wpa_s, bitmap);
+}
+
+
static void wpa_supplicant_store_ptk(void *ctx, u8 *addr, int cipher,
u32 life_time, const struct wpa_ptk *ptk)
{
void wpas_send_ctrl_req(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
const char *field_name, const char *txt);
+void wpas_transition_disable(struct wpa_supplicant *wpa_s, u8 bitmap);
+
#endif /* WPAS_GLUE_H */