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. 20 8月, 2012 2 次提交
  3. 31 7月, 2012 1 次提交
  4. 11 7月, 2012 1 次提交
  5. 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
  6. 06 6月, 2012 1 次提交
  7. 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
  8. 13 4月, 2012 1 次提交
  9. 08 3月, 2012 1 次提交
    • T
      mac80211: fix smatch lock errors in mesh · f06c7885
      Thomas Pedersen 提交于
      smatch was complaining:
      
      CHECK   net/mac80211/mesh_pathtbl.c
      net/mac80211/mesh_pathtbl.c:562 mesh_path_add() error: double lock
      'bottom_half:'
      net/mac80211/mesh_pathtbl.c:580 mesh_path_add() error: double unlock
      'bottom_half:'
      net/mac80211/mesh_pathtbl.c:589 mesh_path_add() error: double unlock
      'bottom_half:'
      net/mac80211/mesh_pathtbl.c:691 mpp_path_add() error: double lock
      'bottom_half:'
      net/mac80211/mesh_pathtbl.c:707 mpp_path_add() error: double unlock
      'bottom_half:'
      net/mac80211/mesh_pathtbl.c:716 mpp_path_add() error: double unlock
      'bottom_half:'
      net/mac80211/mesh_pathtbl.c:814 mesh_path_flush_by_nexthop() error:
      double lock 'bottom_half:'
      net/mac80211/mesh_pathtbl.c:819 mesh_path_flush_by_nexthop() error:
      double unlock 'bottom_half:'
      net/mac80211/mesh_pathtbl.c:887 mesh_path_del() error: double lock
      'bottom_half:'
      net/mac80211/mesh_pathtbl.c:901 mesh_path_del() error: double unlock
      'bottom_half:'
      
      So don't lock / unlock with _bh() while bottom halves are already
      disabled.
      Reported-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NThomas Pedersen <thomas@cozybit.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f06c7885
  10. 06 3月, 2012 1 次提交
  11. 22 2月, 2012 1 次提交
  12. 09 2月, 2012 1 次提交
    • L
      mac80211: rename mesh static path_lookup() · 5ad20dd1
      Luis R. Rodriguez 提交于
      If you want to use mesh support from mac80211 on a recent
      kernel on 2.6.24 you'll run into a name clash when compiling
      against include/linux/namei.h, so rename this routine.
      
      /home/mcgrof/tmp/compat-wireless-3.2.5-1/net/mac80211/mesh_pathtbl.c: At top level:
      /home/mcgrof/tmp/compat-wireless-3.2.5-1/net/mac80211/mesh_pathtbl.c:342:26: error: conflicting types for ‘path_lookup’
      include/linux/namei.h:71:12: note: previous declaration of ‘path_lookup’ was here
      
      Although this could sit as a separate patch in compat-wireless it seems
      best to just merge upstream.
      
      Cc: Javier Cardona <javier@cozybit.com>
      Signed-off-by: NLuis R. Rodriguez <mcgrof@frijolero.org>
      Acked-by: NJavier Cardona <javier@cozybit.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5ad20dd1
  13. 29 11月, 2011 2 次提交
  14. 22 11月, 2011 1 次提交
    • J
      mac80211: fix RCU warnings in mesh · 30be52e4
      Johannes Berg 提交于
      Sparse RCU checking reports two warnings in the mesh
      path table code. These are due to questionable uses of
      rcu_dereference.
      
      To fix the first one, get rid of mesh_gate_add() and
      just make mesh_path_add_gate() do the correct deref.
      
      To fix the second one, simply remove rcu_dereference()
      in mesh_gate_del() -- it already gets a proper pointer
      as indicated by the prototype (no __rcu annotation)
      and confirmed by the code.
      
      Cc: Javier Cardona <javier@cozybit.com>
      Cc: Thomas Pedersen <thomas@cozybit.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      30be52e4
  15. 10 11月, 2011 1 次提交
  16. 15 9月, 2011 2 次提交
  17. 14 9月, 2011 8 次提交
  18. 30 8月, 2011 1 次提交
  19. 26 8月, 2011 1 次提交
  20. 25 8月, 2011 5 次提交
  21. 23 8月, 2011 1 次提交
  22. 12 8月, 2011 1 次提交
  23. 06 7月, 2011 1 次提交
  24. 20 5月, 2011 1 次提交
  25. 17 5月, 2011 2 次提交
    • J
      mac80211: annotate and fix RCU in mesh code · 349eb8cf
      Johannes Berg 提交于
      This adds proper RCU annotations to the mesh path
      table code, and fixes a number of bugs in the code
      that I found while checking the sparse warnings I
      got as a result of the annotations.
      
      Some things like the changes in mesh_path_add() or
      mesh_pathtbl_init() only serve to shut up sparse,
      but other changes like the changes surrounding the
      for_each_mesh_entry() macro fix real RCU bugs in
      the code.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      349eb8cf
    • J
      mac80211: fix and simplify mesh locking · 1928ecab
      Johannes Berg 提交于
      The locking in mesh_{mpath,mpp}_table_grow not only
      has an rcu_read_unlock() missing, it's also racy
      (though really only technically since it's invoked
      from a single function only) since it obtains the
      new size of the table without any locking, so two
      invocations of the function could attempt the same
      resize.
      
      Additionally, it uses synchronize_rcu() which is
      rather expensive and can be avoided trivially here.
      
      Modify the functions to only use the table lock
      and use call_rcu() instead of synchronize_rcu().
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1928ecab