diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2015-01-24 19:52:06 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-27 11:06:09 +0100 |
commit | 00b9cfa3ff38401bd70c34b250ca13e5ea347b4a (patch) | |
tree | 1c3564bf28a6f4b49140a5e023520a1dc658d5c6 /net/mac80211/cfg.c | |
parent | cfcf1682c4ca8f601a4702255958e0b1c9aa12cc (diff) | |
download | blackbird-op-linux-00b9cfa3ff38401bd70c34b250ca13e5ea347b4a.tar.gz blackbird-op-linux-00b9cfa3ff38401bd70c34b250ca13e5ea347b4a.zip |
mac80111: Add GCMP and GCMP-256 ciphers
This allows mac80211 to configure GCMP and GCMP-256 to the driver and
also use software-implementation within mac80211 when the driver does
not support this with hardware accelaration.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
[remove a spurious newline]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index a777114d663b..1c1d061cff56 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -164,6 +164,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev, case WLAN_CIPHER_SUITE_CCMP: case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_GCMP: + case WLAN_CIPHER_SUITE_GCMP_256: break; default: cs = ieee80211_cs_get(local, params->cipher, sdata->vif.type); @@ -369,6 +370,18 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, params.seq = seq; params.seq_len = 6; break; + case WLAN_CIPHER_SUITE_GCMP: + case WLAN_CIPHER_SUITE_GCMP_256: + pn64 = atomic64_read(&key->u.gcmp.tx_pn); + seq[0] = pn64; + seq[1] = pn64 >> 8; + seq[2] = pn64 >> 16; + seq[3] = pn64 >> 24; + seq[4] = pn64 >> 32; + seq[5] = pn64 >> 40; + params.seq = seq; + params.seq_len = 6; + break; } params.key = key->conf.key; |