1. 05 Apr, 2016 1 commit
  2. 24 Feb, 2016 2 commits
  3. 04 Dec, 2015 1 commit
  4. 21 Oct, 2015 3 commits
  5. 14 Oct, 2015 1 commit
  6. 22 Sep, 2015 1 commit
  7. 14 Aug, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: use DECLARE_EWMA · 40d9a38a
      Johannes Berg authored
      Instead of using the out-of-line average calculation, use the new
      DECLARE_EWMA() macro to declare a signal EWMA, and use that.
      This actually *reduces* the code size slightly (on x86-64) while
      also reducing the station info size by 80 bytes.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  8. 17 Jul, 2015 8 commits
  9. 09 Jun, 2015 1 commit
  10. 06 May, 2015 1 commit
  11. 05 May, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: remove sta->tx_fragments counter · f83f1c12
      Johannes Berg authored
      This counter is unsafe with concurrent TX and is only exposed
      through debugfs and ethtool. Instead of trying to fix it just
      remove it for now, if it's really needed then it should be
      exposed through nl80211 and in a way that drivers that do the
      fragmentation in the device could support it as well.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  12. 22 Apr, 2015 2 commits
    • Johannes Berg's avatar
      mac80211: extend fast-xmit for more ciphers · e495c247
      Johannes Berg authored
      When crypto is offloaded then in some cases it's all handled
      by the device, and in others only some space for the IV must
      be reserved in the frame. Handle both of these cases in the
      fast-xmit path, up to a limit of 18 bytes of space for IVs.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      mac80211: add TX fastpath · 17c18bf8
      Johannes Berg authored
      In order to speed up mac80211's TX path, add the "fast-xmit" cache
      that will cache the data frame 802.11 header and other data to be
      able to build the frame more quickly. This cache is rebuilt when
      external triggers imply changes, but a lot of the checks done per
      packet today are simplified away to the check for the cache.
      There's also a more detailed description in the code.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  13. 20 Apr, 2015 2 commits
    • Johannes Berg's avatar
      mac80211: lock rate control · 35c347ac
      Johannes Berg authored
      Both minstrel (reported by Sven Eckelmann) and the iwlwifi rate
      control aren't properly taking concurrency into account. It's
      likely that the same is true for other rate control algorithms.
      In the case of minstrel this manifests itself in crashes when an
      update and other data access are run concurrently, for example
      when the stations change bandwidth or similar. In iwlwifi, this
      can cause firmware crashes.
      Since fixing all rate control algorithms will be very difficult,
      just provide locking for invocations. This protects the internal
      data structures the algorithms maintain.
      I've manipulated hostapd to test this, by having it change its
      advertised bandwidth roughly ever 150ms. At the same time, I'm
      running a flood ping between the client and the AP, which causes
      this race of update vs. get_rate/status to easily happen on the
      client. With this change, the system survives this test.
      Reported-by: default avatarSven Eckelmann <sven@open-mesh.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Bob Copeland's avatar
      mac80211: introduce plink lock for plink fields · 48bf6bed
      Bob Copeland authored
      The mesh plink code uses sta->lock to serialize access to the
      plink state fields between the peer link state machine and the
      peer link timer.  Some paths (e.g. those involving
      mps_qos_null_tx()) unfortunately hold this spinlock across
      frame tx, which is soon to be disallowed.  Add a new spinlock
      just for plink access.
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  14. 01 Apr, 2015 3 commits
    • Felix Fietkau's avatar
      mac80211: add an intermediate software queue implementation · ba8c3d6f
      Felix Fietkau authored
      This allows drivers to request per-vif and per-sta-tid queues from which
      they can pull frames. This makes it easier to keep the hardware queues
      short, and to improve fairness between clients and vifs.
      The task of scheduling packet transmission is left up to the driver -
      queueing is controlled by mac80211. Drivers can only dequeue packets by
      calling ieee80211_tx_dequeue. This makes it possible to add active queue
      management later without changing drivers using this code.
      This can also be used as a starting point to implement A-MSDU
      aggregation in a way that does not add artificially induced latency.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      [resolved minor context conflict, minor changes, endian annotations]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      mac80211: fix RX A-MPDU session reorder timer deletion · 788211d8
      Johannes Berg authored
      There's an issue with the way the RX A-MPDU reorder timer is
      deleted that can cause a kernel crash like this:
       * tid_rx is removed - call_rcu(ieee80211_free_tid_rx)
       * station is destroyed
       * reorder timer fires before ieee80211_free_tid_rx() runs,
         accessing the station, thus potentially crashing due to
         the use-after-free
      The station deletion is protected by synchronize_net(), but
      that isn't enough -- ieee80211_free_tid_rx() need not have
      run when that returns (it deletes the timer.) We could use
      rcu_barrier() instead of synchronize_net(), but that's much
      more expensive.
      Instead, to fix this, add a field tracking that the session
      is being deleted. In this case, the only re-arming of the
      timer happens with the reorder spinlock held, so make that
      code not rearm it if the session is being deleted and also
      delete the timer after setting that field. This ensures the
      timer cannot fire after ___ieee80211_stop_rx_ba_session()
      returns, which fixes the problem.
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      mac80211: use rhashtable for station table · 7bedd0cf
      Johannes Berg authored
      We currently have a hand-rolled table with 256 entries and are
      using the last byte of the MAC address as the hash. This hash
      is obviously very fast, but collisions are easily created and
      we waste a lot of space in the common case of just connecting
      as a client to an AP where we just have a single station. The
      other common case of an AP is also suboptimal due to the size
      of the hash table and the ease of causing collisions.
      Convert all of this to use rhashtable with jhash, which gives
      us the advantage of a far better hash function (with random
      perturbation to avoid hash collision attacks) and of course
      that the hash table grows and shrinks dynamically with chain
      length, improving both cases above.
      Use a specialised hash function (using jhash, but with fixed
      length) to achieve better compiler optimisation as suggested
      by Sergey Ryazanov.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  15. 28 Feb, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: remove TX latency measurement code · abfbc3af
      Johannes Berg authored
      Revert commit ad38bfc9
       ("mac80211: Tx frame latency statistics")
      (along with some follow-up fixes).
      This code turned out not to be as useful in the current form as we
      thought, and we've internally hacked it up more, but that's not
      very suitable for upstream (for now), and we might just do that
      with tracing instead.
      Therefore, for now at least, remove this code. We might also need
      to use the skb->tstamp field for the TCP performance issue, which
      is more important than the debugging.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  16. 08 Jan, 2015 1 commit
  17. 19 Nov, 2014 3 commits
  18. 09 Oct, 2014 1 commit
  19. 11 Sep, 2014 1 commit
  20. 05 Sep, 2014 1 commit
  21. 03 Sep, 2014 1 commit
    • Michal Kazior's avatar
      mac80211: fix offloaded BA session traffic after hw restart · 4549cf2b
      Michal Kazior authored
      When starting an offloaded BA session it is
      unknown what starting sequence number should be
      used. Using last_seq worked in most cases except
      after hw restart.
      When hw restart is requested last_seq is
      (rightfully so) kept unmodified. This ended up
      with BA sessions being restarted with an aribtrary
      BA window values resulting in dropped frames until
      sequence numbers caught up.
      Instead of last_seq pick seqno of a first Rxed
      frame of a given BA session.
      This fixes stalled traffic after hw restart with
      offloaded BA sessions (currently only ath10k).
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  22. 15 Aug, 2014 1 commit
  23. 21 Jul, 2014 2 commits