1. 25 Nov, 2013 1 commit
  2. 28 Oct, 2013 2 commits
  3. 02 Oct, 2013 1 commit
  4. 01 Oct, 2013 2 commits
    • Michal Kazior's avatar
      mac80211: support reporting A-MSDU subframes individually · 0cfcefef
      Michal Kazior authored
      Some devices may not be able to report A-MSDUs in
      single buffers. Drivers for such devices were
      forced to re-assemble A-MSDUs which would then
      be eventually disassembled by mac80211. This could
      lead to CPU cache thrashing and poor performance.
      
      Since A-MSDU has a single sequence number all
      subframes share it. This was in conflict with
      retransmission/duplication recovery
      (IEEE802.11-2012: 9.3.2.10).
      
      Patch introduces a new flag that is meant to be
      set for all individually reported A-MSDU subframes
      except the last one. This ensures the
      last_seq_ctrl is updated after the last subframe
      is processed. If an A-MSDU is actually a duplicate
      transmission all reported subframes will be
      properly discarded.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      [johannes: add braces that were missing even before]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      0cfcefef
    • Johannes Berg's avatar
      mac80211: add explicit IBSS driver operations · 55fff501
      Johannes Berg authored
      This can be useful for drivers if they have any failure cases
      when joining an IBSS. Also move setting the queue parameters
      to before this new call, in case the new driver op needs them
      already.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      55fff501
  5. 26 Sep, 2013 1 commit
    • Johannes Berg's avatar
      mac80211: add ieee80211_iterate_active_interfaces_rtnl() · c7c71066
      Johannes Berg authored
      If it is needed to disconnect multiple virtual interfaces after
      (WoWLAN-) suspend, the most obvious approach would be to iterate
      all interfaces by calling ieee80211_iterate_active_interfaces()
      and then call ieee80211_resume_disconnect() for each one. This
      is what the iwlmvm driver does.
      
      Unfortunately, this causes a locking dependency from mac80211's
      iflist_mtx to the key_mtx. This is problematic as the former is
      intentionally never held while calling any driver operation to
      allow drivers to iterate with their own locks held. The key_mtx
      is held while installing a key into the driver though, so this
      new lock dependency means drivers implementing the logic above
      can no longer hold their own lock while iterating.
      
      To fix this, add a new ieee80211_iterate_active_interfaces_rtnl()
      function that iterates while the RTNL is already held. This is
      true during suspend/resume, so that then the locking dependency
      isn't introduced.
      
      While at it, also refactor the various interface iterators and
      keep only a single implementation called by the various cases.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c7c71066
  6. 21 Aug, 2013 1 commit
  7. 16 Aug, 2013 1 commit
    • Johannes Berg's avatar
      mac80211: add APIs to allow keeping connections after WoWLAN · 27b3eb9c
      Johannes Berg authored
      In order to be able to (securely) keep connections alive after
      the system was suspended for WoWLAN, we need some additional
      APIs. We already have API (ieee80211_gtk_rekey_notify) to tell
      wpa_supplicant about the new replay counter if GTK rekeying
      was done by the device while the host was asleep, but that's
      not sufficient.
      
      If GTK rekeying wasn't done, we need to tell the host about
      sequence counters for the GTK (and PTK regardless of rekeying)
      that was used while asleep, add ieee80211_set_key_rx_seq() for
      that.
      
      If GTK rekeying was done, then we need to be able to disable
      the old keys (with ieee80211_remove_key()) and allocate the
      new GTK key(s) in mac80211 (with ieee80211_gtk_rekey_add()).
      
      If protocol offload (e.g. ARP) is implemented, then also the
      TX sequence counter for the PTK must be updated, using the new
      ieee80211_set_key_tx_seq() function.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      27b3eb9c
  8. 12 Aug, 2013 2 commits
  9. 01 Aug, 2013 1 commit
  10. 31 Jul, 2013 1 commit
  11. 16 Jul, 2013 3 commits
  12. 13 Jun, 2013 1 commit
  13. 05 Jun, 2013 1 commit
  14. 04 Jun, 2013 1 commit
  15. 24 May, 2013 1 commit
  16. 16 May, 2013 3 commits
  17. 22 Apr, 2013 2 commits
    • Felix Fietkau's avatar
      mac80211: improve the rate control API · 0d528d85
      Felix Fietkau authored
      Allow rate control modules to pass a rate selection table to mac80211
      and the driver. This allows drivers to fetch the most recent rate
      selection from the sta pointer for already buffered frames. This allows
      rate control to respond faster to sudden link changes and it is also a
      step towards adding minstrel_ht support to drivers like iwlwifi.
      
      When a driver sets IEEE80211_HW_SUPPORTS_RC_TABLE, mac80211 will not
      fill info->control.rates with rates from the rate table (to preserve
      explicit overrides by the rate control module). The driver then
      explicitly calls ieee80211_get_tx_rates to merge overrides from
      info->control.rates with defaults from the sta rate table.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      0d528d85
    • Alexander Bondar's avatar
      mac80211: indicate admission control in TX queue parameters · 908f8d07
      Alexander Bondar authored
      Some driver implementations need to know whether mandatory
      admission control is required by the AP for some ACs. Add
      a parameter to the TX queue parameters indicating this.
      
      As there's currently no support for admission control in
      mac80211's AP implementation, it's only ever set for the
      client implementation.
      Signed-off-by: default avatarAlexander Bondar <alexander.bondar@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      908f8d07
  18. 16 Apr, 2013 4 commits
    • Felix Fietkau's avatar
      mac80211: fix CTS protection handling · 991fec09
      Felix Fietkau authored
      The rates[0] CTS and RTS flags are only set after rate control has been
      called, so minstrel cannot use them to for setting the number of
      retries. This patch adds two new flags to explicitly indicate RTS/CTS use.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      991fec09
    • Felix Fietkau's avatar
      mac80211: fix and optimize MCS mask handling · 2ffbe6d3
      Felix Fietkau authored
      Currently the code always copies the configured MCS mask (even if it is
      set to default), but only uses it if legacy rates were also masked out.
      Fix this by adding a flag that tracks whether the configured MCS mask is
      set to default or not.
      Optimize the code further by storing a pointer to the configured rate
      mask in txrc instead of using memcpy.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      2ffbe6d3
    • Karl Beldan's avatar
      mac80211: VHT off-by-one NSS · 6bc8312f
      Karl Beldan authored
      The number of VHT spatial streams (NSS) is found in:
      - s8 ieee80211_tx_rate.rate.idx[6:4] (tx - filled by rate control)
      - u8 ieee80211_rx_status.vht_nss     (rx - filled by driver)
      Tx discriminates valid rates indexes with the sign bit and encodes NSS
      starting from 0 to 7 (note this matches some hw encodings e.g IWLMVM).
      Rx does not have the same constraints, and encodes NSS starting from 1
      to 8 (note this matches what wireshark expects in the radiotap header).
      
      To handle ieee80211_tx_rate.rate.idx[6:4] ieee80211_rate_set_vht() and
      ieee80211_rate_get_vht_nss() assume their nss parameter and return value
      respectively runs from 0 to 7.
      ATM, there are only 2 users of these: cfg.c:sta_set_rate_info_t() and
      iwlwifi/mvm/tx.c:iwl_mvm_hwrate_to_tx_control(), but both assume nss
      runs from 1 to 8.
      This patch fixes this inconsistency by making ieee80211_rate_set_vht()
      and ieee80211_rate_get_vht_nss() handle an nss running from 1 to 8.
      Signed-off-by: default avatarKarl Beldan <karl.beldan@rivierawaves.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6bc8312f
    • Johannes Berg's avatar
      mac80211: support secondary channel offset in CSA · 85220d71
      Johannes Berg authored
      Add support for the secondary channel offset IE in channel
      switch announcements. This is necessary for proper handling
      of CSA on HT access points.
      
      For this to work it is also necessary to convert everything
      here to use chandef structs instead of just channels. The
      driver updates aren't really correct though. In particular,
      the TI wl18xx driver update can't possibly be right since
      it just ignores the new channel width for lack of firmware
      API.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      85220d71
  19. 10 Apr, 2013 1 commit
  20. 25 Mar, 2013 2 commits
  21. 22 Mar, 2013 1 commit
  22. 18 Mar, 2013 4 commits
  23. 11 Mar, 2013 1 commit
  24. 07 Mar, 2013 1 commit
    • Johannes Berg's avatar
      mac80211: provide ieee80211_sta_eosp() · e943789e
      Johannes Berg authored
      The irqsafe version ieee80211_sta_eosp_irqsafe() exists, but
      drivers must not mix calls to any irqsafe/non-irqsafe function.
      Both ath9k and iwlwifi, the likely first users of this interface,
      use non-irqsafe RX/TX/TX status so must also use a non-irqsafe
      version of this function. Since no driver uses the _irqsafe()
      version, remove that.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      e943789e
  25. 06 Mar, 2013 1 commit
    • Johannes Berg's avatar
      mac80211: restrict peer's VHT capabilities to own · 55d942f4
      Johannes Berg authored
      Implement restricting peer VHT capabilities to the device's own
      capabilities. This is useful when a single driver supports more
      than one device and the devices have different capabilities
      (often they will differ in the number of spatial streams), but
      in particular is also necessary for VHT capability overrides to
      work correctly -- otherwise it'd be possible to e.g. advertise,
      due to overrides, that TX-STBC is not supported, but then still
      use it to TX to the AP because it supports RX-STBC.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      55d942f4