1. 26 5月, 2015 1 次提交
  2. 03 3月, 2015 1 次提交
    • D
      cfg80211: add bss_type and privacy arguments in cfg80211_get_bss() · 6eb18137
      Dedy Lansky 提交于
      802.11ad adds new a network type (PBSS) and changes the capability
      field interpretation for the DMG (60G) band.
      The same 2 bits that were interpreted as "ESS" and "IBSS" before are
      re-used as a 2-bit field with 3 valid values (and 1 reserved). Valid
      values are: "IBSS", "PBSS" (new) and "AP".
      
      In order to get the BSS struct for the new PBSS networks, change the
      cfg80211_get_bss() function to take a new enum ieee80211_bss_type
      argument with the valid network types, as "capa_mask" and "capa_val"
      no longer work correctly (the search must be band-aware now.)
      
      The remaining bits in "capa_mask" and "capa_val" are used only for
      privacy matching so replace those two with a privacy enum as well.
      Signed-off-by: NDedy Lansky <dlansky@codeaurora.org>
      [rewrite commit log, tiny fixes]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6eb18137
  3. 08 1月, 2015 1 次提交
    • J
      cfg80211: remove enum station_info_flags · 319090bf
      Johannes Berg 提交于
      This is really just duplicating the list of information that's
      already available in the nl80211 attribute, so remove the list.
      Two small changes are needed:
       * remove STATION_INFO_ASSOC_REQ_IES complete, but the length
         (assoc_req_ies_len) can be used instead
       * add NL80211_STA_INFO_RX_DROP_MISC which exists internally
         but not in nl80211 yet
      
      This gets rid of the duplicate maintenance of the two lists.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      319090bf
  4. 14 10月, 2014 1 次提交
  5. 01 9月, 2014 1 次提交
  6. 26 8月, 2014 1 次提交
  7. 19 5月, 2014 2 次提交
  8. 21 2月, 2014 1 次提交
  9. 05 2月, 2014 1 次提交
    • A
      cfg80211: fix channel configuration in IBSS join · fe94f3a4
      Antonio Quartulli 提交于
      When receiving an IBSS_JOINED event select the BSS object
      based on the {bssid, channel} couple rather than the bssid
      only.
      With the current approach if another cell having the same
      BSSID (but using a different channel) exists then cfg80211
      picks up the wrong BSS object.
      The result is a mismatching channel configuration between
      cfg80211 and the driver, that can lead to any sort of
      problem.
      
      The issue can be triggered by having an IBSS sitting on
      given channel and then asking the driver to create a new
      cell using the same BSSID but with a different frequency.
      By passing the channel to cfg80211_get_bss() we can solve
      this ambiguity and retrieve/create the correct BSS object.
      All the users of cfg80211_ibss_joined() have been changed
      accordingly.
      
      Moreover WARN when cfg80211_ibss_joined() gets a NULL
      channel as argument and remove a bogus call of the same
      function in ath6kl (it does not make sense to call
      cfg80211_ibss_joined() with a zero BSSID on ibss-leave).
      
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Arend van Spriel <arend@broadcom.com>
      Cc: Bing Zhao <bzhao@marvell.com>
      Cc: Jussi Kivilinna <jussi.kivilinna@iki.fi>
      Cc: libertas-dev@lists.infradead.org
      Acked-by: NKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: NAntonio Quartulli <antonio@open-mesh.com>
      [minor code cleanup in ath6kl]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      fe94f3a4
  10. 09 1月, 2014 1 次提交
  11. 12 2月, 2013 1 次提交
  12. 05 2月, 2013 1 次提交
  13. 14 1月, 2013 1 次提交
  14. 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
  15. 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
  16. 03 8月, 2012 1 次提交
  17. 18 7月, 2012 1 次提交
  18. 12 7月, 2012 1 次提交
  19. 07 6月, 2012 1 次提交
  20. 14 4月, 2012 1 次提交
  21. 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
  22. 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
  23. 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
  24. 10 11月, 2011 1 次提交
  25. 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
  26. 15 10月, 2011 1 次提交
  27. 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
  28. 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
  29. 09 8月, 2011 1 次提交
  30. 07 6月, 2011 1 次提交
  31. 12 5月, 2011 2 次提交
  32. 29 4月, 2011 1 次提交
  33. 31 3月, 2011 1 次提交
  34. 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
  35. 14 12月, 2010 2 次提交
  36. 23 11月, 2010 2 次提交