1. 05 2月, 2013 1 次提交
    • M
      mac80211: mesh power save basics · 3f52b7e3
      Marco Porsch 提交于
      Add routines to
      - maintain a PS mode for each peer and a non-peer PS mode
      - indicate own PS mode in transmitted frames
      - track neighbor STAs power modes
      - buffer frames when neighbors are in PS mode
      - add TIM and Awake Window IE to beacons
      - release frames in Mesh Peer Service Periods
      
      Add local_pm to sta_info to represent the link-specific power
      mode at this station towards the remote station. When a peer
      link is established, use the default power mode stored in mesh
      config. Update the PS status if the peering status of a neighbor
      changes.
      Maintain a mesh power mode for non-peer mesh STAs. Set the
      non-peer power mode to active mode during peering. Authenticated
      mesh peering is currently not working when either node is
      configured to be in power save mode.
      
      Indicate the current power mode in transmitted frames. Use QoS
      Nulls to indicate mesh power mode transitions.
      For performance reasons, calls to the function setting the frame
      flags are placed in HWMP routing routines, as there the STA
      pointer is already available.
      
      Add peer_pm to sta_info to represent the peer's link-specific
      power mode towards the local station. Add nonpeer_pm to
      represent the peer's power mode towards all non-peer stations.
      Track power modes based on received frames.
      
      Add the ps_data structure to ieee80211_if_mesh (for TIM map, PS
      neighbor counter and group-addressed frame buffer).
      
      Set WLAN_STA_PS flag for STA in PS mode to use the unicast frame
      buffering routines in the tx path. Update num_sta_ps to buffer
      and release group-addressed frames after DTIM beacons.
      
      Announce the awake window duration in beacons if in light or
      deep sleep mode towards any peer or non-peer. Create a TIM IE
      similarly to AP mode and add it to mesh beacons. Parse received
      Awake Window IEs and check TIM IEs for buffered frames.
      
      Release frames towards peers in mesh Peer Service Periods. Use
      the corresponding trigger frames and monitor the MPSP status.
      Append a QoS Null as trigger frame if neccessary to properly end
      the MPSP. Currently, in HT channels MPSPs behave imperfectly and
      show large delay spikes and frame losses.
      Signed-off-by: NMarco Porsch <marco@cozybit.com>
      Signed-off-by: NIvan Bezyazychnyy <ivan.bezyazychnyy@gmail.com>
      Signed-off-by: NMike Krinkin <krinkin.m.u@gmail.com>
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      3f52b7e3
  2. 31 1月, 2013 1 次提交
    • 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
  3. 29 1月, 2013 1 次提交
  4. 05 12月, 2012 1 次提交
  5. 29 11月, 2012 1 次提交
  6. 11 11月, 2012 1 次提交
  7. 30 10月, 2012 1 次提交
    • J
      mac80211: combine status/drop reporting · 8a2fbedc
      Johannes Berg 提交于
      The TX status reporting is done for both the
      nl80211 report as well as the socket option.
      The socket option is also reported when an
      skb is dropped to guarantee that the copy in
      the IDR tree is freed and status is reported
      to userspace.
      
      However, when a frame is dropped, no nl80211
      status is reported. This can cause userspace
      to stop making progress while waiting for a
      status notification.
      
      Combine the nl80211 and socket option status
      reporting into a new function and call it in
      both places -- when the status comes in from
      the driver and when the skb is dropped.
      
      While at it, also simplify the code in the
      nl80211 portion a bit.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8a2fbedc
  8. 17 10月, 2012 1 次提交
    • J
      mac80211: track needed RX chains for channel contexts · 04ecd257
      Johannes Berg 提交于
      On each channel that the device is operating on, it
      may need to listen using one or more chains depending
      on the SMPS settings of the interfaces using it. The
      previous channel context changes completely removed
      this ability (before, it was available as the SMPS
      mode).
      
      Add per-context tracking of the required static and
      dynamic RX chains and notify the driver on changes.
      To achieve this, track the chains and SMPS mode used
      on each virtual interface and update the channel
      context whenever this changes.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      04ecd257
  9. 09 10月, 2012 1 次提交
  10. 11 9月, 2012 1 次提交
  11. 20 8月, 2012 1 次提交
  12. 09 7月, 2012 1 次提交
    • J
      cfg80211: use wdev in mgmt-tx/ROC APIs · 71bbc994
      Johannes Berg 提交于
      The management frame and remain-on-channel APIs will be
      needed in the P2P device abstraction, so move them over
      to the new wdev-based APIs. Userspace can still use both
      the interface index and wdev identifier for them so it's
      backward compatible, but for the P2P Device wdev it will
      be able to use the wdev identifier only.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      71bbc994
  13. 24 6月, 2012 1 次提交
    • J
      mac80211: clean up debugging · bdcbd8e0
      Johannes Berg 提交于
      There are a few things that make the logging and
      debugging in mac80211 less useful than it should
      be right now:
       * a lot of messages should be pr_info, not pr_debug
       * wholesale use of pr_debug makes it require *both*
         Kconfig and dynamic configuration
       * there are still a lot of ifdefs
       * the style is very inconsistent, sometimes the
         sdata->name is printed in front
      
      Clean up everything, introducing new macros and
      separating out the station MLME debugging into
      a new Kconfig symbol.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      bdcbd8e0
  14. 22 6月, 2012 1 次提交
  15. 07 6月, 2012 1 次提交
    • J
      mac80211: unify SW/offload remain-on-channel · 2eb278e0
      Johannes Berg 提交于
      Redesign all the off-channel code, getting rid of
      the generic off-channel work concept, replacing
      it with a simple remain-on-channel list.
      
      This fixes a number of small issues with the ROC
      implementation:
       * offloaded remain-on-channel couldn't be queued,
         now we can queue it as well, if needed
       * in iwlwifi (the only user) offloaded ROC is
         mutually exclusive with scanning, use the new
         queue to handle that case -- I expect that it
         will later depend on a HW flag
      
      The bigger issue though is that there's a bad bug
      in the current implementation: if we get a mgmt
      TX request while HW roc is active, and this new
      request has a wait time, we actually schedule a
      software ROC instead since we can't guarantee the
      existing offloaded ROC will still be that long.
      To fix this, the queuing mechanism was needed.
      
      The queuing mechanism for offloaded ROC isn't yet
      optimal, ideally we should add API to have the HW
      extend the ROC if needed. We could add that later
      but for now use a software implementation.
      
      Overall, this unifies the behaviour between the
      offloaded and software-implemented case as much
      as possible.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2eb278e0
  16. 06 6月, 2012 1 次提交
  17. 10 5月, 2012 1 次提交
    • J
      mac80211: Convert compare_ether_addr to ether_addr_equal · b203ca39
      Joe Perches 提交于
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b203ca39
  18. 14 4月, 2012 1 次提交
  19. 06 3月, 2012 1 次提交
  20. 28 2月, 2012 1 次提交
  21. 28 1月, 2012 1 次提交
  22. 14 12月, 2011 1 次提交
  23. 22 11月, 2011 1 次提交
  24. 10 11月, 2011 3 次提交
  25. 01 11月, 2011 1 次提交
  26. 15 10月, 2011 2 次提交
  27. 12 10月, 2011 1 次提交
  28. 01 10月, 2011 6 次提交
    • 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
    • J
      mac80211: implement uAPSD · 47086fc5
      Johannes Berg 提交于
      Add uAPSD support to mac80211. This is probably not
      possible with all devices, so advertising it with
      the cfg80211 flag will be left up to drivers that
      want it.
      
      Due to my previous patches it is now a fairly
      straight-forward extension. Drivers need to have
      accurate TX status reporting for the EOSP frame.
      For drivers that buffer themselves, the provided
      APIs allow releasing the right number of frames,
      but then drivers need to set EOSP and more-data
      themselves. This is documented in more detail in
      the new code itself.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      47086fc5
    • J
      mac80211: clear more-data bit on filtered frames · 8a8656fa
      Johannes Berg 提交于
      It doesn't seem likely, but maybe possible, that the
      more-data bit needs to be recomputed due to changes
      in the queued frames. Clear it for filtered frames
      to ensure that we never send it incorrectly. It'll
      be set again as necessary when we retransmit this
      frame.
      
      The more likely case is maybe where the station woke
      up after the filtered frame in which case more-data
      should be clear when the frame is transmitted to the
      station since it is now awake.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8a8656fa
    • J
      mac80211: split PS buffers into ACs · 948d887d
      Johannes Berg 提交于
      For uAPSD support we'll need to have per-AC PS
      buffers. As this is a major undertaking, split
      the buffers before really adding support for
      uAPSD. This already makes some reference to the
      uapsd_queues variable, but for now that will
      never be non-zero.
      
      Since book-keeping is complicated, also change
      the logic for keeping a maximum of frames only
      and allow 64 frames per AC (up from 128 for a
      station).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      948d887d
    • J
      mac80211: also expire filtered frames · 60750397
      Johannes Berg 提交于
      mac80211 will expire normal PS-buffered frames, but
      if the device rejected some frames for a sleeping
      station, these won't be on the ps_tx_buf queue but
      on the tx_filtered queue instead; this is done to
      avoid reordering.
      
      However, mac80211 will not expire frames from the
      filtered queue, let's fix that.
      
      Also add a more comments to what all this expiry is
      doing and how it works.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      60750397
    • J
      mac80211: unify TIM bit handling · c868cb35
      Johannes Berg 提交于
      Currently, the TIM bit for a given station is set
      and cleared all over the place. Since the logic to
      set/clear it will become much more complex when we
      add uAPSD support, as a first step let's collect
      the entire logic in one place. This requires a few
      small adjustments to other places.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c868cb35
  29. 17 9月, 2011 1 次提交
  30. 15 9月, 2011 1 次提交
  31. 14 9月, 2011 1 次提交
  32. 23 8月, 2011 1 次提交
    • H
      mac80211: Tear down BA session on BAR tx failure · e69deded
      Helmut Schaa 提交于
      As described at [1] some STAs (i.e. Intel 5100 Windows) can end up
      correctly BlockAcking incoming frames without delivering them to user
      space if a AMPDU subframe got lost and we don't flush the receipients
      reorder buffer with a BlockAckReq. This in turn results in stuck
      connections.
      
      According to 802.11n-2009 it is not necessary to send a BAR to flush
      the recepients RX reorder buffer but we still do that to be polite.
      
      However, assume the following frame exchange:
      
      AP -> STA, AMPDU (failed)
      AP -> STA, BAR (failed)
      
      The client in question then ends up in the same situation and won't
      deliver frames to userspace anymore since we weren't able to flush
      its reorder buffer.
      
      This is not a hypothetical situation but I was able to observe this
      exact behavior during a stress test between a rt2800pci AP and a Intel
      5100 Windows client.
      
      In order to work around this issue just tear down the BA session as
      soon as a BAR failed to be TX'ed.
      
      [1] http://comments.gmane.org/gmane.linux.kernel.wireless.general/66867Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e69deded