29 Nov, 2011
2 commits
-
We used to initiate a path discovery when receiving a frame for which
there is no forwarding information. To cut down on PREQ spam, just send
a (gated) PERR in response.Also separate path discovery logic from nexthop querying. This patch
means we no longer queue frames when forwarding, so kill the PERR TX
stuff in discard_frame().Signed-off-by: Thomas Pedersen
Signed-off-by: John W. Linville -
Don't write the TA until next hop is actually known, since we might need
the original TA for sending a PERR. Previously we would send a PERR to
ourself if path resolution for a forwarded frame failed.Signed-off-by: Thomas Pedersen
Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
22 Nov, 2011
1 commit
-
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
Cc: Thomas Pedersen
Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
10 Nov, 2011
1 commit
-
We only need to set the skb queue twice:
1. by the netdev, on local TX.
2. when forwarding a mesh frame.We only need to set the qos header twice:
1. by mac80211, on local TX.
2. when putting a frame on the mpath->frame_queueWe also don't need the RA in order to set the proper queue mapping since
all mesh STAs are QoS, indicate this and do it once when the frame is
received. Also fixes an issue where the QoS header and queue mapping was not
set for unicast forwarded frames.Signed-off-by: Javier Cardona
Signed-off-by: Thomas Pedersen
Signed-off-by: John W. Linville
20 Sep, 2011
1 commit
15 Sep, 2011
2 commits
-
Per sec 7.1.3.5 of draft 12.0 of 802.11s, mesh frames indicate the
presence of the mesh control header in their QoS header.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
In order to support QoS in mesh, we need to assign queue mapping only
after the next hop has been resolved, both for forwarded and locally
originated frames. Also, now that this is fixed, remove the XXX comment
in ieee80211_select_queue().Also, V-Shy Ho reported that the queue mapping was not being applied to
the forwarded frame (fwd_skb instead of skb). Fixed that as well.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
14 Sep, 2011
9 commits
-
The calls to kzalloc() weren't checked here and it upsets the static
checkers. Obviously they're not super likely to fail, but we might
as well add some error handling.Signed-off-by: Dan Carpenter
Signed-off-by: John W. Linville -
Signed-off-by: John W. Linville
-
Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
No need to take the mpath state lock when an mpath is removed.
Also, no need checking the lock when reading mpath flags.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
When an interface is removed, the mesh paths associated with it should
also be removed.This fixes a bug we observed when reloading a device driver module
without reloading mac80211s.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
Reported by Pedro Larbig (ASPj)
Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
30 Aug, 2011
2 commits
-
This seems a bit less awkward...
Signed-off-by: John W. Linville
-
…wireless-next into for-davem
26 Aug, 2011
1 commit
-
Since a v1 of the mesh gate series was accidentally applied, this patch
contains the changes in v2.These are:
- automatically make mesh gate a root node.
- use TU_TO_EXP_TIME macro.
- initialize timer instead of checking for NULL timer function.
- cleanups.Signed-off-by: Thomas Pedersen
Signed-off-by: John W. Linville
25 Aug, 2011
5 commits
-
In this implementation, a mesh gate is a root node with a certain bit
set in its RANN flags. The mpath to this root node is marked as a path
to a gate, and added to our list of known gates for this if_mesh. Once a
path discovery process fails, we forward the unresolved frames to a
known gate. Thanks to Luis Rodriguez for refactoring and bug fix help.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
Previously, mpaths were never flushed since the mpath is not active once
we call this function.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
mesh_queue_preq is invoked invoked from both user (work queue) and
softirq (timer) context, so the _bh version of spinlock needs to be
used. Also, the mpath->state_lock should be softirq safe as well.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
If we have an mpath whose timer has not been initialized, don't try to
delete it.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
make hwmp_dbg print the relevant sdata->name by default and improve
formatting. Also add mpath_dbg macro for debugging of mesh path
operations.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
23 Aug, 2011
1 commit
-
Make mesh path selection frames Mesh Action category, remove outdated
Mesh Path Selection category and defines, use updated reason codes, add
mesh_action_is_path_sel for readability, and update/correct path
selection IEs.Signed-off-by: Thomas Pedersen
Signed-off-by: John W. Linville
12 Aug, 2011
1 commit
-
RCU api had been completed and rcu_access_pointer() or
rcu_dereference_protected() are better than generic
rcu_dereference_raw()Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
06 Jul, 2011
1 commit
-
mlme.c
l.757 ieee80211_dynamic_ps_enable_work(11)
variable dereferenced before check 'sdata'mesh_pathtbl.c
l.650 mesh_path_del(20) double lock 'bottom_half'
l.663 mesh_path_del(33) double unlock 'bottom_half'Signed-off-by: Christian Lamparter
Signed-off-by: John W. Linville
25 May, 2011
1 commit
20 May, 2011
1 commit
-
After commit 1928ecab620907a0953f811316d05f367f3f4dba (mac80211: fix and
simplify mesh locking) mesh table allocation is performed with the
pathtbl_resize_lock taken. Under those conditions one should not sleep.
This patch makes the allocations GFP_ATOMIC to prevent that.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
17 May, 2011
4 commits
-
…wireless-next-2.6 into for-davem
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
net/mac80211/sta_info.h -
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: Johannes Berg
Signed-off-by: John W. Linville -
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: Johannes Berg
Signed-off-by: John W. Linville -
Mesh paths are deleted via mesh_path_del() which properly
deactivates the timer associated to a mesh path. But if paths were
deleted by mesh_table_free(..., true) timers would not be deactivated.
This fixes this case.Reported-by: Johannes Berg
Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
13 May, 2011
1 commit
-
There's no need to have table functions in one
file and all users in another, move the functions
to the right file and make them static. Also move
a static variable to the beginning of the file to
make it easier to find.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
12 May, 2011
2 commits
-
The mesh and mpp path tables are accessed from softirq and workqueue
context so non-irq locking cannot be used. Or at least that's what
PROVE_RCU seems to tell us here:[ 431.240946] =================================
[ 431.241061] [ INFO: inconsistent lock state ]
[ 431.241061] 2.6.39-rc3-wl+ #354
[ 431.241061] ---------------------------------
[ 431.241061] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
[ 431.241061] kworker/u:1/1423 [HC0[0]:SC0[0]:HE1:SE1] takes:
[ 431.241061] (&(&newtbl->hashwlock[i])->rlock){+.?...}, at:
[] mesh_path_add+0x167/0x257Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
Not sure if I'm chasing a ghost here, seems like the
mesh_path->size_order needs to be inside an RCU-read section to prevent
that value from changing between table allocation and copying. We have
observed crashes that might be caused by this.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
26 Apr, 2011
1 commit
-
…wireless-next-2.6 into for-davem
Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/rt2x00/rt2x00queue.c
drivers/net/wireless/rt2x00/rt2x00queue.h
14 Apr, 2011
1 commit
-
It is unnecessary to hold the path table resize lock while allocating a
new table. Allocate first and take lock later. This resolves a
soft-lockup:[ 293.385799] BUG: soft lockup - CPU#0 stuck for 61s! [kworker/u:3:744]
(...)
[ 293.386049] Call Trace:
[ 293.386049] [] do_raw_read_lock+0x26/0x29
[ 293.386049] [] _raw_read_lock+0x8/0xa
[ 293.386049] [] mesh_path_add+0xb7/0x24e
[ 293.386049] [] ? mesh_path_lookup+0x1b/0xa6
[ 293.386049] [] hwmp_route_info_get+0x276/0x2fd
[ 293.386049] [] mesh_rx_path_sel_frame+0x5a/0x5d9
[ 293.386049] [] ? update_curr+0x1cf/0x1d7
[ 293.386049] [] ieee80211_mesh_rx_queued_mgmt+0x60/0x67
[ 293.386049] [] ieee80211_iface_work+0x1f0/0x258
(...)Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
07 Dec, 2010
1 commit
-
The TTL in path selection information elements is different from
the mesh ttl used in mesh data frames. Version 7.03 of the 11s
draft calls this ttl 'Element TTL'.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville