aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-10-05 13:39:30 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-06 16:30:40 -0400
commite31b82136d1adc7a599b6e99d3321e5831841f5a (patch)
treec72d78d4cccfd08587e909c7efe59956f1cbc23e /include/net
parent53f73c09d64f1fa7d7e6e8b6bb7468d42eddc92d (diff)
cfg80211/mac80211: allow per-station GTKs
This adds API to allow adding per-station GTKs, updates mac80211 to support it, and also allows drivers to remove a key from hwaccel again when this may be necessary due to multiple GTKs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h9
-rw-r--r--include/net/mac80211.h24
2 files changed, 30 insertions, 3 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 5f4d8acf7abb..0f77515266b8 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1130,13 +1130,14 @@ struct cfg80211_ops {
1130 struct vif_params *params); 1130 struct vif_params *params);
1131 1131
1132 int (*add_key)(struct wiphy *wiphy, struct net_device *netdev, 1132 int (*add_key)(struct wiphy *wiphy, struct net_device *netdev,
1133 u8 key_index, const u8 *mac_addr, 1133 u8 key_index, bool pairwise, const u8 *mac_addr,
1134 struct key_params *params); 1134 struct key_params *params);
1135 int (*get_key)(struct wiphy *wiphy, struct net_device *netdev, 1135 int (*get_key)(struct wiphy *wiphy, struct net_device *netdev,
1136 u8 key_index, const u8 *mac_addr, void *cookie, 1136 u8 key_index, bool pairwise, const u8 *mac_addr,
1137 void *cookie,
1137 void (*callback)(void *cookie, struct key_params*)); 1138 void (*callback)(void *cookie, struct key_params*));
1138 int (*del_key)(struct wiphy *wiphy, struct net_device *netdev, 1139 int (*del_key)(struct wiphy *wiphy, struct net_device *netdev,
1139 u8 key_index, const u8 *mac_addr); 1140 u8 key_index, bool pairwise, const u8 *mac_addr);
1140 int (*set_default_key)(struct wiphy *wiphy, 1141 int (*set_default_key)(struct wiphy *wiphy,
1141 struct net_device *netdev, 1142 struct net_device *netdev,
1142 u8 key_index); 1143 u8 key_index);
@@ -1304,6 +1305,7 @@ struct cfg80211_ops {
1304 * @WIPHY_FLAG_CONTROL_PORT_PROTOCOL: This device supports setting the 1305 * @WIPHY_FLAG_CONTROL_PORT_PROTOCOL: This device supports setting the
1305 * control port protocol ethertype. The device also honours the 1306 * control port protocol ethertype. The device also honours the
1306 * control_port_no_encrypt flag. 1307 * control_port_no_encrypt flag.
1308 * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN.
1307 */ 1309 */
1308enum wiphy_flags { 1310enum wiphy_flags {
1309 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), 1311 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
@@ -1314,6 +1316,7 @@ enum wiphy_flags {
1314 WIPHY_FLAG_4ADDR_AP = BIT(5), 1316 WIPHY_FLAG_4ADDR_AP = BIT(5),
1315 WIPHY_FLAG_4ADDR_STATION = BIT(6), 1317 WIPHY_FLAG_4ADDR_STATION = BIT(6),
1316 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), 1318 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7),
1319 WIPHY_FLAG_IBSS_RSN = BIT(7),
1317}; 1320};
1318 1321
1319struct mac_address { 1322struct mac_address {
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 47316a653ae1..33aa2e39147b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1041,6 +1041,13 @@ enum ieee80211_tkip_key_type {
1041 * @IEEE80211_HW_NEED_DTIM_PERIOD: 1041 * @IEEE80211_HW_NEED_DTIM_PERIOD:
1042 * This device needs to know the DTIM period for the BSS before 1042 * This device needs to know the DTIM period for the BSS before
1043 * associating. 1043 * associating.
1044 *
1045 * @IEEE80211_HW_SUPPORTS_PER_STA_GTK: The device's crypto engine supports
1046 * per-station GTKs as used by IBSS RSN or during fast transition. If
1047 * the device doesn't support per-station GTKs, but can be asked not
1048 * to decrypt group addressed frames, then IBSS RSN support is still
1049 * possible but software crypto will be used. Advertise the wiphy flag
1050 * only in that case.
1044 */ 1051 */
1045enum ieee80211_hw_flags { 1052enum ieee80211_hw_flags {
1046 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, 1053 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
@@ -1064,6 +1071,7 @@ enum ieee80211_hw_flags {
1064 IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, 1071 IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18,
1065 IEEE80211_HW_CONNECTION_MONITOR = 1<<19, 1072 IEEE80211_HW_CONNECTION_MONITOR = 1<<19,
1066 IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, 1073 IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20,
1074 IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21,
1067}; 1075};
1068 1076
1069/** 1077/**
@@ -2582,6 +2590,22 @@ void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success);
2582void ieee80211_request_smps(struct ieee80211_vif *vif, 2590void ieee80211_request_smps(struct ieee80211_vif *vif,
2583 enum ieee80211_smps_mode smps_mode); 2591 enum ieee80211_smps_mode smps_mode);
2584 2592
2593/**
2594 * ieee80211_key_removed - disable hw acceleration for key
2595 * @key_conf: The key hw acceleration should be disabled for
2596 *
2597 * This allows drivers to indicate that the given key has been
2598 * removed from hardware acceleration, due to a new key that
2599 * was added. Don't use this if the key can continue to be used
2600 * for TX, if the key restriction is on RX only it is permitted
2601 * to keep the key for TX only and not call this function.
2602 *
2603 * Due to locking constraints, it may only be called during
2604 * @set_key. This function must be allowed to sleep, and the
2605 * key it tries to disable may still be used until it returns.
2606 */
2607void ieee80211_key_removed(struct ieee80211_key_conf *key_conf);
2608
2585/* Rate control API */ 2609/* Rate control API */
2586 2610
2587/** 2611/**