Problem with disconnect and reconnect
dcbw at redhat.com
Mon Apr 27 16:57:11 EDT 2015
On Mon, 2015-04-27 at 13:46 -0700, Marlon Smith wrote:
> I've tried calling disconnect() before removing the network, but I get
> the same result. Calling disconnect() puts the state into
> interface_disabled, and I have to restart wpa_supplicant in order to
Your app may need to set IFF_UP on the interface (outside of the
supplicant) before attempting the AddNetwork/SelectNetwork/Scan
operations. It appears that something is removing the IFF_UP flag, be
that the mac80211 stack, cfg80211, the driver itself, or the supplicant.
I looked at wpa_supplicant 2.4 and couldn't find anywhere the supplicant
would do it, nor does rtl2x00 seem to do it anywhere. There are a
couple places in mac80211 and cfg80211 that do so, but those are
typically in response to a "reconfig failure" or removing all
interfaces. In any case, this is what's happening, and if it's not
possible to track down what's causing it, just setting the interface
IFF_UP in your app should work around it.
> On Mon, 2015-04-27 at 21:58 +0200, Floris Bos wrote:
> > On 04/27/2015 09:44 PM, Marlon Smith wrote:
> > >
> > > I'm using wpa_supplicant with nl80211 and the rt2800usb driver in my
> > > application, which allows user to connect to a network or create an
> > > access point. I'm using the dbus interface of wpa_supplicant to
> > > control the connection.
> > >
> > > The user is able to enable/disable the connection via a menu, and
> > > when they do I use AddNetwork and SelectNetwork to connect, and
> > > RemoveNetwork to disconnect.
> > Might want to use Disconnect() to disconnect.
> > Yours sincerely,
> > Floris Bos
> > _______________________________________________
> > HostAP mailing list
> > HostAP at lists.shmoo.com
> > http://lists.shmoo.com/mailman/listinfo/hostap
> HostAP mailing list
> HostAP at lists.shmoo.com
More information about the HostAP