1. 20 11月, 2014 2 次提交
  2. 05 9月, 2014 1 次提交
  3. 26 8月, 2014 1 次提交
  4. 25 6月, 2014 2 次提交
  5. 09 5月, 2014 1 次提交
  6. 09 4月, 2014 1 次提交
  7. 20 3月, 2014 1 次提交
  8. 20 2月, 2014 1 次提交
  9. 11 2月, 2014 1 次提交
  10. 16 12月, 2013 1 次提交
  11. 06 12月, 2013 2 次提交
    • E
      mac80211: start_next_roc only if scan was actually running · a2b70e83
      Eliad Peller 提交于
      On scan completion we try start any pending roc.
      
      However, if scan was just pending (and not actually started)
      there is no point in trying to start the roc, as it might
      have started already.
      
      This solves the following warning:
      WARNING: CPU: 0 PID: 3552 at net/mac80211/offchannel.c:269 ieee80211_start_next_roc+0x164/0x204 [mac80211]()
      [<c001cd38>] (unwind_backtrace+0x0/0xf0)
      [<c00181d0>] (show_stack+0x10/0x14)
      [<c05c0d8c>] (dump_stack+0x78/0x94)
      [<c0047c08>] (warn_slowpath_common+0x68/0x8c)
      [<c0047c48>] (warn_slowpath_null+0x1c/0x24)
      [<bf4d6660>] (ieee80211_start_next_roc+0x164/0x204 [mac80211])
      [<bf4d5a74>] (ieee80211_scan_cancel+0xe8/0x190 [mac80211])
      [<bf4df970>] (ieee80211_do_stop+0x63c/0x79c [mac80211])
      [<bf4dfae0>] (ieee80211_stop+0x10/0x18 [mac80211])
      [<c0504d84>] (__dev_close_many+0x84/0xcc)
      [<c0504df4>] (__dev_close+0x28/0x3c)
      [<c0509708>] (__dev_change_flags+0x78/0x144)
      [<c0509854>] (dev_change_flags+0x10/0x48)
      [<c055fe3c>] (devinet_ioctl+0x614/0x6d0)
      [<c04f22a0>] (sock_ioctl+0x5c/0x2a4)
      [<c0124eb4>] (do_vfs_ioctl+0x7c/0x5d8)
      [<c012547c>] (SyS_ioctl+0x6c/0x7c)
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a2b70e83
    • E
      mac80211: determine completed scan type by defined ops · 8bd2a248
      Eliad Peller 提交于
      In some cases, determining the completed scan type was
      done by testing the SCAN_HW_SCANNING flag.
      
      However, this doesn't take care for the case in which
      the hw scan was requested, but hasn't started yet (e.g.
      due to active remain_on_channel).
      
      Replace this test by checking whether ops->hw_scan is
      defined.
      
      This solves the following warning:
      
      WARNING: CPU: 0 PID: 3552 at net/mac80211/offchannel.c:156 __ieee80211_scan_completed+0x1b4/0x2dc [mac80211]()
      [<c001cd38>] (unwind_backtrace+0x0/0xf0)
      [<c00181d0>] (show_stack+0x10/0x14)
      [<c05c0d8c>] (dump_stack+0x78/0x94)
      [<c0047c08>] (warn_slowpath_common+0x68/0x8c)
      [<c0047c48>] (warn_slowpath_null+0x1c/0x24)
      [<bf4d4504>] (__ieee80211_scan_completed+0x1b4/0x2dc [mac80211])
      [<bf4d5a74>] (ieee80211_scan_cancel+0xe8/0x190 [mac80211])
      [<bf4df970>] (ieee80211_do_stop+0x63c/0x79c [mac80211])
      [<bf4dfae0>] (ieee80211_stop+0x10/0x18 [mac80211])
      [<c0504d84>] (__dev_close_many+0x84/0xcc)
      [<c0504df4>] (__dev_close+0x28/0x3c)
      [<c0509708>] (__dev_change_flags+0x78/0x144)
      [<c0509854>] (dev_change_flags+0x10/0x48)
      [<c055fe3c>] (devinet_ioctl+0x614/0x6d0)
      [<c04f22a0>] (sock_ioctl+0x5c/0x2a4)
      [<c0124eb4>] (do_vfs_ioctl+0x7c/0x5d8)
      [<c012547c>] (SyS_ioctl+0x6c/0x7c)
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8bd2a248
  12. 03 12月, 2013 1 次提交
  13. 26 11月, 2013 1 次提交
    • L
      cfg80211: consolidate passive-scan and no-ibss flags · 8fe02e16
      Luis R. Rodriguez 提交于
      These two flags are used for the same purpose, just
      combine them into a no-ir flag to annotate no initiating
      radiation is allowed.
      
      Old userspace sending either flag will have it treated as
      the no-ir flag. To be considerate to older userspace we
      also send both the no-ir flag and the old no-ibss flags.
      Newer userspace will have to be aware of older kernels.
      
      Update all places in the tree using these flags with the
      following semantic patch:
      
      @@
      @@
      -NL80211_RRF_PASSIVE_SCAN
      +NL80211_RRF_NO_IR
      @@
      @@
      -NL80211_RRF_NO_IBSS
      +NL80211_RRF_NO_IR
      @@
      @@
      -IEEE80211_CHAN_PASSIVE_SCAN
      +IEEE80211_CHAN_NO_IR
      @@
      @@
      -IEEE80211_CHAN_NO_IBSS
      +IEEE80211_CHAN_NO_IR
      @@
      @@
      -NL80211_RRF_NO_IR | NL80211_RRF_NO_IR
      +NL80211_RRF_NO_IR
      @@
      @@
      -IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_IR
      +IEEE80211_CHAN_NO_IR
      @@
      @@
      -(NL80211_RRF_NO_IR)
      +NL80211_RRF_NO_IR
      @@
      @@
      -(IEEE80211_CHAN_NO_IR)
      +IEEE80211_CHAN_NO_IR
      
      Along with some hand-optimisations in documentation, to
      remove duplicates and to fix some indentation.
      Signed-off-by: NLuis R. Rodriguez <mcgrof@do-not-panic.com>
      [do all the driver updates in one go]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8fe02e16
  14. 25 11月, 2013 1 次提交
    • J
      mac80211: fix scheduled scan rtnl deadlock · 18db594a
      Johannes Berg 提交于
      When changing cfg80211 to use RTNL locking, this caused a
      deadlock in mac80211 as it calls cfg80211_sched_scan_stopped()
      from a work item that's on a workqueue that is flushed with
      the RTNL held.
      
      Fix this by simply using schedule_work(), the work only needs
      to finish running before the wiphy is unregistered, no other
      synchronisation (e.g. with suspend) is really required since
      for suspend userspace is already blocked anyway when we flush
      the workqueue so will only pick up the event after resume.
      
      Cc: stable@vger.kernel.org
      Fixes: 5fe231e8 ("cfg80211: vastly simplify locking")
      Reported-and-tested-by: NEliad Peller <eliadx.peller@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      18db594a
  15. 10 10月, 2013 1 次提交
    • E
      mac80211: correctly close cancelled scans · a754055a
      Emmanuel Grumbach 提交于
      __ieee80211_scan_completed is called from a worker. This
      means that the following flow is possible.
      
       * driver calls ieee80211_scan_completed
       * mac80211 cancels the scan (that is already complete)
       * __ieee80211_scan_completed runs
      
      When scan_work will finally run, it will see that the scan
      hasn't been aborted and might even trigger another scan on
      another band. This leads to a situation where cfg80211's
      scan is not done and no further scan can be issued.
      
      Fix this by setting a new flag when a HW scan is being
      cancelled so that no other scan will be triggered.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a754055a
  16. 26 9月, 2013 1 次提交
  17. 16 7月, 2013 2 次提交
  18. 13 6月, 2013 1 次提交
  19. 16 4月, 2013 1 次提交
    • J
      mac80211: parse VHT channel switch IEs · b2e506bf
      Johannes Berg 提交于
      VHT introduces multiple IEs that need to be parsed for a
      wide bandwidth channel switch. Two are (currently) needed
      in mac80211:
       * wide bandwidth channel switch element
       * channel switch wrapper element
      
      The former is contained in the latter for beacons and probe
      responses, but not for the spectrum management action frames
      so the IE parser needs a new argument to differentiate them.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b2e506bf
  20. 08 4月, 2013 1 次提交
  21. 26 3月, 2013 1 次提交
  22. 19 3月, 2013 1 次提交
  23. 11 3月, 2013 1 次提交
  24. 15 2月, 2013 1 次提交
  25. 12 2月, 2013 4 次提交
    • S
      mac80211: Add flushes before going off-channel · 9c35d7d2
      Seth Forshee 提交于
      We've got a couple of races when enabling powersave with an AP for
      off-channel operation. The first is fairly simple. If we go off-channel
      before the nullfunc frame to enable PS is transmitted then it may not be
      received by the AP. Add a flush after enabling off-channel PS to prevent
      this from happening.
      
      The second race is a bit more subtle. If the driver supports QoS and has
      frames queued when the nullfunc frame is queued, those frames may get
      transmitted after the nullfunc frame. If PM is not set then the AP is
      being told that we've exited PS before we go off-channel and may try to
      deliver frames. To prevent this, add a flush after stopping the queues
      but before passing the nullfunc frame to the driver.
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9c35d7d2
    • S
      mac80211: Fix tx queue handling during scans · 6c17b77b
      Seth Forshee 提交于
      Scans currently work by stopping the netdev tx queues but leaving the
      mac80211 queues active. This stops the flow of incoming packets while
      still allowing mac80211 to transmit nullfunc and probe request frames to
      facilitate scanning. However, the driver may try to wake the mac80211
      queues while in this state, which will also wake the netdev queues.
      
      To prevent this, add a new queue stop reason,
      IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL, to be used when stopping the tx
      queues for off-channel operation. This prevents the netdev queues from
      waking when a driver wakes the mac80211 queues.
      
      This also stops all frames from being transmitted, even those meant to
      be sent off-channel. Add a new tx control flag,
      IEEE80211_TX_CTL_OFFCHAN_TX_OK, which allows frames to be transmitted
      when the queues are stopped only for the off-channel stop reason. Update
      all locations transmitting off-channel frames to use this flag.
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6c17b77b
    • J
      mac80211: introduce beacon-only timing data · ef429dad
      Johannes Berg 提交于
      In order to be able to predict the next DTIM TBTT
      in the driver, add the ability to use timing data
      from beacons only with the new hardware flag
      IEEE80211_HW_TIMING_BEACON_ONLY and the BSS info
      value sync_dtim_count which is only valid if the
      timing data came from a beacon. The data can only
      come from a beacon, and if no beacon was received
      before association it is updated later together
      with the DTIM count notification.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ef429dad
    • J
      cfg80211: pass wiphy to cfg80211_ref_bss/put_bss · 5b112d3d
      Johannes Berg 提交于
      This prepares for using the spinlock instead of krefs
      which is needed in the next patch to track the refs
      of combined BSSes correctly.
      
      Acked-by: Bing Zhao <bzhao@marvell.com> [mwifiex]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      5b112d3d
  26. 31 1月, 2013 4 次提交
    • S
      mac80211: improve latency and throughput while software scanning · 3f892b61
      Stanislaw Gruszka 提交于
      Patch vastly improve latency while scanning. Slight throughput
      improvements were observed as well. Is intended for improve performance
      of voice and video applications, when scan is periodically requested by
      user space (i.e. default NetworkManager behaviour).
      
      Patch remove latency requirement based on PM_QOS_NETWORK_LATENCY,
      this value is 2000 seconds by default (i.e. approximately 0.5 hour !?!).
      
      Also remove listen interval requirement, which based on beaconing and
      depending on BSS parameters. It can make we stay off-channel for a
      second or more.
      
      Instead try to offer the best latency that we could, i.e. be off-channel
      no longer than PASSIVE channel scan time: 125 ms. That mean we will
      scan two ACTIVE channels and go back to on-channel, and one PASSIVE
      channel, and go back to on-channel.
      
      Patch also decrease PASSIVE channel scan time to about 110 ms.
      
      As drawback patch increase overall scan time. On my tests, when scanning
      both 2GHz and 5GHz bands, scanning time increase from 5 seconds up to 10
      seconds. Since that increase happen only when we are associated, I think
      it can be acceptable. If eventually better scan time is needed for
      situations when we lose signal and quickly need to decide to which AP
      roam, additional scan flag or parameter can be introduced.
      
      I tested patch by doing:
      
      while true; do iw dev wlan0 scan; sleep 3; done > /dev/null
      
      and
      
      ping -i0.2 -c 1000 HOST
      
      on remote and local machine, results are as below:
      
      * Ping from local periodically scanning machine to AP:
      Unpatched: rtt min/avg/max/mdev = 0.928/24.946/182.135/36.873 ms
      Patched:   rtt min/avg/max/mdev = 0.928/19.678/150.845/33.130 ms
      
      * Ping from remote machine to periodically scanning machine:
      Unpatched: rtt min/avg/max/mdev = 1.637/120.683/709.139/164.337 ms
      Patched:   rtt min/avg/max/mdev = 1.807/26.893/201.435/40.284 ms
      
      Throughput measured by scp show following results.
      
      * Upload to periodically scanning machine:
      Unpatched: 3.9MB/s   03:15
      Patched:   4.3MB/s   02:58
      
      * Download from periodically scanning machine:
      Unpatched: 5.5MB/s   02:17
      Patched:   6.2MB/s   02:02
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      3f892b61
    • J
      mac80211: start auth/assoc timeout on frame status · 1672c0e3
      Johannes Berg 提交于
      When sending authentication/association frames they
      might take a bit of time to go out because we may
      have to synchronise with the AP, in particular in
      the case where it's really a P2P GO. In this case
      the 200ms fixed timeout could potentially be too
      short if the beacon interval is relatively large.
      
      For drivers that report TX status we can do better.
      Instead of starting the timeout directly, start it
      only when the frame status arrives. Since then the
      frame was out on the air, we can wait shorter (the
      typical response time is supposed to be 30ms, wait
      100ms.) Also, if the frame failed to be transmitted
      try again right away instead of waiting.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1672c0e3
    • J
      mac80211: remove unused mesh data from bss · 0fe20add
      Johannes Berg 提交于
      These pointers/values are never used, remove them.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      0fe20add
    • J
      mac80211: remove last_probe_resp from bss · ce9877c0
      Johannes Berg 提交于
      We track this, but never use it, so we can
      just remove it.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ce9877c0
  27. 16 1月, 2013 1 次提交
    • S
      mac80211: synchronize scan off/on-channel and PS states · aacde9ee
      Stanislaw Gruszka 提交于
      Since:
      
      commit b23b025f
      Author: Ben Greear <greearb@candelatech.com>
      Date:   Fri Feb 4 11:54:17 2011 -0800
      
          mac80211: Optimize scans on current operating channel.
      
      we do not disable PS while going back to operational channel (on
      ieee80211_scan_state_suspend) and deffer that until scan finish.
      But since we are allowed to send frames, we can send a frame to AP
      without PM bit set, so disable PS on AP side. Then when we switch
      to off-channel (in ieee80211_scan_state_resume) we do not enable PS.
      Hence we are off-channel with PS disabled, frames are not buffered
      by AP.
      
      To fix remove offchannel_ps_disable argument and always enable PS when
      going off-channel and disable it when going on-channel, like it was
      before.
      
      Cc: stable@vger.kernel.org # 2.6.39+
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Tested-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      aacde9ee
  28. 03 1月, 2013 3 次提交