1. 11 8月, 2016 1 次提交
  2. 06 4月, 2016 2 次提交
    • J
      mac80211: fix "warning: ‘target_metric’ may be used uninitialized" · b4201cc4
      Jeff Mahoney 提交于
      This fixes:
      
      net/mac80211/mesh_hwmp.c:603:26: warning: ‘target_metric’ may be used uninitialized in this function
      
      target_metric is only consumed when reply = true so no bug exists here,
      but not all versions of gcc realize it.  Initialize to 0 to remove the
      warning.
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b4201cc4
    • B
      mac80211: mesh: fix crash in mesh_path_timer · 74932959
      Bob Copeland 提交于
      The mesh_path_reclaim() function, called from an rcu callback, cancels
      the mesh_path_timer associated with a mesh path.  Unfortunately, this
      call can happen much later, perhaps after the hash table itself is
      destroyed.
      
      Such a situation led to the following crash in mesh_path_send_to_gates()
      when dereferencing the tbl pointer:
      
      [   23.901661] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
      [   23.905516] IP: [<ffffffff814c910b>] mesh_path_send_to_gates+0x2b/0x740
      [   23.908757] PGD 99ca067 PUD 99c4067 PMD 0
      [   23.910789] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      [   23.913485] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.5.0-rc6-wt+ #43
      [   23.916675] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014
      [   23.920471] task: ffffffff81685500 ti: ffffffff81678000 task.ti: ffffffff81678000
      [   23.922619] RIP: 0010:[<ffffffff814c910b>]  [<ffffffff814c910b>] mesh_path_send_to_gates+0x2b/0x740
      [   23.925237] RSP: 0018:ffff88000b403d30  EFLAGS: 00010286
      [   23.926739] RAX: 0000000000000000 RBX: ffff880009bc0d20 RCX: 0000000000000102
      [   23.928796] RDX: 000000000000002e RSI: 0000000000000001 RDI: ffff880009bc0d20
      [   23.930895] RBP: ffff88000b403e18 R08: 0000000000000001 R09: 0000000000000001
      [   23.932917] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880009c20940
      [   23.936370] R13: ffff880009bc0e70 R14: ffff880009c21c40 R15: ffff880009bc0d20
      [   23.939823] FS:  0000000000000000(0000) GS:ffff88000b400000(0000) knlGS:0000000000000000
      [   23.943688] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [   23.946429] CR2: 0000000000000008 CR3: 00000000099c5000 CR4: 00000000000006b0
      [   23.949861] Stack:
      [   23.950840]  000000000000002e ffff880009c20940 ffff88000b403da8 ffffffff8109e551
      [   23.954467]  ffffffff82711be2 000000000000002e 0000000000000000 ffffffff8166a5f5
      [   23.958141]  0000000000685ce8 0000000000000246 ffff880009bc0d20 ffff880009c20940
      [   23.961801] Call Trace:
      [   23.962987]  <IRQ>
      [   23.963963]  [<ffffffff8109e551>] ? vprintk_emit+0x351/0x5e0
      [   23.966782]  [<ffffffff8109e8ff>] ? vprintk_default+0x1f/0x30
      [   23.969529]  [<ffffffff810ffa41>] ? printk+0x48/0x50
      [   23.971956]  [<ffffffff814ceef3>] mesh_path_timer+0x133/0x160
      [   23.974707]  [<ffffffff814cedc0>] ? mesh_nexthop_resolve+0x230/0x230
      [   23.977775]  [<ffffffff810b04ee>] call_timer_fn+0xce/0x330
      [   23.980448]  [<ffffffff810b0425>] ? call_timer_fn+0x5/0x330
      [   23.983126]  [<ffffffff814cedc0>] ? mesh_nexthop_resolve+0x230/0x230
      [   23.986091]  [<ffffffff810b097c>] run_timer_softirq+0x22c/0x390
      
      Instead of cancelling in the RCU callback, set a new flag to prevent the
      timer from being rearmed, and then cancel the timer synchronously when
      freeing the mesh path.  This leaves mesh_path_reclaim() doing nothing
      but kfree, so switch to kfree_rcu().
      
      Fixes: 3b302ada7f0a ("mac80211: mesh: move path tables into if_mesh")
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      74932959
  3. 05 3月, 2016 1 次提交
  4. 21 10月, 2015 1 次提交
    • J
      mac80211: move station statistics into sub-structs · e5a9f8d0
      Johannes Berg 提交于
      Group station statistics by where they're (mostly) updated
      (TX, RX and TX-status) and group them into sub-structs of
      the struct sta_info.
      
      Also rename the variables since the grouping now makes it
      obvious where they belong.
      
      This makes it easier to identify where the statistics are
      updated in the code, and thus easier to think about them.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e5a9f8d0
  5. 17 7月, 2015 6 次提交
  6. 10 6月, 2015 2 次提交
  7. 16 7月, 2014 1 次提交
  8. 22 4月, 2014 2 次提交
  9. 26 11月, 2013 2 次提交
  10. 16 4月, 2013 1 次提交
    • J
      mac80211: parse VHT channel switch IEs · b2e506bf
      Johannes Berg 提交于
      VHT introduces multiple IEs that need to be parsed for a
      wide bandwidth channel switch. Two are (currently) needed
      in mac80211:
       * wide bandwidth channel switch element
       * channel switch wrapper element
      
      The former is contained in the latter for beacons and probe
      responses, but not for the spectrum management action frames
      so the IE parser needs a new argument to differentiate them.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b2e506bf
  11. 08 4月, 2013 2 次提交
  12. 15 2月, 2013 2 次提交
  13. 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
  14. 17 1月, 2013 2 次提交
    • B
      mac80211: add encrypt headroom to PERR frames · 8680451f
      Bob Copeland 提交于
      Mesh PERR action frames are robust and thus may be encrypted, so add
      proper head/tailroom to allow this.  Fixes this warning when operating
      a Mesh STA on ath5k:
      
      WARNING: at net/mac80211/wpa.c:427 ccmp_encrypt_skb.isra.5+0x7b/0x1a0 [mac80211]()
      Call Trace:
       [<c011c5e7>] warn_slowpath_common+0x63/0x78
       [<c011c60b>] warn_slowpath_null+0xf/0x13
       [<e090621d>] ccmp_encrypt_skb.isra.5+0x7b/0x1a0 [mac80211]
       [<e090685c>] ieee80211_crypto_ccmp_encrypt+0x1f/0x37 [mac80211]
       [<e0917113>] invoke_tx_handlers+0xcad/0x10bd [mac80211]
       [<e0917665>] ieee80211_tx+0x87/0xb3 [mac80211]
       [<e0918932>] ieee80211_tx_pending+0xcc/0x170 [mac80211]
       [<c0121c43>] tasklet_action+0x3e/0x65
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8680451f
    • B
      mac80211: set NEED_TXPROCESSING for PERR frames · 9cbbffe2
      Bob Copeland 提交于
      A user reported warnings in ath5k due to transmitting frames with no
      rates set up.  The frames were Mesh PERR frames, and some debugging
      showed an empty control block with just the vif pointer:
      
      >  [  562.522682] XXX txinfo: 00000000: 00 00 00 00 00 00 00 00 00 00 00
      >  00 00 00 00 00  ................
      >  [  562.522688] XXX txinfo: 00000010: 00 00 00 00 00 00 00 00 54 b8 f2
      >  db 00 00 00 00  ........T.......
      >  [  562.522693] XXX txinfo: 00000020: 00 00 00 00 00 00 00 00 00 00 00
      >  00 00 00 00 00  ................
      
      Set the IEEE80211_TX_INTFL_NEED_TXPROCESSING flag to ensure that
      rate control gets run before the frame is sent.
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9cbbffe2
  15. 04 1月, 2013 1 次提交
  16. 20 8月, 2012 1 次提交
  17. 11 7月, 2012 1 次提交
  18. 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
  19. 19 6月, 2012 1 次提交
  20. 18 6月, 2012 2 次提交
  21. 14 6月, 2012 1 次提交
    • C
      mac80211: implement the proactive PREQ generation · a69cc44f
      Chun-Yeow Yeoh 提交于
      Generate the proactive PREQ element as defined in
      Sec. 13.10.9.3 (Case C) of IEEE Std. 802.11-2012
      based on the selection of dot11MeshHWMPRootMode as follow:
      dot11MeshHWMPRootMode (2) is proactivePREQnoPREP
      dot11MeshHWMPRootMode (3) is proactivePREQwithPREP
      
      The proactive PREQ is generated based on the interval
      defined by dot11MeshHWMProotInterval.
      
      With this change, proactive RANN element is now generated
      if the dot11MeshHWMPRootMode is set to (4) instead of (1).
      Signed-off-by: NChun-Yeow Yeoh <yeohchunyeow@gmail.com>
      [line-break commit log]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a69cc44f
  22. 09 6月, 2012 2 次提交
  23. 06 6月, 2012 1 次提交
  24. 16 5月, 2012 1 次提交
  25. 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
  26. 13 4月, 2012 1 次提交