1. 27 Aug, 2010 1 commit
  2. 24 Aug, 2010 1 commit
  3. 26 Jul, 2010 1 commit
  4. 20 Jul, 2010 1 commit
    • Johannes Berg's avatar
      mac80211: move QoS-enable to BSS info · 4ced3f74
      Johannes Berg authored
      Ever since
      commit e1b3ec1a
      Author: Stanislaw Gruszka <sgruszka@redhat.com>
      Date:   Mon Mar 29 12:18:34 2010 +0200
          mac80211: explicitly disable/enable QoS
      mac80211 is telling drivers, in particular
      iwlwifi, whether QoS is enabled or not.
      However, this is only relevant for station mode,
      since only then will any device send nullfunc
      frames and need to know whether they should be
      QoS frames or not. In other modes, there are
      (currently) no frames the device is supposed to
      When you now consider virtual interfaces, it
      becomes apparent that the current mechanism is
      inadequate since it enables/disables QoS on a
      global scale, where for nullfunc frames it has
      to be on a per-interface scale.
      Due to the above considerations, we can change
      the way mac80211 advertises the QoS state to
      drivers to only ever advertise it as "off" in
      station mode, and make it a per-BSS setting.
      Tested-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  5. 14 Jun, 2010 1 commit
    • Johannes Berg's avatar
      mac80211: simplify station/aggregation code · 2a419056
      Johannes Berg authored
      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: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  6. 07 May, 2010 1 commit
  7. 08 Apr, 2010 1 commit
  8. 07 Apr, 2010 1 commit
  9. 31 Mar, 2010 1 commit
  10. 30 Mar, 2010 2 commits
  11. 08 Feb, 2010 2 commits
    • Wey-Yi Guy's avatar
      mac80211: tear down all agg queues when restart/reconfig hw · 74e2bd1f
      Wey-Yi Guy authored
      When there is a need to restart/reconfig hw, tear down all the
      aggregation queues and let the mac80211 and driver get in-sync to have
      the opportunity to re-establish the aggregation queues again.
      Need to wait until driver re-establish all the station information before tear
      down the aggregation queues, driver(at least iwlwifi driver) will reject the
      stop aggregation queue request if station is not ready. But also need to make
      sure the aggregation queues are tear down before waking up the queues, so
      mac80211 will not sending frames with aggregation bit set.
      Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      mac80211: allow station add/remove to sleep · 34e89507
      Johannes Berg authored
      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
      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: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  12. 15 Jan, 2010 1 commit
  13. 12 Jan, 2010 3 commits
    • Kalle Valo's avatar
      mac80211: add U-APSD client support · ab13315a
      Kalle Valo authored
      Add Unscheduled Automatic Power-Save Delivery (U-APSD) client support. The
      idea is that the data frames from the client trigger AP to send the buffered
      frames with ACs which have U-APSD enabled. This decreases latency and makes it
      possible to save even more power.
      Driver needs to use IEEE80211_HW_UAPSD to enable the feature. The current
      implementation assumes that firmware takes care of the wakeup and
      hardware needing IEEE80211_HW_PS_NULLFUNC_STACK is not yet supported.
      Tested with wl1251 on a Nokia N900 and Cisco Aironet 1231G AP and running
      various test traffic with ping.
      Signed-off-by: default avatarKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Lennert Buytenhek's avatar
      mac80211: flush workqueue before calling driver ->stop() method · 678f415f
      Lennert Buytenhek authored
      Since commit "mwl8k: handle station database update for AP's sta entry
      via ->sta_notify()", mwl8k every now and then gets a command timeout
      when ifconfig'ing a STA interface down.  This turns out to be due to
      mwl8k_stop() being called while the work queue item that was scheduled
      by mwl8k_sta_notify() to remove the STA entry for the associated AP is
      still queued, and the former disables interrupts so that when the
      latter eventually runs, a command completion interrupt is never seen.
      Fix this by changing ieee80211_stop_device() so that the workqueue is
      flushed before drv_stop() is called, instead of doing it the other way
      around as is done now.  (As ->stop() is allowed to sleep, there isn't
      any reason for drivers to queue work from within it.)
      Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Kalle Valo's avatar
      mac80211: use Probe Request template when sending a direct scan · 7c12ce8b
      Kalle Valo authored
      As mac80211 now has a separate function for creating Probe Request templates,
      better to use it when sending direct Probe Requests to an AP. Only the
      bssid needs to be updated in the template before sending it.
      Signed-off-by: default avatarKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  14. 05 Jan, 2010 2 commits
  15. 04 Jan, 2010 1 commit
  16. 28 Dec, 2009 4 commits
  17. 22 Dec, 2009 2 commits
  18. 21 Dec, 2009 2 commits
  19. 07 Dec, 2009 1 commit
  20. 19 Nov, 2009 1 commit
    • Johannes Berg's avatar
      mac80211: fix resume · ceb99fe0
      Johannes Berg authored
      When mac80211 resumes, it currently first sets suspended
      to false so the driver can start doing things and we can
      receive frames.
      However, if we actually receive frames then it can end
      up starting some work which adds timers and then later
      runs into a BUG_ON in the timer code because it tries
      add_timer() on a pending timer.
      Fix this by keeping track of the resuming process by
      introducing a new variable 'resuming' which gets set to
      true early on instead of setting 'suspended' to false,
      and allow queueing work but not receiving frames while
      Reported-by: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  21. 18 Nov, 2009 2 commits
  22. 13 Nov, 2009 1 commit
  23. 30 Oct, 2009 1 commit
    • Johannes Berg's avatar
      mac80211: split hardware scan by band · 4d36ec58
      Johannes Berg authored
      There's currently a very odd bug in mac80211 -- a
      hardware scan that is done while the hardware is
      really operating on 2.4 GHz will include CCK rates
      in the probe request frame, even on 5 GHz (if the
      driver uses the mac80211 IEs). Vice versa, if the
      hardware is operating on 5 GHz the 2.4 GHz probe
      requests will not include CCK rates even though
      they should.
      Fix this by splitting up cfg80211 scan requests by
      band -- recalculating the IEs every time -- and
      requesting only per-band scans from the driver.
      Apparently this bug hasn't been a problem yet, but
      it is imaginable that some older access points get
      confused if confronted with such behaviour.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  24. 07 Oct, 2009 1 commit
  25. 28 Aug, 2009 1 commit
  26. 20 Aug, 2009 1 commit
    • Johannes Berg's avatar
      mac80211: allow configure_filter callback to sleep · 3ac64bee
      Johannes Berg authored
      Over time, a whole bunch of drivers have come up
      with their own scheme to delay the configure_filter
      operation to a workqueue. To be able to simplify
      things, allow configure_filter to sleep, and add
      a new prepare_multicast callback that drivers that
      need the multicast address list implement. This new
      callback must be atomic, but most drivers either
      don't care or just calculate a hash which can be
      done atomically and then uploaded to the hardware
      A cursory look suggests that at76c50x-usb, ar9170,
      mwl8k (which is actually very broken now), rt2x00,
      wl1251, wl1271 and zd1211 should make use of this
      new capability.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  27. 04 Aug, 2009 1 commit
    • Luis R. Rodriguez's avatar
      mac80211: redefine usage of the mac80211 workqueue · 42935eca
      Luis R. Rodriguez authored
      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: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  28. 29 Jul, 2009 1 commit
    • Johannes Berg's avatar
      mac80211: verify info->control.vif is not NULL · a7bc376c
      Johannes Berg authored
      When enqueuing packets on the internal packet queue, we
      need to ensure that we have a valid vif pointer since
      that is required since the net namespace work. Add some
      assertions to verify this, but also don't crash is for
      some reason we don't end up with a vif pointer -- warn
      and drop the packet in all these cases.
      Since this code touches a number of hotpaths, it is
      intended to be temporary, or maybe configurable in the
      future, at least the bit that is in the path that gets
      hit for every packet, ieee80211_tx_pending().
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  29. 24 Jul, 2009 1 commit