1. 13 Dec, 2018 1 commit
  2. 30 May, 2018 1 commit
  3. 03 Mar, 2018 1 commit
  4. 05 Jul, 2017 1 commit
  5. 24 Jun, 2017 3 commits
  6. 27 Apr, 2017 2 commits
  7. 15 Mar, 2017 2 commits
  8. 26 Jan, 2017 1 commit
    • Johannes Berg's avatar
      mac80211: implement multicast forwarding on fast-RX path · bab10a54
      Johannes Berg authored
      commit eeb0d56f upstream.
      
      In AP (or VLAN) mode, when unicast 802.11 packets are received,
      they might actually be multicast after conversion. In this case
      the fast-RX path didn't handle them properly to send them back
      to the wireless medium. Implement that by copying the SKB and
      sending it back out.
      
      The possible alternative would be to just punt the packet back
      to the regular (slow) RX path, but since we have almost all of
      the required code here already it's not so complicated to add
      here. Punting it back would also mean acquiring the spinlock,
      which would be bad for the stated purpose of the fast-RX path,
      to enable well-performing parallel RX.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bab10a54
  9. 12 Oct, 2016 4 commits
  10. 30 Sep, 2016 2 commits
    • Toke Høiland-Jørgensen's avatar
      mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue · bb42f2d1
      Toke Høiland-Jørgensen authored
      The TXQ intermediate queues can cause packet reordering when more than
      one flow is active to a single station. Since some of the wifi-specific
      packet handling (notably sequence number and encryption handling) is
      sensitive to re-ordering, things break if they are applied before the
      TXQ.
      
      This splits up the TX handlers and fast_xmit logic into two parts: An
      early part and a late part. The former is applied before TXQ enqueue,
      and the latter after dequeue. The non-TXQ path just applies both parts
      at once.
      
      Because fragments shouldn't be split up or reordered, the fragmentation
      handler is run after dequeue. Any fragments are then kept in the TXQ and
      on subsequent dequeues they take precedence over dequeueing from the FQ
      structure.
      
      This approach avoids having to scatter special cases all over the place
      for when TXQ is enabled, at the cost of making the fast_xmit and TX
      handler code slightly more complex.
      Signed-off-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
      [fix a few code-style nits, make ieee80211_xmit_fast_finish void,
       remove a useless txq->sta check]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      bb42f2d1
    • Ayala Beker's avatar
      cfg80211: add start / stop NAN commands · cb3b7d87
      Ayala Beker authored
      This allows user space to start/stop NAN interface.
      A NAN interface is like P2P device in a few aspects: it
      doesn't have a netdev associated to it.
      Add the new interface type and prevent operations that
      can't be executed on NAN interface like scan.
      
      Define several attributes that may be configured by user space
      when starting NAN functionality (master preference and dual
      band operation)
      Signed-off-by: default avatarAndrei Otcheretianski <andrei.otcheretianski@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      cb3b7d87
  11. 20 Sep, 2016 1 commit
    • Herbert Xu's avatar
      mac80211: Use rhltable instead of rhashtable · 83e7e4ce
      Herbert Xu authored
      mac80211 currently uses rhashtable with insecure_elasticity set
      to true.  The latter is because of duplicate objects.  What's
      more, mac80211 walks the rhashtable chains by hand which is broken
      as rhashtable may contain multiple tables due to resizing or
      rehashing.
      
      This patch fixes it by converting it to the newly added rhltable
      interface which is designed for use with duplicate objects.
      
      With rhltable a lookup returns a list of objects instead of a
      single one.  This is then fed into the existing for_each_sta_info
      macro.
      
      This patch also deletes the sta_addr_hash function since rhashtable
      defaults to jhash.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83e7e4ce
  12. 12 Sep, 2016 5 commits
  13. 02 Aug, 2016 1 commit
  14. 30 Jun, 2016 1 commit
  15. 09 Jun, 2016 1 commit
    • Michal Kazior's avatar
      mac80211: implement fair queueing per txq · fa962b92
      Michal Kazior authored
      mac80211's software queues were designed to work
      very closely with device tx queues. They are
      required to make use of 802.11 packet aggregation
      easily and efficiently.
      
      Due to the way 802.11 aggregation is designed it
      only makes sense to keep fair queuing as close to
      hardware as possible to reduce induced latency and
      inertia and provide the best flow responsiveness.
      
      This change doesn't translate directly to
      immediate and significant gains. End result
      depends on driver's induced latency. Best results
      can be achieved if driver keeps its own tx
      queue/fifo fill level to a minimum.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      fa962b92
  16. 12 May, 2016 1 commit
    • Johannes Berg's avatar
      mac80211: allow software PS-Poll/U-APSD with AP_LINK_PS · 46fa38e8
      Johannes Berg authored
      When using RSS, frames might not be processed in the correct order,
      and thus AP_LINK_PS must be used; most likely with firmware keeping
      track of the powersave state, this is the case in iwlwifi now.
      
      In this case, the driver can use ieee80211_sta_ps_transition() to
      still have mac80211 manage powersave buffering. However, for U-APSD
      and PS-Poll this isn't sufficient. If the device can't manage that
      entirely on its own, mac80211's code should be used.
      
      To allow this, export two functions: ieee80211_sta_uapsd_trigger()
      and ieee80211_sta_pspoll().
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      46fa38e8
  17. 12 Apr, 2016 1 commit
  18. 06 Apr, 2016 8 commits
    • Johannes Berg's avatar
      mac80211: enable collecting station statistics per-CPU · c9c5962b
      Johannes Berg authored
      If the driver advertises the new HW flag USE_RSS, make the
      station statistics on the fast-rx path per-CPU. This will
      enable calling the RX in parallel, only hitting locking or
      shared cachelines when the fast-RX path isn't available.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c9c5962b
    • Johannes Berg's avatar
      mac80211: add fast-rx path · 49ddf8e6
      Johannes Berg authored
      The regular RX path has a lot of code, but with a few
      assumptions on the hardware it's possible to reduce the
      amount of code significantly. Currently the assumptions
      on the driver are the following:
       * hardware/driver reordering buffer (if supporting aggregation)
       * hardware/driver decryption & PN checking (if using encryption)
       * hardware/driver did de-duplication
       * hardware/driver did A-MSDU deaggregation
       * AP_LINK_PS is used (in AP mode)
       * no client powersave handling in mac80211 (in client mode)
      
      of which some are actually checked per packet:
       * de-duplication
       * PN checking
       * decryption
      and additionally packets must
       * not be A-MSDU (have been deaggregated by driver/device)
       * be data packets
       * not be fragmented
       * be unicast
       * have RFC 1042 header
      
      Additionally dynamically we assume:
       * no encryption or CCMP/GCMP, TKIP/WEP/other not allowed
       * station must be authorized
       * 4-addr format not enabled
      
      Some data needed for the RX path is cached in a new per-station
      "fast_rx" structure, so that we only need to look at this and
      the packet, no other memory when processing packets on the fast
      RX path.
      
      After doing the above per-packet checks, the data path collapses
      down to a pretty simple conversion function taking advantage of
      the data cached in the small fast_rx struct.
      
      This should speed up the RX processing, and will make it easier
      to reason about parallelizing RX (for which statistics will need
      to be per-CPU still.)
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      49ddf8e6
    • Johannes Berg's avatar
      mac80211: fix RX u64 stats consistency on 32-bit platforms · 0f9c5a61
      Johannes Berg authored
      On 32-bit platforms, the 64-bit counters we keep need to be protected
      to be consistently read. Use the u64_stats_sync mechanism to do that.
      
      In order to not end up with overly long lines, refactor the tidstats
      assignments a bit.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      0f9c5a61
    • Johannes Berg's avatar
      mac80211: fix last RX rate data consistency · 4f6b1b3d
      Johannes Berg authored
      When storing the last_rate_* values in the RX code, there's nothing
      to guarantee consistency, so a concurrent reader could see, e.g.
      last_rate_idx on the new value, but last_rate_flag still on the old,
      getting completely bogus values in the end.
      
      To fix this, I lifted the sta_stats_encode_rate() function from my
      old rate statistics code, which encodes the entire rate data into a
      single 16-bit value, avoiding the consistency issue.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      4f6b1b3d
    • Johannes Berg's avatar
      mac80211: move averaged values out of rx_stats · 0be6ed13
      Johannes Berg authored
      Move the averaged values out of rx_stats and into rx_stats_avg,
      to cleanly split them out. The averaged ones cannot be supported
      for parallel RX in a per-CPU fashion, while the other values can
      be collected per CPU and then combined/selected when needed.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      0be6ed13
    • Johannes Berg's avatar
      mac80211: move semicolon out of CALL_RXH macro · 8ebaa5b0
      Johannes Berg authored
      Move the semicolon, people typically assume that and
      once line already put a semicolon behind the "call".
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8ebaa5b0
    • Johannes Berg's avatar
      mac80211: count MSDUs in A-MSDU properly · de8f18d3
      Johannes Berg authored
      For the RX MSDU statistics, we need to count the number of
      MSDUs created and accepted from an A-MSDU. Right now, all
      frames in any A-MSDUs were completely ignored. Fix this by
      moving the RX MSDU statistics accounting into the deliver
      function.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      de8f18d3
    • Johannes Berg's avatar
      mac80211: allow passing transmitter station on RX · d63b548f
      Johannes Berg authored
      Sometimes drivers already looked up, or know out-of-band
      from their device, which station transmitted a given RX
      frame. Allow them to pass the station pointer to mac80211
      to save the extra lookup.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      d63b548f
  19. 05 Apr, 2016 2 commits
  20. 05 Mar, 2016 1 commit