aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-03-20 09:06:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:52 -0400
commit5d2cdcd4e85c5187db30a6b29f79fbbe59f39f78 (patch)
tree0c7e079a30871fb593c282a7a711ccc90c31af1a /include/net/mac80211.h
parent17e476b8db13790c03e2c46d93abc71468fca47e (diff)
mac80211: get a TKIP phase key from skb
This patch makes mac80211 able to compute a TKIP key from an skb. The requested key can be a phase 1 or a phase 2 key. This is useful for drivers who need to provide tkip key to their HW to enable HW encryption. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5ab6a350ee6d..2a134582fc16 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 */
656enum 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
@@ -1472,6 +1487,21 @@ int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
1472int ieee80211_get_hdrlen(u16 fc); 1487int ieee80211_get_hdrlen(u16 fc);
1473 1488
1474/** 1489/**
1490 * ieee80211_get_tkip_key - get a TKIP rc4 for skb
1491 *
1492 * This function computes a TKIP rc4 key for an skb. It computes
1493 * a phase 1 key if needed (iv16 wraps around). This function is to
1494 * be used by drivers which can do HW encryption but need to compute
1495 * to phase 1/2 key in SW.
1496 *
1497 * @keyconf: the parameter passed with the set key
1498 * @skb: the skb for which the key is needed
1499 * @rc4key: a buffer to which the key will be written
1500 */
1501void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
1502 struct sk_buff *skb,
1503 enum ieee80211_tkip_key_type type, u8 *key);
1504/**
1475 * ieee80211_wake_queue - wake specific queue 1505 * ieee80211_wake_queue - wake specific queue
1476 * @hw: pointer as obtained from ieee80211_alloc_hw(). 1506 * @hw: pointer as obtained from ieee80211_alloc_hw().
1477 * @queue: queue number (counted from zero). 1507 * @queue: queue number (counted from zero).