[RFC 26/40] wpas: add notification functions for STA authorized
Johannes Berg
johannes
Thu Feb 24 12:47:21 PST 2011
On Thu, 2011-02-24 at 22:43 +0200, Jouni Malinen wrote:
> On Wed, Jan 05, 2011 at 08:53:22PM +0100, Johannes Berg wrote:
> > diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
>
> > +void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
> > + const u8 *mac_addr, int authorized)
> > +{
> > +#ifdef CONFIG_P2P
> > + if (authorized)
> > + wpas_notify_p2p_peer_joined(wpa_s, mac_addr);
> > + else
> > + wpas_notify_p2p_peer_disconnected(wpa_s, mac_addr);
> > +#endif
>
> Adding sta_authorized notification itself is fine, but that #ifdef
> CONFIG_P2P is not going to make this in any way mean that the
> p2p_peer_{joined,disconnected} notifications were really specific to
> P2P. Is there any particular reason to try to make this apply for P2P GO
> case only or would it be fine to rename these to
> station_{connected,disconnected} for any AP use?
Yeah, you're right -- this makes no sense. It can be generic, the p2p
dbus functions it calls will all check whether it's actually P2P Dbus or
not based on whether it was a group that was added via P2P.
johannes
More information about the Hostap
mailing list