1. 06 4月, 2016 1 次提交
    • J
      mac80211: add fast-rx path · 49ddf8e6
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      49ddf8e6
  2. 05 4月, 2016 2 次提交
  3. 01 3月, 2016 1 次提交
    • J
      mac80211: check PN correctly for GCMP-encrypted fragmented MPDUs · 9acc54be
      Johannes Berg 提交于
      Just like for CCMP we need to check that for GCMP the fragments
      have PNs that increment by one; the spec was updated to fix this
      security issue and now has the following text:
      
      	The receiver shall discard MSDUs and MMPDUs whose constituent
      	MPDU PN values are not incrementing in steps of 1.
      
      Adapt the code for CCMP to work for GCMP as well, luckily the
      relevant fields already alias each other so no code duplication
      is needed (just check the aliasing with BUILD_BUG_ON.)
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9acc54be
  4. 24 2月, 2016 5 次提交
  5. 14 1月, 2016 1 次提交
  6. 15 12月, 2015 1 次提交
  7. 04 12月, 2015 3 次提交
    • J
      mac80211: rewrite remain-on-channel logic · aaa016cc
      Johannes Berg 提交于
      Jouni found a bug in the remain-on-channel logic: when a short item
      is queued, a long item is combined with it extending the original
      one, and then the long item is deleted, the timeout doesn't go back
      to the short one, and the short item ends up taking a long time. In
      this case, this showed as blocking scan when running two test cases
      back to back - the scan from the second was delayed even though all
      the remain-on-channel items should long have been gone.
      
      Fixing this with the current data structures turns out to be a bit
      complicated, we just remove the long item from the dependents list
      right now and don't recalculate the timeouts.
      
      There's a somewhat similar bug where we delete the short item and
      all the dependents go with it; to fix this we'd have to move them
      from the dependents to the real list.
      
      Instead of trying to do that, rewrite the code to not have all this
      complexity in the data structures: use a single list and allow more
      than one entry in it being marked as started. This makes the code a
      bit more complex, the worker needs to understand that it might need
      to just remove one of the started items, while keeping the device
      off-channel, but that's not more complicated than the nested data
      structures.
      
      This then fixes both issues described, and makes it easier to also
      limit the overall off-channel time when combining.
      
      TODO: as before, with hardware remain-on-channel, deleting an item
      after combining results in cancelling them all - we can keep track
      of the time elapsed and only cancel after that to fix this.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      aaa016cc
    • J
      mac80211: simplify ack_skb handling · 5ee00dbd
      Johannes Berg 提交于
      Since the cookie is assigned inside ieee80211_make_ack_skb()
      now, we no longer need to return the ack_skb as the cookie
      and can simplify the function's return and the callers. Also
      rename it to ieee80211_attach_ack_skb() to more accurately
      reflect its purpose.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      5ee00dbd
    • J
      mac80211: move off-channel/mgmt-tx code to offchannel.c · a2fcfccb
      Johannes Berg 提交于
      This is quite a bit of code that logically depends here since
      it has to deal with all the remain-on-channel logic.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a2fcfccb
  8. 03 11月, 2015 3 次提交
  9. 21 10月, 2015 1 次提交
  10. 15 10月, 2015 3 次提交
  11. 29 9月, 2015 1 次提交
  12. 22 9月, 2015 4 次提交
  13. 14 8月, 2015 1 次提交
  14. 17 7月, 2015 9 次提交
  15. 20 5月, 2015 1 次提交
  16. 19 5月, 2015 1 次提交
  17. 12 5月, 2015 1 次提交
  18. 05 5月, 2015 1 次提交
    • J
      mac80211: make LED triggering depend on activation · 8d5c2585
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      8d5c2585