1. 17 Mar, 2015 2 commits
  2. 16 Mar, 2015 4 commits
  3. 04 Mar, 2015 10 commits
  4. 03 Mar, 2015 5 commits
  5. 28 Feb, 2015 4 commits
    • Johannes Berg's avatar
      mac80211: remove TX latency measurement code · abfbc3af
      Johannes Berg authored
      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: default avatarJohannes Berg <johannes.berg@intel.com>
    • Masashi Honma's avatar
      nl/mac80211: allow zero plink timeout to disable STA expiration · 31f909a2
      Masashi Honma authored
      Both wpa_supplicant and mac80211 have and inactivity timer. By default
      wpa_supplicant will be timed out in 5 minutes and mac80211's it is 30
      minutes. If wpa_supplicant uses a longer timer than mac80211, it will
      get unexpected disconnection by mac80211.
      Using 0xffffffff instead as the configured value could solve this w/o
      changing the code, but due to integer overflow in the expression used
      this doesn't work. The expression is:
      (current jiffies) > (frame Rx jiffies + NL80211_MESHCONF_PLINK_TIMEOUT * 250)
      On 32bit system, the right side would overflow and be a very small
      value if NL80211_MESHCONF_PLINK_TIMEOUT is sufficiently large,
      causing unexpectedly early disconnections.
      Instead allow disabling the inactivity timer to avoid this situation,
      by passing the (previously invalid and useless) value 0.
      Signed-off-by: default avatarMasashi Honma <masashi.honma@gmail.com>
      [reword/rewrap commit log]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      mac80211: iterate using station list in AP SMPS · 7d9bb2f0
      Johannes Berg authored
      When changing AP SMPS, we need to look up all the stations
      for this interface, so there's no reason to iterate over
      hash chains rather than doing the simpler iteration over
      the station list.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      mac80211: don't look up stations for multicast addresses · 9d6b106b
      Johannes Berg authored
      Since multicast addresses don't exist as stations, don't attempt
      to look them up in the hashtable on TX.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  6. 27 Jan, 2015 5 commits
  7. 23 Jan, 2015 10 commits
    • Johannes Berg's avatar
      mac80211: support beacon statistics · 225b8189
      Johannes Berg authored
      For drivers without beacon filtering, support beacon statistics
      entirely, i.e. report the number of beacons and average signal.
      For drivers with beacon filtering, give them the number of beacons
      received by mac80211 -- in case the device reports only the number
      of filtered beacons then driver doesn't have to count all beacons
      again as mac80211 already does.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      mac80211: fix per-TID RX-MSDU counter · 3d6dc343
      Johannes Berg authored
      In the case of non-QoS association, the counter was actually
      wrong. The right index isn't security_idx but seqno_idx, as
      security_idx will be 0 for data frames, while 16 is needed.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      mac80211: tdls: disentangle HT supported conditions · c5309ba7
      Johannes Berg authored
      These conditions are rather difficult to follow, for example
      because "!sta" only exists to not crash in the case that we
      don't have a station pointer (WLAN_TDLS_SETUP_REQUEST) in
      which the additional condition (peer supports HT) doesn't
      actually matter anyway.
      Cleaning this up only duplicates two lines of code but makes
      the rest far easier to read, so do that.
      As a side effect, smatch stops complaining about the lack of
      a sta pointer test after the !sta (since the !sta goes away)
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      mac80211: tdls: remove shadowing variable · d6f5cc09
      Johannes Berg authored
      There's no need to use another local 'sta' variable as the
      original (outer scope) one isn't needed any more and has
      become invalid anyway when exiting the RCU read section.
      Remove the inner scope one and along with it the useless NULL
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Bob Copeland's avatar
      Revert "mac80211: keep sending peer candidate events while in listen state" · 985e88b1
      Bob Copeland authored
      This reverts commit 2ae70efc
      The new peer events that are generated by the change are causing problems
      with wpa_supplicant in userspace: wpa_s tries to restart SAE authentication
      with the peer when receiving the event, even though authentication may be in
      progress already, and it gets very confused.
      Revert back to the original operating mode, which is to only get events when
      there is no corresponding station entry.
      Cc: Nishikawa, Kenzoh <Kenzoh.Nishikawa@jp.sony.com>
      Cc: Masashi Honma <masashi.honma@gmail.com>
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Luciano Coelho's avatar
      mac80211: complete scan work immediately if quiesced or suspended · 332ff7fe
      Luciano Coelho authored
      It is possible that a deferred scan is queued after the queues are
      flushed in __ieee80211_suspend().  The deferred scan work may be
      scheduled by ROC or ieee80211_stop_poll().
      To make sure don't start a new scan while suspending, check whether
      we're quiescing or suspended and complete the scan immediately if
      that's the case.
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Emmanuel Grumbach's avatar
      mac80211: avoid races related to suspend flow · 4afaff17
      Emmanuel Grumbach authored
      When we go to suspend, there is complex set of states that
      avoids races. The quiescing variable is set whlie
      __ieee80211_suspend is running. Then suspended is set.
      The code makes sure there is no window without any of these
      The problem is that workers can still be enqueued while we
      are quiescing. This leads to situations where the driver is
      already suspending and other flows like disassociation are
      handled by a worker.
      To fix this, we need to check quiescing and suspended flags
      in the worker itself and not only before enqueueing it.
      I also add here extensive documentation to ease the
      understanding of these complex issues.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Emmanuel Grumbach's avatar
      mac80211: synchronize_net() before flushing the queues · 14f2ae83
      Emmanuel Grumbach authored
      When mac80211 disconnects, it drops all the packets on the
      queues. This happens after the net stack has been notified
      that we have no link anymore (netif_carrier_off).
      netif_carrier_off ensures that no new packets are sent to
      xmit() callback, but we might have older packets in the
      middle of the Tx path. These packets will land in the
      driver's queues after the latter have been flushed.
      Synchronize_net() between netif_carrier_off and drv_flush()
      will fix this.
      Note that we can't call synchronize_net inside
      ieee80211_flush_queues since there are flows that call
      ieee80211_flush_queues and don't need synchronize_net()
      which is an expensive operation.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      [reword comment to be more accurate]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Mathy Vanhoef's avatar
      mac80211: properly set CCK flag in radiotap · 3a5c5e81
      Mathy Vanhoef authored
      Fix a regression introduced by commit a5e70697 ("mac80211: add radiotap flag
      and handling for 5/10 MHz") where the IEEE80211_CHAN_CCK channel type flag was
      incorrectly replaced by the IEEE80211_CHAN_OFDM flag. This commit fixes that by
      using the CCK flag again.
      Cc: stable@vger.kernel.org
      Fixes: a5e70697
       ("mac80211: add radiotap flag and handling for 5/10 MHz")
      Signed-off-by: default avatarMathy Vanhoef <vanhoefm@gmail.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Luciano Coelho's avatar
      mac80211: only roll back station states for WDS when suspending · 2af81d67
      Luciano Coelho authored
      In normal cases (i.e. when we are fully associated), cfg80211 takes
      care of removing all the stations before calling suspend in mac80211.
      But in the corner case when we suspend during authentication or
      association, mac80211 needs to roll back the station states.  But we
      shouldn't roll back the station states in the suspend function,
      because this is taken care of in other parts of the code, except for
      WDS interfaces.  For AP types of interfaces, cfg80211 takes care of
      disconnecting all stations before calling the driver's suspend code.
      For station interfaces, this is done in the quiesce code.
      For WDS interfaces we still need to do it here, so move the code into
      a new switch case for WDS.
      Cc: stable@kernel.org [3.15+]
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>