diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-06-16 17:09:18 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-08-04 10:11:39 +0300 |
commit | 2dc2a15ebd12c44074d0ea2eef3e97956df4bb86 (patch) | |
tree | bc31eb33a7a7bacd56759f8bd839dc5d5adff178 /drivers/net/wireless/iwlwifi/mvm/mvm.h | |
parent | 94ce9e5e73c71b26a19b83844f9840859f3b035b (diff) | |
download | lwn-2dc2a15ebd12c44074d0ea2eef3e97956df4bb86.tar.gz lwn-2dc2a15ebd12c44074d0ea2eef3e97956df4bb86.zip |
iwlwifi: mvm: LRU-assign key offsets
The current key offset assignment algorithm always uses the lowest
unused key offset, which will potentially lead to issues when the
firmware will change to take the key material for TX from the key
table rather than from the TX command.
In order to avoid those issues (and avoid forgetting about them)
change the key offset allocation algorithm now to avoid reusing key
offsets quickly.
The new algorithm always picks as the next offset the least recently
freed offset, i.e. the offset that has been unused for the longest
amount of time. This is implemented by having a generation counter
for each key offset that is incremented every time a key is deleted,
except for the one that's deleted, which is reset to zero. Thus the
highest counter is the key that's been unused longest.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mvm.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 2d4bad5fe825..40d1bd7a200f 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h @@ -686,6 +686,7 @@ struct iwl_mvm { * can hold 16 keys at most. Reflect this fact. */ unsigned long fw_key_table[BITS_TO_LONGS(STA_KEY_MAX_NUM)]; + u8 fw_key_deleted[STA_KEY_MAX_NUM]; /* references taken by the driver and spinlock protecting them */ spinlock_t refs_lock; |