diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-04-20 12:12:41 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-05-06 07:29:59 -0400 |
commit | 9352c19f639354f093cb5457315c01bcb94aa82a (patch) | |
tree | 6265793a17841220f692b0becf86bee0d2bd9f6f /include/net/mac80211.h | |
parent | f603f1f342547b597450b9d1e1e00b3e07c6e41b (diff) |
mac80211: extend get_tkip_seq to all keys
Extend the function to read the TKIP IV32/IV16 to read the IV/PN for
all ciphers in order to allow drivers with full hardware crypto to
properly support this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8a3a7d7cda26..47b39c26fc05 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1502,6 +1502,40 @@ struct ieee80211_key_conf { | |||
1502 | }; | 1502 | }; |
1503 | 1503 | ||
1504 | /** | 1504 | /** |
1505 | * struct ieee80211_key_seq - key sequence counter | ||
1506 | * | ||
1507 | * @tkip: TKIP data, containing IV32 and IV16 in host byte order | ||
1508 | * @ccmp: PN data, most significant byte first (big endian, | ||
1509 | * reverse order than in packet) | ||
1510 | * @aes_cmac: PN data, most significant byte first (big endian, | ||
1511 | * reverse order than in packet) | ||
1512 | * @aes_gmac: PN data, most significant byte first (big endian, | ||
1513 | * reverse order than in packet) | ||
1514 | * @gcmp: PN data, most significant byte first (big endian, | ||
1515 | * reverse order than in packet) | ||
1516 | */ | ||
1517 | struct ieee80211_key_seq { | ||
1518 | union { | ||
1519 | struct { | ||
1520 | u32 iv32; | ||
1521 | u16 iv16; | ||
1522 | } tkip; | ||
1523 | struct { | ||
1524 | u8 pn[6]; | ||
1525 | } ccmp; | ||
1526 | struct { | ||
1527 | u8 pn[6]; | ||
1528 | } aes_cmac; | ||
1529 | struct { | ||
1530 | u8 pn[6]; | ||
1531 | } aes_gmac; | ||
1532 | struct { | ||
1533 | u8 pn[6]; | ||
1534 | } gcmp; | ||
1535 | }; | ||
1536 | }; | ||
1537 | |||
1538 | /** | ||
1505 | * struct ieee80211_cipher_scheme - cipher scheme | 1539 | * struct ieee80211_cipher_scheme - cipher scheme |
1506 | * | 1540 | * |
1507 | * This structure contains a cipher scheme information defining | 1541 | * This structure contains a cipher scheme information defining |
@@ -2836,9 +2870,9 @@ enum ieee80211_reconfig_type { | |||
2836 | * Returns zero if statistics are available. | 2870 | * Returns zero if statistics are available. |
2837 | * The callback can sleep. | 2871 | * The callback can sleep. |
2838 | * | 2872 | * |
2839 | * @get_tkip_seq: If your device implements TKIP encryption in hardware this | 2873 | * @get_key_seq: If your device implements encryption in hardware and does |
2840 | * callback should be provided to read the TKIP transmit IVs (both IV32 | 2874 | * IV/PN assignment then this callback should be provided to read the |
2841 | * and IV16) for the given key from hardware. | 2875 | * IV/PN for the given key from hardware. |
2842 | * The callback must be atomic. | 2876 | * The callback must be atomic. |
2843 | * | 2877 | * |
2844 | * @set_frag_threshold: Configuration of fragmentation threshold. Assign this | 2878 | * @set_frag_threshold: Configuration of fragmentation threshold. Assign this |
@@ -3237,8 +3271,9 @@ struct ieee80211_ops { | |||
3237 | struct ieee80211_vif *vif); | 3271 | struct ieee80211_vif *vif); |
3238 | int (*get_stats)(struct ieee80211_hw *hw, | 3272 | int (*get_stats)(struct ieee80211_hw *hw, |
3239 | struct ieee80211_low_level_stats *stats); | 3273 | struct ieee80211_low_level_stats *stats); |
3240 | void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx, | 3274 | void (*get_key_seq)(struct ieee80211_hw *hw, |
3241 | u32 *iv32, u16 *iv16); | 3275 | struct ieee80211_key_conf *key, |
3276 | struct ieee80211_key_seq *seq); | ||
3242 | int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value); | 3277 | int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value); |
3243 | int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value); | 3278 | int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value); |
3244 | int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 3279 | int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
@@ -4273,40 +4308,6 @@ void ieee80211_aes_cmac_calculate_k1_k2(struct ieee80211_key_conf *keyconf, | |||
4273 | u8 *k1, u8 *k2); | 4308 | u8 *k1, u8 *k2); |
4274 | 4309 | ||
4275 | /** | 4310 | /** |
4276 | * struct ieee80211_key_seq - key sequence counter | ||
4277 | * | ||
4278 | * @tkip: TKIP data, containing IV32 and IV16 in host byte order | ||
4279 | * @ccmp: PN data, most significant byte first (big endian, | ||
4280 | * reverse order than in packet) | ||
4281 | * @aes_cmac: PN data, most significant byte first (big endian, | ||
4282 | * reverse order than in packet) | ||
4283 | * @aes_gmac: PN data, most significant byte first (big endian, | ||
4284 | * reverse order than in packet) | ||
4285 | * @gcmp: PN data, most significant byte first (big endian, | ||
4286 | * reverse order than in packet) | ||
4287 | */ | ||
4288 | struct ieee80211_key_seq { | ||
4289 | union { | ||
4290 | struct { | ||
4291 | u32 iv32; | ||
4292 | u16 iv16; | ||
4293 | } tkip; | ||
4294 | struct { | ||
4295 | u8 pn[6]; | ||
4296 | } ccmp; | ||
4297 | struct { | ||
4298 | u8 pn[6]; | ||
4299 | } aes_cmac; | ||
4300 | struct { | ||
4301 | u8 pn[6]; | ||
4302 | } aes_gmac; | ||
4303 | struct { | ||
4304 | u8 pn[6]; | ||
4305 | } gcmp; | ||
4306 | }; | ||
4307 | }; | ||
4308 | |||
4309 | /** | ||
4310 | * ieee80211_get_key_tx_seq - get key TX sequence counter | 4311 | * ieee80211_get_key_tx_seq - get key TX sequence counter |
4311 | * | 4312 | * |
4312 | * @keyconf: the parameter passed with the set key | 4313 | * @keyconf: the parameter passed with the set key |