[PATCH] P2P: Remove P2P GO interface on INTERFACE_DISABLED
Jouni Malinen
j
Sun Aug 25 01:08:06 PDT 2013
On Wed, Aug 07, 2013 at 01:08:41PM +0300, Ilan Peer wrote:
> Disconnect a P2P GO interface when the interface is being disabled.
Could you please describe what the use case is for this? The only case
where EVENT_INTERFACE_DISABLED would show up during GO operation would
be when something external sets the group interface down. Why would that
terminate the group? Why is that something external not terminating the
group through existing means?
> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> @@ -2566,6 +2566,9 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
> {
> struct wpa_supplicant *wpa_s = ctx;
>
> + if (!wpa_s)
> + return;
> +
> if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED &&
This looks completely independent change and something that should not
be needed in the first place. Where is wpa_supplicant_event() called
with ctx == NULL?
> @@ -3030,6 +3033,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
> break;
> case EVENT_INTERFACE_DISABLED:
> wpa_dbg(wpa_s, MSG_DEBUG, "Interface was disabled");
> +#ifdef CONFIG_P2P
> + if (wpa_s->p2p_group_interface ==
> + P2P_GROUP_INTERFACE_GO) {
> + wpas_p2p_disconnect(wpa_s);
> + break;
> + }
> +#endif /* CONFIG_P2P */
This would cover only the case of a separate P2P group interface.
Shouldn't the use-wlan0-netdev-for-group case behave consistently?
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list