aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorRaja Mani <rmani@qca.qualcomm.com>2013-02-07 13:24:53 (GMT)
committerJouni Malinen <j@w1.fi>2013-02-07 13:24:53 (GMT)
commit3140803b6d004c32c9e1bbb6288d04a14eb75a9b (patch)
treeafc75439844eed2386a41e64b1e0e5e6309d527c /wpa_supplicant/events.c
parent409ca9a84daee279d743d87f9b78d61ecccbc401 (diff)
downloadhostap-3140803b6d004c32c9e1bbb6288d04a14eb75a9b.zip
hostap-3140803b6d004c32c9e1bbb6288d04a14eb75a9b.tar.gz
hostap-3140803b6d004c32c9e1bbb6288d04a14eb75a9b.tar.bz2
nl80211: Add ctrl_iface message for AP mode connection rejection
When AP mode operation reject the client, nl80211 layer advertises the connect failed event with the reason for failures (for example, max client reached, etc.) using NL80211_CMD_CONN_FAILED. This patch adds some debug messages whenever such an event is received from the nl80211 layer and also the same event is posted to the upper layer via wpa_msg(). Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 3196352..c3e54d3 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2962,6 +2962,16 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
wpas_wps_start_pbc(wpa_s, NULL, 0);
#endif /* CONFIG_WPS */
break;
+ case EVENT_CONNECT_FAILED_REASON:
+#ifdef CONFIG_AP
+ if (!wpa_s->ap_iface || !data)
+ break;
+ hostapd_event_connect_failed_reason(
+ wpa_s->ap_iface->bss[0],
+ data->connect_failed_reason.addr,
+ data->connect_failed_reason.code);
+#endif /* CONFIG_AP */
+ break;
default:
wpa_msg(wpa_s, MSG_INFO, "Unknown event %d", event);
break;