iwlwifi: Check BSS ctx active before call mac80211
authorIlan Peer <ilan.peer@intel.com>
Thu, 10 May 2012 12:53:14 +0000 (15:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:22:52 +0000 (08:22 -0700)
commitb7ad4aebc763c09f6792dae95c74fb289d76c641
tree44573208b601c9d592bc3220f5eac6b9df046f33
parentbd9f6140e697f52bdc7225d39a46c6b82d50cacc
iwlwifi: Check BSS ctx active before call mac80211

commit e19ebcab01cc130fa832764d453b263460ec3b91 upstream.

It is possible that the BSS context is not active (for example
when the current mode is set to GO), or that the vif->type is
different than station. In such a case we cannot
call mac80211 to report the average rssi for the interface
(the function assumes that the vif is valid and that the type
is station).

Reported-by: Daniel J Blueman <daniel@quora.org>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/iwlwifi/iwl-agn-lib.c