diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-09-14 11:10:25 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:27 -0400 |
commit | 7848ba7d7a010ccb265617fc2bc053e2bdf06f48 (patch) | |
tree | 844da4a4d796d817b0040b284ddeaa320446eaab /include | |
parent | b708e610622cff07f4374a2b4410884f964b8489 (diff) |
[MAC80211]: rework hardware crypto flags
This patch reworks the various hardware crypto related
flags to make them more local, i.e. put them with each
key or each packet instead of into the hw struct.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/mac80211.h | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index fcb7e3f9c669..9137579c12a4 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -240,6 +240,8 @@ struct ieee80211_rx_status { | |||
240 | #define RX_FLAG_MMIC_ERROR (1<<0) | 240 | #define RX_FLAG_MMIC_ERROR (1<<0) |
241 | #define RX_FLAG_DECRYPTED (1<<1) | 241 | #define RX_FLAG_DECRYPTED (1<<1) |
242 | #define RX_FLAG_RADIOTAP (1<<2) | 242 | #define RX_FLAG_RADIOTAP (1<<2) |
243 | #define RX_FLAG_MMIC_STRIPPED (1<<3) | ||
244 | #define RX_FLAG_IV_STRIPPED (1<<4) | ||
243 | int flag; | 245 | int flag; |
244 | }; | 246 | }; |
245 | 247 | ||
@@ -402,6 +404,16 @@ typedef enum { | |||
402 | * that situation it should reject that key. | 404 | * that situation it should reject that key. |
403 | */ | 405 | */ |
404 | #define IEEE80211_KEY_FLAG_WMM_STA (1<<0) | 406 | #define IEEE80211_KEY_FLAG_WMM_STA (1<<0) |
407 | /* | ||
408 | * This flag should be set by the driver if it requires | ||
409 | * IV generation in software for this key. | ||
410 | */ | ||
411 | #define IEEE80211_KEY_FLAG_GENERATE_IV (1<<1) | ||
412 | /* | ||
413 | * This flag should be set by the driver if it requires | ||
414 | * MMIC generation in software for this key. | ||
415 | */ | ||
416 | #define IEEE80211_KEY_FLAG_GENERATE_MMIC (1<<2) | ||
405 | 417 | ||
406 | struct ieee80211_key_conf { | 418 | struct ieee80211_key_conf { |
407 | /* | 419 | /* |
@@ -465,17 +477,7 @@ struct ieee80211_hw { | |||
465 | */ | 477 | */ |
466 | #define IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE (1<<1) | 478 | #define IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE (1<<1) |
467 | 479 | ||
468 | /* | 480 | /* hole at 2 */ |
469 | * Some devices handle decryption internally and do not | ||
470 | * indicate whether the frame was encrypted (unencrypted frames | ||
471 | * will be dropped by the hardware, unless specifically allowed | ||
472 | * through.) | ||
473 | * It is permissible to not handle all encrypted frames and fall | ||
474 | * back to software encryption; however, if this flag is set | ||
475 | * unencrypted frames must be dropped unless the driver is told | ||
476 | * otherwise via the set_ieee8021x() callback. | ||
477 | */ | ||
478 | #define IEEE80211_HW_DEVICE_HIDES_WEP (1<<2) | ||
479 | 481 | ||
480 | /* Whether RX frames passed to ieee80211_rx() include FCS in the end */ | 482 | /* Whether RX frames passed to ieee80211_rx() include FCS in the end */ |
481 | #define IEEE80211_HW_RX_INCLUDES_FCS (1<<3) | 483 | #define IEEE80211_HW_RX_INCLUDES_FCS (1<<3) |
@@ -488,32 +490,13 @@ struct ieee80211_hw { | |||
488 | * can fetch them with ieee80211_get_buffered_bc(). */ | 490 | * can fetch them with ieee80211_get_buffered_bc(). */ |
489 | #define IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING (1<<4) | 491 | #define IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING (1<<4) |
490 | 492 | ||
491 | /* | 493 | /* hole at 5 */ |
492 | * This flag is only relevant if hardware encryption is used. | ||
493 | * If set, it has two meanings: | ||
494 | * 1) the IV and ICV are present in received frames that have | ||
495 | * been decrypted (unless IEEE80211_HW_DEVICE_HIDES_WEP is | ||
496 | * also set) | ||
497 | * 2) on transmission, the IV should be generated in software. | ||
498 | * | ||
499 | * Please let us know if you *don't* use this flag, the stack would | ||
500 | * really like to be able to get the IV to keep key statistics | ||
501 | * accurate. | ||
502 | */ | ||
503 | #define IEEE80211_HW_WEP_INCLUDE_IV (1<<5) | ||
504 | 494 | ||
505 | /* hole at 6 */ | 495 | /* hole at 6 */ |
506 | 496 | ||
507 | /* hole at 7 */ | 497 | /* hole at 7 */ |
508 | 498 | ||
509 | /* | 499 | /* hole at 8 */ |
510 | * Some devices handle Michael MIC internally and do not include MIC in | ||
511 | * the received packets passed up. This flag must be set for such | ||
512 | * devices. The 'encryption' frame control bit is expected to be still | ||
513 | * set in the IEEE 802.11 header with this option unlike with the | ||
514 | * IEEE80211_HW_DEVICE_HIDES_WEP flag. | ||
515 | */ | ||
516 | #define IEEE80211_HW_DEVICE_STRIPS_MIC (1<<8) | ||
517 | 500 | ||
518 | /* Device is capable of performing full monitor mode even during | 501 | /* Device is capable of performing full monitor mode even during |
519 | * normal operation. */ | 502 | * normal operation. */ |
@@ -527,8 +510,6 @@ struct ieee80211_hw { | |||
527 | * specified in the device's EEPROM */ | 510 | * specified in the device's EEPROM */ |
528 | #define IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED (1<<11) | 511 | #define IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED (1<<11) |
529 | 512 | ||
530 | /* calculate Michael MIC for an MSDU when doing hwcrypto */ | ||
531 | #define IEEE80211_HW_TKIP_INCLUDE_MMIC (1<<12) | ||
532 | /* Do TKIP phase1 key mixing in stack to support cards only do | 513 | /* Do TKIP phase1 key mixing in stack to support cards only do |
533 | * phase2 key mixing when doing hwcrypto */ | 514 | * phase2 key mixing when doing hwcrypto */ |
534 | #define IEEE80211_HW_TKIP_REQ_PHASE1_KEY (1<<13) | 515 | #define IEEE80211_HW_TKIP_REQ_PHASE1_KEY (1<<13) |