iwlwifi: fix and add missing sta_lock usage
authorReinette Chatre <reinette.chatre@intel.com>
Wed, 5 May 2010 09:26:06 +0000 (02:26 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Thu, 13 May 2010 17:44:16 +0000 (10:44 -0700)
commit9c5ac091b269912cd30fade987f4bc615ef3be90
tree698fe77ad1f144ca1c2e3ba9738946a22253399f
parent94adfaa406420ae035b1b760e3d5015775fe7b7c
iwlwifi: fix and add missing sta_lock usage

There are a few places where sta_lock is used, but the
station information protected by it is accessed outside
of the lock. Address this in two ways, if the access
won't sleep then just move the access into the lock, if
the access can sleep then copy the needed station
information to the stack to be accessed without risk of
it changing while access in progress.

Additionally, a number of other places access station
station information without holding the sta_lock, fix
those as well.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl-sta.c
drivers/net/wireless/iwlwifi/iwl3945-base.c