1. 19 6月, 2010 1 次提交
    • J
      mac80211: fix sw scan bracketing · 543708be
      Johannes Berg 提交于
      Currently, detection in hwsim and ath9k can
      detect that two sw scans are in flight at the
      same time, which isn't really true. It is
      caused by a race condition, because the scan
      complete callback is called too late, after
      the lock has been dropped, so that a new scan
      can be started before it is called.
      
      It is also called too early semantically, as
      it is currently called _after_ the return to
      the operating channel -- it should be before
      so that drivers know this is the operating
      channel again.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      543708be
  2. 04 5月, 2010 1 次提交
    • J
      mac80211: improve IBSS scanning · be4a4b6a
      Johannes Berg 提交于
      When IBSS is fixed to a frequency, it can still
      scan to try to find the right BSSID. This makes
      sense if the BSSID isn't also fixed, but it need
      not scan all channels -- just one is sufficient.
      Make it do that by moving the scan setup code to
      ieee80211_request_internal_scan() and include
      a channel variable setting.
      
      Note that this can be further improved to start
      the IBSS right away if both frequency and BSSID
      are fixed.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      be4a4b6a
  3. 29 4月, 2010 1 次提交
  4. 28 4月, 2010 1 次提交
  5. 09 4月, 2010 1 次提交
  6. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  7. 10 3月, 2010 1 次提交
    • H
      mac80211: Improve software scan timing · df13cce5
      Helmut Schaa 提交于
      The current software scan implemenation in mac80211 returns to the operating
      channel after each scanned channel. However, in some situations (e.g. no
      traffic) it would be nicer to scan a few channels in a row to speed up
      the scan itself.
      
      Hence, after scanning a channel, check if we have queued up any tx frames and
      return to the operating channel in that case.
      
      Unfortunately we don't know if the AP has buffered any frames for us. Hence,
      scan only as many channels in a row as the pm_qos latency and the negotiated
      listen interval allows us to.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      df13cce5
  8. 09 2月, 2010 1 次提交
    • J
      mac80211: fix deferred hardware scan requests · c0ce77b8
      Johannes Berg 提交于
      Reinette found the reason for the warnings that
      happened occasionally when a hw-offloaded scan
      finished; her description of the problem:
      
        mac80211 will defer the handling of scan requests if it is
        busy with management work at the time. The scan requests
        are deferred and run after the work has completed. When
        this occurs there are currently two problems.
      
        * The scan request for hardware scan is not fully populated
          with the band and channels to scan not initialized.
      
        * When the scan is queued the state is not correctly updated
          to reflect that a scan is in progress. The problem here is
          that when the driver completes the scan and calls
          ieee80211_scan_completed() a warning will be triggered
          since mac80211 was not aware that a scan was in progress.
      
      The reason is that the queued scan work will start
      the hw scan right away when the hw_scan_req struct
      has already been allocated. However, in the first
      pass it will not have been filled, which happens
      at the same time as setting the bits. To fix this,
      simply move the allocation after the pending work
      test as well, so that the first iteration of the
      scan work will call __ieee80211_start_scan() even
      in the hardware scan case.
      Bug-identified-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c0ce77b8
  9. 27 1月, 2010 1 次提交
  10. 13 1月, 2010 2 次提交
    • K
      mac80211: add U-APSD client support · ab13315a
      Kalle Valo 提交于
      Add Unscheduled Automatic Power-Save Delivery (U-APSD) client support. The
      idea is that the data frames from the client trigger AP to send the buffered
      frames with ACs which have U-APSD enabled. This decreases latency and makes it
      possible to save even more power.
      
      Driver needs to use IEEE80211_HW_UAPSD to enable the feature. The current
      implementation assumes that firmware takes care of the wakeup and
      hardware needing IEEE80211_HW_PS_NULLFUNC_STACK is not yet supported.
      
      Tested with wl1251 on a Nokia N900 and Cisco Aironet 1231G AP and running
      various test traffic with ping.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ab13315a
    • J
      mac80211: fix a few work bugs · 81ac3462
      Johannes Berg 提交于
      Kalle and Lennert reported problems with the new work
      code, and at least Kalle's problem I was able to trace
      to a missing jiffies initialisation.
      
      I also ran into a problem where occasionally I couldn't
      connect, which seems fixed with kicking the work items
      after scanning.
      
      Finally, also add some sanity checking code to verify
      that we're not adding work items while an interface is
      down -- that case could lead to something similar to
      what Lennert was seeing.
      
      There still seems to be a race condition that we're
      trying to figure out separately.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Tested-by: NLennert Buytenhek <buytenh@marvell.com>
      Tested-by: NKalle Valo <kalle.valo@iki.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      81ac3462
  11. 07 1月, 2010 1 次提交
  12. 06 1月, 2010 1 次提交
  13. 29 12月, 2009 5 次提交
  14. 22 12月, 2009 1 次提交
    • J
      mac80211: reduce reliance on netdev · 47846c9b
      Johannes Berg 提交于
      For bluetooth 3, we will most likely not have
      a netdev for a virtual interface (sdata), so
      prepare for that by reducing the reliance on
      having a netdev. This patch moves the name
      and address fields into the sdata struct and
      uses them from there all over. Some work is
      needed to keep them sync'ed, but that's not
      a lot of work and in slow paths anyway.
      
      In doing so, this also reduces the number of
      pointer dereferences in many places, because
      of things like sdata->dev->dev_addr becoming
      sdata->vif.addr.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      47846c9b
  15. 08 12月, 2009 1 次提交
  16. 03 11月, 2009 2 次提交
  17. 31 10月, 2009 2 次提交
  18. 28 10月, 2009 1 次提交
  19. 23 9月, 2009 1 次提交
    • J
      mac80211: fix DTIM setting · 6a211bf1
      Johannes Berg 提交于
      When the DTIM setting is read from beacons, mac80211 will
      assume it is 1 if the TIM IE is not present or the value
      is 0. This sounds fine, but the same function processes
      probe responses as well, which don't have a TIM IE. This
      leads to overwriting any values previously parsed out of
      beacon frames.
      
      Thus, instead of checking for the presence of the TIM IE
      when setting the default, simply check whether the DTIM
      period value is valid already. If the TIM IE is not there
      then the value cannot be valid (it is initialised to 0)
      and probe responses received after beacons will not lead
      to overwriting an already valid value.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6a211bf1
  20. 29 8月, 2009 1 次提交
  21. 20 8月, 2009 1 次提交
    • J
      mac80211: allow configure_filter callback to sleep · 3ac64bee
      Johannes Berg 提交于
      Over time, a whole bunch of drivers have come up
      with their own scheme to delay the configure_filter
      operation to a workqueue. To be able to simplify
      things, allow configure_filter to sleep, and add
      a new prepare_multicast callback that drivers that
      need the multicast address list implement. This new
      callback must be atomic, but most drivers either
      don't care or just calculate a hash which can be
      done atomically and then uploaded to the hardware
      non-atomically.
      
      A cursory look suggests that at76c50x-usb, ar9170,
      mwl8k (which is actually very broken now), rt2x00,
      wl1251, wl1271 and zd1211 should make use of this
      new capability.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3ac64bee
  22. 14 8月, 2009 1 次提交
  23. 05 8月, 2009 1 次提交
    • L
      mac80211: redefine usage of the mac80211 workqueue · 42935eca
      Luis R. Rodriguez 提交于
      The mac80211 workqueue exists to enable mac80211 and drivers
      to queue their own work on a single threaded workqueue. mac80211
      takes care to flush the workqueue during suspend but we never
      really had requirements on drivers for how they should use
      the workqueue in consideration for suspend.
      
      We extend mac80211 to document how the mac80211 workqueue should
      be used, how it should not be used and finally move raw access to
      the workqueue to mac80211 only. Drivers and mac80211 use helpers
      to queue work onto the mac80211 workqueue:
      
        * ieee80211_queue_work()
        * ieee80211_queue_delayed_work()
      
      These helpers will now warn if mac80211 already completed its
      suspend cycle and someone is trying to queue work. mac80211
      flushes the mac80211 workqueue prior to suspend a few times,
      but we haven't taken the care to ensure drivers won't add more
      work after suspend. To help with this we add a warning when
      someone tries to add work and mac80211 already completed the
      suspend cycle.
      
      Drivers should ensure they cancel any work or delayed work
      in the mac80211 stop() callback.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      42935eca
  24. 30 7月, 2009 2 次提交
  25. 28 7月, 2009 6 次提交
  26. 25 7月, 2009 1 次提交
  27. 11 7月, 2009 1 次提交
    • J
      mac80211: rework MLME for multiple authentications · 77fdaa12
      Johannes Berg 提交于
      Sit tight. This shakes up the world as you know
      it. Let go of your spaghetti tongs, they will no
      longer be required, the horrible statemachine in
      net/mac80211/mlme.c is no more...
      
      With the cfg80211 SME mac80211 now has much less
      to keep track of, but, on the other hand, for FT
      it needs to be able to keep track of at least one
      authentication being in progress while associated.
      So convert from a single state machine to having
      small ones for all the different things we need to
      do. For real FT it will still need work wrt. PS,
      but this should be a good step.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      77fdaa12