mac80211: fix channel assumption for association done work
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Fri, 1 Oct 2010 21:05:19 +0000 (17:05 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:32:08 +0000 (13:32 -0800)
commit96c2c781bc823f6205e9c964f94b08540a5186d6
tree57b1b04722337b991ee0a4b491de94f88defb584
parent9057874c22d14f2d6b335d8f5c19b1db06495a3f
mac80211: fix channel assumption for association done work

commit e7480bbb926c5816e4fbfca70748096bbe0e4978 upstream.

Be consistent and use the wk->chan instead of the
local->hw.conf.channel for the association done work.
This prevents any possible races against channel changes
while we run this work.

In the case that the race did happen we would be initializing
the bit rates for the new AP under the assumption of a wrong
channel and in the worst case, wrong band. This could lead
to trying to assuming we could use CCK frames on 5 GHz, for
example.

This patch has a fix for kernels >= v2.6.34

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/mac80211/mlme.c