diff options
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index d30960e1755c..bcc480b8892a 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -49,6 +49,120 @@ 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 | */ | ||
64 | struct key_params { | ||
65 | u8 *key; | ||
66 | u8 *seq; | ||
67 | int key_len; | ||
68 | int seq_len; | ||
69 | u32 cipher; | ||
70 | }; | ||
71 | |||
72 | /** | ||
73 | * struct beacon_parameters - beacon parameters | ||
74 | * | ||
75 | * Used to configure the beacon for an interface. | ||
76 | * | ||
77 | * @head: head portion of beacon (before TIM IE) | ||
78 | * or %NULL if not changed | ||
79 | * @tail: tail portion of beacon (after TIM IE) | ||
80 | * or %NULL if not changed | ||
81 | * @interval: beacon interval or zero if not changed | ||
82 | * @dtim_period: DTIM period or zero if not changed | ||
83 | * @head_len: length of @head | ||
84 | * @tail_len: length of @tail | ||
85 | */ | ||
86 | struct beacon_parameters { | ||
87 | u8 *head, *tail; | ||
88 | int interval, dtim_period; | ||
89 | int head_len, tail_len; | ||
90 | }; | ||
91 | |||
92 | /** | ||
93 | * enum station_flags - station flags | ||
94 | * | ||
95 | * Station capability flags. Note that these must be the bits | ||
96 | * according to the nl80211 flags. | ||
97 | * | ||
98 | * @STATION_FLAG_CHANGED: station flags were changed | ||
99 | * @STATION_FLAG_AUTHORIZED: station is authorized to send frames (802.1X) | ||
100 | * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | ||
101 | * with short preambles | ||
102 | * @STATION_FLAG_WME: station is WME/QoS capable | ||
103 | */ | ||
104 | enum station_flags { | ||
105 | STATION_FLAG_CHANGED = 1<<0, | ||
106 | STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED, | ||
107 | STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE, | ||
108 | STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME, | ||
109 | }; | ||
110 | |||
111 | /** | ||
112 | * struct station_parameters - station parameters | ||
113 | * | ||
114 | * Used to change and create a new station. | ||
115 | * | ||
116 | * @vlan: vlan interface station should belong to | ||
117 | * @supported_rates: supported rates in IEEE 802.11 format | ||
118 | * (or NULL for no change) | ||
119 | * @supported_rates_len: number of supported rates | ||
120 | * @station_flags: station flags (see &enum station_flags) | ||
121 | * @listen_interval: listen interval or -1 for no change | ||
122 | * @aid: AID or zero for no change | ||
123 | */ | ||
124 | struct station_parameters { | ||
125 | u8 *supported_rates; | ||
126 | struct net_device *vlan; | ||
127 | u32 station_flags; | ||
128 | int listen_interval; | ||
129 | u16 aid; | ||
130 | u8 supported_rates_len; | ||
131 | }; | ||
132 | |||
133 | /** | ||
134 | * enum station_stats_flags - station statistics flags | ||
135 | * | ||
136 | * Used by the driver to indicate which info in &struct station_stats | ||
137 | * it has filled in during get_station(). | ||
138 | * | ||
139 | * @STATION_STAT_INACTIVE_TIME: @inactive_time filled | ||
140 | * @STATION_STAT_RX_BYTES: @rx_bytes filled | ||
141 | * @STATION_STAT_TX_BYTES: @tx_bytes filled | ||
142 | */ | ||
143 | enum station_stats_flags { | ||
144 | STATION_STAT_INACTIVE_TIME = 1<<0, | ||
145 | STATION_STAT_RX_BYTES = 1<<1, | ||
146 | STATION_STAT_TX_BYTES = 1<<2, | ||
147 | }; | ||
148 | |||
149 | /** | ||
150 | * struct station_stats - station statistics | ||
151 | * | ||
152 | * Station information filled by driver for get_station(). | ||
153 | * | ||
154 | * @filled: bitflag of flags from &enum station_stats_flags | ||
155 | * @inactive_time: time since last station activity (tx/rx) in milliseconds | ||
156 | * @rx_bytes: bytes received from this station | ||
157 | * @tx_bytes: bytes transmitted to this station | ||
158 | */ | ||
159 | struct station_stats { | ||
160 | u32 filled; | ||
161 | u32 inactive_time; | ||
162 | u32 rx_bytes; | ||
163 | u32 tx_bytes; | ||
164 | }; | ||
165 | |||
52 | /* from net/wireless.h */ | 166 | /* from net/wireless.h */ |
53 | struct wiphy; | 167 | struct wiphy; |
54 | 168 | ||
@@ -71,6 +185,31 @@ struct wiphy; | |||
71 | * | 185 | * |
72 | * @change_virtual_intf: change type of virtual interface | 186 | * @change_virtual_intf: change type of virtual interface |
73 | * | 187 | * |
188 | * @add_key: add a key with the given parameters. @mac_addr will be %NULL | ||
189 | * when adding a group key. | ||
190 | * | ||
191 | * @get_key: get information about the key with the given parameters. | ||
192 | * @mac_addr will be %NULL when requesting information for a group | ||
193 | * key. All pointers given to the @callback function need not be valid | ||
194 | * after it returns. | ||
195 | * | ||
196 | * @del_key: remove a key given the @mac_addr (%NULL for a group key) | ||
197 | * and @key_index | ||
198 | * | ||
199 | * @set_default_key: set the default key on an interface | ||
200 | * | ||
201 | * @add_beacon: Add a beacon with given parameters, @head, @interval | ||
202 | * and @dtim_period will be valid, @tail is optional. | ||
203 | * @set_beacon: Change the beacon parameters for an access point mode | ||
204 | * interface. This should reject the call when no beacon has been | ||
205 | * configured. | ||
206 | * @del_beacon: Remove beacon configuration and stop sending the beacon. | ||
207 | * | ||
208 | * @add_station: Add a new station. | ||
209 | * | ||
210 | * @del_station: Remove a station; @mac may be NULL to remove all stations. | ||
211 | * | ||
212 | * @change_station: Modify a given station. | ||
74 | */ | 213 | */ |
75 | struct cfg80211_ops { | 214 | struct cfg80211_ops { |
76 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, | 215 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, |
@@ -78,6 +217,34 @@ struct cfg80211_ops { | |||
78 | int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); | 217 | int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); |
79 | int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex, | 218 | int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex, |
80 | enum nl80211_iftype type); | 219 | enum nl80211_iftype type); |
220 | |||
221 | int (*add_key)(struct wiphy *wiphy, struct net_device *netdev, | ||
222 | u8 key_index, u8 *mac_addr, | ||
223 | struct key_params *params); | ||
224 | int (*get_key)(struct wiphy *wiphy, struct net_device *netdev, | ||
225 | u8 key_index, u8 *mac_addr, void *cookie, | ||
226 | void (*callback)(void *cookie, struct key_params*)); | ||
227 | int (*del_key)(struct wiphy *wiphy, struct net_device *netdev, | ||
228 | u8 key_index, u8 *mac_addr); | ||
229 | int (*set_default_key)(struct wiphy *wiphy, | ||
230 | struct net_device *netdev, | ||
231 | u8 key_index); | ||
232 | |||
233 | int (*add_beacon)(struct wiphy *wiphy, struct net_device *dev, | ||
234 | struct beacon_parameters *info); | ||
235 | int (*set_beacon)(struct wiphy *wiphy, struct net_device *dev, | ||
236 | struct beacon_parameters *info); | ||
237 | int (*del_beacon)(struct wiphy *wiphy, struct net_device *dev); | ||
238 | |||
239 | |||
240 | int (*add_station)(struct wiphy *wiphy, struct net_device *dev, | ||
241 | u8 *mac, struct station_parameters *params); | ||
242 | int (*del_station)(struct wiphy *wiphy, struct net_device *dev, | ||
243 | u8 *mac); | ||
244 | int (*change_station)(struct wiphy *wiphy, struct net_device *dev, | ||
245 | u8 *mac, struct station_parameters *params); | ||
246 | int (*get_station)(struct wiphy *wiphy, struct net_device *dev, | ||
247 | u8 *mac, struct station_stats *stats); | ||
81 | }; | 248 | }; |
82 | 249 | ||
83 | #endif /* __NET_CFG80211_H */ | 250 | #endif /* __NET_CFG80211_H */ |