1. 23 Jan, 2015 9 commits
  2. 22 Jan, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: allow drivers to control software crypto · fa7e1fbc
      Johannes Berg authored
      Some drivers unfortunately cannot support software crypto, but
      mac80211 currently assumes that they do.
      
      This has the issue that if the hardware enabling fails for some
      reason, the software fallback is used, which won't work. This
      clearly isn't desirable, the error should be reported and the
      key setting refused.
      
      Support this in mac80211 by allowing drivers to set a new HW
      flag IEEE80211_HW_SW_CRYPTO_CONTROL, in which case mac80211 will
      only allow software fallback if the set_key() method returns 1.
      The driver will also need to advertise supported cipher suites
      so that mac80211 doesn't advertise any (future) software ciphers
      that the driver can't actually do.
      
      While at it, to make it easier to support this, refactor the
      ieee80211_init_cipher_suites() code.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      fa7e1fbc
  3. 21 Jan, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: fix HW registration error paths · 54330bf6
      Johannes Berg authored
      Station info state is started in allocation, so should be
      destroyed on free (it's just a timer); rate control must
      be freed if anything afterwards fails to initialize.
      
      LED exit should be later, no need for locking there, but
      it needs to be done also when rate init failed.
      
      Also clean up the code by moving a label so the locking
      doesn't have to be done separately.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      54330bf6
  4. 19 Jan, 2015 2 commits
    • Emmanuel Grumbach's avatar
      mac80211: delete the assoc/auth timer upon suspend · c1e140bf
      Emmanuel Grumbach authored
      While suspending, we destroy the authentication /
      association that might be taking place. While doing so, we
      forgot to delete the timer which can be firing after
      local->suspended is already set, producing the warning below.
      
      Fix that by deleting the timer.
      
      [66722.825487] WARNING: CPU: 2 PID: 5612 at net/mac80211/util.c:755 ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]()
      [66722.825487] queueing ieee80211 work while going to suspend
      [66722.825529] CPU: 2 PID: 5612 Comm: kworker/u16:69 Tainted: G        W  O  3.16.1+ #24
      [66722.825537] Workqueue: events_unbound async_run_entry_fn
      [66722.825545] Call Trace:
      [66722.825552]  <IRQ>  [<ffffffff817edbb2>] dump_stack+0x4d/0x66
      [66722.825556]  [<ffffffff81075cad>] warn_slowpath_common+0x7d/0xa0
      [66722.825572]  [<ffffffffa06b5b90>] ? ieee80211_sta_bcn_mon_timer+0x50/0x50 [mac80211]
      [66722.825573]  [<ffffffff81075d1c>] warn_slowpath_fmt+0x4c/0x50
      [66722.825586]  [<ffffffffa06977a2>] ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]
      [66722.825598]  [<ffffffffa06977d5>] ieee80211_queue_work+0x25/0x50 [mac80211]
      [66722.825611]  [<ffffffffa06b5bac>] ieee80211_sta_timer+0x1c/0x20 [mac80211]
      [66722.825614]  [<ffffffff8108655a>] call_timer_fn+0x8a/0x300
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c1e140bf
    • Johannes Berg's avatar
      Revert "wireless: Support of IFLA_INFO_KIND rtnl attribute" · 6e9f3fa4
      Johannes Berg authored
      This reverts commit ba1debdf.
      
      Oliver reported that it breaks network-manager, for some reason with
      this patch NM decides that the device isn't wireless but "generic"
      (ethernet), sees no carrier (as expected with wifi) and fails to do
      anything else with it.
      
      Revert this to unbreak userspace.
      Reported-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
      Tested-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6e9f3fa4
  5. 16 Jan, 2015 2 commits
  6. 15 Jan, 2015 3 commits
    • Johannes Berg's avatar
      cfg80211: change bandwidth reporting to explicit field · b51f3bee
      Johannes Berg authored
      For some reason, we made the bandwidth separate flags, which
      is rather confusing - a single rate cannot have different
      bandwidths at the same time.
      
      Change this to no longer be flags but use a separate field
      for the bandwidth ('bw') instead.
      
      While at it, add support for 5 and 10 MHz rates - these are
      reported as regular legacy rates with their real bitrate,
      but tagged as 5/10 now to make it easier to distinguish them.
      
      In the nl80211 API, the flags are preserved, but the code
      now can also clearly only set a single one of the flags.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      b51f3bee
    • Johannes Berg's avatar
      cfg80211: remove 80+80 MHz rate reporting · 97d910d0
      Johannes Berg authored
      These rates are treated the same as 160 MHz in the spec, so
      it makes no sense to distinguish them. As no driver uses them
      yet, this is also not a problem, just remove them.
      
      In the userspace API the field remains reserved to preserve
      API and ABI.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      97d910d0
    • Johannes Berg's avatar
      mac80211: remove 80+80 MHz rate reporting · f89903d5
      Johannes Berg authored
      These rates are treated the same as 160 MHz in the spec,
      so it makes no sense to distinguish them. As no driver
      uses them yet, this is also not a problem, just remove
      them.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f89903d5
  7. 14 Jan, 2015 9 commits
  8. 09 Jan, 2015 3 commits
  9. 08 Jan, 2015 10 commits
    • Johannes Berg's avatar
      mac80211: provide per-TID RX/TX MSDU counters · 79c892b8
      Johannes Berg authored
      Implement the new counters cfg80211 can now advertise to userspace.
      The TX code is in the sequence number handler, which is a bit odd,
      but that place already knows the TID and frame type, so it was
      easiest and least impact there.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      79c892b8
    • Johannes Berg's avatar
      nl80211: support per-TID station statistics · 6de39808
      Johannes Berg authored
      The base for the current statistics is pretty mixed up, support
      exporting RX/TX statistics for MSDUs per TID. This (currently)
      covers received MSDUs, transmitted MSDUs and retries/failures
      thereof.
      
      Doing it per TID for MSDUs makes more sense than say only per AC
      because it's symmetric - we could export per-AC statistics for all
      frames (which AC we used for transmission can be determined also
      for management frames) but per TID is better and usually data
      frames are really the ones we care about. Also, on RX we can't
      determine the AC - but we do know the TID for any QoS MPDU we
      received.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6de39808
    • Johannes Berg's avatar
      nl80211: clarify packet statistics descriptions · 8d791361
      Johannes Berg authored
      The current statistics we keep aren't very clear, some are on
      MPDUs and some on MSDUs/MMPDUs. Clarify the descriptions based
      on the counters mac80211 keeps.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8d791361
    • Johannes Berg's avatar
      cfg80211: add nl80211 beacon-only statistics · a76b1942
      Johannes Berg authored
      Add these two values:
       * BEACON_RX: number of beacons received from this peer
       * BEACON_SIGNAL_AVG: signal strength average for beacons only
      
      These can then be used for Android Lollipop's statistics request.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      a76b1942
    • Johannes Berg's avatar
      cfg80211: remove enum station_info_flags · 319090bf
      Johannes Berg authored
      This is really just duplicating the list of information that's
      already available in the nl80211 attribute, so remove the list.
      Two small changes are needed:
       * remove STATION_INFO_ASSOC_REQ_IES complete, but the length
         (assoc_req_ies_len) can be used instead
       * add NL80211_STA_INFO_RX_DROP_MISC which exists internally
         but not in nl80211 yet
      
      This gets rid of the duplicate maintenance of the two lists.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      319090bf
    • Johannes Berg's avatar
      mac80211: allow drivers to provide most station statistics · 2b9a7e1b
      Johannes Berg authored
      In many cases, drivers can filter things like beacons that will
      skew statistics reported by mac80211. To get correct statistics
      in these cases, call drivers to obtain statistics and let them
      override all values, filling values from mac80211 if the driver
      didn't provide them. Not all of them make sense for the driver
      to fill, so some are still always done by mac80211.
      
      Note that this doesn't currently allow a driver to say "I know
      this value is wrong, don't report it at all", or to sum it up
      with a mac80211 value (as could be useful for "dropped misc"),
      that can be added if it turns out to be needed.
      
      This also gets rid of the get_rssi() method as is can now be
      implemented using sta_statistics().
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      2b9a7e1b
    • Johannes Berg's avatar
      mac80211: send statistics with delete station event · 6f7a8d26
      Johannes Berg authored
      Use the new cfg80211_del_sta_sinfo() function to send the
      statistics about the deleted station with the delete event.
      This lets userspace see how much traffic etc. the deleted
      station used.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6f7a8d26
    • Johannes Berg's avatar
      cfg80211: allow including station info in delete event · cf5ead82
      Johannes Berg authored
      When a station is removed, its statistics may be interesting to
      userspace, for example for further aggregation of statistics of
      all stations that ever connected to an AP.
      
      Introduce a new cfg80211_del_sta_sinfo() function (and make the
      cfg80211_del_sta() a static inline calling it) to allow passing
      a struct station_info along with this, and send the data in the
      nl80211 event message.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      cf5ead82
    • Johannes Berg's avatar
      cfg80211: add scan time to survey data · 052536ab
      Johannes Berg authored
      Add the time spent scanning to the survey data so it can be
      reported by drivers that collect such information.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      052536ab
    • Johannes Berg's avatar
      cfg80211: allow survey data to return global data · 11f78ac3
      Johannes Berg authored
      Not all devices are able to report survey data (particularly
      time spent for various operations) per channel. As all these
      statistics already exist in survey data, allow such devices
      to report them (if userspace requested it)
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      11f78ac3