Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: remove ieee80211_aes_cmac_calculate_k1_k2()

The iwlwifi driver was the only driver that used this, but as
it turns out it never needed it, so we can remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

-30
-13
include/net/mac80211.h
··· 4331 4331 struct sk_buff *skb, u8 *p2k); 4332 4332 4333 4333 /** 4334 - * ieee80211_aes_cmac_calculate_k1_k2 - calculate the AES-CMAC sub keys 4335 - * 4336 - * This function computes the two AES-CMAC sub-keys, based on the 4337 - * previously installed master key. 4338 - * 4339 - * @keyconf: the parameter passed with the set key 4340 - * @k1: a buffer to be filled with the 1st sub-key 4341 - * @k2: a buffer to be filled with the 2nd sub-key 4342 - */ 4343 - void ieee80211_aes_cmac_calculate_k1_k2(struct ieee80211_key_conf *keyconf, 4344 - u8 *k1, u8 *k2); 4345 - 4346 - /** 4347 4334 * ieee80211_get_key_tx_seq - get key TX sequence counter 4348 4335 * 4349 4336 * @keyconf: the parameter passed with the set key
-17
net/mac80211/aes_cmac.c
··· 145 145 { 146 146 crypto_free_cipher(tfm); 147 147 } 148 - 149 - void ieee80211_aes_cmac_calculate_k1_k2(struct ieee80211_key_conf *keyconf, 150 - u8 *k1, u8 *k2) 151 - { 152 - u8 l[AES_BLOCK_SIZE] = {}; 153 - struct ieee80211_key *key = 154 - container_of(keyconf, struct ieee80211_key, conf); 155 - 156 - crypto_cipher_encrypt_one(key->u.aes_cmac.tfm, l, l); 157 - 158 - memcpy(k1, l, AES_BLOCK_SIZE); 159 - gf_mulx(k1); 160 - 161 - memcpy(k2, k1, AES_BLOCK_SIZE); 162 - gf_mulx(k2); 163 - } 164 - EXPORT_SYMBOL(ieee80211_aes_cmac_calculate_k1_k2);