[PATCH] Android: Fix bgscan-start / bgscan-stop call

Jouni Malinen j
Tue Nov 29 11:48:48 PST 2011


On Tue, Nov 29, 2011 at 10:26:27AM -0800, Dmitry Shmidt wrote:
> On Tue, Nov 29, 2011 at 3:03 AM, Jouni Malinen <j at w1.fi> wrote:
> > On Mon, Nov 28, 2011 at 05:07:26PM -0800, Dmitry Shmidt wrote:
> >> @@ -3377,10 +3378,12 @@ static int wpa_supplicant_driver_cmd(struct wpa_supplicant *wpa_s, char *cmd,
> >>
> >> ?#ifdef ANDROID
> >> ? ? ? if (os_strcasecmp(cmd, "BGSCAN-START") == 0)
> >> - ? ? ? ? ? ? return pno_start(wpa_s);
> >> + ? ? ? ? ? ? ret = pno_start(wpa_s);
> >> +
> >> + ? ? else if (os_strcasecmp(cmd, "BGSCAN-STOP") == 0)
> >> + ? ? ? ? ? ? ret = pno_stop(wpa_s);
> >>
> >> - ? ? if (os_strcasecmp(cmd, "BGSCAN-STOP") == 0)
> >> - ? ? ? ? ? ? return pno_stop(wpa_s);
> >> + ? ? else
> >> ?#endif /* ANDROID */
> >>
> >> ? ? ? ret = wpa_drv_driver_cmd(wpa_s, cmd, buf, buflen);

> The point here to return proper status in the return buffer. ("Ok" in
> this case or "Fail").

Ah. Sorry, obviously I cannot read anymore.. ;-) I missed the last
"else" there going across #endif and the context in the patch ended just
before the key functionality. I applied this now with the ifdef block
removed so that this is easier to read.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list