1. 23 Jan, 2015 2 commits
    • 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
      flags.
      
      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>
      4afaff17
    • Lorenzo Bianconi's avatar
      mac80211: enable TPC through mac80211 stack · db82d8a9
      Lorenzo Bianconi authored
      
      
      Control per packet Transmit Power Control (TPC) in lower drivers
      according to TX power settings configured by the user. In particular TPC is
      enabled if value passed in enum nl80211_tx_power_setting is
      NL80211_TX_POWER_LIMITED (allow using less than specified from userspace),
      whereas TPC is disabled if nl80211_tx_power_setting is set to
      NL80211_TX_POWER_FIXED (use value configured from userspace)
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      db82d8a9
  2. 14 Jan, 2015 2 commits
    • Eliad Peller's avatar
      mac80211: remove local->radar_detect_enabled · 5cbc95a7
      Eliad Peller authored
      
      
      local->radar_detect_enabled should tell whether
      radar_detect is enabled on any interface belonging
      to local.
      
      However, it's not getting updated correctly
      in many cases (actually, when testing with hwsim
      it's never been set, even when the dfs master
      is beaconing).
      
      Instead of handling all the corner cases
      (e.g. channel switch), simply check whether
      radar detection is enabled only when needed,
      instead of caching the result.
      Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5cbc95a7
    • Emmanuel Grumbach's avatar
      mac80211: let flush() drop packets when possible · 3b24f4c6
      Emmanuel Grumbach authored
      
      
      When roaming / suspending, it makes no sense to wait until
      the transmit queues of the device are empty. In extreme
      condition they can be starved (VO saturating the air), but
      even in regular cases, it is pointless to delay the roaming
      because the low level driver is trying to send packets to
      an AP which is far away. We'd rather drop these packets and
      let TCP retransmit if needed. This will allow to speed up
      the roaming.
      
      For suspend, the explanation is even more trivial.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      3b24f4c6
  3. 17 Dec, 2014 1 commit
  4. 19 Nov, 2014 12 commits
  5. 04 Nov, 2014 2 commits
    • Johannes Berg's avatar
      mac80211: handle RIC data element in reassociation request · 8ed28747
      Johannes Berg authored
      
      
      When the RIC data element (RDE) is included in the IEs coming
      from userspace for an association request, its handling is
      currently broken as any IEs that are contained within it would
      be split off from it and inserted again after all the IEs that
      mac80211 generates (e.g. HT, VHT.)
      
      To fix this, treat the RIC element specially, and stop after
      it only when we find something that doesn't actually belong to
      it. This assumes userspace is actually correctly building it,
      directly after the fast BSS transition IE and before all the
      others like extended capabilities.
      
      This leaves as a potential problem the case where userspace is
      building the following IEs:
      
      [RDE] [vendor resource description] [vendor non-resource IE]
      
      In this case, we'd erroneously consider all three IEs to be
      part of the RIC data together, and not split them between the
      two vendor IEs. Unfortunately, it isn't easily possible to
      distinguish vendor IEs, so this isn't easy to fix. Luckily,
      this case is rare as normally wpa_supplicant will include an
      extended capabilities IE in the IEs, and that certainly will
      break the two vendor IEs apart correctly.
      Reviewed-by: default avatarEliad Peller <eliad@wizery.com>
      Reviewed-by: default avatarBeni Lev <beni.lev@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8ed28747
    • Rostislav Lisovy's avatar
      mac80211: 802.11p OCB mode support · 239281f8
      Rostislav Lisovy authored
      
      
      This patch adds 802.11p OCB (Outside the Context of a BSS) mode
      support.
      
      When communicating in OCB mode a mandatory wildcard BSSID
      (48 '1' bits) is used.
      
      The EDCA parameters handling function was changed to support
      802.11p specific values.
      
      The insertion of a newly discovered STAs is done in the similar way
      as in the IBSS mode -- through the deferred insertion.
      
      The OCB mode uses a periodic 'housekeeping task' for expiration of
      disconnected STAs (in the similar manner as in the MESH mode).
      
      New Kconfig option for verbose OCB debugging outputs is added.
      Signed-off-by: default avatarRostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      239281f8
  6. 31 Oct, 2014 1 commit
  7. 29 Oct, 2014 1 commit
    • Luciano Coelho's avatar
      mac80211: use secondary channel offset IE also beacons during CSA · 84469a45
      Luciano Coelho authored
      
      
      If we are switching from an HT40+ to an HT40- channel (or vice-versa),
      we need the secondary channel offset IE to specify what is the
      post-CSA offset to be used.  This applies both to beacons and to probe
      responses.
      
      In ieee80211_parse_ch_switch_ie() we were ignoring this IE from
      beacons and using the *current* HT information IE instead.  This was
      causing us to use the same offset as before the switch.
      
      Fix that by using the secondary channel offset IE also for beacons and
      don't ever use the pre-switch offset.  Additionally, remove the
      "beacon" argument from ieee80211_parse_ch_switch_ie(), since it's not
      needed anymore.
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarJouni Malinen <j@w1.fi>
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      84469a45
  8. 23 Oct, 2014 1 commit
  9. 22 Oct, 2014 1 commit
    • Johannes Berg's avatar
      mac80211: add WMM admission control support · 02219b3a
      Johannes Berg authored
      
      
      Use the currently existing APIs between mac80211 and the low
      level driver to implement WMM admission control.
      
      The low level driver needs to report the media time used by
      each transmitted packet in ieee80211_tx_status. Based on that
      information, mac80211 will modify the QoS parameters of the
      admission controlled Access Category when the limit is
      reached. Once the original QoS parameters can be restored,
      mac80211 will do so.
      
      One issue with this approach is that management frames will
      also erroneously be downgraded, but the upside is that the
      implementation is simple. In the future, it can be extended
      to driver- or device-based implementations that are better.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      02219b3a
  10. 09 Oct, 2014 2 commits
  11. 08 Sep, 2014 1 commit
    • Steinar H. Gunderson's avatar
      mac80211: support DTPC IE (from Cisco Client eXtensions) · c8d65917
      Steinar H. Gunderson authored
      
      
      Linux already supports 802.11h, where the access point can tell the
      client to reduce its transmission power. However, 802.11h is only
      defined for 5 GHz, where the need for this is much smaller than on
      2.4 GHz.
      
      Cisco has their own solution, called DTPC (Dynamic Transmit Power
      Control). Cisco APs on a controller sometimes but not always send
      802.11h; they always send DTPC, even on 2.4 GHz. This patch adds support
      for parsing and honoring the DTPC IE in addition to the 802.11h
      element (they do not always contain the same limits, so both must
      be honored); the format is not documented, but very simple.
      
      Tested (on top of wireless.git and on 3.16.1) against a Cisco Aironet
      1142 joined to a Cisco 2504 WLC, by setting various transmit power
      levels for the given access points and observing the results.
      The Wireshark 802.11 dissector agrees with the interpretation of the
      element, except for negative numbers, which seem to never happen
      anyway.
      Signed-off-by: default avatarSteinar H. Gunderson <sgunderson@bigfoot.com>
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      c8d65917
  12. 05 Sep, 2014 3 commits
  13. 03 Sep, 2014 1 commit
    • Michal Kazior's avatar
      mac80211: fix offloaded BA session traffic after hw restart · 4549cf2b
      Michal Kazior authored
      
      
      When starting an offloaded BA session it is
      unknown what starting sequence number should be
      used. Using last_seq worked in most cases except
      after hw restart.
      
      When hw restart is requested last_seq is
      (rightfully so) kept unmodified. This ended up
      with BA sessions being restarted with an aribtrary
      BA window values resulting in dropped frames until
      sequence numbers caught up.
      
      Instead of last_seq pick seqno of a first Rxed
      frame of a given BA session.
      
      This fixes stalled traffic after hw restart with
      offloaded BA sessions (currently only ath10k).
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      4549cf2b
  14. 26 Aug, 2014 1 commit
  15. 21 Jul, 2014 5 commits
  16. 25 Jun, 2014 3 commits
  17. 23 Jun, 2014 1 commit
    • Arik Nemtsov's avatar
      mac80211: implement proper Tx path flushing for TDLS · db67d661
      Arik Nemtsov authored
      
      
      As the spec mandates, flush data in the AP path before transmitting the
      first setup frame. Data packets transmitted during setup are already
      dropped in the Tx path.
      
      For the teardown flow, flush all packets in the direct path before
      transmitting the teardown frame. Un-authorize the peer sta after teardown
      is sent, forcing all subsequent Tx to the peer through the AP.
      
      Make sure to flush the queues when disabling the link to get the
      teardown packet out.
      Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
      [adjust to Luca's new quuee API and stop only vif queues]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      db67d661