mac80211: fix TX status cookie in HW offload case
authorJohannes Berg <johannes.berg@intel.com>
Wed, 2 Feb 2011 15:58:06 +0000 (16:58 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Feb 2011 21:38:59 +0000 (16:38 -0500)
commit4334ec8518cec3f7a4feeb3dacb46acfb24904d4
treee00b87af0dc841a5bd2cf2af4fc0de7adeeaaff7
parentff458edc0c5ec42b299547fb7eb9790a4aecc632
mac80211: fix TX status cookie in HW offload case

When the off-channel TX is done with remain-on-channel
offloaded to hardware, the reported cookie is wrong as
in that case we shouldn't use the SKB as the cookie but
need to instead use the corresponding r-o-c cookie
(XOR'ed with 2 to prevent API mismatches).

Fix this by keeping track of the hw_roc_skb pointer
just for the status processing and use the correct
cookie to report in this case. We can't use the
hw_roc_skb pointer itself because it is NULL'ed when
the frame is transmitted to prevent it being used
twice.

This fixes a bug where the P2P state machine in the
supplicant gets stuck because it never gets a correct
result for its transmitted frame.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/status.c