]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: update key flags at time key is set
authorReinette Chatre <reinette.chatre@intel.com>
Thu, 30 Apr 2009 20:56:31 +0000 (13:56 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 May 2009 20:22:10 +0000 (16:22 -0400)
commit9e4bba085a0b456252a3c71128e6dfd56ab947ed
treef8fc9314b473a49e88d4130bc160fda09dc10c1f
parentf3711b06edea0be8864fc5dc86b4ae98137eccc7
iwlwifi: update key flags at time key is set

We need to be symmetrical in what is done when key is set and cleared.
This is important wrt the key flags as they are used during key
clearing and if they are not set when the key is set the key cannot be
cleared completely.

This addresses the many occurences of the WARN found in
iwl_set_tkip_dynamic_key_info() and tracked in
http://www.kerneloops.org/searchweek.php?search=iwl_set_dynamic_key

If calling iwl_set_tkip_dynamic_key_info()/iwl_remove_dynamic_key()
pair a few times in a row will cause that we run out of key space.
This is because the index stored in the key flags is used by
iwl_remove_dynamic_key() to decide if it should remove the key.
Unfortunately the key flags, and hence the key index is currently only
set at the time the key is written to the device (in
iwl_update_tkip_key()) and _not_ in iwl_set_tkip_dynamic_key_info().
Fix this by setting flags in iwl_set_tkip_dynamic_key_info().

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-sta.c