Search Linux Wireless

Re: [PATCH] mac80211: hardware scan rework

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

 



Looks ok, although I'm wondering whether the two new flags
sta_{sw,hw}_scanning should be subsumed into scan_flags instead. This
might have bad locking properties though since the ioctl code changes
them.

If not I think they should be defined as 'bool' and treated as such like
here:

> -		if (local->sta_scanning)
> +		if (local->sta_sw_scanning)

Rather than being tested against zero explicitly like here:

> +	if (unlikely(local->sta_hw_scanning != 0))

> +	if (unlikely(local->sta_sw_scanning != 0)) {

> +	if (unlikely(tx->local->sta_sw_scanning != 0) &&

Also, you don't avoid doing the hw reconfig while hw scanning in the
ioctl code:

@@ -315,7 +315,7 @@ int ieee80211_set_channel(struct ieee80211_local *local, int channel, int freq)
        }
 
        if (set) {
-               if (local->sta_scanning)
+               if (local->sta_sw_scanning)
                        ret = 0;
                else
                        ret = ieee80211_hw_config(local);

Since we're doing a hw scan, shouldn't we be able to avoid calling
ieee80211_hw_config() due to scanning? Then, ieee80211_scan_completed()
should reconfigure filters and hw_config only when a software scan
completed and in the hw scan case not touch the sta timers, netif
queues, not send nullfunc frames etc.

Right now this is pretty asymmetrical, we're treating a hw scan
specially when it starts but we're still trying to reset everything when
the hw scan finishes which seems weird to me. Do you think you can fix
these design mistakes of the hw scan code now?

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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