Search Linux Wireless

Re: [PATCH] wl12xx: trigger recovery for failures in sched scan stop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 21, 2011 at 2:06 PM, Eyal Shapira <eyal@xxxxxxxxxx> wrote:
> mac80211 requires that drv_sched_scan_stop
> will always succeed. We have a few possible errors
> such as OOM, failure to ELP wakeup, fail in the FW command.
> Instead of no-op , trigger a recovery which would
> mark sched scan as stopped and clear up any bad FW state.
>
> Signed-off-by: Eyal Shapira <eyal@xxxxxxxxxx>
> ---
this patch seems a bit redundant.

>        ret = wl1271_ps_elp_wakeup(wl);
> -       if (ret < 0)
> +       if (ret < 0) {
> +               wl12xx_queue_recovery_work(wl);
>                goto out;
> +       }
>
we enqueue recovery in wl1271_ps_elp_wakeup() in most error paths.


> -       /* FIXME: what to do if alloc'ing to stop fails? */
>        stop = kzalloc(sizeof(*stop), GFP_KERNEL);
>        if (!stop) {
>                wl1271_error("failed to alloc memory to send sched scan stop");
> -               return;
> +               goto recovery;
>        }
not sure if initiating recovery here will really help. it'll probably
fail as well, and good chances we are going to panic soon anyway :)

>        ret = wl1271_cmd_send(wl, CMD_STOP_PERIODIC_SCAN, stop,
>                              sizeof(*stop), 0);
> +
> +       kfree(stop);
> +
>        if (ret < 0) {
>                wl1271_error("failed to send sched scan stop command");
> -               goto out_free;
> +               goto recovery;
>        }
>
wl1271_cmd_send enqueues recovery work on error as well.

anyway, the major thing i don't like here is handling the sched_stop
in a different manner than the rest of the commands.

Eliad.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux