diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-25 20:20:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-25 20:20:03 -0400 |
commit | f89e6e3834035c6e8203042f3527931aa7f52496 (patch) | |
tree | a82677254fe4511679d5690606ac75f4300fefe1 /include | |
parent | 7cbca67c073263c179f605bdbbdc565ab29d801d (diff) | |
parent | 3a643d244f09fa1fdd25d48a56a073c1a69583ee (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.26
Diffstat (limited to 'include')
-rw-r--r-- | include/net/mac80211.h | 47 | ||||
-rw-r--r-- | include/net/wireless.h | 6 |
2 files changed, 53 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 5ab6a350ee6d..48428a6b9109 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -644,6 +644,21 @@ enum sta_notify_cmd { | |||
644 | }; | 644 | }; |
645 | 645 | ||
646 | /** | 646 | /** |
647 | * enum ieee80211_tkip_key_type - get tkip key | ||
648 | * | ||
649 | * Used by drivers which need to get a tkip key for skb. Some drivers need a | ||
650 | * phase 1 key, others need a phase 2 key. A single function allows the driver | ||
651 | * to get the key, this enum indicates what type of key is required. | ||
652 | * | ||
653 | * @IEEE80211_TKIP_P1_KEY: the driver needs a phase 1 key | ||
654 | * @IEEE80211_TKIP_P2_KEY: the driver needs a phase 2 key | ||
655 | */ | ||
656 | enum ieee80211_tkip_key_type { | ||
657 | IEEE80211_TKIP_P1_KEY, | ||
658 | IEEE80211_TKIP_P2_KEY, | ||
659 | }; | ||
660 | |||
661 | /** | ||
647 | * enum ieee80211_hw_flags - hardware flags | 662 | * enum ieee80211_hw_flags - hardware flags |
648 | * | 663 | * |
649 | * These flags are used to indicate hardware capabilities to | 664 | * These flags are used to indicate hardware capabilities to |
@@ -812,6 +827,16 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr) | |||
812 | * parameter is guaranteed to be valid until another call to set_key() | 827 | * parameter is guaranteed to be valid until another call to set_key() |
813 | * removes it, but it can only be used as a cookie to differentiate | 828 | * removes it, but it can only be used as a cookie to differentiate |
814 | * keys. | 829 | * keys. |
830 | * | ||
831 | * In TKIP some HW need to be provided a phase 1 key, for RX decryption | ||
832 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key | ||
833 | * handler. | ||
834 | * The update_tkip_key() call updates the driver with the new phase 1 key. | ||
835 | * This happens everytime the iv16 wraps around (every 65536 packets). The | ||
836 | * set_key() call will happen only once for each key (unless the AP did | ||
837 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is | ||
838 | * provided by udpate_tkip_key only. The trigger that makes mac80211 call this | ||
839 | * handler is software decryption with wrap around of iv16. | ||
815 | */ | 840 | */ |
816 | 841 | ||
817 | /** | 842 | /** |
@@ -988,6 +1013,10 @@ enum ieee80211_ampdu_mlme_action { | |||
988 | * and remove_interface calls, i.e. while the interface with the | 1013 | * and remove_interface calls, i.e. while the interface with the |
989 | * given local_address is enabled. | 1014 | * given local_address is enabled. |
990 | * | 1015 | * |
1016 | * @update_tkip_key: See the section "Hardware crypto acceleration" | ||
1017 | * This callback will be called in the context of Rx. Called for drivers | ||
1018 | * which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY. | ||
1019 | * | ||
991 | * @hw_scan: Ask the hardware to service the scan request, no need to start | 1020 | * @hw_scan: Ask the hardware to service the scan request, no need to start |
992 | * the scan state machine in stack. The scan must honour the channel | 1021 | * the scan state machine in stack. The scan must honour the channel |
993 | * configuration done by the regulatory agent in the wiphy's registered | 1022 | * configuration done by the regulatory agent in the wiphy's registered |
@@ -1079,6 +1108,9 @@ struct ieee80211_ops { | |||
1079 | int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, | 1108 | int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, |
1080 | const u8 *local_address, const u8 *address, | 1109 | const u8 *local_address, const u8 *address, |
1081 | struct ieee80211_key_conf *key); | 1110 | struct ieee80211_key_conf *key); |
1111 | void (*update_tkip_key)(struct ieee80211_hw *hw, | ||
1112 | struct ieee80211_key_conf *conf, const u8 *address, | ||
1113 | u32 iv32, u16 *phase1key); | ||
1082 | int (*hw_scan)(struct ieee80211_hw *hw, u8 *ssid, size_t len); | 1114 | int (*hw_scan)(struct ieee80211_hw *hw, u8 *ssid, size_t len); |
1083 | int (*get_stats)(struct ieee80211_hw *hw, | 1115 | int (*get_stats)(struct ieee80211_hw *hw, |
1084 | struct ieee80211_low_level_stats *stats); | 1116 | struct ieee80211_low_level_stats *stats); |
@@ -1472,6 +1504,21 @@ int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | |||
1472 | int ieee80211_get_hdrlen(u16 fc); | 1504 | int ieee80211_get_hdrlen(u16 fc); |
1473 | 1505 | ||
1474 | /** | 1506 | /** |
1507 | * ieee80211_get_tkip_key - get a TKIP rc4 for skb | ||
1508 | * | ||
1509 | * This function computes a TKIP rc4 key for an skb. It computes | ||
1510 | * a phase 1 key if needed (iv16 wraps around). This function is to | ||
1511 | * be used by drivers which can do HW encryption but need to compute | ||
1512 | * to phase 1/2 key in SW. | ||
1513 | * | ||
1514 | * @keyconf: the parameter passed with the set key | ||
1515 | * @skb: the skb for which the key is needed | ||
1516 | * @rc4key: a buffer to which the key will be written | ||
1517 | */ | ||
1518 | void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf, | ||
1519 | struct sk_buff *skb, | ||
1520 | enum ieee80211_tkip_key_type type, u8 *key); | ||
1521 | /** | ||
1475 | * ieee80211_wake_queue - wake specific queue | 1522 | * ieee80211_wake_queue - wake specific queue |
1476 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1523 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1477 | * @queue: queue number (counted from zero). | 1524 | * @queue: queue number (counted from zero). |
diff --git a/include/net/wireless.h b/include/net/wireless.h index c7f805ee5545..f4b77ab66bae 100644 --- a/include/net/wireless.h +++ b/include/net/wireless.h | |||
@@ -304,4 +304,10 @@ extern int ieee80211_channel_to_frequency(int chan); | |||
304 | */ | 304 | */ |
305 | extern int ieee80211_frequency_to_channel(int freq); | 305 | extern int ieee80211_frequency_to_channel(int freq); |
306 | 306 | ||
307 | /** | ||
308 | * ieee80211_get_channel - get channel struct from wiphy for specified frequency | ||
309 | */ | ||
310 | extern struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy, | ||
311 | int freq); | ||
312 | |||
307 | #endif /* __NET_WIRELESS_H */ | 313 | #endif /* __NET_WIRELESS_H */ |