1. 16 11月, 2010 7 次提交
  2. 26 10月, 2010 1 次提交
    • L
      cfg80211: fix regression on processing country IEs · a171fba4
      Luis R. Rodriguez 提交于
      The patch 4f366c5d:
      
      	wireless: only use alpha2 regulatory information from country IE
      
      removed some complex intersection we were always doing between the AP's
      country IE info and what we got from CRDA. When CRDA sent us back a
      regulatory domain we would do some sanity checks on that regulatory
      domain response we just got. Part of these sanity checks included
      checking that we already had performed an intersection for the
      request of NL80211_REGDOM_SET_BY_COUNTRY_IE type.
      
      This mean that cfg80211 was only processing country IEs for cases
      where we already had an intersection, but since we removed enforcing
      this this is no longer required, we should just apply the country
      IE country hint with the data received from CRDA.
      
      This patch has fixes intended for kernels >= 2.6.36.
      
      Cc: stable@kernel.org
      Reported-by: NEaswar Krishnan <easwar.krishnan@atheros.com>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a171fba4
  3. 17 9月, 2010 1 次提交
  4. 17 8月, 2010 1 次提交
  5. 29 7月, 2010 1 次提交
  6. 27 7月, 2010 1 次提交
  7. 21 7月, 2010 2 次提交
  8. 25 6月, 2010 1 次提交
  9. 19 6月, 2010 1 次提交
  10. 01 4月, 2010 1 次提交
  11. 31 3月, 2010 1 次提交
  12. 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
  13. 02 2月, 2010 2 次提交
  14. 16 1月, 2010 1 次提交
    • L
      cfg80211: make regulatory_hint_11d() band specific · 84920e3e
      Luis R. Rodriguez 提交于
      In practice APs do not send country IE channel triplets for channels
      the AP is not operating on and if they were to do so they would have
      to use the regulatory extension which we currently do not process.
      No AP has been seen in practice that does this though so just drop
      those country IEs.
      
      Additionally it has been noted the first series of country IE
      channels triplets are specific to the band the AP sends. Propagate
      the band on which the country IE was found on reject the country
      IE then if the triplets are ever oustide of the band.
      
      Although we now won't process country IE information with multiple
      band information we leave the intersection work as is as it is
      technically possible for someone to want to eventually process these
      type of country IEs with regulatory extensions.
      
      Cc: Jouni Malinen <jouni.malinen@atheros.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      84920e3e
  15. 15 1月, 2010 2 次提交
  16. 13 1月, 2010 3 次提交
  17. 06 1月, 2010 2 次提交
  18. 05 1月, 2010 1 次提交
  19. 29 12月, 2009 1 次提交
  20. 22 12月, 2009 1 次提交
  21. 11 12月, 2009 1 次提交
  22. 05 12月, 2009 1 次提交
    • K
      cfg80211: indent regulatory messages with spaces · 269ac5fd
      Kalle Valo 提交于
      The regulatory messages in syslog look weird:
      
      kernel: cfg80211: Regulatory domain: US
      kernel: ^I(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
      kernel: ^I(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
      kernel: ^I(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
      kernel: ^I(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
      kernel: ^I(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
      kernel: ^I(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
      kernel: ^I(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
      
      Indent them with four spaces instead of the tab character to get prettier
      output.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Acked: Luis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      269ac5fd
  23. 20 11月, 2009 1 次提交
  24. 14 8月, 2009 2 次提交
  25. 05 8月, 2009 3 次提交
    • L
      cfg80211: enable country IE support to all cfg80211 drivers · 8b19e6ca
      Luis R. Rodriguez 提交于
      Since the bss is always set now once we are connected, if the
      bss has its own information element we refer to it and pass that
      instead of relying on mac80211's parsing.
      
      Now all cfg80211 drivers get country IE support, automatically and
      we reduce the call overhead that we had on mac80211 which called this
      upon every beacon and instead now call this only upon a successfull
      connection by a STA on cfg80211.
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8b19e6ca
    • L
      cfg80211: decouple regulatory variables from cfg80211_mutex · abc7381b
      Luis R. Rodriguez 提交于
      We change regulatory code to be protected by its own regulatory
      mutex and alleviate cfg80211_mutex to only be used to protect
      cfg80211_rdev_list, the registered device list.
      
      By doing this we will be able to work on regulatory core components
      without having to have hog up the cfg80211_mutex. An example here is
      we no longer need to use the cfg80211_mutex during driver specific
      wiphy_apply_custom_regulatory(). We also no longer need it for the
      the country IE regulatory hint; by doing so we end up curing this
      new lockdep warning:
      
      =======================================================
      [ INFO: possible circular locking dependency detected ]
      2.6.31-rc4-wl #12
      -------------------------------------------------------
      phy1/1709 is trying to acquire lock:
       (cfg80211_mutex){+.+.+.}, at: [<ffffffffa00af852>] regulatory_hint_11d+0x32/0x3f0 [cfg80211]
      
      but task is already holding lock:
       (&ifmgd->mtx){+.+.+.}, at: [<ffffffffa0144228>] ieee80211_sta_work+0x108/0x10f0 [mac80211]
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #3 (&ifmgd->mtx){+.+.+.}:
             [<ffffffff810857b6>] __lock_acquire+0xd76/0x12b0
             [<ffffffff81085dd3>] lock_acquire+0xe3/0x120
             [<ffffffff814eeae4>] mutex_lock_nested+0x44/0x350
             [<ffffffffa0141bb8>] ieee80211_mgd_auth+0x108/0x1f0 [mac80211]
             [<ffffffffa0148563>] ieee80211_auth+0x13/0x20 [mac80211]
             [<ffffffffa00bc3a1>] __cfg80211_mlme_auth+0x1b1/0x2a0 [cfg80211]
             [<ffffffffa00bc516>] cfg80211_mlme_auth+0x86/0xc0 [cfg80211]
             [<ffffffffa00b368d>] nl80211_authenticate+0x21d/0x230 [cfg80211]
             [<ffffffff81416ba6>] genl_rcv_msg+0x1b6/0x1f0
             [<ffffffff81415c39>] netlink_rcv_skb+0x89/0xb0
             [<ffffffff814169d9>] genl_rcv+0x29/0x40
             [<ffffffff8141591d>] netlink_unicast+0x29d/0x2b0
             [<ffffffff81416514>] netlink_sendmsg+0x214/0x300
             [<ffffffff813e4407>] sock_sendmsg+0x107/0x130
             [<ffffffff813e45b9>] sys_sendmsg+0x189/0x320
             [<ffffffff81011f82>] system_call_fastpath+0x16/0x1b
             [<ffffffffffffffff>] 0xffffffffffffffff
      
      -> #2 (&wdev->mtx){+.+.+.}:
             [<ffffffff810857b6>] __lock_acquire+0xd76/0x12b0
             [<ffffffff81085dd3>] lock_acquire+0xe3/0x120
             [<ffffffff814eeae4>] mutex_lock_nested+0x44/0x350
             [<ffffffffa00ab304>] cfg80211_netdev_notifier_call+0x1a4/0x390 [cfg80211]
             [<ffffffff814f3dff>] notifier_call_chain+0x3f/0x80
             [<ffffffff81075a91>] raw_notifier_call_chain+0x11/0x20
             [<ffffffff813f665a>] dev_open+0x10a/0x120
             [<ffffffff813f59bd>] dev_change_flags+0x9d/0x1e0
             [<ffffffff8144eb6e>] devinet_ioctl+0x6fe/0x760
             [<ffffffff81450204>] inet_ioctl+0x94/0xc0
             [<ffffffff813e25fa>] sock_ioctl+0x6a/0x290
             [<ffffffff8111e911>] vfs_ioctl+0x31/0xa0
             [<ffffffff8111ea9a>] do_vfs_ioctl+0x8a/0x5c0
             [<ffffffff8111f069>] sys_ioctl+0x99/0xa0
             [<ffffffff81011f82>] system_call_fastpath+0x16/0x1b
             [<ffffffffffffffff>] 0xffffffffffffffff
      
      -> #1 (&rdev->mtx){+.+.+.}:
             [<ffffffff810857b6>] __lock_acquire+0xd76/0x12b0
             [<ffffffff81085dd3>] lock_acquire+0xe3/0x120
             [<ffffffff814eeae4>] mutex_lock_nested+0x44/0x350
             [<ffffffffa00ac4d0>] cfg80211_get_dev_from_ifindex+0x60/0x90 [cfg80211]
             [<ffffffffa00b21ff>] get_rdev_dev_by_info_ifindex+0x6f/0xa0 [cfg80211]
             [<ffffffffa00b51eb>] nl80211_set_interface+0x3b/0x260 [cfg80211]
             [<ffffffff81416ba6>] genl_rcv_msg+0x1b6/0x1f0
             [<ffffffff81415c39>] netlink_rcv_skb+0x89/0xb0
             [<ffffffff814169d9>] genl_rcv+0x29/0x40
             [<ffffffff8141591d>] netlink_unicast+0x29d/0x2b0
             [<ffffffff81416514>] netlink_sendmsg+0x214/0x300
             [<ffffffff813e4407>] sock_sendmsg+0x107/0x130
             [<ffffffff813e45b9>] sys_sendmsg+0x189/0x320
             [<ffffffff81011f82>] system_call_fastpath+0x16/0x1b
             [<ffffffffffffffff>] 0xffffffffffffffff
      
      other info that might help us debug this:
      
      3 locks held by phy1/1709:
       #0:  ((wiphy_name(local->hw.wiphy))){+.+.+.}, at: [<ffffffff8106b45d>] worker_thread+0x19d/0x340
       #1:  (&ifmgd->work){+.+.+.}, at: [<ffffffff8106b45d>] worker_thread+0x19d/0x340
       #2:  (&ifmgd->mtx){+.+.+.}, at: [<ffffffffa0144228>] ieee80211_sta_work+0x108/0x10f0 [mac80211]
      Reported-by: NReinette Chatre <reinette.chatre@intel.com>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      abc7381b
    • L
      cfg80211: do not iterate over rdev list on country IE hint · 4b44c8bc
      Luis R. Rodriguez 提交于
      Simplify the country IE hint code by just bailing out if
      a previous country IE has been issued. We currently just trust
      the first AP we connect to on any card. The idea was to perform
      conflict resolution within this routine but since we can no longer
      iterate over the registered device list here we leave conflict
      resolution to be dealt with at a later time on the workqueue.
      
      This code has no functional changes other than saving us an
      interation over the registered device list when a second card
      is connected, or you unplug and connect the same one, and a
      country IE is received. This would have been done upon every
      beacon received.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4b44c8bc