1. 22 Sep, 2015 2 commits
  2. 14 Aug, 2015 1 commit
  3. 17 Jul, 2015 9 commits
  4. 20 May, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: don't split remain-on-channel for coalescing · 252ec2b3
      Johannes Berg authored
      Due to remain-on-channel scheduling delays, when we split an ROC
      while coalescing, we'll usually get a picture like this:
      
      existing ROC:  |------------------|
      current time:              ^
      new ROC:                   |------|              |-------|
      
      If the expected response frames are then transmitted by the peer
      in the hole between the two fragments of the new ROC, we miss
      them and the process (e.g. ANQP query) fails.
      
      mac80211 expects that the window to miss something is small:
      
      existing ROC:  |------------------|
      new ROC:                   |------||-------|
      
      but that's normally not the case.
      
      To avoid this problem, coalesce only if the new ROC's duration
      is <= the remaining time on the existing one:
      
      existing ROC:  |------------------|
      new ROC:                   |-----|
      
      and never split a new one but schedule it afterwards instead:
      
      existing ROC:  |------------------|
      new ROC:                                       |-------------|
      
      type=bugfix
      bug=not-tracked
      fixes=unknown
      Reported-by: default avatarMatti Gottlieb <matti.gottlieb@intel.com>
      Reviewed-by: default avatarEliadX Peller <eliad@wizery.com>
      Reviewed-by: default avatarMatti Gottlieb <matti.gottlieb@intel.com>
      Tested-by: default avatarMatti Gottlieb <matti.gottlieb@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      252ec2b3
  5. 19 May, 2015 1 commit
  6. 11 May, 2015 1 commit
  7. 05 May, 2015 3 commits
    • Johannes Berg's avatar
      mac80211: make LED triggering depend on activation · 8d5c2585
      Johannes Berg authored
      When LED triggers are compiled in, but not used, mac80211 will still
      call them to update the status. This isn't really a problem for the
      assoc and radio ones, but the TX/RX (and to a certain extend TPT)
      ones can be called very frequently (for every packet.)
      
      In order to avoid that when they're not used, track their activation
      and call the corresponding trigger (and in the TPT case, account for
      throughput) only when the trigger is actually used by an LED.
      
      Additionally, make those trigger functions inlines since theyre only
      used once in the remaining code.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8d5c2585
    • Johannes Berg's avatar
      mac80211: move dot11 counters under MAC80211_DEBUG_COUNTERS · c206ca67
      Johannes Berg authored
      Since these counters can only be read through debugfs, there's
      very little point in maintaining them all the time. However,
      even just making them depend on debugfs is pointless - they're
      not normally used. Additionally a number of them aren't even
      concurrency safe.
      
      Move them under MAC80211_DEBUG_COUNTERS so they're normally
      not even compiled in.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c206ca67
    • Johannes Berg's avatar
      mac80211: clean up global debugfs statistics · f1160434
      Johannes Berg authored
      The debugfs statistics macros are pointlessly verbose, so change
      that macro to just have a single argument. While at it, remove
      the unused counters and rename rx_expand_skb_head2 to the better
      rx_expand_skb_head_defrag.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f1160434
  8. 24 Apr, 2015 2 commits
  9. 22 Apr, 2015 1 commit
    • 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>
      17c18bf8
  10. 07 Apr, 2015 1 commit
  11. 01 Apr, 2015 2 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>
      ba8c3d6f
    • 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>
      7bedd0cf
  12. 30 Mar, 2015 3 commits
  13. 20 Mar, 2015 2 commits
  14. 16 Mar, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: ignore CSA to same channel · f84eaa10
      Johannes Berg authored
      If the AP is confused and starts doing a CSA to the same channel,
      just ignore that request instead of trying to act it out since it
      was likely sent in error anyway.
      
      In the case of the bug I was investigating the GO was misbehaving
      and sending out a beacon with CSA IEs still included after having
      actually done the channel switch.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f84eaa10
  15. 03 Mar, 2015 2 commits
  16. 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>
      abfbc3af
  17. 27 Jan, 2015 1 commit
  18. 23 Jan, 2015 2 commits
    • Emmanuel Grumbach's avatar
      mac80211: avoid races related to suspend flow · 4afaff17
      Emmanuel Grumbach authored
      When we go to suspend, there is complex set of states that
      avoids races. The quiescing variable is set whlie
      __ieee80211_suspend is running. Then suspended is set.
      The code makes sure there is no window without any of these
      flags.
      
      The problem is that workers can still be enqueued while we
      are quiescing. This leads to situations where the driver is
      already suspending and other flows like disassociation are
      handled by a worker.
      
      To fix this, we need to check quiescing and suspended flags
      in the worker itself and not only before enqueueing it.
      I also add here extensive documentation to ease the
      understanding of these complex issues.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      4afaff17
    • Lorenzo Bianconi's avatar
      mac80211: enable TPC through mac80211 stack · db82d8a9
      Lorenzo Bianconi authored
      Control per packet Transmit Power Control (TPC) in lower drivers
      according to TX power settings configured by the user. In particular TPC is
      enabled if value passed in enum nl80211_tx_power_setting is
      NL80211_TX_POWER_LIMITED (allow using less than specified from userspace),
      whereas TPC is disabled if nl80211_tx_power_setting is set to
      NL80211_TX_POWER_FIXED (use value configured from userspace)
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      db82d8a9
  19. 14 Jan, 2015 2 commits
    • Eliad Peller's avatar
      mac80211: remove local->radar_detect_enabled · 5cbc95a7
      Eliad Peller authored
      local->radar_detect_enabled should tell whether
      radar_detect is enabled on any interface belonging
      to local.
      
      However, it's not getting updated correctly
      in many cases (actually, when testing with hwsim
      it's never been set, even when the dfs master
      is beaconing).
      
      Instead of handling all the corner cases
      (e.g. channel switch), simply check whether
      radar detection is enabled only when needed,
      instead of caching the result.
      Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5cbc95a7
    • Emmanuel Grumbach's avatar
      mac80211: let flush() drop packets when possible · 3b24f4c6
      Emmanuel Grumbach authored
      When roaming / suspending, it makes no sense to wait until
      the transmit queues of the device are empty. In extreme
      condition they can be starved (VO saturating the air), but
      even in regular cases, it is pointless to delay the roaming
      because the low level driver is trying to send packets to
      an AP which is far away. We'd rather drop these packets and
      let TCP retransmit if needed. This will allow to speed up
      the roaming.
      
      For suspend, the explanation is even more trivial.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      3b24f4c6
  20. 17 Dec, 2014 1 commit
  21. 19 Nov, 2014 1 commit