|
@@ -13,6 +13,7 @@
|
|
#include "drivers/driver.h"
|
|
#include "drivers/driver.h"
|
|
#include "common/ieee802_11_defs.h"
|
|
#include "common/ieee802_11_defs.h"
|
|
#include "common/ieee802_11_common.h"
|
|
#include "common/ieee802_11_common.h"
|
|
|
|
+#include "common/wpa_ctrl.h"
|
|
#include "crypto/random.h"
|
|
#include "crypto/random.h"
|
|
#include "p2p/p2p.h"
|
|
#include "p2p/p2p.h"
|
|
#include "wps/wps.h"
|
|
#include "wps/wps.h"
|
|
@@ -393,6 +394,22 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+void hostapd_event_connect_failed_reason(struct hostapd_data *hapd,
|
|
|
|
+ const u8 *addr, int reason_code)
|
|
|
|
+{
|
|
|
|
+ switch (reason_code) {
|
|
|
|
+ case MAX_CLIENT_REACHED:
|
|
|
|
+ wpa_msg(hapd->msg_ctx, MSG_INFO, AP_REJECTED_MAX_STA MACSTR,
|
|
|
|
+ MAC2STR(addr));
|
|
|
|
+ break;
|
|
|
|
+ case BLOCKED_CLIENT:
|
|
|
|
+ wpa_msg(hapd->msg_ctx, MSG_INFO, AP_REJECTED_BLOCKED_STA MACSTR,
|
|
|
|
+ MAC2STR(addr));
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
|
|
int hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa, const u8 *da,
|
|
const u8 *bssid, const u8 *ie, size_t ie_len,
|
|
const u8 *bssid, const u8 *ie, size_t ie_len,
|
|
int ssi_signal)
|
|
int ssi_signal)
|
|
@@ -828,6 +845,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|
data->ch_switch.ht_enabled,
|
|
data->ch_switch.ht_enabled,
|
|
data->ch_switch.ch_offset);
|
|
data->ch_switch.ch_offset);
|
|
break;
|
|
break;
|
|
|
|
+ case EVENT_CONNECT_FAILED_REASON:
|
|
|
|
+ if (!data)
|
|
|
|
+ break;
|
|
|
|
+ hostapd_event_connect_failed_reason(
|
|
|
|
+ hapd, data->connect_failed_reason.addr,
|
|
|
|
+ data->connect_failed_reason.code);
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
|
|
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
|
|
break;
|
|
break;
|