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)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 Jun 2012 11:03:25 +0000 (13:03 +0200)
commite19ebcab01cc130fa832764d453b263460ec3b91
treeb5c4e061cd55d7e291a7b349e075fbf0a9bc4755
parentfdbfff73408f99799724f583cbc2a0ce3263c6a7
iwlwifi: Check BSS ctx active before call mac80211

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).

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>
drivers/net/wireless/iwlwifi/iwl-agn-lib.c