1. 16 12月, 2013 1 次提交
    • J
      mac80211: add pre-RCU-sync sta removal driver operation · 6a9d1b91
      Johannes Berg 提交于
      Currently, mac80211 allows drivers to keep RCU-protected station
      references that are cleared when the station is removed from the
      driver and consequently needs to synchronize twice, once before
      removing the station from the driver (so it can guarantee that
      the station is no longer used in TX towards the driver) and once
      after the station is removed from the driver.
      
      Add a new pre-RCU-synchronisation station removal operation to
      the API to allow drivers to clear/invalidate their RCU-protected
      station pointers before the RCU synchronisation.
      
      This will allow removing the second synchronisation by changing
      the driver API so that the driver may no longer assume a valid
      RCU-protected pointer after sta_remove/sta_state returns.
      
      The alternative to this would be to synchronize_rcu() in all the
      drivers that currently rely on this behaviour (only iwlmvm) but
      that would defeat the purpose.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6a9d1b91
  2. 03 12月, 2013 2 次提交
  3. 26 11月, 2013 2 次提交
  4. 28 10月, 2013 2 次提交
  5. 03 10月, 2013 1 次提交
  6. 01 10月, 2013 2 次提交
    • M
      mac80211: support reporting A-MSDU subframes individually · 0cfcefef
      Michal Kazior 提交于
      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: NMichal Kazior <michal.kazior@tieto.com>
      [johannes: add braces that were missing even before]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      0cfcefef
    • J
      mac80211: add explicit IBSS driver operations · 55fff501
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      55fff501
  7. 26 9月, 2013 1 次提交
    • J
      mac80211: add ieee80211_iterate_active_interfaces_rtnl() · c7c71066
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      c7c71066
  8. 21 8月, 2013 1 次提交
  9. 16 8月, 2013 1 次提交
    • J
      mac80211: add APIs to allow keeping connections after WoWLAN · 27b3eb9c
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      27b3eb9c
  10. 12 8月, 2013 2 次提交
  11. 02 8月, 2013 1 次提交
  12. 01 8月, 2013 1 次提交
  13. 16 7月, 2013 3 次提交
  14. 13 6月, 2013 1 次提交
  15. 05 6月, 2013 1 次提交
  16. 04 6月, 2013 1 次提交
  17. 24 5月, 2013 1 次提交
  18. 17 5月, 2013 3 次提交
  19. 22 4月, 2013 2 次提交
    • F
      mac80211: improve the rate control API · 0d528d85
      Felix Fietkau 提交于
      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: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      0d528d85
    • A
      mac80211: indicate admission control in TX queue parameters · 908f8d07
      Alexander Bondar 提交于
      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: NAlexander Bondar <alexander.bondar@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      908f8d07
  20. 17 4月, 2013 2 次提交
  21. 16 4月, 2013 2 次提交
    • K
      mac80211: VHT off-by-one NSS · 6bc8312f
      Karl Beldan 提交于
      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: NKarl Beldan <karl.beldan@rivierawaves.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6bc8312f
    • J
      mac80211: support secondary channel offset in CSA · 85220d71
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      85220d71
  22. 11 4月, 2013 1 次提交
  23. 26 3月, 2013 1 次提交
  24. 25 3月, 2013 1 次提交
  25. 22 3月, 2013 1 次提交
  26. 19 3月, 2013 3 次提交