aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d30960e1755c..3db7dfa53b6f 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -49,6 +49,26 @@ extern int ieee80211_radiotap_iterator_next(
49 struct ieee80211_radiotap_iterator *iterator); 49 struct ieee80211_radiotap_iterator *iterator);
50 50
51 51
52 /**
53 * struct key_params - key information
54 *
55 * Information about a key
56 *
57 * @key: key material
58 * @key_len: length of key material
59 * @cipher: cipher suite selector
60 * @seq: sequence counter (IV/PN) for TKIP and CCMP keys, only used
61 * with the get_key() callback, must be in little endian,
62 * length given by @seq_len.
63 */
64struct key_params {
65 u8 *key;
66 u8 *seq;
67 int key_len;
68 int seq_len;
69 u32 cipher;
70};
71
52/* from net/wireless.h */ 72/* from net/wireless.h */
53struct wiphy; 73struct wiphy;
54 74
@@ -71,6 +91,18 @@ struct wiphy;
71 * 91 *
72 * @change_virtual_intf: change type of virtual interface 92 * @change_virtual_intf: change type of virtual interface
73 * 93 *
94 * @add_key: add a key with the given parameters. @mac_addr will be %NULL
95 * when adding a group key.
96 *
97 * @get_key: get information about the key with the given parameters.
98 * @mac_addr will be %NULL when requesting information for a group
99 * key. All pointers given to the @callback function need not be valid
100 * after it returns.
101 *
102 * @del_key: remove a key given the @mac_addr (%NULL for a group key)
103 * and @key_index
104 *
105 * @set_default_key: set the default key on an interface
74 */ 106 */
75struct cfg80211_ops { 107struct cfg80211_ops {
76 int (*add_virtual_intf)(struct wiphy *wiphy, char *name, 108 int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
@@ -78,6 +110,18 @@ struct cfg80211_ops {
78 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); 110 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
79 int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex, 111 int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex,
80 enum nl80211_iftype type); 112 enum nl80211_iftype type);
113
114 int (*add_key)(struct wiphy *wiphy, struct net_device *netdev,
115 u8 key_index, u8 *mac_addr,
116 struct key_params *params);
117 int (*get_key)(struct wiphy *wiphy, struct net_device *netdev,
118 u8 key_index, u8 *mac_addr, void *cookie,
119 void (*callback)(void *cookie, struct key_params*));
120 int (*del_key)(struct wiphy *wiphy, struct net_device *netdev,
121 u8 key_index, u8 *mac_addr);
122 int (*set_default_key)(struct wiphy *wiphy,
123 struct net_device *netdev,
124 u8 key_index);
81}; 125};
82 126
83#endif /* __NET_CFG80211_H */ 127#endif /* __NET_CFG80211_H */