Search Linux Wireless

Re: [RFC 3/3] mac80211: redesign scan RX

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

 



On Sat, Jul 7, 2012 at 12:05 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> Scan receive is rather inefficient when there are
> multiple virtual interfaces. We iterate all of the
> virtual interfaces and then notify cfg80211 about
> each beacon many times.
>
> Redesign scan RX to happen before everything else.
> Then we can also get rid of IEEE80211_RX_IN_SCAN
> since we don't have to accept frames into the RX
> handlers for scanning or scheduled scanning any
> more. Overall, this simplifies the code.
>
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> ---
[...]

> +       sdata1 = rcu_dereference(local->scan_sdata);
> +       sdata2 = rcu_dereference(local->sched_scan_sdata);
>
> -       if (skb->len < 24)
> -               return RX_CONTINUE;
> +       if (likely(!sdata1 && !sdata2))
> +               return;
>
> -       presp = ieee80211_is_probe_resp(fc);
> -       if (presp) {
> +       if (ieee80211_is_probe_resp(mgmt->frame_control)) {
>                 /* ignore ProbeResp to foreign address */
> -               if (!ether_addr_equal(mgmt->da, sdata->vif.addr))
> -                       return RX_DROP_MONITOR;
> +               if (!ether_addr_equal(mgmt->da, sdata1->vif.addr) &&
> +                   !ether_addr_equal(mgmt->da, sdata2->vif.addr))
> +                       return;

you should check sdata1 and sdata2 before dereferencing them.

other than that, looks good to me.

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