]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iwlagn: fix iwl_is_any_associated
authorJohannes Berg <johannes.berg@intel.com>
Fri, 6 May 2011 18:11:20 +0000 (11:11 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 00:31:35 +0000 (09:31 +0900)
commit462a14519a4206926db6bf3ecddc0f13810764aa
tree886e969434f0c6d364e479603676f3434be5ff58
parent002b0d10cb04e5e4036e0d3fd830f2cca81be69b
iwlagn: fix iwl_is_any_associated

commit 054ec924944912413e4ee927b8cf02f476d08783 upstream.

The function iwl_is_any_associated() was intended
to check both contexts, but due to an oversight
it only checks the BSS context. This leads to a
problem with scanning since the passive dwell
time isn't restricted appropriately and a scan
that includes passive channels will never finish
if only the PAN context is associated since the
default dwell time of 120ms won't fit into the
normal 100 TU DTIM interval.

Fix the function by using for_each_context() and
also reorganise the other functions a bit to take
advantage of each other making the code easier to
read.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlwifi/iwl-dev.h