1. 05 3月, 2016 1 次提交
  2. 24 2月, 2016 4 次提交
  3. 04 12月, 2015 1 次提交
  4. 21 10月, 2015 1 次提交
    • J
      mac80211: move station statistics into sub-structs · e5a9f8d0
      Johannes Berg 提交于
      Group station statistics by where they're (mostly) updated
      (TX, RX and TX-status) and group them into sub-structs of
      the struct sta_info.
      
      Also rename the variables since the grouping now makes it
      obvious where they belong.
      
      This makes it easier to identify where the statistics are
      updated in the code, and thus easier to think about them.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e5a9f8d0
  5. 29 9月, 2015 2 次提交
  6. 24 9月, 2015 1 次提交
  7. 14 8月, 2015 1 次提交
  8. 17 7月, 2015 5 次提交
    • J
      mac80211: account TX MSDUs properly with segmentation offload · ccc6bb96
      Johannes Berg 提交于
      If an SKB will be segmented by the driver, count it for multiple
      MSDUs that are being transmitted rather than just a single.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ccc6bb96
    • B
      mac80211: enable assoc check for mesh interfaces · 3633ebeb
      Bob Copeland 提交于
      We already set a station to be associated when peering completes, both
      in user space and in the kernel.  Thus we should always have an
      associated sta before sending data frames to that station.
      
      Failure to check assoc state can cause crashes in the lower-level driver
      due to transmitting unicast data frames before driver sta structures
      (e.g. ampdu state in ath9k) are initialized.  This occurred when
      forwarding in the presence of fixed mesh paths: frames were transmitted
      to stations with whom we hadn't yet completed peering.
      
      Cc: stable@vger.kernel.org
      Reported-by: NAlexis Green <agreen@cococorp.com>
      Tested-by: NJesse Jones <jjones@cococorp.com>
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      3633ebeb
    • W
      mac80211: avoid unnecessary beacon deref on CSA counter update · e996ec2a
      Wojciech Dubowik 提交于
      The beacon struct is already available in many contexts that
      are also already in an RCU read-locked section. Avoid that by
      using the existing beacon struct pointer directly.
      Signed-off-by: NWojciech Dubowik <Wojciech.Dubowik@neratec.com>
      [rewrite subject/add commit message]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e996ec2a
    • J
      mac80211: remove key TX/RX counter · 77c96404
      Johannes Berg 提交于
      This counter is inherently racy (since it can be incremented by RX
      as well as by concurrent TX) and only available in debugfs. Instead
      of fixing it to be per-CPU or similar, remove it for now. If needed
      it should be added without races and with proper nl80211, perhaps
      even addressing the threshold reporting TODO item that's been there
      since the code was originally added.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      77c96404
    • M
      mac80211: don't clear all tx flags when requeing · e9de0190
      Michal Kazior 提交于
      When acting as AP and a PS-Poll frame is received
      associated station is marked as one in a Service
      Period. This state is kept until Tx status for
      released frame is reported. While a station is in
      Service Period PS-Poll frames are ignored.
      
      However if PS-Poll was received during A-MPDU
      teardown it was possible to have the to-be
      released frame re-queued back to pending queue.
      In such case the frame was stripped of 2 important
      flags:
      
       (a) IEEE80211_TX_CTL_NO_PS_BUFFER
       (b) IEEE80211_TX_STATUS_EOSP
      
      Stripping of (a) led to the frame that was to be
      released to be queued back to ps_tx_buf queue. If
      station remained to use only PS-Poll frames the
      re-queued frame (and new ones) was never actually
      transmitted because mac80211 would ignore
      subsequent PS-Poll frames due to station being in
      Service Period. There was nothing left to clear
      the Service Period bit (no xmit -> no tx status ->
      no SP end), i.e. the AP would have the station
      stuck in Service Period. Beacon TIM would
      repeatedly prompt station to poll for frames but
      it would get none.
      
      Once (a) is not stripped (b) becomes important
      because it's the main condition to clear the
      Service Period bit of the station when Tx status
      for the released frame is reported back.
      
      This problem was observed with ath9k acting as P2P
      GO in some testing scenarios but isn't limited to
      it. AP operation with mac80211 based Tx A-MPDU
      control combined with clients using PS-Poll frames
      is subject to this race.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e9de0190
  9. 10 6月, 2015 2 次提交
    • J
      mac80211: convert HW flags to unsigned long bitmap · 30686bf7
      Johannes Berg 提交于
      As we're running out of hardware capability flags pretty quickly,
      convert them to use the regular test_bit() style unsigned long
      bitmaps.
      
      This introduces a number of helper functions/macros to set and to
      test the bits, along with new debugfs code.
      
      The occurrences of an explicit __clear_bit() are intentional, the
      drivers were never supposed to change their supported bits on the
      fly. We should investigate changing this to be a per-frame flag.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      30686bf7
    • J
      mac80211: handle aggregation session timeout on fast-xmit path · 472be00d
      Johannes Berg 提交于
      The conversion to the fast-xmit path lost proper aggregation session
      timeout handling - the last_tx wasn't set on that path and the timer
      would therefore incorrectly tear down the session periodically (with
      those drivers/rate control algorithms that have a timeout.)
      
      In case of iwlwifi, this was every 5 seconds and caused significant
      throughput degradation.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      472be00d
  10. 02 6月, 2015 1 次提交
    • J
      mac80211: move TX PN to public part of key struct · db388a56
      Johannes Berg 提交于
      For drivers supporting TSO or similar features, but that still have
      PN assignment in software, there's a need to have some memory to
      store the current PN value. As mac80211 already stores this and it's
      somewhat complicated to add a per-driver area to the key struct (due
      to the dynamic sizing thereof) it makes sense to just move the TX PN
      to the keyconf, i.e. the public part of the key struct.
      
      As TKIP is more complicated and we won't able to offload it in this
      way right now (fast-xmit is skipped for TKIP unless the HW does it
      all, and our hardware needs MMIC calculation in software) I've not
      moved that for now - it's possible but requires exposing a lot of
      the internal TKIP state.
      
      As an bonus side effect, we can remove a lot of code by assuming the
      keyseq struct has a certain layout - with BUILD_BUG_ON to verify it.
      
      This might also improve performance, since now TX and RX no longer
      share a cacheline.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      db388a56
  11. 05 5月, 2015 2 次提交
  12. 24 4月, 2015 2 次提交
  13. 22 4月, 2015 7 次提交
    • J
      mac80211: allow segmentation offloads · 80616c0d
      Johannes Berg 提交于
      Implement the necessary software segmentation on the normal
      TX path so that fast-xmit can use segmentation offload if
      the hardware (or driver) supports it.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      80616c0d
    • J
      mac80211: allow drivers to support S/G · 680a0dab
      Johannes Berg 提交于
      If drivers want to support S/G (really just gather DMA on TX) then
      we can now easily support this on the fast-xmit path since it just
      needs to write to the ethernet header (and already has a check for
      that being possible.)
      
      However, disallow this on the regular TX path (which has to handle
      fragmentation, software crypto, etc.) by calling skb_linearize().
      
      Also allow the related HIGHDMA since that's not interesting to the
      code in mac80211 at all anyway.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      680a0dab
    • J
      mac80211: allow checksum offload only in fast-xmit · 2d981fdd
      Johannes Berg 提交于
      When we go through the complete TX processing, there are a number
      of things like fragmentation and software crypto that require the
      checksum to be calculated already.
      
      In favour of maintainability, instead of adding the necessary call
      to skb_checksum_help() in all the places that need it, just do it
      once before the regular TX processing.
      
      Right now this only affects the TI wlcore and QCA ath10k drivers
      since they're the only ones using checksum offload. The previous
      commits enabled fast-xmit for them in almost all cases.
      
      For wlcore this even fixes a corner case: when a key fails to be
      programmed to hardware software encryption gets used, encrypting
      frames with a bad checksum.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2d981fdd
    • J
      mac80211: extend fast-xmit to cover IBSS · 3ffd8840
      Johannes Berg 提交于
      IBSS can be supported very easily since it uses the standard station
      authorization state etc. so it just needs to be covered by the header
      building switch statement.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      3ffd8840
    • J
      mac80211: extend fast-xmit for more ciphers · e495c247
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      e495c247
    • J
      mac80211: extend fast-xmit to driver fragmentation · 725b812c
      Johannes Berg 提交于
      If the driver handles fragmentation then it wouldn't
      be done in software so we can still use the fast-xmit
      path in that case.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      725b812c
    • J
      mac80211: add TX fastpath · 17c18bf8
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      17c18bf8
  14. 02 4月, 2015 1 次提交
    • F
      mac80211: add an intermediate software queue implementation · ba8c3d6f
      Felix Fietkau 提交于
      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: NFelix Fietkau <nbd@openwrt.org>
      [resolved minor context conflict, minor changes, endian annotations]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ba8c3d6f
  15. 30 3月, 2015 2 次提交
  16. 20 3月, 2015 5 次提交
    • J
      mac80211: avoid duplicate TX path station lookup · 7c10770f
      Johannes Berg 提交于
      Instead of looking up the destination station twice in the TX path
      (first to build the header, and then for control processing), save
      it when building the header and use it later in the TX path.
      
      To avoid having to look up the station in the many callers, allow
      those to pass %NULL which keeps the existing lookup.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      7c10770f
    • J
      mac80211: mesh: avoid pointless station lookup · e33f5569
      Johannes Berg 提交于
      In ieee80211_build_hdr(), the station is looked up to build the
      header correctly (QoS field) and to check for authorization. For
      mesh, authorization isn't checked here, and QoS capability is
      mandatory, so the station lookup can be avoided.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e33f5569
    • J
      mac80211: drop 4-addr VLAN frames earlier if not connected · a8d15ff0
      Johannes Berg 提交于
      If there's no station on the 4-addr VLAN interface, then frames
      cannot be transmitted. Drop such frames earlier, before setting
      up all the information for them.
      
      We should keep the old check though since that code might be used
      for other internally-generated frames.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a8d15ff0
    • J
      mac80211: don't look up destination station twice · 5041006c
      Johannes Berg 提交于
      There's no need to look up the destination station twice while
      building the 802.11 header for a given frame if the frame will
      actually be transmitted to the station we initially looked up.
      
      This happens for 4-addr VLAN interfaces and TDLS connections, which
      both directly send the frame to the station they looked up, though
      in the case of TDLS some station conditions need to be checked.
      
      To avoid that, add a variable indicating that we've looked up the
      station that the frame is going to be transmitted to, and avoid the
      lookup/flag checking if it already has been done.
      
      In the TDLS case, also move the authorized/wme_sta flag assignment
      to the correct place, i.e. only when that station is really used.
      Before this change, the new lookup should always have succeeded so
      that the potentially erroneous data would be overwritten.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      5041006c
    • J
      mac80211: remove drop_unencrypted code · e8f4fb7c
      Johannes Berg 提交于
      This mechanism was historic, and only ever used by IBSS, which
      also doesn't need to have it as it properly manages station's
      802.1X PAE state (or, with WEP, always has a key.)
      
      Remove the mechanism to clean up the code.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e8f4fb7c
  17. 04 3月, 2015 1 次提交
  18. 01 3月, 2015 1 次提交
    • J
      mac80211: remove TX latency measurement code · abfbc3af
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      abfbc3af