2013-11-28 02:40:27

by Matt Chen

[permalink] [raw]
Subject: Re: [PATCH] mac80211: save parsing elem if channel is disabled

Does this patch make sense to you all ?

2013/11/25 Matt Chen <[email protected]>:
> It is possible to save parsing element time
> if we find the channel is disabled.
>
> Acked-by: Matt Chen <[email protected]>
> ---
> net/mac80211/scan.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
> index 5ad66a8..7369557 100644
> --- a/net/mac80211/scan.c
> +++ b/net/mac80211/scan.c
> @@ -198,13 +198,13 @@ void ieee80211_scan_rx(struct ieee80211_local *local, struct sk_buff *skb)
> if (baselen > skb->len)
> return;
>
> - ieee802_11_parse_elems(elements, skb->len - baselen, false, &elems);
> -
> channel = ieee80211_get_channel(local->hw.wiphy, rx_status->freq);
>
> if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
> return;
>
> + ieee802_11_parse_elems(elements, skb->len - baselen, false, &elems);
> +
> bss = ieee80211_bss_info_update(local, rx_status,
> mgmt, skb->len, &elems,
> channel);
> --
> 1.7.12.4
>
>