1. 19 1月, 2019 1 次提交
    • 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
  2. 19 12月, 2018 3 次提交
  3. 18 12月, 2018 10 次提交
  4. 05 12月, 2018 5 次提交
    • E
      mac80211: fix deauth TX when we disconnect · f6c7f03f
      Emmanuel Grumbach 提交于
      The iTXQs stop/wake queue mechanism involves a whole bunch
      of locks and this is probably why the call to
      ieee80211_wake_txqs is deferred to a tasklet when called from
      __ieee80211_wake_queue.
      
      Another advantage of that is that ieee80211_wake_txqs might
      call the wake_tx_queue() callback and then the driver may
      call mac80211 which will call it back in the same context.
      
      The bug I saw is that when we send a deauth frame as a
      station we do:
      
      flush(drop=1)
      tx deauth
      flush(drop=0)
      
      While we flush we stop the queues and wake them up
      immediately after we finished flushing. The problem here is
      that the tasklet that de-facto enables the queue may not have
      run until we send the deauth. Then the deauth frame is sent
      to the driver (which is surprising by itself), but the driver
      won't get anything useful from ieee80211_tx_dequeue because
      the queue is stopped (or more precisely because
      vif->txqs_stopped[0] is true).
      Then the deauth is not sent. Later on, the tasklet will run,
      but that'll be too late. We'll already have removed all the
      vif etc...
      
      Fix this by calling ieee80211_wake_txqs synchronously if we
      are not waking up the queues from the driver (we check the
      reason to determine that). This makes the code really
      convoluted because we may call ieee80211_wake_txqs from
      __ieee80211_wake_queue. The latter assumes that
      queue_stop_reason_lock has been taken by the caller and
      ieee80211_wake_txqs may release the lock to send the frames.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f6c7f03f
    • B
      mac80211: rewrite Kconfig text for mesh · c8d10cbd
      Bob Copeland 提交于
      Lubomir Rintel recently pointed out a dead link for o11s.org, and
      repointed it to a still live, but also stale website.  As far as I
      know, no one is updating the content at open80211s.org.
      
      Since this Kconfig text was originally written, though, the 802.11s
      mesh drafts were approved and ultimately rolled into 802.11 proper.
      Meanwhile, the implementation has converged on the final standard,
      so we can lose all of the text here and provide something that's a
      little more helpful and accurate.
      Signed-off-by: NBob Copeland <bobcopeland@fb.com>
      Reviewed-by: NLubomir Rintel <lkundrak@v3.sk>
      Reviewed-by: NSteve deRosier <derosier@cal-sierra.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c8d10cbd
    • E
      mac80211: ignore NullFunc frames in the duplicate detection · 990d7184
      Emmanuel Grumbach 提交于
      NullFunc packets should never be duplicate just like
      QoS-NullFunc packets.
      
      We saw a client that enters / exits power save with
      NullFunc frames (and not with QoS-NullFunc) despite the
      fact that the association supports HT.
      This specific client also re-uses a non-zero sequence number
      for different NullFunc frames.
      At some point, the client had to send a retransmission of
      the NullFunc frame and we dropped it, leading to a
      misalignment in the power save state.
      Fix this by never consider a NullFunc frame as duplicate,
      just like we do for QoS NullFunc frames.
      
      This fixes https://bugzilla.kernel.org/show_bug.cgi?id=201449
      
      CC: <stable@vger.kernel.org>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      990d7184
    • F
      mac80211: fix reordering of buffered broadcast packets · 9ec1190d
      Felix Fietkau 提交于
      If the buffered broadcast queue contains packets, letting new packets bypass
      that queue can lead to heavy reordering, since the driver is probably throttling
      transmission of buffered multicast packets after beacons.
      
      Keep buffering packets until the buffer has been cleared (and no client
      is in powersave mode).
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9ec1190d
    • F
      mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext · a317e65f
      Felix Fietkau 提交于
      Make it behave like regular ieee80211_tx_status calls, except for the lack of
      filtered frame processing.
      This fixes spurious low-ack triggered disconnections with powersave clients
      connected to an AP.
      
      Fixes: f027c2ac ("mac80211: add ieee80211_tx_status_noskb")
      Cc: stable@vger.kernel.org
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a317e65f
  5. 20 11月, 2018 1 次提交
  6. 09 11月, 2018 14 次提交
  7. 12 10月, 2018 2 次提交
  8. 11 10月, 2018 4 次提交
    • 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
    • J
      mac80211: Move ieee80211_mgd_auth() EBUSY check to be before allocation · 8d7432a2
      Jouni Malinen 提交于
      This makes it easier to conditionally replace full allocation of
      auth_data to use reallocation for the case of continuing SAE
      authentication. Furthermore, there was not really any point in having
      this check done so late in the function after having already completed
      number of steps that cannot be used anyway in the error case.
      Signed-off-by: NJouni Malinen <jouni@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8d7432a2
    • J
      mac80211: Helper function for marking STA authenticated · fc107a93
      Jouni Malinen 提交于
      Authentication exchange can be completed in both TX and RX paths for
      SAE, so move this common functionality into a helper function to avoid
      having to implement practically the same operations in two places when
      extending SAE implementation in the following commits.
      Signed-off-by: NJouni Malinen <jouni@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      fc107a93
    • F
      mac80211: rc80211_minstrel: remove variance / stddev calculation · 506dbf90
      Felix Fietkau 提交于
      When there are few packets (e.g. for sampling attempts), the exponentially
      weighted variance is usually vastly overestimated, making the resulting data
      essentially useless. As far as I know, there has not been any practical use
      for this, so let's not waste any cycles on it.
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      506dbf90