Search Linux Wireless

Re: [PATCH 3/3] mac80211: fix channel context iteration

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

 



On Fri, Dec 14, 2012 at 1:59 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> During suspend/resume channel contexts might be
> iterated even if they haven't been re-added to
> the driver, keep track of this and skip them in
> iteration. Also use the new status for sanity
> checks.
>
> Change-Id: Ibac29191dcc24578d56565c36a543d7a9733be10
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> ---
>  net/mac80211/chan.c        |  3 ++-
>  net/mac80211/driver-ops.h  | 15 ++++++++++++---
>  net/mac80211/ieee80211_i.h |  1 +
>  3 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
> index 80e5552..1bfe0a8 100644
> --- a/net/mac80211/chan.c
> +++ b/net/mac80211/chan.c
> @@ -381,7 +381,8 @@ void ieee80211_iter_chan_contexts_atomic(
>
>         rcu_read_lock();
>         list_for_each_entry_rcu(ctx, &local->chanctx_list, list)
> -               iter(hw, &ctx->conf, iter_data);
> +               if (ctx->driver_present)
> +                       iter(hw, &ctx->conf, iter_data);
>         rcu_read_unlock();
>  }
this will behave differently on hw restart (as ctx->driver_present
will remain true).
at least worth documenting :)

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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux