1. 22 9月, 2015 3 次提交
    • J
      mac80211: fix driver RSSI event calculations · 8ec6d978
      Johannes Berg 提交于
      The ifmgd->ave_beacon_signal value cannot be taken as is for
      comparisons, it must be divided by since it's represented
      like that for better accuracy of the EWMA calculations. This
      would lead to invalid driver RSSI events. Fix the used value.
      
      Fixes: 615f7b9b ("mac80211: add driver RSSI threshold events")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8ec6d978
    • J
      mac80211: remove last_beacon/ave_beacon debugfs files · 8e0d7fe0
      Johannes Berg 提交于
      These file aren't really useful:
       - if per beacon data is required then you need to use
         radiotap or similar anyway, debugfs won't help much
       - average beacon signal is reported in station info in
         nl80211 and can be looked up with iw
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8e0d7fe0
    • J
      mac80211: remove direct probe step before authentication · 46cad4b7
      Johannes Berg 提交于
      The direct probe step before authentication was done mostly for
      two reasons:
       1) the BSS data could be stale
       2) the beacon might not have included all IEs
      
      The concern (1) doesn't really seem to be relevant any more as
      we time out BSS information after about 30 seconds, and in fact
      the original patch only did the direct probe if the data was
      older than the BSS timeout to begin with. This condition got
      (likely inadvertedly) removed later though.
      
      Analysing this in more detail shows that since we mostly use
      data from the association response, the only real reason for
      needing the probe response was that the code validates the WMM
      parameters, and those are optional in beacons. As the previous
      patches removed that behaviour, we can now remove the direct
      probe step entirely.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      46cad4b7
  2. 17 7月, 2015 3 次提交
  3. 10 6月, 2015 2 次提交
    • J
      mac80211: convert HW flags to unsigned long bitmap · 30686bf7
      Johannes Berg 提交于
      As we're running out of hardware capability flags pretty quickly,
      convert them to use the regular test_bit() style unsigned long
      bitmaps.
      
      This introduces a number of helper functions/macros to set and to
      test the bits, along with new debugfs code.
      
      The occurrences of an explicit __clear_bit() are intentional, the
      drivers were never supposed to change their supported bits on the
      fly. We should investigate changing this to be a per-frame flag.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      30686bf7
    • M
      mac80211: release channel on auth failure · d01f858c
      Michal Kazior 提交于
      There were a few rare cases when upon
      authentication failure channel wasn't released.
      This could cause stale pointers to remain in
      chanctx assigned_vifs after interface removal and
      trigger general protection fault later.
      
      This could be triggered, e.g. on ath10k with the
      following steps:
      
       1. start an AP
       2. create 2 extra vifs on ath10k host
       3. connect vif1 to the AP
       4. connect vif2 to the AP
          (auth fails because ath10k firmware isn't able
           to maintain 2 peers with colliding AP mac
           addresses across vifs and consequently
           refuses sta_info_insert() in
           ieee80211_prep_connection())
       5. remove the 2 extra vifs
       6. goto step 2; at step 3 kernel was crashing:
      
       general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
       Modules linked in: ath10k_pci ath10k_core ath
       ...
       Call Trace:
        [<ffffffff81a2dabb>] ieee80211_check_combinations+0x22b/0x290
        [<ffffffff819fb825>] ? ieee80211_check_concurrent_iface+0x125/0x220
        [<ffffffff8180f664>] ? netpoll_poll_disable+0x84/0x100
        [<ffffffff819fb833>] ieee80211_check_concurrent_iface+0x133/0x220
        [<ffffffff81a0029e>] ieee80211_open+0x3e/0x80
        [<ffffffff817f2d26>] __dev_open+0xb6/0x130
        [<ffffffff817f3051>] __dev_change_flags+0xa1/0x170
       ...
       RIP  [<ffffffff81a23140>] ieee80211_chanctx_radar_detect+0xa0/0x170
      
       (gdb) l * ieee80211_chanctx_radar_detect+0xa0
       0xffffffff81a23140 is in ieee80211_chanctx_radar_detect (/devel/src/linux/net/mac80211/util.c:3182).
       3177             */
       3178            WARN_ON(ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER &&
       3179                    !list_empty(&ctx->assigned_vifs));
       3180
       3181            list_for_each_entry(sdata, &ctx->assigned_vifs, assigned_chanctx_list)
       3182                    if (sdata->radar_required)
       3183                            radar_detect |= BIT(sdata->vif.bss_conf.chandef.width);
       3184
       3185            return radar_detect;
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d01f858c
  4. 03 6月, 2015 1 次提交
  5. 01 6月, 2015 1 次提交
    • J
      mac80211: act upon and report deauth while associating · c9c99f89
      Johannes Berg 提交于
      When trying to associate, the AP could send a deauth frame instead.
      Currently mac80211 drops that frame and doesn't report it to the
      supplicant, which, in some versions and/or in certain circumstances
      will simply keep trying to associate over and over again instead of
      trying authentication again.
      
      Fix this by reacting to deauth frames while associating, reporting
      them to the supplicant and dropping the association attempt (which
      is bound to fail.)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c9c99f89
  6. 20 5月, 2015 1 次提交
  7. 24 4月, 2015 1 次提交
  8. 02 4月, 2015 1 次提交
  9. 30 3月, 2015 7 次提交
  10. 16 3月, 2015 3 次提交
  11. 04 3月, 2015 3 次提交
  12. 03 3月, 2015 2 次提交
    • J
      mac80211: fix another suspend vs. association race · be72afe0
      Johannes Berg 提交于
      Since cfg80211 disconnects, but has no insight into the association
      process, it can happen that it disconnects while association is in
      progress. We then try to abort association in mac80211, but this is
      only later so the association can complete between the two.
      
      This results in removing an interface from the driver while bound
      to the channel context, obviously causing confusion and issues.
      
      Solve this by also checking if we're associated during quiesce and
      if so deauthenticating. The frame will no longer go out to the AP
      which is a bit unfortunate, but it'll resolve the crash (and before
      we would have suspended without telling the AP as well.)
      
      I'm working on a better, but more complex solution as well, which
      should avoid that problem.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      be72afe0
    • A
      mac80211: Update beacon's timing and DTIM count on every beacon · 2ecc3905
      Alexander Bondar 提交于
      Beacon's timestamp, device system time associated with this beacon and
      DTIM count parameters are not updated in the associated vif context
      if the latest beacon's content is identical to the previously received.
      It make sense to update these changing parameters on every beacon so the
      driver can get most updated values. This may be necessary, for example,
      to avoid either beacons' drift effect or device time stamp overrun.
      IMPORTANT: Three sync_* parameters - sync_ts, sync_device_ts and
      sync_dtim_count would possibly be out of sync by the time the driver will
      use them. The synchronized view is currently guaranteed only in certain
      callbacks.
      Signed-off-by: NAlexander Bondar <alexander.bondar@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2ecc3905
  13. 23 1月, 2015 1 次提交
    • E
      mac80211: synchronize_net() before flushing the queues · 14f2ae83
      Emmanuel Grumbach 提交于
      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: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      [reword comment to be more accurate]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      14f2ae83
  14. 20 1月, 2015 1 次提交
    • E
      mac80211: delete the assoc/auth timer upon suspend · c1e140bf
      Emmanuel Grumbach 提交于
      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: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c1e140bf
  15. 14 1月, 2015 1 次提交
  16. 07 1月, 2015 1 次提交
  17. 17 12月, 2014 3 次提交
  18. 15 12月, 2014 1 次提交
  19. 12 12月, 2014 1 次提交
  20. 27 11月, 2014 1 次提交
  21. 24 11月, 2014 1 次提交
  22. 20 11月, 2014 1 次提交