1. 23 6月, 2014 5 次提交
    • J
      mac80211: remove weak WEP IV accounting · ba9030c2
      Johannes Berg 提交于
      Since WEP is practically dead, there seems very little
      point in keeping WEP weak IV accounting.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ba9030c2
    • A
      trivial: net/mac80211/mesh.c: fix typo s/Substract/Subtract/ · b314c669
      Antonio Ospite 提交于
      Signed-off-by: NAntonio Ospite <ao2@ao2.it>
      Cc: Luis Carlos Cobo <luisca@cozybit.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b314c669
    • B
      mac80211: remove ignore_plink_timer flag · 2b470c39
      Bob Copeland 提交于
      The mesh_plink code is doing some interesting things with the
      ignore_plink_timer flag.  It seems the original intent was to
      handle this race:
      
      cpu 0                           cpu 1
      -----                           -----
                                      start timer handler for state X
      acquire sta_lock
      change state from X to Y
      mod_timer() / del_timer()
      release sta_lock
                                      acquire sta_lock
                                      execute state Y timer too soon
      
      However, using the mod_timer()/del_timer() return values to
      detect these cases is broken.  As a result, timers get ignored
      unnecessarily, and stations can get stuck in the peering state
      machine.
      
      Instead, we can detect the case by looking at the timer expiration.
      In the case of del_timer, just ignore the timers in the following
      (LISTEN/ESTAB) states since they won't have timers anyway.
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2b470c39
    • J
      mac80211: fix station/driver powersave race · 5ac2e350
      Johannes Berg 提交于
      It is currently possible to have a race due to the station PS
      unblock work like this:
       * station goes to sleep with frames buffered in the driver
       * driver blocks wakeup
       * station wakes up again
       * driver flushes/returns frames, and unblocks, which schedules
         the unblock work
       * unblock work starts to run, and checks that the station is
         awake (i.e. that the WLAN_STA_PS_STA flag isn't set)
       * we process a received frame with PM=1, setting the flag again
       * ieee80211_sta_ps_deliver_wakeup() runs, delivering all frames
         to the driver, and then clearing the WLAN_STA_PS_DRIVER and
         WLAN_STA_PS_STA flags
      
      In this scenario, mac80211 will think that the station is awake,
      while it really is asleep, and any TX'ed frames should be filtered
      by the device (it will know that the station is sleeping) but then
      passed to mac80211 again, which will not buffer it either as it
      thinks the station is awake, and eventually the packets will be
      dropped.
      
      Fix this by moving the clearing of the flags to exactly where we
      learn about the situation. This creates a problem of reordering,
      so introduce another flag indicating that delivery is being done,
      this new flag also queues frames and is cleared only while the
      spinlock is held (which the queuing code also holds) so that any
      concurrent delivery/TX is handled correctly.
      Reported-by: NAndrei Otcheretianski <andrei.otcheretianski@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      5ac2e350
    • J
      mac80211: remove PID rate control · 20edb50e
      John W. Linville 提交于
      Minstrel has long since proven its worth.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      20edb50e
  2. 09 6月, 2014 1 次提交
  3. 28 5月, 2014 4 次提交
  4. 27 5月, 2014 1 次提交
  5. 26 5月, 2014 2 次提交
    • E
      mac80211: fix virtual monitor interface addition · 34171dc0
      Emmanuel Grumbach 提交于
      Since the commit below, cfg80211_chandef_dfs_required()
      will warn if it gets a an NL80211_IFTYPE_UNSPECIFIED iftype
      as explicitely written in the commit log.
      When an virtual monitor interface is added, its type is set
      in ieee80211_sub_if_data.vif.type, but not in
      ieee80211_sub_if_data.wdev.iftype which is passed to
      cfg80211_chandef_dfs_required() hence resulting in the
      following warning:
      
      WARNING: CPU: 1 PID: 21265 at net/wireless/chan.c:376 cfg80211_chandef_dfs_required+0xbc/0x130 [cfg80211]()
      Modules linked in: [...]
      CPU: 1 PID: 21265 Comm: ifconfig Tainted: G        W  O 3.13.11+ #12
      Hardware name: Dell Inc. Latitude E6410/0667CC, BIOS A01 03/05/2010
       0000000000000009 ffff88008f5fdb08 ffffffff817d4219 ffff88008f5fdb50
       ffff88008f5fdb40 ffffffff8106f57d 0000000000000000 0000000000000000
       ffff880081062fb8 ffff8800810604e0 0000000000000001 ffff88008f5fdba0
      Call Trace:
       [<ffffffff817d4219>] dump_stack+0x4d/0x66
       [<ffffffff8106f57d>] warn_slowpath_common+0x7d/0xa0
       [<ffffffff8106f5ec>] warn_slowpath_fmt+0x4c/0x50
       [<ffffffffa04ea4ec>] cfg80211_chandef_dfs_required+0xbc/0x130 [cfg80211]
       [<ffffffffa06b1024>] ieee80211_vif_use_channel+0x94/0x500 [mac80211]
       [<ffffffffa0684e6b>] ieee80211_add_virtual_monitor+0x1ab/0x5c0 [mac80211]
       [<ffffffffa0686ae5>] ieee80211_do_open+0xe75/0x1580 [mac80211]
       [<ffffffffa0687259>] ieee80211_open+0x69/0x70 [mac80211]
      [snip]
      
      Fixes: 00ec75fc ("cfg80211: pass the actual iftype when calling cfg80211_chandef_dfs_required()")
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Acked-by: NLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      34171dc0
    • L
      mac80211: add a single-transaction driver op to switch contexts · 1a5f0c13
      Luciano Coelho 提交于
      In some cases, when the driver is already using all the channel
      contexts it can handle at once, we have to do an in-place switch
      (ie. we cannot afford using an extra context temporarily for the
      transaction).  But some drivers may not support switching the channel
      context assigned to a vif on the fly (ie. without unassigning and
      assigning it) while others may only work if the context is changed on
      the fly, without unassigning it first.
      
      To allow these different scenarios, add a new driver operation that
      let's the driver decide how to handle an in-place switch.
      Signed-off-by: NLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1a5f0c13
  6. 21 5月, 2014 1 次提交
    • A
      mac80211: export the expected throughput · cca674d4
      Antonio Quartulli 提交于
      Add get_expected_throughput() API to mac80211 so that each
      driver can implement its own version based on the RC
      algorithm they are using (might be using an HW RC algo).
      The API returns a value expressed in Kbps.
      
      Also, add the new get_expected_throughput() member
      to the rate_control_ops structure in order to be
      able to query the RC algorithm (this patch provides an
      implementation of this API for both minstrel and
      minstrel_ht).
      
      The related member in the station_info object is now
      filled accordingly when dumping a station.
      
      Cc: Felix Fietkau <nbd@openwrt.org>
      Signed-off-by: NAntonio Quartulli <antonio@open-mesh.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      cca674d4
  7. 19 5月, 2014 2 次提交
  8. 15 5月, 2014 5 次提交
  9. 14 5月, 2014 1 次提交
    • J
      mac80211: fix on-channel remain-on-channel · b4b177a5
      Johannes Berg 提交于
      Jouni reported that if a remain-on-channel was active on the
      same channel as the current operating channel, then the ROC
      would start, but any frames transmitted using mgmt-tx on the
      same channel would get delayed until after the ROC.
      
      The reason for this is that the ROC starts, but doesn't have
      any handling for "remain on the same channel", so it stops
      the interface queues. The later mgmt-tx then puts the frame
      on the interface queues (since it's on the current operating
      channel) and thus they get delayed until after the ROC.
      
      To fix this, add some logic to handle remaining on the same
      channel specially and not stop the queues etc. in this case.
      This not only fixes the bug but also improves behaviour in
      this case as data frames etc. can continue to flow.
      
      Cc: stable@vger.kernel.org
      Reported-by: NJouni Malinen <j@w1.fi>
      Tested-by: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b4b177a5
  10. 13 5月, 2014 1 次提交
  11. 09 5月, 2014 3 次提交
  12. 08 5月, 2014 2 次提交
  13. 07 5月, 2014 1 次提交
  14. 06 5月, 2014 2 次提交
    • M
      mac80211: split CSA finalize function · 66199506
      Michal Kazior 提交于
      Improves readability and modularity.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      66199506
    • M
      mac80211: fix CSA tx queue stopping · 59af6928
      Michal Kazior 提交于
      It was possible for tx queues to be stuck stopped
      if AP CSA finalization failed. In that case
      neither stop_ap nor do_stop woke the queues up.
      This means it was impossible to perform tx at all
      until driver was reloaded or a successful CSA was
      performed later.
      
      It was possible to solve this in a simpler manner
      however this is more robust and future proof
      (having multi-vif CSA in mind).
      
      New sdata->csa_block_tx is introduced to keep
      track of which interfaces requested tx to be
      blocked for CSA. This is required because mac80211
      stops all tx queues for that purpose. This means
      queues must be awoken only when last tx-blocking
      CSA interface is finished.
      
      It is still possible to have tx queues stopped
      after CSA failure but as soon as offending
      interfaces are stopped from userspace (stop_ap or
      ifdown) tx queues are woken up properly.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      59af6928
  15. 05 5月, 2014 5 次提交
  16. 29 4月, 2014 2 次提交
  17. 28 4月, 2014 2 次提交