summaryrefslogtreecommitdiff
path: root/net/mac80211/key.c
diff options
context:
space:
mode:
authorCedric Izoard <Cedric.Izoard@ceva-dsp.com>2015-03-17 13:47:33 +0300
committerJohannes Berg <johannes.berg@intel.com>2015-03-17 14:34:26 +0300
commitc7ef38e0ccca25050efed56a35df2e1e93c0b469 (patch)
tree041949d9e29d3f54936ccbd8de9b5c449ad5036e /net/mac80211/key.c
parent8a4988d13734f9340ba8b34467d8ea09347b55d5 (diff)
downloadlinux-c7ef38e0ccca25050efed56a35df2e1e93c0b469.tar.xz
mac80211: Get IV len from key conf and not cipher scheme
When a key is installed using a cipher scheme, set a new internal key flag (KEY_FLAG_CIPHER_SCHEME) on it, to allow distinguishing such keys more easily. In particular, use this flag on the TX path instead of testing the sta->cipher_scheme pointer, as the station is NULL for broad-/multicast message, and use the key's iv_len instead of the cipher scheme information. Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com> [add missing documentation, rewrite commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/key.c')
-rw-r--r--net/mac80211/key.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 0825d76edcfc..2291cd730091 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -492,6 +492,7 @@ ieee80211_key_alloc(u32 cipher, int idx, size_t key_len,
for (j = 0; j < len; j++)
key->u.gen.rx_pn[i][j] =
seq[len - j - 1];
+ key->flags |= KEY_FLAG_CIPHER_SCHEME;
}
}
memcpy(key->conf.key, key_data, key_len);