1. 29 7月, 2010 3 次提交
    • F
      mac80211: inform drivers about the off-channel status on channel changes · 45521245
      Felix Fietkau 提交于
      For some drivers it can be useful to know whether the channel they're
      supposed to switch to is going to be used for short off-channel work or
      scanning, or whether the hardware is expected to stay on it for a while
      longer. This is important for various kinds of calibration work, which
      takes longer to complete and should keep some persistent state, even if
      the channel temporarily changes.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      45521245
    • L
      Revert "mac80211: fix sw scan bracketing" · a0daa0e7
      Luis R. Rodriguez 提交于
      This reverts this commit. While in theory the change is
      correct the patch does not address current assumptions made
      by some drivers, one which is definitley affected is ath9k.
      
      Prior to this change the scan complete callback would be
      called after we returned to the home channel and configured
      the hardware RX filters. After this change we call the scan
      complete callback prior to both the hw config and the config
      filter. At least for ath9k this breaks quite a few assumptions
      on the callback, leading to disconnects to the AP after every scan
      making the driver pretty useless on STA mode. The goal behind
      this commit was to address the now understood spurious warnings
      from ath9k and mac80211_hwsim on scanning on two wiphys at the
      same time but we have now supressed these and will address this
      issue in the next kernel release.
      
      When fixing this for good next we must first review the other
      driver's dependence on this logic and perhaps consider removal
      of the scan complete callback all together.
      
      Cc: Johannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a0daa0e7
    • Y
      mac80211: Put some code under MESH macro · e4ab7eb0
      Yuri Ershov 提交于
      In the function ieee80211_subif_start_xmit the logic related with
      meshdrlen is under CONFIG_MAC80211_MESH macro, but in one place it isn't.
      This is some update for this
      Signed-off-by: NYuri Ershov <ext-yuri.ershov@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e4ab7eb0
  2. 28 7月, 2010 1 次提交
    • J
      mac80211: Fix key freeing to handle unlinked keys · 32162a4d
      Jouni Malinen 提交于
      Key locking simplification removed key->sdata != NULL verification from
      ieee80211_key_free(). While that is fine for most use cases, there is one
      path where this function can be called with an unlinked key (i.e.,
      key->sdata == NULL && key->local == NULL). This results in a NULL pointer
      dereference with the current implementation. This is known to happen at
      least with FT protocol when wpa_supplicant tries to configure the key
      before association.
      
      Avoid the issue by passing in the local pointer to
      ieee80211_key_free(). In addition, do not clear the key from hw_accel
      or debugfs if it has not yet been added. At least the hw_accel one could
      trigger another NULL pointer dereference.
      Signed-off-by: NJouni Malinen <j@w1.fi>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      32162a4d
  3. 27 7月, 2010 6 次提交
  4. 22 7月, 2010 3 次提交
  5. 21 7月, 2010 3 次提交
  6. 17 7月, 2010 2 次提交
  7. 09 7月, 2010 1 次提交
    • J
      mac80211: remove wep dependency · 3473187d
      John W. Linville 提交于
      The current mac80211 code assumes that WEP is always available.  If WEP
      fails to initialize, ieee80211_register_hw will always fail.
      
      In some cases (e.g. FIPS certification), the cryptography used by WEP is
      unavailable.  However, in such cases there is no good reason why CCMP
      encryption (or even no link level encryption) cannot be used.  So, this
      patch removes mac80211's assumption that WEP (and TKIP) will always be
      available for use.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3473187d
  8. 03 7月, 2010 2 次提交
  9. 01 7月, 2010 1 次提交
  10. 30 6月, 2010 2 次提交
  11. 29 6月, 2010 3 次提交
  12. 25 6月, 2010 4 次提交
  13. 24 6月, 2010 1 次提交
  14. 22 6月, 2010 2 次提交
    • J
      mac80211: Add interface for driver to temporarily disable dynamic ps · f90754c1
      Juuso Oikarinen 提交于
      This mechanism introduced in this patch applies (at least) for hardware
      designs using a single shared antenna for both WLAN and BT. In these designs,
      the antenna must be toggled between WLAN and BT.
      
      In those hardware, managing WLAN co-existence with Bluetooth requires WLAN
      full power save whenever there is Bluetooth activity in order for WLAN to be
      able to periodically relinquish the antenna to be used for BT. This is because
      BT can only access the shared antenna when WLAN is idle or asleep.
      
      Some hardware, for instance the wl1271, are able to indicate to the host
      whenever there is BT traffic. In essence, the hardware will send an indication
      to the host whenever there is, for example, SCO traffic or A2DP traffic, and
      will send another indication when the traffic is over.
      
      The hardware gets information of Bluetooth traffic via hardware co-existence
      control lines - these lines are used to negotiate the shared antenna
      ownership. The hardware will give the antenna to BT whenever WLAN is sleeping.
      
      This patch adds the interface to mac80211 to facilitate temporarily disabling
      of dynamic power save as per request of the WLAN driver. This interface will
      immediately force WLAN to full powersave, hence allowing BT coexistence as
      described above.
      
      In these kind of shared antenna desings, when WLAN powersave is fully disabled,
      Bluetooth will not work simultaneously with WLAN at all. This patch does not
      address that problem. This interface will not change PSM state, so if PSM is
      disabled it will remain so. Solving this problem requires knowledge about BT
      state, and is best done in user-space.
      Signed-off-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f90754c1
    • G
      mac80211: Fix compile warning in scan.c. · fb63bc41
      Gertjan van Wingerde 提交于
      Fix the following compile warning:
      
      CC [M]  net/mac80211/scan.o
      net/mac80211/scan.c: In function 'ieee80211_request_internal_scan':
      net/mac80211/scan.c:749:23: warning: comparison between 'enum nl80211_band' and 'enum ieee80211_band'
      
      caused by the local variable band not being of the proper 'ieee80211_band' type.
      Signed-off-by: NGertjan van Wingerde <gwingerde@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      fb63bc41
  15. 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
  16. 17 6月, 2010 1 次提交
  17. 16 6月, 2010 3 次提交
    • J
      mac80211: Use a separate CCMP PN receive counter for management frames · 9190252c
      Jouni Malinen 提交于
      When management frame protection (IEEE 802.11w) is used, we must use a
      separate counter for tracking received CCMP packet number for the
      management frames. The previously used NUM_RX_DATA_QUEUESth queue was
      shared with data frames when QoS was not used and that can cause
      problems in detecting replays incorrectly for robust management frames.
      Add a new counter just for robust management frames to avoid this issue.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9190252c
    • J
      mac80211: Protect Deauthentication frame when using MFP · 05e48e8e
      Jouni Malinen 提交于
      When management frame protection (IEEE 802.11w) is used,
      Deauthentication frame needs to be protected when the pairwise key is
      configured. mac80211 was removing the station entry (and its keys)
      before actually sending out the Deauthentication frame. Fix this by
      reordering the code to send the frame before the station entry gets
      removed. This matches an earlier change that handled the Disassociation
      frame processing, but missed Deauthentication frames.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      05e48e8e
    • J
      mac80211: Fix ps-qos network latency handling · ff616381
      Juuso Oikarinen 提交于
      The ps-qos latency handling is broken. It uses predetermined latency values
      to select specific dynamic PS timeouts. With common AP configurations, these
      values overlap with beacon interval and are therefore essentially useless
      (for network latencies less than the beacon interval, PSM is disabled.)
      
      This patch remedies the problem by replacing the predetermined network latency
      values with one high value (1900ms) which is used to go trigger full psm. For
      backwards compatibility, the value 2000ms is still mapped to a dynamic ps
      timeout of 100ms.
      
      Currently also the mac80211 internal value for storing user space configured
      dynamic PSM values is incorrectly in the driver visible ieee80211_conf struct.
      Move it to the ieee80211_local struct.
      Signed-off-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ff616381
  18. 15 6月, 2010 1 次提交
    • J
      mac80211: Fix circular locking dependency in ARP filter handling · 68542962
      Juuso Oikarinen 提交于
      There is a circular locking dependency when configuring the
      hardware ARP filters on association, occurring when flushing the mac80211
      workqueue. This is what happens:
      
      [   92.026800] =======================================================
      [   92.030507] [ INFO: possible circular locking dependency detected ]
      [   92.030507] 2.6.34-04781-g2b2c009e #85
      [   92.030507] -------------------------------------------------------
      [   92.030507] modprobe/5225 is trying to acquire lock:
      [   92.030507]  ((wiphy_name(local->hw.wiphy))){+.+.+.}, at: [<ffffffff8105b5c0>] flush_workq
      ueue+0x0/0xb0
      [   92.030507]
      [   92.030507] but task is already holding lock:
      [   92.030507]  (rtnl_mutex){+.+.+.}, at: [<ffffffff812b9ce2>] rtnl_lock+0x12/0x20
      [   92.030507]
      [   92.030507] which lock already depends on the new lock.
      [   92.030507]
      [   92.030507]
      [   92.030507] the existing dependency chain (in reverse order) is:
      [   92.030507]
      [   92.030507] -> #2 (rtnl_mutex){+.+.+.}:
      [   92.030507]        [<ffffffff810761fb>] lock_acquire+0xdb/0x110
      [   92.030507]        [<ffffffff81341754>] mutex_lock_nested+0x44/0x300
      [   92.030507]        [<ffffffff812b9ce2>] rtnl_lock+0x12/0x20
      [   92.030507]        [<ffffffffa022d47c>] ieee80211_assoc_done+0x6c/0xe0 [mac80211]
      [   92.030507]        [<ffffffffa022f2ad>] ieee80211_work_work+0x31d/0x1280 [mac80211]
      
      [   92.030507] -> #1 ((&local->work_work)){+.+.+.}:
      [   92.030507]        [<ffffffff810761fb>] lock_acquire+0xdb/0x110
      [   92.030507]        [<ffffffff8105a51a>] worker_thread+0x22a/0x370
      [   92.030507]        [<ffffffff8105ecc6>] kthread+0x96/0xb0
      [   92.030507]        [<ffffffff81003a94>] kernel_thread_helper+0x4/0x10
      [   92.030507]
      [   92.030507] -> #0 ((wiphy_name(local->hw.wiphy))){+.+.+.}:
      [   92.030507]        [<ffffffff81075fdc>] __lock_acquire+0x1c0c/0x1d50
      [   92.030507]        [<ffffffff810761fb>] lock_acquire+0xdb/0x110
      [   92.030507]        [<ffffffff8105b60e>] flush_workqueue+0x4e/0xb0
      [   92.030507]        [<ffffffffa023ff7b>] ieee80211_stop_device+0x2b/0xb0 [mac80211]
      [   92.030507]        [<ffffffffa0231635>] ieee80211_stop+0x3e5/0x680 [mac80211]
      
      The locking in this case is quite complex. Fix the problem by rewriting the
      way the hardware ARP filter list is handled - i.e. make a copy of the address
      list to the bss_conf struct, and provide that list to the hardware driver
      when needed.
      
      The current patch will enable filtering also in promiscuous mode. This may need
      to be changed in the future.
      Reported-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      68542962