1. 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
  2. 09 10月, 2012 1 次提交
  3. 11 9月, 2012 1 次提交
  4. 20 8月, 2012 1 次提交
  5. 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
  6. 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
  7. 22 6月, 2012 1 次提交
  8. 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
  9. 06 6月, 2012 1 次提交
  10. 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
  11. 14 4月, 2012 1 次提交
  12. 06 3月, 2012 1 次提交
  13. 28 2月, 2012 1 次提交
  14. 28 1月, 2012 1 次提交
  15. 14 12月, 2011 1 次提交
  16. 22 11月, 2011 1 次提交
  17. 10 11月, 2011 3 次提交
  18. 01 11月, 2011 1 次提交
  19. 15 10月, 2011 2 次提交
  20. 12 10月, 2011 1 次提交
  21. 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
  22. 17 9月, 2011 1 次提交
  23. 15 9月, 2011 1 次提交
  24. 14 9月, 2011 1 次提交
  25. 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
  26. 09 8月, 2011 1 次提交
  27. 29 4月, 2011 1 次提交
  28. 31 3月, 2011 1 次提交
  29. 26 2月, 2011 1 次提交
  30. 24 2月, 2011 1 次提交
    • V
      mac80211: Fix a race on enabling power save. · f3e85b9e
      Vivek Natarajan 提交于
      There is a race on sending a data frame before the tx completion
      of nullfunc frame for enabling power save. As the data quickly
      follows the nullfunc frame, the AP thinks that the station is out
      of power save and continues to send the frames. Whereas in the
      station, the nullfunc ack will be processed after the tx completion
      of data frame and mac80211 goes to powersave. Thus the power
      save state mismatch between the station and the AP causes some
      data loss and some applications fail because of that. This patch
      fixes this issue.
      Signed-off-by: NVivek Natarajan <vnatarajan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f3e85b9e
  31. 04 2月, 2011 1 次提交
  32. 03 2月, 2011 1 次提交
    • J
      mac80211: fix TX status cookie in HW offload case · 4334ec85
      Johannes Berg 提交于
      When the off-channel TX is done with remain-on-channel
      offloaded to hardware, the reported cookie is wrong as
      in that case we shouldn't use the SKB as the cookie but
      need to instead use the corresponding r-o-c cookie
      (XOR'ed with 2 to prevent API mismatches).
      
      Fix this by keeping track of the hw_roc_skb pointer
      just for the status processing and use the correct
      cookie to report in this case. We can't use the
      hw_roc_skb pointer itself because it is NULL'ed when
      the frame is transmitted to prevent it being used
      twice.
      
      This fixes a bug where the P2P state machine in the
      supplicant gets stuck because it never gets a correct
      result for its transmitted frame.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4334ec85