1. 06 3月, 2013 1 次提交
    • S
      cfg80211/mac80211: disconnect on suspend · 81256969
      Stanislaw Gruszka 提交于
      If possible that after suspend, cfg80211 will receive request to
      disconnect what require action on interface that was removed during
      suspend.
      
      Problem can manifest itself by various warnings similar to below one:
      
      WARNING: at net/mac80211/driver-ops.h:12 ieee80211_bss_info_change_notify+0x2f9/0x300 [mac80211]()
      wlan0:  Failed check-sdata-in-driver check, flags: 0x4
      Call Trace:
       [<c043e0b3>] warn_slowpath_fmt+0x33/0x40
       [<f83707c9>] ieee80211_bss_info_change_notify+0x2f9/0x300 [mac80211]
       [<f83a660a>] ieee80211_recalc_ps_vif+0x2a/0x30 [mac80211]
       [<f83a6706>] ieee80211_set_disassoc+0xf6/0x500 [mac80211]
       [<f83a9441>] ieee80211_mgd_deauth+0x1f1/0x280 [mac80211]
       [<f8381b36>] ieee80211_deauth+0x16/0x20 [mac80211]
       [<f8261e70>] cfg80211_mlme_down+0x70/0xc0 [cfg80211]
       [<f8264de1>] __cfg80211_disconnect+0x1b1/0x1d0 [cfg80211]
      
      To fix the problem disconnect from any associated network before
      suspend. User space is responsible to establish connection again
      after resume. This basically need to be done by user space anyway,
      because associated stations can go away during suspend (for example
      NetworkManager disconnects on suspend and connect on resume by default).
      
      Patch also handle situation when driver refuse to suspend with wowlan
      configured and try to suspend again without it.
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      81256969
  2. 15 2月, 2013 1 次提交
  3. 31 1月, 2013 1 次提交
  4. 03 1月, 2013 5 次提交
  5. 20 11月, 2012 1 次提交
    • J
      mac80211: fix channel context suspend/reconfig handling · fe5f2559
      Johannes Berg 提交于
      Sujith reported warnings with suspend/resume due to
      channel contexts. When I looked into it, I realised
      that the code was completely broken as it unassigned
      the channel contexts when suspending, which actually
      means they are destroyed.
      
      Eliad Peller then pointed out that we also need to
      remove the channel contexts from the driver. When I
      looked into this, I also noticed that the code isn't
      handling the virtual monitor interface correctly (if
      it exists.)
      
      Fix this by calling just the driver methods (if they
      are implemented) instead of using the channel context
      management code. Also add reconfiguration for the
      virtual monitor interface.
      Reported-by: NSujith Manoharan <sujith@msujith.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      fe5f2559
  6. 26 10月, 2012 1 次提交
  7. 17 10月, 2012 1 次提交
    • J
      mac80211: use channel contexts · 55de908a
      Johannes Berg 提交于
      Instead of operating on a single channel only,
      use the new channel context infrastructure in
      all mac80211 code.
      
      This enables drivers that want to use the new
      channel context infrastructure to use multiple
      channels, while nothing should change for all
      the other drivers that don't support it.
      
      Right now this disables both TX power settings
      and spatial multiplexing powersave. Both need
      to be re-enabled on a channel context basis.
      
      Additionally, when channel contexts are used
      drop the connection when channel switch is
      received rather than trying to handle it. This
      will have to be improved later.
      
      [With fixes from Eliad and Emmanuel incorporated]
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      55de908a
  8. 20 6月, 2012 1 次提交
  9. 07 6月, 2012 1 次提交
  10. 12 4月, 2012 1 次提交
    • J
      mac80211: add explicit monitor interface if needed · 4b6f1dd6
      Johannes Berg 提交于
      The queue mapping redesign that I'm planning to do
      will break pure injection unless we handle monitor
      interfaces explicitly. One possible option would
      be to have the driver tell mac80211 about monitor
      mode queues etc., but that would duplicate the API
      since we already need to have queue assignments
      handled per virtual interface.
      
      So in order to solve this, have a virtual monitor
      interface that is added whenever all active vifs
      are monitors. We could also use the state of one
      of the monitor interfaces, but managing that would
      be complicated, so allocate separate state.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4b6f1dd6
  11. 28 2月, 2012 1 次提交
  12. 07 2月, 2012 3 次提交
  13. 10 11月, 2011 1 次提交
  14. 01 10月, 2011 1 次提交
    • J
      mac80211: optimise station flags · c2c98fde
      Johannes Berg 提交于
      The flaglock in struct sta_info has long been
      something that I wanted to get rid of, this
      finally does the conversion to atomic bitops.
      
      The conversion itself is straight-forward in
      most places, a few things needed to change a
      bit since we can no longer use multiple bits
      at the same time.
      
      On x86-64, this is a fairly significant code
      size reduction:
         text	   data	    bss	    dec	    hex
       427861	  23648	   1008	 452517	  6e7a5	before
       425383	  23648	    976	 450007	  6ddd7	after
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c2c98fde
  15. 16 7月, 2011 1 次提交
  16. 06 7月, 2011 1 次提交
  17. 21 6月, 2011 1 次提交
    • E
      mac80211: quiesce vif before suspending · 77572fd1
      Eliad Peller 提交于
      Cancel all relevant timers/works before suspending (wowlan).
      
      This patch handles the following warning:
      WARNING: at net/mac80211/util.c:565 queueing ieee80211 work while going to suspend
      Backtrace:
      [<bf07b598>] (ieee80211_can_queue_work+0x0/0x4c [mac80211])
      [<bf07c28c>] (ieee80211_queue_work+0x0/0x30 [mac80211])
      [<bf0690dc>] (ieee80211_sta_timer+0x0/0x3c [mac80211])
      [<c00a3008>] (run_timer_softirq+0x0/0x220)
      [<c009e530>] (__do_softirq+0x0/0x130)
      [<c009e660>] (irq_exit+0x0/0xb4)
      [<c004c4a0>] (ipi_timer+0x0/0x4c)
      [<c0046350>] (do_local_timer+0x0/0x88)
      [<c00488ec>] (cpu_idle+0x0/0xe0)
      [<c05294e8>] (rest_init+0x0/0xe0)
      [<c0008958>] (start_kernel+0x0/0x314)
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      77572fd1
  18. 06 5月, 2011 1 次提交
  19. 26 4月, 2011 1 次提交
  20. 07 10月, 2010 2 次提交
  21. 02 9月, 2010 1 次提交
  22. 15 6月, 2010 2 次提交
    • J
      mac80211: use common work struct · 64592c8f
      Johannes Berg 提交于
      IBSS, managed and mesh modes all have their
      own work struct, and in the future we want
      to also use it in other modes to process
      frames from the now common skb queue.
      
      This also makes the skb queue and work safe
      to use from other interface types.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      64592c8f
    • J
      mac80211: simplify station/aggregation code · 2a419056
      Johannes Berg 提交于
      A number of places use RCU locking for accessing
      the station list, even though they do not need
      to. Use mutex locking instead to prepare for the
      locking changes I want to make. The mlme code is
      also using a WLAN_STA_DISASSOC flag that has the
      same meaning as WLAN_STA_BLOCK_BA, so use that.
      
      While doing so, combine places where we loop
      over stations twice, and optimise away some of
      the loops by checking if the hardware supports
      aggregation at all first.
      
      Also fix a more theoretical race condition: right
      now we could resume, set up an aggregation session,
      and right after tear it down again due to the code
      that is needed for hardware reconfiguration here.
      Also mark add a comment to that code marking it as
      a workaround.
      
      Finally, remove a pointless aggregation disabling
      loop when an interface is stopped, directly after
      that we remove all stations from it which will also
      disable all aggregation sessions that may still be
      active, and does so in a race-free way unlike the
      current loop that doesn't block new sessions.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2a419056
  23. 08 4月, 2010 1 次提交
  24. 09 2月, 2010 1 次提交
    • J
      mac80211: allow station add/remove to sleep · 34e89507
      Johannes Berg 提交于
      Many drivers would like to sleep during station
      addition and removal, and currently have a high
      complexity there from not being able to.
      
      This introduces two new callbacks sta_add() and
      sta_remove() that drivers can implement instead
      of using sta_notify() and that can sleep, and
      the new sta_add() callback is also allowed to
      fail.
      
      The reason we didn't do this previously is that
      the IBSS code wants to insert stations from the
      RX path, which is a tasklet, so cannot sleep.
      This patch will keep the station allocation in
      that path, but moves adding the station to the
      driver out of line. Since the addition can now
      fail, we can have IBSS peer structs the driver
      rejected -- in that case we still talk to the
      station but never tell the driver about it in
      the control.sta pointer. If there will ever be
      a driver that has a low limit on the number of
      stations and that cannot talk to any stations
      that are not known to it, we need to do come up
      with a new strategy of handling larger IBSSs,
      maybe quicker expiry or rejecting peers.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      34e89507
  25. 29 12月, 2009 2 次提交
  26. 22 12月, 2009 2 次提交
  27. 29 8月, 2009 1 次提交
  28. 05 8月, 2009 2 次提交
    • L
      mac80211: redefine usage of the mac80211 workqueue · 42935eca
      Luis R. Rodriguez 提交于
      The mac80211 workqueue exists to enable mac80211 and drivers
      to queue their own work on a single threaded workqueue. mac80211
      takes care to flush the workqueue during suspend but we never
      really had requirements on drivers for how they should use
      the workqueue in consideration for suspend.
      
      We extend mac80211 to document how the mac80211 workqueue should
      be used, how it should not be used and finally move raw access to
      the workqueue to mac80211 only. Drivers and mac80211 use helpers
      to queue work onto the mac80211 workqueue:
      
        * ieee80211_queue_work()
        * ieee80211_queue_delayed_work()
      
      These helpers will now warn if mac80211 already completed its
      suspend cycle and someone is trying to queue work. mac80211
      flushes the mac80211 workqueue prior to suspend a few times,
      but we haven't taken the care to ensure drivers won't add more
      work after suspend. To help with this we add a warning when
      someone tries to add work and mac80211 already completed the
      suspend cycle.
      
      Drivers should ensure they cancel any work or delayed work
      in the mac80211 stop() callback.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      42935eca
    • B
      mac80211: disable beacons before removing the associated interface · 97af7432
      Bob Copeland 提交于
      When downing interfaces, it's a good idea to tell the driver to
      stop sending beacons; that way the driver doesn't need special
      code in ops->remove_interface() when it should already handle the
      case in bss_info_changed().
      
      This fixes a potential crash with at least ath5k since the vif
      pointer will be nullified while beacon interrupts are still active.
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      97af7432
  29. 30 7月, 2009 1 次提交