]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: remove ignore_plink_timer flag
authorBob Copeland <me@bobcopeland.com>
Wed, 4 Jun 2014 13:27:31 +0000 (09:27 -0400)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 23 Jun 2014 09:05:27 +0000 (11:05 +0200)
commit44bdf1d38cb50445521cca9dbefd7315edec3573
tree9f890c8927fbfb4bae1e252b77caace4793f008d
parent0616e5a48eb8f46c92d710c219b48a2a44102e77
mac80211: remove ignore_plink_timer flag

The mesh_plink code is doing some interesting things with the
ignore_plink_timer flag.  It seems the original intent was to
handle this race:

cpu 0                           cpu 1
-----                           -----
                                start timer handler for state X
acquire sta_lock
change state from X to Y
mod_timer() / del_timer()
release sta_lock
                                acquire sta_lock
                                execute state Y timer too soon

However, using the mod_timer()/del_timer() return values to
detect these cases is broken.  As a result, timers get ignored
unnecessarily, and stations can get stuck in the peering state
machine.

Instead, we can detect the case by looking at the timer expiration.
In the case of del_timer, just ignore the timers in the following
(LISTEN/ESTAB) states since they won't have timers anyway.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh_plink.c
net/mac80211/sta_info.h