1. 19 6月, 2019 1 次提交
  2. 26 4月, 2019 5 次提交
  3. 22 2月, 2019 2 次提交
  4. 08 2月, 2019 2 次提交
  5. 19 1月, 2019 2 次提交
    • T
      mac80211: Add airtime accounting and scheduling to TXQs · b4809e94
      Toke Høiland-Jørgensen 提交于
      This adds airtime accounting and scheduling to the mac80211 TXQ
      scheduler. A new callback, ieee80211_sta_register_airtime(), is added
      that drivers can call to report airtime usage for stations.
      
      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. If no airtime usage is reported
      by the driver, the scheduler will default to round-robin scheduling.
      
      For drivers that don't control TXQ scheduling in software, a new API
      function, ieee80211_txq_may_transmit(), is added which the driver can use
      to check if the TXQ is eligible for transmission, or should be throttled to
      enforce fairness. Calls to this function must also be enclosed in
      ieee80211_txq_schedule_{start,end}() calls to ensure proper locking.
      
      The API ieee80211_txq_may_transmit() also ensures that TXQ list will be
      aligned aginst driver's own round-robin scheduler list. i.e it rotates
      the TXQ list till it makes the requested node becomes the first entry
      in TXQ list. Thus both the TXQ list and driver's list are in sync.
      Co-developed-by: NRajkumar Manoharan <rmanohar@codeaurora.org>
      Signed-off-by: NLouie Lu <git@louie.lu>
      [added debugfs write op to reset airtime counter]
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NRajkumar Manoharan <rmanohar@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b4809e94
    • T
      mac80211: Add TXQ scheduling API · 18667600
      Toke Høiland-Jørgensen 提交于
      This adds an API to mac80211 to handle scheduling of TXQs. The interface
      between driver and mac80211 for TXQ handling is changed by adding two new
      functions: ieee80211_next_txq(), which will return the next TXQ to schedule
      in the current round-robin rotation, and ieee80211_return_txq(), which the
      driver uses to indicate that it has finished scheduling a TXQ (which will
      then be put back in the scheduling rotation if it isn't empty).
      
      The driver must call ieee80211_txq_schedule_start() at the start of each
      scheduling session, and ieee80211_txq_schedule_end() at the end. The API
      then guarantees that the same TXQ is not returned twice in the same
      session (so a driver can loop on ieee80211_next_txq() without worrying
      about breaking the loop.
      
      Usage of the new API is optional, so drivers can be ported one at a time.
      In this patch, the actual scheduling performed by mac80211 is simple
      round-robin, but a subsequent commit adds airtime fairness awareness to the
      scheduler.
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      [minor kernel-doc fix, propagate sparse locking checks out]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      18667600
  6. 18 12月, 2018 1 次提交
  7. 11 10月, 2018 1 次提交
    • J
      mac80211: Extend SAE authentication in infra BSS STA mode · efb543e6
      Jouni Malinen 提交于
      Previous implementation of SAE authentication in infrastructure BSS was
      somewhat restricting and not exactly clean way of handling the two
      auth() operations. This ended up removing and re-adding the STA entry
      for the AP in the middle of authentication and also messing up
      authentication state tracking through the sequence of four
      Authentication frames. Furthermore, this did not work if the AP ended up
      sending out SAE Confirm (auth trans #2) immediately after SAE Commit
      (auth trans #1) before the station had time to transmit its SAE Confirm.
      
      Clean up authentication state handling for the SAE case to allow two
      rounds of auth() calls without dropping all state between those
      operations. Track peer Confirmed status and mark authentication
      completed only once both ends have confirmed.
      
      ieee80211_mgd_auth() check for EBUSY cases is now handling only the
      pending association (ifmgd->assoc_data) while all pending authentication
      (ifmgd->auth_data) cases are allowed to proceed to allow user space to
      start a new connection attempt from scratch even if the previously
      requested authentication is still waiting completion. This is needed to
      avoid making SAE error cases with retries take excessive amount of time
      with no means for the user space to stop that (apart from setting the
      netdev down).
      
      As an extra bonus, the end of ieee80211_rx_mgmt_auth() can be cleaned up
      to avoid the extra copy of the cfg80211_rx_mlme_mgmt() call for ongoing
      SAE authentication since the new ieee80211_mark_sta_auth() helper
      function can handle both completion of authentication and updates to the
      STA entry under the same condition and there is no need to return from
      the function between those operations.
      Signed-off-by: NJouni Malinen <jouni@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      efb543e6
  8. 05 9月, 2018 2 次提交
  9. 28 8月, 2018 1 次提交
    • M
      mac80211: add stop/start logic for software TXQs · 21a5d4c3
      Manikanta Pubbisetty 提交于
      Sometimes, it is required to stop the transmissions momentarily and
      resume it later; stopping the txqs becomes very critical in scenarios where
      the packet transmission has to be ceased completely. For example, during
      the hardware restart, during off channel operations,
      when initiating CSA(upon detecting a radar on the DFS channel), etc.
      
      The TX queue stop/start logic in mac80211 works well in stopping the TX
      when drivers make use of netdev queues, i.e, when Qdiscs in network layer
      take care of traffic scheduling. Since the devices implementing
      wake_tx_queue can run without Qdiscs, packets will be handed to mac80211
      directly without queueing them in the netdev queues.
      
      Also, mac80211 does not invoke any of the
      netif_stop_*/netif_wake_* APIs if wake_tx_queue is implemented.
      Since the queues are not stopped in this case, transmissions can continue
      and this will impact negatively on the operation of the wireless device.
      
      For example,
      During hardware restart, we stop the netdev queues so that packets are
      not sent to the driver. Since ath10k implements wake_tx_queue,
      TX queues will not be stopped and packets might reach the hardware while
      it is restarting; this can make hardware unresponsive and the only
      possible option for recovery is to reboot the entire system.
      
      There is another problem to this, it is observed that the packets
      were sent on the DFS channel for a prolonged duration after radar
      detection impacting the channel closing time.
      
      We can still invoke netif stop/wake APIs when wake_tx_queue is implemented
      but this could lead to packet drops in network layer; adding stop/start
      logic for software TXQs in mac80211 instead makes more sense; the change
      proposed adds the same in mac80211.
      Signed-off-by: NManikanta Pubbisetty <mpubbise@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      21a5d4c3
  10. 19 6月, 2018 1 次提交
  11. 15 6月, 2018 3 次提交
  12. 08 5月, 2018 1 次提交
  13. 29 3月, 2018 5 次提交
  14. 31 1月, 2018 1 次提交
  15. 19 12月, 2017 2 次提交
  16. 11 12月, 2017 3 次提交
    • 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
    • T
      mac80211: Add TXQ scheduling API · e937b8da
      Toke Høiland-Jørgensen 提交于
      This adds an API to mac80211 to handle scheduling of TXQs and changes the
      interface between driver and mac80211 for TXQ handling as follows:
      
      - The wake_tx_queue callback interface no longer includes the TXQ. Instead,
        the driver is expected to retrieve that from ieee80211_next_txq()
      
      - Two new mac80211 functions are added: ieee80211_next_txq() and
        ieee80211_schedule_txq(). The former returns the next TXQ that should be
        scheduled, and is how the driver gets a queue to pull packets from. The
        latter is called internally by mac80211 to start scheduling a queue, and
        the driver is supposed to call it to re-schedule the TXQ after it is
        finished pulling packets from it (unless the queue emptied).
      
      The ath9k and ath10k drivers are changed to use the new API.
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e937b8da
    • J
      mac80211: make __ieee80211_start_rx_ba_session static · a9d09bc1
      Johannes Berg 提交于
      The function is only used with the file, so make it static.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a9d09bc1
  17. 20 11月, 2017 1 次提交
  18. 11 10月, 2017 1 次提交
  19. 06 9月, 2017 1 次提交
    • J
      mac80211: fix deadlock in driver-managed RX BA session start · bde59c47
      Johannes Berg 提交于
      When an RX BA session is started by the driver, and it has to tell
      mac80211 about it, the corresponding bit in tid_rx_manage_offl gets
      set and the BA session work is scheduled. Upon testing this bit, it
      will call __ieee80211_start_rx_ba_session(), thus deadlocking as it
      already holds the ampdu_mlme.mtx, which that acquires again.
      
      Fix this by adding ___ieee80211_start_rx_ba_session(), a version of
      the function that requires the mutex already held.
      
      Cc: stable@vger.kernel.org
      Fixes: 699cb58c ("mac80211: manage RX BA session offload without SKB queue")
      Reported-by: NMatteo Croce <mcroce@redhat.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      bde59c47
  20. 13 6月, 2017 1 次提交
  21. 08 6月, 2017 1 次提交
    • J
      mac80211: manage RX BA session offload without SKB queue · 699cb58c
      Johannes Berg 提交于
      Instead of using the SKB queue with the fake pkt_type for the
      offloaded RX BA session management, also handle this with the
      normal aggregation state machine worker. This also makes the
      use of this more reliable since it gets rid of the allocation
      of the fake skb.
      
      Combined with the previous patch, this finally allows us to
      get rid of the pkt_type hack entirely, so do that as well.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      699cb58c
  22. 30 5月, 2017 1 次提交
    • J
      mac80211: fix TX aggregation start/stop callback race · 7a7c0a64
      Johannes Berg 提交于
      When starting or stopping an aggregation session, one of the steps
      is that the driver calls back to mac80211 that the start/stop can
      proceed. This is handled by queueing up a fake SKB and processing
      it from the normal iface/sdata work. Since this isn't flushed when
      disassociating, the following race is possible:
      
       * associate
       * start aggregation session
       * driver callback
       * disassociate
       * associate again to the same AP
       * callback processing runs, leading to a WARN_ON() that
         the TID hadn't requested aggregation
      
      If the second association isn't to the same AP, there would only
      be a message printed ("Could not find station: <addr>"), but the
      same race could happen.
      
      Fix this by not going the whole detour with a fake SKB etc. but
      simply looking up the aggregation session in the driver callback,
      marking it with a START_CB/STOP_CB bit and then scheduling the
      regular aggregation work that will now process these bits as well.
      This also simplifies the code and gets rid of the whole problem
      with allocation failures of said skb, which could have left the
      session in limbo.
      Reported-by: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      7a7c0a64
  23. 24 5月, 2017 1 次提交