1. 19 12月, 2018 1 次提交
  2. 05 12月, 2018 1 次提交
  3. 12 10月, 2018 1 次提交
    • A
      mac80211: implement ieee80211_tx_rate_update to update rate · f8252e7b
      Anilkumar Kolli 提交于
      Current mac80211 has provision to update tx status through
      ieee80211_tx_status() and ieee80211_tx_status_ext(). But
      drivers like ath10k updates the tx status from the skb except
      txrate, txrate will be updated from a different path, peer stats.
      
      Using ieee80211_tx_status_ext() in two different paths
      (one for the stats, one for the tx rate) would duplicate
      the stats instead.
      
      To avoid this stats duplication, ieee80211_tx_rate_update()
      is implemented.
      Signed-off-by: NAnilkumar Kolli <akolli@codeaurora.org>
      [minor commit message editing, use initializers in code]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f8252e7b
  4. 10 9月, 2018 1 次提交
    • Y
      mac80211: fix TX status reporting for ieee80211s · c4205510
      Yuan-Chi Pang 提交于
      TX status reporting to ieee80211s is through ieee80211s_update_metric.
      There are two problems about ieee80211s_update_metric:
      
      1. The purpose is to estimate the fail probability
      to a specific link. No need to restrict to data frame.
      
      2. Current implementation does not work if wireless driver does not
      pass tx_status with skb.
      
      Fix this by removing ieee80211_is_data condition, passing
      ieee80211_tx_status directly to ieee80211s_update_metric, and
      putting it in both __ieee80211_tx_status and ieee80211_tx_status_ext.
      Signed-off-by: NYuan-Chi Pang <fu3mo6goo@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c4205510
  5. 05 9月, 2018 1 次提交
  6. 08 5月, 2018 1 次提交
  7. 19 2月, 2018 2 次提交
  8. 19 12月, 2017 1 次提交
  9. 11 12月, 2017 1 次提交
    • T
      mac80211: Add airtime account and scheduling to TXQs · b0d52ad8
      Toke Høiland-Jørgensen 提交于
      This adds airtime accounting and scheduling to the mac80211 TXQ
      scheduler. A new hardware flag, AIRTIME_ACCOUNTING, is added that
      drivers can set if they support reporting airtime usage of
      transmissions. When this flag is set, mac80211 will expect the actual
      airtime usage to be reported in the tx_time and rx_time fields of the
      respective status structs.
      
      When airtime information is present, mac80211 will schedule TXQs
      (through ieee80211_next_txq()) in a way that enforces airtime fairness
      between active stations. This scheduling works the same way as the ath9k
      in-driver airtime fairness scheduling.
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b0d52ad8
  10. 16 6月, 2017 1 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions return void * and remove all the casts across
      the tree, adding a (u8 *) cast only where the unsigned char pointer
      was used directly, all done with the following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
  11. 30 5月, 2017 1 次提交
  12. 28 4月, 2017 3 次提交
  13. 27 4月, 2017 1 次提交
    • E
      mac80211: don't parse encrypted management frames in ieee80211_frame_acked · cf147085
      Emmanuel Grumbach 提交于
      ieee80211_frame_acked is called when a frame is acked by
      the peer. In case this is a management frame, we check
      if this an SMPS frame, in which case we can update our
      antenna configuration.
      
      When we parse the management frame we look at the category
      in case it is an action frame. That byte sits after the IV
      in case the frame was encrypted. This means that if the
      frame was encrypted, we basically look at the IV instead
      of looking at the category. It is then theorically
      possible that we think that an SMPS action frame was acked
      where really we had another frame that was encrypted.
      
      Since the only management frame whose ack needs to be
      tracked is the SMPS action frame, and that frame is not
      a robust management frame, it will never be encrypted.
      The easiest way to fix this problem is then to not look
      at frames that were encrypted.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      cf147085
  14. 27 2月, 2017 1 次提交
  15. 14 2月, 2017 1 次提交
  16. 26 1月, 2017 1 次提交
  17. 12 1月, 2017 1 次提交
  18. 13 12月, 2016 1 次提交
    • K
      mac80211: Remove unused 'rates_idx' variable · 872684b1
      Kirtika Ruchandani 提交于
      Commit f027c2ac introduced 'rates_idx' in
      ieee80211_tx_status_noskb but did not use it. Compiling with W=1
      gives the following warning, fix it.
      
      mac80211/status.c: In function ‘ieee80211_tx_status_noskb’:
      mac80211/status.c:636:6: warning: variable ‘rates_idx’ set but not used [-Wunused-but-set-variable]
      
      This is a harmless warning, and is only being fixed to reduce the
      noise generated with W=1.
      
      Fixes: f027c2ac ("mac80211: add ieee80211_tx_status_noskb")
      Cc: Johannes Berg <johannes.berg@intel.com>
      Cc: Felix Fietkau <nbd@openwrt.org>
      Signed-off-by: NKirtika Ruchandani <kirtika@google.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      872684b1
  19. 20 9月, 2016 1 次提交
    • H
      mac80211: Use rhltable instead of rhashtable · 83e7e4ce
      Herbert Xu 提交于
      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: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83e7e4ce
  20. 15 9月, 2016 1 次提交
  21. 12 9月, 2016 1 次提交
  22. 05 8月, 2016 1 次提交
  23. 06 4月, 2016 1 次提交
    • J
      mac80211: add separate last_ack variable · b8da6b6a
      Johannes Berg 提交于
      Instead of touching the rx_stats.last_rx from the status path, introduce
      and use a status_stats.last_ack variable. This will make rx_stats.last_rx
      indicate when the last frame was received, making it available for real
      "last_rx" and statistics gathering; statistics, when done per-CPU, will
      need to figure out which place was updated last for those items where the
      "last" value is exposed.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b8da6b6a
  24. 05 3月, 2016 1 次提交
  25. 14 1月, 2016 1 次提交
    • H
      mac80211: Don't buffer non-bufferable MMPDUs · da629cf1
      Helmut Schaa 提交于
      Non-bufferable MMPDUs are sent out to STAs even while in PS mode
      (for example probe responses). Applying filtered frame handling for
      these doesn't seem to make much sense and will only create more
      air utilization when the STA wakes up. Hence, apply filtered frame
      handling only for bufferable MMPDUs.
      
      Discovered while testing an old VOIP phone that started probing
      for APs while in PS mode. The mac80211/ath9k AP where the STA is
      associated would reply with a probe response but the phone sometimes
      moved to a new channel already and couldn't ack the probe response
      anymore. In that case mac80211 applied filtered frame handling
      for the un-acked probe response.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      da629cf1
  26. 21 10月, 2015 2 次提交
  27. 24 9月, 2015 1 次提交
  28. 22 9月, 2015 1 次提交
  29. 13 8月, 2015 1 次提交
  30. 10 6月, 2015 1 次提交
    • 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
  31. 02 6月, 2015 2 次提交
    • J
      mac80211: stop using pointers as userspace cookies · 3b79af97
      Johannes Berg 提交于
      Even if the pointers are really only accessible to root and used
      pretty much only by wpa_supplicant, this is still not great; even
      for debugging it'd be easier to have something that's easier to
      read and guaranteed to never get reused.
      
      With the recent change to make mac80211 create an ack_skb for the
      mgmt-tx path this becomes possible, only the client probe method
      needs to also allocate an ack_skb, and we can store the cookie in
      that skb.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      3b79af97
    • J
      mac80211: copy nl80211 mgmt TX SKB for status · b2eb0ee6
      Johannes Berg 提交于
      When we return the TX status for an nl80211 mgmt TX SKB, we
      should also return the original frame with the status to
      allow userspace to match up the submission (it could also
      use the cookie but both ways are permissible.)
      
      As TX SKBs could be encrypted, at least in the case of ANQP
      while associated with the AP, copy the original SKB, store
      it with an ACK frame ID and restructure the status path to
      use that to return status with the original SKB. Otherwise,
      userspace (in particular wpa_supplicant) will get confused.
      Reported-by: NMatti Gottlieb <matti.gottlieb@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b2eb0ee6
  32. 05 5月, 2015 1 次提交
  33. 01 4月, 2015 1 次提交
    • J
      mac80211: use rhashtable for station table · 7bedd0cf
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      7bedd0cf
  34. 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
  35. 16 1月, 2015 1 次提交