nl80211: Cancel not yet started r-o-c
authorJohannes Berg <johannes.berg@intel.com>
Sat, 10 Sep 2011 19:57:41 +0000 (22:57 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 10 Sep 2011 19:57:41 +0000 (22:57 +0300)
commit531f0331a12fee6e7a08654071b1287a135a068b
tree268dafff2785cd017df49b45f5deabd98daeaae0
parent47185fc788b7a30700a5bf877e65980762ecc190
nl80211: Cancel not yet started r-o-c

Currently, the following can happen:

1) P2P state machine requests R-O-C
2) user changes their mind and aborts
3) P2P state machine aborts R-O-C
4) driver_nl80211 rejects abort since there
   was no notification about the start yet
5) R-O-C period start notification from kernel
6) P2P state machine requests new R-O-C
7) this overlaps with old R-O-C -- iwlwifi driver
   can't handle that and returns -EBUSY
8) state machine stops dead in its tracks

The reason is that the abort isn't going through properly. Instead of
tracking whether a R-O-C is active in driver_nl80211, track whether one
was requested to avoid this scenario.

Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
src/drivers/driver_nl80211.c