[PATCH] P2P: Remove P2P GO interface on INTERFACE_DISABLED

Jouni Malinen j
Sun Nov 24 02:32:03 PST 2013


On Sun, Sep 01, 2013 at 07:38:45PM +0000, Peer, Ilan wrote:
> The use case was triggering rfkill (both SW and HW). This case popped up as part of a testing cycle, where after a toggle in the rfkill state, the result was that the interface was not deleted, but on the other hand the wpa_supplicant did not configure the kernel to re-start the ap functionality again. To fix this, we could have either fixed the flow to reconfigured the kernel to re-start the AP functionality again, or to entirely remove the interface. Assuming that that a P2P group is usually setup for specific use case, i.e., file transfer or WFD, once a P2P group interface is externally disabled, it did not make sense to keep the interface, but rely on the external user to setup it up again in case it was needed. Hope that his make sense.

OK, that makes sense.

> > >  	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?
> 
> Missed this one. Does deleting the network block in case that it is marked as temporary is a sufficient solution? 

No, both of these cases need to do same, i.e., call
wpas_p2p_disconnect() (which will result in removing that network block,
but also indicating the expected events about group removal). I'll fix
this when committing the patch.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list