1. 12 11月, 2011 1 次提交
    • J
      libertas: release bss references and avoid warning from cfg80211_inform_bss · 731f8e1c
      John W. Linville 提交于
        CC [M]  drivers/net/wireless/libertas/cfg.o
      drivers/net/wireless/libertas/cfg.c: In function ‘lbs_ret_scan’:
      drivers/net/wireless/libertas/cfg.c:636:24: warning: ignoring return value of ‘cfg80211_inform_bss’, declared with attribute warn_unused_result
      drivers/net/wireless/libertas/cfg.c: In function ‘lbs_join_post’:
      drivers/net/wireless/libertas/cfg.c:1766:21: warning: ignoring return value of ‘cfg80211_inform_bss’, declared with attribute warn_unused_result
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      731f8e1c
  2. 10 11月, 2011 1 次提交
  3. 03 11月, 2011 1 次提交
    • A
      libertas: ensure we clean up a scan request properly · 3209e061
      Andres Salomon 提交于
      Commit 2e30168b ("libertas: terminate scan when stopping interface")
      adds cleanup code to lbs_eth_stop to call cfg80211_scan_done if there's
      an outstanding cfg80211_scan_request.  However, it assumes that the
      scan request was allocated via the cfg80211 stack.  Libertas has
      its own internal allocation method, kept track of with
      priv->internal_scan.  This doesn't set scan_req->wiphy, amongst other
      things, which results in hitting a BUG() when we call cfg80211_scan_done
      on the request.
      
      This provides a function to take care of the low-level scan_req cleanup
      details.  We simply call that to deal with finishing up scan requests.
      
      The bug we were hitting was:
      
      [  964.321495] kernel BUG at net/wireless/core.h:87!
      [  964.329970] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [  964.341963] pgd = dcf80000
      ...
      [  964.849998] 9fe0: 00000000 beb417b8 4018e280 401e822c 60000010 00000004 00000000 00000000
      [  964.865007] [<c003104c>] (__bug+0x1c/0x28) from [<c0384ffc>] (cfg80211_scan_done+0x54/0x6c)
      [  964.895324] [<c0384ffc>] (cfg80211_scan_done+0x54/0x6c) from [<bf028bac>] (lbs_eth_stop+0x10c/0x188 [libertas])
      [  964.895324] [<bf028bac>] (lbs_eth_stop+0x10c/0x188 [libertas]) from [<c03002a0>] (__dev_close_many+0x94/0xc4)
      [  964.918995] [<c03002a0>] (__dev_close_many+0x94/0xc4) from [<c030037c>] (dev_close_many+0x78/0xe0)
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Acked-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3209e061
  4. 15 10月, 2011 1 次提交
  5. 28 9月, 2011 1 次提交
    • D
      libertas: scan behaviour consistency improvements · b4c3f34a
      Daniel Drake 提交于
      When scanning for the broadcast SSID, there is no need to add the
      SSID TLV (restoring the behaviour of the driver behaviour in the wext
      days, confirmed in Marvell specifications).
      
      If bssid is unspecified, the current scan code will usually fire off an
      active scan probing for the specific requested SSID. However, if a scan
      is ongoing (or has just finished), those scan results will be used
      instead (even if that scan is totally different, e.g. a passive scan on
      channel 4 for a different SSID). Fix this inconsistency by always
      firing off a scan when associating without a bssid.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Acked-by: NDan Williams <dcbw@redhat.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b4c3f34a
  6. 10 8月, 2011 1 次提交
    • D
      libertas: disable functionality when interface is down · d2e7b342
      Daniel Drake 提交于
      Modify the driver so that it does not function when the interface is
      down, in preparation for runtime power management.
      
      No commands can be run while the interface is down, so the ndo_dev_stop
      routine now directly does all necessary work (including asking the device
      to disconnect from the network and disabling multicast functionality)
      directly.
      
      power_save and power_restore hooks are added meaning that card drivers
      can take steps to turn the device off when the interface is down.
      
      The MAC address can now only be changed when all interfaces are down;
      the new address will be programmed when an interface gets brought up.
      This matches mac80211 behaviour.
      
      Also, some small cleanups/simplifications were made in the surrounding
      device handling logic.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d2e7b342
  7. 09 8月, 2011 1 次提交
  8. 07 6月, 2011 1 次提交
  9. 12 5月, 2011 2 次提交
  10. 29 4月, 2011 1 次提交
  11. 31 3月, 2011 1 次提交
  12. 22 1月, 2011 1 次提交
    • B
      cfg80211: Extend channel to frequency mapping for 802.11j · 59eb21a6
      Bruno Randolf 提交于
      Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
      IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
      channel numbers in the 2GHz and 5GHz band we can't map from channel to
      frequency without knowing the band. This is no problem as in most contexts we
      know the band. In places where we don't know the band (and WEXT compatibility)
      we assume the 2GHz band for channels below 14.
      
      This patch does not implement all channel to frequency mappings defined in
      802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
      channels as well as 802.11y channels have been omitted.
      
      The following drivers have been updated to reflect the API changes:
      iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
      The drivers have been compile-tested only.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NBrian Prodoehl <bprodoehl@gmail.com>
      Acked-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      59eb21a6
  13. 14 12月, 2010 2 次提交
  14. 23 11月, 2010 2 次提交
  15. 09 11月, 2010 1 次提交
  16. 07 10月, 2010 1 次提交
  17. 17 9月, 2010 1 次提交
    • J
      libertas: correct sparse warnings · 65a602dd
      John W. Linville 提交于
        CHECK   drivers/net/wireless/libertas/cfg.c
      drivers/net/wireless/libertas/cfg.c:493:19: warning: cast to restricted __le16
        CHECK   drivers/net/wireless/libertas/mesh.c
      drivers/net/wireless/libertas/mesh.c:577:16: warning: incorrect type in assignment (different base types)
      drivers/net/wireless/libertas/mesh.c:577:16:    expected restricted __le32 [addressable] [assigned] [usertype] id
      drivers/net/wireless/libertas/mesh.c:577:16:    got bool
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      65a602dd
  18. 17 8月, 2010 3 次提交
  19. 11 8月, 2010 1 次提交
    • A
      drivers/net/wireless/libertas/cfg.c: needs sched.h · 241a6a54
      Andrew Morton 提交于
      i386 allmodconfig:
      
      drivers/net/wireless/libertas/cfg.c: In function 'lbs_scan_worker':
      drivers/net/wireless/libertas/cfg.c:722: error: 'TASK_NORMAL' undeclared (first use in this function)
      drivers/net/wireless/libertas/cfg.c:722: error: (Each undeclared identifier is reported only once
      drivers/net/wireless/libertas/cfg.c:722: error: for each function it appears in.)
      drivers/net/wireless/libertas/cfg.c: In function 'lbs_cfg_connect':
      drivers/net/wireless/libertas/cfg.c:1267: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
      drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function 'signal_pending'
      drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function 'schedule_timeout'
      
      So wait.h has a dependency on sched.h, but doesn't include sched.h.  This
      patch doesn't fix that.
      
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      241a6a54
  20. 10 8月, 2010 1 次提交
    • J
      libertas: fix build break by including linux/sched.h · a9fda88b
      John W. Linville 提交于
        CC [M]  drivers/net/wireless/libertas/cfg.o
      /home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c: In function ‘lbs_scan_worker’:
      /home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:722: error: ‘TASK_NORMAL’ undeclared (first use in this function)
      /home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:722: error: (Each undeclared identifier is reported only once
      /home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:722: error: for each function it appears in.)
      /home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c: In function ‘lbs_cfg_connect’:
      /home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:1267: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function)
      /home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function ‘signal_pending’
      /home/greearb/git/wireless-testing/drivers/net/wireless/libertas/cfg.c:1267: error: implicit declaration of function ‘schedule_timeout’
      Reported-by: NBen Greear <greearb@candelatech.com>
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a9fda88b
  21. 06 8月, 2010 3 次提交
  22. 28 7月, 2010 3 次提交
  23. 15 7月, 2010 1 次提交
  24. 24 6月, 2010 3 次提交
  25. 08 5月, 2010 1 次提交
    • J
      cfg80211/mac80211: better channel handling · f444de05
      Johannes Berg 提交于
      Currently (all tested with hwsim) you can do stupid
      things like setting up an AP on a certain channel,
      then adding another virtual interface and making
      that associate on another channel -- this will make
      the beaconing to move channel but obviously without
      the necessary IEs data update.
      
      In order to improve this situation, first make the
      configuration APIs (cfg80211 and nl80211) aware of
      multi-channel operation -- we'll eventually need
      that in the future anyway. There's one userland API
      change and one API addition. The API change is that
      now SET_WIPHY must be called with virtual interface
      index rather than only wiphy index in order to take
      effect for that interface -- luckily all current
      users (hostapd) do that. For monitor interfaces, the
      old setting is preserved, but monitors are always
      slaved to other devices anyway so no guarantees.
      
      The second userland API change is the introduction
      of a per virtual interface SET_CHANNEL command, that
      hostapd should use going forward to make it easier
      to understand what's going on (it can automatically
      detect a kernel with this command).
      
      Other than mac80211, no existing cfg80211 drivers
      are affected by this change because they only allow
      a single virtual interface.
      
      mac80211, however, now needs to be aware that the
      channel settings are per interface now, and needs
      to disallow (for now) real multi-channel operation,
      which is another important part of this patch.
      
      One of the immediate benefits is that you can now
      start hostapd to operate on a hardware that already
      has a connection on another virtual interface, as
      long as you specify the same channel.
      
      Note that two things are left unhandled (this is an
      improvement -- not a complete fix):
      
       * different HT/no-HT modes
      
         currently you could start an HT AP and then
         connect to a non-HT network on the same channel
         which would configure the hardware for no HT;
         that can be fixed fairly easily
      
       * CSA
      
         An AP we're connected to on a virtual interface
         might indicate switching channels, and in that
         case we would follow it, regardless of how many
         other interfaces are operating; this requires
         more effort to fix but is pretty rare after all
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f444de05
  26. 31 3月, 2010 1 次提交
    • D
      net/wireless/libertas: do not call wiphy_unregister() w/o wiphy_register() · 73714004
      Daniel Mack 提交于
      The libertas driver calls wiphy_unregister() without a prior
      wiphy_register() when a devices fails initialization. Fix this by
      introducing a private flag.
      
      [    9.310000] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      
      [...]
      
      [    9.330000] [<c0311310>] (wiphy_unregister+0xfc/0x19c) from [<bf00c9ec>] (lbs_cfg_free+0x70/0x9c [libertas])
      [    9.330000] [<bf00c9ec>] (lbs_cfg_free+0x70/0x9c [libertas]) from [<bf014fdc>] (lbs_remove_card+0x180/0x210 [libertas])
      [    9.330000] [<bf014fdc>] (lbs_remove_card+0x180/0x210 [libertas]) from [<bf035394>] (if_sdio_probe+0xdc4/0xef4 [libertas_sdio])
      [    9.330000] [<bf035394>] (if_sdio_probe+0xdc4/0xef4 [libertas_sdio]) from [<c0230d14>] (sdio_bus_probe+0xd4/0xf0)
      [    9.330000] [<c0230d14>] (sdio_bus_probe+0xd4/0xf0) from [<c01a6034>] (driver_probe_device+0xa4/0x174)
      [    9.330000] [<c01a6034>] (driver_probe_device+0xa4/0x174) from [<c01a6164>] (__driver_attach+0x60/0x84)
      [    9.330000] [<c01a6164>] (__driver_attach+0x60/0x84) from [<c01a5854>] (bus_for_each_dev+0x4c/0x8c)
      [    9.330000] [<c01a5854>] (bus_for_each_dev+0x4c/0x8c) from [<c01a50e4>] (bus_add_driver+0xa0/0x228)
      [    9.330000] [<c01a50e4>] (bus_add_driver+0xa0/0x228) from [<c01a6470>] (driver_register+0xc0/0x150)
      [    9.330000] [<c01a6470>] (driver_register+0xc0/0x150) from [<bf03a06c>] (if_sdio_init_module+0x6c/0x108 [libertas_sdio])
      [    9.330000] [<bf03a06c>] (if_sdio_init_module+0x6c/0x108 [libertas_sdio]) from [<c00263ac>] (do_one_initcall+0x5c/0x1bc)
      [    9.330000] [<c00263ac>] (do_one_initcall+0x5c/0x1bc) from [<c0069f80>] (sys_init_module+0xc0/0x1f0)
      [    9.330000] [<c0069f80>] (sys_init_module+0xc0/0x1f0) from [<c0026f00>] (ret_fast_syscall+0x0/0x30)
      Signed-off-by: NDaniel Mack <daniel@caiaq.de>
      Cc: Dan Williams <dcbw@redhat.com>
      Cc: John W. Linville <linville@tuxdriver.com>
      Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
      Cc: Bing Zhao <bzhao@marvell.com>
      Cc: libertas-dev@lists.infradead.org
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      73714004
  27. 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
  28. 08 10月, 2009 1 次提交