1. 29 6月, 2010 1 次提交
  2. 15 6月, 2010 6 次提交
    • J
      mac80211: change RX aggregation locking · a93e3644
      Johannes Berg 提交于
      To prepare for allowing drivers to sleep in
      ampdu_action, change the locking in the RX
      aggregation code to use a mutex, so that it
      would already allow drivers to sleep. But
      explicitly disable BHs around the callback
      for now since the TX part cannot yet sleep,
      and drivers' locking might require it.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a93e3644
    • J
      mac80211: defer RX agg session teardown to work · 7c3b1dd8
      Johannes Berg 提交于
      Since we want the code to be able to sleep
      in the future, it must not be called from
      the timer directly. To prepare, move it out
      into the aggregation work.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7c3b1dd8
    • J
      mac80211: make TX aggregation start/stop request async · 0ab33703
      Johannes Berg 提交于
      When the driver or rate control requests starting
      or stopping an aggregation session, that currently
      causes a direct callback into the driver, which
      could potentially cause locking problems. Also,
      the functions need to be callable from contexts
      that cannot sleep, and thus will interfere with
      making the ampdu_action callback sleeping.
      
      To address these issues, add a new work item for
      each station that will process any start or stop
      requests out of line.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0ab33703
    • J
      mac80211: use RCU for TX aggregation · a622ab72
      Johannes Berg 提交于
      Currently we allocate some memory for each TX
      aggregation session and additionally keep a
      state bitmap indicating the state it is in.
      By using RCU to protect the pointer, moving
      the state into the structure and some locking
      trickery we can avoid locking when the TX agg
      session is fully operational.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a622ab72
    • J
      mac80211: use RCU for RX aggregation · a87f736d
      Johannes Berg 提交于
      Currently we allocate some memory for each RX
      aggregation session and additionally keep a
      flag indicating whether or not it is valid.
      By using RCU to protect the pointer and making
      sure that the memory is fully set up before it
      becomes visible to the RX path, we can remove
      the need for the bool that indicates validity,
      as well as for locking on the RX path since it
      is always synchronised against itself, and we
      can guarantee that all other modifications are
      done when the structure is not visible to the
      RX path.
      
      The net result is that since we remove locking
      requirements from the RX path, we can in the
      future use any kind of lock for the setup and
      teardown code paths.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a87f736d
    • 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
  3. 04 6月, 2010 1 次提交
  4. 25 5月, 2010 1 次提交
  5. 08 4月, 2010 2 次提交
  6. 10 3月, 2010 1 次提交
  7. 11 2月, 2010 1 次提交
  8. 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
  9. 13 1月, 2010 1 次提交
  10. 22 12月, 2009 1 次提交
    • J
      mac80211: make station management completely depend on vif · abe60632
      Johannes Berg 提交于
      The station management currently uses the virtual
      interface, but you cannot add the same station to
      multiple virtual interfaces if you're communicating
      with it in multiple ways.
      
      This restriction should be lifted so that in the
      future we can, for instance, support bluetooth 3
      with an access point that mac80211 is already
      associated to.
      
      We can do that by requiring all sta_info_get users
      to provide the virtual interface and making the RX
      code aware that an address may match more than one
      station struct. Thanks to the previous patches this
      one isn't all that large and except for the RX and
      TX status paths changes has low complexity.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      abe60632
  11. 24 11月, 2009 1 次提交
  12. 19 11月, 2009 1 次提交
  13. 07 11月, 2009 1 次提交
    • J
      mac80211: async station powersave handling · af818581
      Johannes Berg 提交于
      Some devices require that all frames to a station
      are flushed when that station goes into powersave
      mode before being able to send frames to that
      station again when it wakes up or polls -- all in
      order to avoid reordering and too many or too few
      frames being sent to the station when it polls.
      
      Normally, this is the case unless the station
      goes to sleep and wakes up very quickly again.
      But in that case, frames for it may be pending
      on the hardware queues, and thus races could
      happen in the case of multiple hardware queues
      used for QoS/WMM. Normally this isn't a problem,
      but with the iwlwifi mechanism we need to make
      sure the race doesn't happen.
      
      This makes mac80211 able to cope with the race
      with driver help by a new WLAN_STA_PS_DRIVER
      per-station flag that can be controlled by the
      driver and tells mac80211 whether it can transmit
      frames or not. This flag must be set according to
      very specific rules outlined in the documentation
      for the function that controls it.
      
      When we buffer new frames for the station, we
      normally set the TIM bit right away, but while
      the driver has blocked transmission to that sta
      we need to avoid that as well since we cannot
      respond to the station if it wakes up due to the
      TIM bit. Once the driver unblocks, we can set
      the TIM bit.
      
      Similarly, when the station just wakes up, we
      need to wait until all other frames are flushed
      before we can transmit frames to that station,
      so the same applies here, we need to wait for
      the driver to give the OK.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      af818581
  14. 31 10月, 2009 2 次提交
    • J
      mac80211: deprecate qual value · c27f2fde
      Johannes Berg 提交于
      This value is unused by mac80211, because it was only
      be used by wireless extensions, and turned out to not
      be useful there because the quality value needs to be
      comparable between scan results and the current value
      which is impossible when the qual value is calculated
      taking into account noise, for example.
      
      Since it is unused anyway, this patch deprecates it
      in the hope that drivers will remove their sometimes
      quite expensive calculations of the value.
      
      I'm open to actual uses of the value, but the best
      way of using it seems to be what the Intel drivers do
      which should probably be generalised if we have noise
      values from the hardware.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c27f2fde
    • J
      cfg80211/mac80211: use debugfs_remove_recursive · 7bcfaf2f
      Johannes Berg 提交于
      We can save a lot of code and pointers in the structs
      by using debugfs_remove_recursive().
      
      First, change cfg80211 to use debugfs_remove_recursive()
      so that drivers do not need to clean up any files they
      added to the per-wiphy debugfs (if and only if they are
      ok to be accessed until after wiphy_unregister!).
      
      Then also make mac80211 use debugfs_remove_recursive()
      where necessary -- it need not remove per-wiphy files
      as cfg80211 now removes those, but netdev etc. files
      still need to be handled but can now be removed without
      needing struct dentry pointers to all of them.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7bcfaf2f
  15. 28 7月, 2009 1 次提交
  16. 11 7月, 2009 1 次提交
  17. 21 5月, 2009 2 次提交
  18. 07 5月, 2009 1 次提交
    • J
      mac80211: Add a timeout for frames in the RX reorder buffer · 4d050f1d
      Jouni Malinen 提交于
      This patch allows skbs to be released from the RX reorder buffer in
      case they have been there for an unexpectedly long time without us
      having received the missing frames before them. Previously, these
      frames were only released when the reorder window moved and that could
      take very long time unless new frames were received constantly (e.g.,
      TCP connections could be killed more or less indefinitely).
      
      This situation should not happen very frequently, but it looks like
      there are some scenarious that trigger it for some reason. As such,
      this should be considered mostly a workaround to speed up recovery
      from unexpected siutation that could result in connections hanging for
      long periods of time.
      
      The changes here will only check for timeout situation when adding new
      RX frames to the reorder buffer. It does not handle all possible
      cases, but seems to help for most cases that could result from common
      network usage (e.g., TCP retrying at least couple of times). For more
      completely coverage, a timer could be used to periodically check
      whether there are any frames remaining in the reorder buffer if no new
      frames are received.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4d050f1d
  19. 23 4月, 2009 1 次提交
  20. 28 3月, 2009 3 次提交
    • J
      mac80211/iwlwifi: move virtual A-MDPU queue bookkeeping to iwlwifi · e4e72fb4
      Johannes Berg 提交于
      This patch removes all the virtual A-MPDU-queue bookkeeping from
      mac80211. Curiously, iwlwifi already does its own bookkeeping, so
      it doesn't require much changes except where it needs to handle
      starting and stopping the queues in mac80211.
      
      To handle the queue stop/wake properly, we rewrite the software
      queue number for aggregation frames and internally to iwlwifi keep
      track of the queues that map into the same AC queue, and only talk
      to mac80211 about the AC queue. The implementation requires calling
      two new functions, iwl_stop_queue and iwl_wake_queue instead of the
      mac80211 counterparts.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: Reinette Chattre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e4e72fb4
    • J
      mac80211: fix aggregation to not require queue stop · cd8ffc80
      Johannes Berg 提交于
      Instead of stopping the entire AC queue when enabling aggregation
      (which was only done for hardware with aggregation queues) buffer
      the packets for each station, and release them to the pending skb
      queue once aggregation is turned on successfully.
      
      We get a little more code, but it becomes conceptually simpler and
      we can remove the entire virtual queue mechanism from mac80211 in
      a follow-up patch.
      
      This changes how mac80211 behaves towards drivers that support
      aggregation but have no hardware queues -- those drivers will now
      not be handed packets while the aggregation session is being
      established, but only after it has been fully established.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cd8ffc80
    • S
      mac80211: Tear down aggregation sessions for suspend/resume · 722f069a
      Sujith 提交于
      When the driver has been notified with a STA_REMOVE, it tears down
      the internal ADDBA state. On resume, trying to initiate aggregation would
      fail because mac80211 has not cleared the operational state for that <TID,STA>.
      This can be fixed by tearing down the existing sessions on a suspend.
      
      Also, the driver can initiate a new BA session when suspend is in progress.
      This is fixed by marking the station as being in suspend state and
      denying ADDBA requests for such STAs.
      Signed-off-by: NSujith <Sujith.Manoharan@atheros.com>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      722f069a
  21. 28 2月, 2009 2 次提交
    • J
      mac80211: add missing kernel-doc · 0a16ec5f
      Johannes Berg 提交于
      Document the new shutdown member.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0a16ec5f
    • J
      mac80211: fix aggregation for hardware with ampdu queues · 96f5e66e
      Johannes Berg 提交于
      Hardware with AMPDU queues currently has broken aggregation.
      
      This patch fixes it by making all A-MPDUs go over the regular AC queues,
      but keeping track of the hardware queues in mac80211. As a first rough
      version, it actually stops the AC queue for extended periods of time,
      which can be removed by adding buffering internal to mac80211, but is
      currently not a huge problem because people rarely use multiple TIDs
      that are in the same AC (and iwlwifi currently doesn't operate as AP).
      
      This is a short-term fix, my current medium-term plan, which I hope to
      execute soon as well, but am not sure can finish before .30, looks like
      this:
       1) rework the internal queuing layer in mac80211 that we use for
          fragments if the driver stopped queue in the middle of a fragmented
          frame to be able to queue more frames at once (rather than just a
          single frame with its fragments)
       2) instead of stopping the entire AC queue, queue up the frames in a
          per-station/per-TID queue during aggregation session initiation,
          when the session has come up take all those frames and put them
          onto the queue from 1)
       3) push the ampdu queue layer abstraction this patch introduces in
          mac80211 into the driver, and remove the virtual queue stuff from
          mac80211 again
      
      This plan will probably also affect ath9k in that mac80211 queues the
      frames instead of passing them down, even when there are no ampdu queues.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      96f5e66e
  22. 14 2月, 2009 3 次提交
  23. 30 1月, 2009 2 次提交
  24. 17 1月, 2009 1 次提交
  25. 22 11月, 2008 1 次提交
    • R
      mac80211: remove more excess kernel-doc · 0ed94eaa
      Randy Dunlap 提交于
      Delete kernel-doc struct descriptions for fields that don't exist:
      
      Warning(include/net/mac80211.h:1263): Excess struct/union/enum/typedef member 'conf_ht' description in 'ieee80211_ops'
      Warning(net/mac80211/sta_info.h:309): Excess struct/union/enum/typedef member 'addr' description in 'sta_info'
      Warning(net/mac80211/sta_info.h:309): Excess struct/union/enum/typedef member 'aid' description in 'sta_info'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      cc: Johannes Berg <johannes@sipsolutions.net>
      cc: John W. Linville <linville@tuxdriver.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0ed94eaa
  26. 01 11月, 2008 1 次提交