Skip to contentSkip to conversation

mac80211: save parsing elem if channel is disabled

PATCH Matt Chen 1 participant 1 message Nov 28, 2013 1 message not in the archive

lore
Share & tools
lore

Matt Chen

author
#1 lore raw
In reply to a message not in the archive

Does this patch make sense to you all ?

2013/11/25 Matt Chen <[email protected]>:

Quoted 32 lines

It is possible to save parsing element time
if we find the channel is disabled.

---
 net/mac80211/scan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/mac80211/scan.c +2 -3
index 5ad66a8..7369557 100644
@@ -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