1. 30 11月, 2012 1 次提交
    • J
      cfg80211: fix BSS struct IE access races · 9caf0364
      Johannes Berg 提交于
      When a BSS struct is updated, the IEs are currently
      overwritten or freed. This can lead to races if some
      other CPU is accessing the BSS struct and using the
      IEs concurrently.
      
      Fix this by always allocating the IEs in a new struct
      that holds the data and length and protecting access
      to this new struct with RCU.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9caf0364
  2. 26 11月, 2012 1 次提交
    • J
      cfg80211: pass a channel definition struct · 683b6d3b
      Johannes Berg 提交于
      Instead of passing a channel pointer and channel type
      to all functions and driver methods, pass a new channel
      definition struct. Right now, this struct contains just
      the control channel and channel type, but for VHT this
      will change.
      
      Also, add a small inline cfg80211_get_chandef_type() so
      that drivers don't need to use the _type field of the
      new structure all the time, which will change.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      683b6d3b
  3. 03 8月, 2012 1 次提交
  4. 18 7月, 2012 1 次提交
  5. 12 7月, 2012 1 次提交
  6. 07 6月, 2012 1 次提交
  7. 14 4月, 2012 1 次提交
  8. 16 3月, 2012 1 次提交
    • D
      libertas: remove dump_survey implementation · 37752657
      Daniel Drake 提交于
      libertas provides a dump_survey implementation based on reading of
      a RSSI value. However, this RSSI value is calculated based on the
      last received beacon from the associated AP - it is not a good
      way of surveying a channel in general, and even causes an error
      if the card is not associated to a network.
      
      As this is not appropriate as a survey, remove it. This fixes an
      issue where something in userspace is repeatedly calling site-survey
      during boot, resulting in many repeated errors as the RSSI value cannot
      be read before associating.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      37752657
  9. 22 12月, 2011 1 次提交
    • A
      libertas: clean up scan thread handling · afbca95f
      Andres Salomon 提交于
      The libertas scan thread expects priv->scan_req to be non-NULL.  In theory,
      it should always be set.  In practice, we've seen the following oops:
      
      [ 8363.067444] Unable to handle kernel NULL pointer dereference at virtual address 00000004
      [ 8363.067490] pgd = c0004000
      [ 8363.078393] [00000004] *pgd=00000000
      [ 8363.086711] Internal error: Oops: 17 [#1] PREEMPT
      [ 8363.091375] Modules linked in: fuse libertas_sdio libertas psmouse mousedev ov7670 mmp_camera joydev videobuf2_core videobuf2_dma_sg videobuf2_memops [last unloaded: scsi_wait_scan]
      [ 8363.107490] CPU: 0    Not tainted  (3.0.0-gf7ccc69 #671)
      [ 8363.112799] PC is at lbs_scan_worker+0x108/0x5a4 [libertas]
      [ 8363.118326] LR is at 0x0
      [ 8363.120836] pc : [<bf03a854>]    lr : [<00000000>]    psr: 60000113
      [ 8363.120845] sp : ee66bf48  ip : 00000000  fp : 00000000
      [ 8363.120845] r10: ee2c2088  r9 : c04e2efc  r8 : eef97005
      [ 8363.132231] r7 : eee0716f  r6 : ee2c02c0  r5 : ee2c2088  r4 : eee07160
      [ 8363.137419] r3 : 00000000  r2 : a0000113  r1 : 00000001  r0 : eee07160
      [ 8363.143896] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      [ 8363.157630] Control: 10c5387d  Table: 2e754019  DAC: 00000015
      [ 8363.163334] Process kworker/u:1 (pid: 25, stack limit = 0xee66a2f8)
      
      While I've not found a smoking gun, there are two places that raised red flags
      for me.  The first is in _internal_start_scan, when we queue up a scan; we
      first queue the worker, and then set priv->scan_req.  There's theoretically
      a 50mS delay which should be plenty, but doing things that way just seems
      racy (and not in the good way).
      
      The second is in the scan worker thread itself.  Depending on the state of
      priv->scan_channel, we cancel pending scan runs and then requeue a run in
      300mS.  We then send the scan command down to the hardware, sleep, and if
      we get scan results for all the desired channels, we set priv->scan_req to
      NULL.  However, it that's happened in less than 300mS, what happens with
      the pending scan run?
      
      This patch addresses both of those concerns.  With the patch applied, we
      have not seen the oops in the past two weeks.
      Signed-off-by: NAndres Salomon <dilinger@queued.net>
      Cc: stable@kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      afbca95f
  10. 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
  11. 10 11月, 2011 1 次提交
  12. 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
  13. 15 10月, 2011 1 次提交
  14. 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
  15. 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
  16. 09 8月, 2011 1 次提交
  17. 07 6月, 2011 1 次提交
  18. 12 5月, 2011 2 次提交
  19. 29 4月, 2011 1 次提交
  20. 31 3月, 2011 1 次提交
  21. 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
  22. 14 12月, 2010 2 次提交
  23. 23 11月, 2010 2 次提交
  24. 09 11月, 2010 1 次提交
  25. 07 10月, 2010 1 次提交
  26. 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
  27. 17 8月, 2010 3 次提交
  28. 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
  29. 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
  30. 06 8月, 2010 3 次提交
  31. 28 7月, 2010 3 次提交