blob: 23c0ab74ded63bfbc9f57a36751872be3e195f77 [file] [log] [blame]
Johannes Berg704232c2007-04-23 12:20:05 -07001#ifndef __NET_CFG80211_H
2#define __NET_CFG80211_H
3
4#include <linux/netlink.h>
5#include <linux/skbuff.h>
Johannes Berg55682962007-09-20 13:09:35 -04006#include <linux/nl80211.h>
Johannes Berg704232c2007-04-23 12:20:05 -07007#include <net/genetlink.h>
Johannes Bergfee52672008-11-26 22:36:31 +01008/* remove once we remove the wext stuff */
9#include <net/iw_handler.h>
Johannes Berg704232c2007-04-23 12:20:05 -070010
11/*
12 * 802.11 configuration in-kernel interface
13 *
Johannes Berg55682962007-09-20 13:09:35 -040014 * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net>
Johannes Berg704232c2007-04-23 12:20:05 -070015 */
16
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +010017/**
18 * struct vif_params - describes virtual interface parameters
19 * @mesh_id: mesh ID to use
20 * @mesh_id_len: length of the mesh ID
21 */
22struct vif_params {
23 u8 *mesh_id;
24 int mesh_id_len;
25};
26
Andy Green179f8312007-07-10 19:29:38 +020027/* Radiotap header iteration
28 * implemented in net/wireless/radiotap.c
29 * docs in Documentation/networking/radiotap-headers.txt
30 */
31/**
32 * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args
33 * @rtheader: pointer to the radiotap header we are walking through
34 * @max_length: length of radiotap header in cpu byte ordering
35 * @this_arg_index: IEEE80211_RADIOTAP_... index of current arg
36 * @this_arg: pointer to current radiotap arg
37 * @arg_index: internal next argument index
38 * @arg: internal next argument pointer
39 * @next_bitmap: internal pointer to next present u32
40 * @bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present
41 */
42
43struct ieee80211_radiotap_iterator {
44 struct ieee80211_radiotap_header *rtheader;
45 int max_length;
46 int this_arg_index;
47 u8 *this_arg;
48
49 int arg_index;
50 u8 *arg;
51 __le32 *next_bitmap;
52 u32 bitmap_shifter;
53};
54
55extern int ieee80211_radiotap_iterator_init(
56 struct ieee80211_radiotap_iterator *iterator,
57 struct ieee80211_radiotap_header *radiotap_header,
58 int max_length);
59
60extern int ieee80211_radiotap_iterator_next(
61 struct ieee80211_radiotap_iterator *iterator);
62
63
Johannes Berg41ade002007-12-19 02:03:29 +010064 /**
65 * struct key_params - key information
66 *
67 * Information about a key
68 *
69 * @key: key material
70 * @key_len: length of key material
71 * @cipher: cipher suite selector
72 * @seq: sequence counter (IV/PN) for TKIP and CCMP keys, only used
73 * with the get_key() callback, must be in little endian,
74 * length given by @seq_len.
75 */
76struct key_params {
77 u8 *key;
78 u8 *seq;
79 int key_len;
80 int seq_len;
81 u32 cipher;
82};
83
Johannes Berged1b6cc2007-12-19 02:03:32 +010084/**
85 * struct beacon_parameters - beacon parameters
86 *
87 * Used to configure the beacon for an interface.
88 *
89 * @head: head portion of beacon (before TIM IE)
90 * or %NULL if not changed
91 * @tail: tail portion of beacon (after TIM IE)
92 * or %NULL if not changed
93 * @interval: beacon interval or zero if not changed
94 * @dtim_period: DTIM period or zero if not changed
95 * @head_len: length of @head
96 * @tail_len: length of @tail
97 */
98struct beacon_parameters {
99 u8 *head, *tail;
100 int interval, dtim_period;
101 int head_len, tail_len;
102};
103
Johannes Berg5727ef12007-12-19 02:03:34 +0100104/**
105 * enum station_flags - station flags
106 *
107 * Station capability flags. Note that these must be the bits
108 * according to the nl80211 flags.
109 *
110 * @STATION_FLAG_CHANGED: station flags were changed
111 * @STATION_FLAG_AUTHORIZED: station is authorized to send frames (802.1X)
112 * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames
113 * with short preambles
114 * @STATION_FLAG_WME: station is WME/QoS capable
115 */
116enum station_flags {
117 STATION_FLAG_CHANGED = 1<<0,
118 STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED,
119 STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE,
120 STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME,
121};
122
123/**
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100124 * enum plink_action - actions to perform in mesh peers
125 *
126 * @PLINK_ACTION_INVALID: action 0 is reserved
127 * @PLINK_ACTION_OPEN: start mesh peer link establishment
128 * @PLINK_ACTION_BLOCL: block traffic from this mesh peer
129 */
130enum plink_actions {
131 PLINK_ACTION_INVALID,
132 PLINK_ACTION_OPEN,
133 PLINK_ACTION_BLOCK,
134};
135
136/**
Johannes Berg5727ef12007-12-19 02:03:34 +0100137 * struct station_parameters - station parameters
138 *
139 * Used to change and create a new station.
140 *
141 * @vlan: vlan interface station should belong to
142 * @supported_rates: supported rates in IEEE 802.11 format
143 * (or NULL for no change)
144 * @supported_rates_len: number of supported rates
145 * @station_flags: station flags (see &enum station_flags)
146 * @listen_interval: listen interval or -1 for no change
147 * @aid: AID or zero for no change
148 */
149struct station_parameters {
150 u8 *supported_rates;
151 struct net_device *vlan;
152 u32 station_flags;
153 int listen_interval;
154 u16 aid;
155 u8 supported_rates_len;
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100156 u8 plink_action;
Jouni Malinen36aedc92008-08-25 11:58:58 +0300157 struct ieee80211_ht_cap *ht_capa;
Johannes Berg5727ef12007-12-19 02:03:34 +0100158};
159
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100160/**
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100161 * enum station_info_flags - station information flags
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100162 *
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100163 * Used by the driver to indicate which info in &struct station_info
164 * it has filled in during get_station() or dump_station().
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100165 *
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100166 * @STATION_INFO_INACTIVE_TIME: @inactive_time filled
167 * @STATION_INFO_RX_BYTES: @rx_bytes filled
168 * @STATION_INFO_TX_BYTES: @tx_bytes filled
169 * @STATION_INFO_LLID: @llid filled
170 * @STATION_INFO_PLID: @plid filled
171 * @STATION_INFO_PLINK_STATE: @plink_state filled
Henning Rogge420e7fa2008-12-11 22:04:19 +0100172 * @STATION_INFO_SIGNAL: @signal filled
173 * @STATION_INFO_TX_BITRATE: @tx_bitrate fields are filled
174 * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100175 */
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100176enum station_info_flags {
177 STATION_INFO_INACTIVE_TIME = 1<<0,
178 STATION_INFO_RX_BYTES = 1<<1,
179 STATION_INFO_TX_BYTES = 1<<2,
180 STATION_INFO_LLID = 1<<3,
181 STATION_INFO_PLID = 1<<4,
182 STATION_INFO_PLINK_STATE = 1<<5,
Henning Rogge420e7fa2008-12-11 22:04:19 +0100183 STATION_INFO_SIGNAL = 1<<6,
184 STATION_INFO_TX_BITRATE = 1<<7,
185};
186
187/**
188 * enum station_info_rate_flags - bitrate info flags
189 *
190 * Used by the driver to indicate the specific rate transmission
191 * type for 802.11n transmissions.
192 *
193 * @RATE_INFO_FLAGS_MCS: @tx_bitrate_mcs filled
194 * @RATE_INFO_FLAGS_40_MHZ_WIDTH: 40 Mhz width transmission
195 * @RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval
196 */
197enum rate_info_flags {
198 RATE_INFO_FLAGS_MCS = 1<<0,
199 RATE_INFO_FLAGS_40_MHZ_WIDTH = 1<<1,
200 RATE_INFO_FLAGS_SHORT_GI = 1<<2,
201};
202
203/**
204 * struct rate_info - bitrate information
205 *
206 * Information about a receiving or transmitting bitrate
207 *
208 * @flags: bitflag of flags from &enum rate_info_flags
209 * @mcs: mcs index if struct describes a 802.11n bitrate
210 * @legacy: bitrate in 100kbit/s for 802.11abg
211 */
212struct rate_info {
213 u8 flags;
214 u8 mcs;
215 u16 legacy;
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100216};
217
218/**
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100219 * struct station_info - station information
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100220 *
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100221 * Station information filled by driver for get_station() and dump_station.
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100222 *
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100223 * @filled: bitflag of flags from &enum station_info_flags
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100224 * @inactive_time: time since last station activity (tx/rx) in milliseconds
225 * @rx_bytes: bytes received from this station
226 * @tx_bytes: bytes transmitted to this station
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100227 * @llid: mesh local link id
228 * @plid: mesh peer link id
229 * @plink_state: mesh peer link state
Henning Rogge420e7fa2008-12-11 22:04:19 +0100230 * @signal: signal strength of last received packet in dBm
231 * @txrate: current unicast bitrate to this station
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100232 */
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100233struct station_info {
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100234 u32 filled;
235 u32 inactive_time;
236 u32 rx_bytes;
237 u32 tx_bytes;
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100238 u16 llid;
239 u16 plid;
240 u8 plink_state;
Henning Rogge420e7fa2008-12-11 22:04:19 +0100241 s8 signal;
242 struct rate_info txrate;
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100243};
244
Michael Wu66f7ac52008-01-31 19:48:22 +0100245/**
246 * enum monitor_flags - monitor flags
247 *
248 * Monitor interface configuration flags. Note that these must be the bits
249 * according to the nl80211 flags.
250 *
251 * @MONITOR_FLAG_FCSFAIL: pass frames with bad FCS
252 * @MONITOR_FLAG_PLCPFAIL: pass frames with bad PLCP
253 * @MONITOR_FLAG_CONTROL: pass control frames
254 * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering
255 * @MONITOR_FLAG_COOK_FRAMES: report frames after processing
256 */
257enum monitor_flags {
258 MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL,
259 MONITOR_FLAG_PLCPFAIL = 1<<NL80211_MNTR_FLAG_PLCPFAIL,
260 MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL,
261 MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS,
262 MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES,
263};
264
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100265/**
266 * enum mpath_info_flags - mesh path information flags
267 *
268 * Used by the driver to indicate which info in &struct mpath_info it has filled
269 * in during get_station() or dump_station().
270 *
271 * MPATH_INFO_FRAME_QLEN: @frame_qlen filled
272 * MPATH_INFO_DSN: @dsn filled
273 * MPATH_INFO_METRIC: @metric filled
274 * MPATH_INFO_EXPTIME: @exptime filled
275 * MPATH_INFO_DISCOVERY_TIMEOUT: @discovery_timeout filled
276 * MPATH_INFO_DISCOVERY_RETRIES: @discovery_retries filled
277 * MPATH_INFO_FLAGS: @flags filled
278 */
279enum mpath_info_flags {
280 MPATH_INFO_FRAME_QLEN = BIT(0),
281 MPATH_INFO_DSN = BIT(1),
282 MPATH_INFO_METRIC = BIT(2),
283 MPATH_INFO_EXPTIME = BIT(3),
284 MPATH_INFO_DISCOVERY_TIMEOUT = BIT(4),
285 MPATH_INFO_DISCOVERY_RETRIES = BIT(5),
286 MPATH_INFO_FLAGS = BIT(6),
287};
288
289/**
290 * struct mpath_info - mesh path information
291 *
292 * Mesh path information filled by driver for get_mpath() and dump_mpath().
293 *
294 * @filled: bitfield of flags from &enum mpath_info_flags
295 * @frame_qlen: number of queued frames for this destination
296 * @dsn: destination sequence number
297 * @metric: metric (cost) of this mesh path
298 * @exptime: expiration time for the mesh path from now, in msecs
299 * @flags: mesh path flags
300 * @discovery_timeout: total mesh path discovery timeout, in msecs
301 * @discovery_retries: mesh path discovery retries
302 */
303struct mpath_info {
304 u32 filled;
305 u32 frame_qlen;
306 u32 dsn;
307 u32 metric;
308 u32 exptime;
309 u32 discovery_timeout;
310 u8 discovery_retries;
311 u8 flags;
312};
313
Jouni Malinen9f1ba902008-08-07 20:07:01 +0300314/**
315 * struct bss_parameters - BSS parameters
316 *
317 * Used to change BSS parameters (mainly for AP mode).
318 *
319 * @use_cts_prot: Whether to use CTS protection
320 * (0 = no, 1 = yes, -1 = do not change)
321 * @use_short_preamble: Whether the use of short preambles is allowed
322 * (0 = no, 1 = yes, -1 = do not change)
323 * @use_short_slot_time: Whether the use of short slot time is allowed
324 * (0 = no, 1 = yes, -1 = do not change)
Jouni Malinen90c97a02008-10-30 16:59:22 +0200325 * @basic_rates: basic rates in IEEE 802.11 format
326 * (or NULL for no change)
327 * @basic_rates_len: number of basic rates
Jouni Malinen9f1ba902008-08-07 20:07:01 +0300328 */
329struct bss_parameters {
330 int use_cts_prot;
331 int use_short_preamble;
332 int use_short_slot_time;
Jouni Malinen90c97a02008-10-30 16:59:22 +0200333 u8 *basic_rates;
334 u8 basic_rates_len;
Jouni Malinen9f1ba902008-08-07 20:07:01 +0300335};
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100336
Luis R. Rodriguezb2e1b302008-09-09 23:19:48 -0700337/**
338 * enum reg_set_by - Indicates who is trying to set the regulatory domain
339 * @REGDOM_SET_BY_INIT: regulatory domain was set by initialization. We will be
340 * using a static world regulatory domain by default.
341 * @REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world regulatory domain.
342 * @REGDOM_SET_BY_USER: User asked the wireless core to set the
343 * regulatory domain.
344 * @REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the wireless core
345 * it thinks its knows the regulatory domain we should be in.
346 * @REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an 802.11 country
347 * information element with regulatory information it thinks we
348 * should consider.
349 */
350enum reg_set_by {
351 REGDOM_SET_BY_INIT,
352 REGDOM_SET_BY_CORE,
353 REGDOM_SET_BY_USER,
354 REGDOM_SET_BY_DRIVER,
355 REGDOM_SET_BY_COUNTRY_IE,
356};
357
358struct ieee80211_freq_range {
359 u32 start_freq_khz;
360 u32 end_freq_khz;
361 u32 max_bandwidth_khz;
362};
363
364struct ieee80211_power_rule {
365 u32 max_antenna_gain;
366 u32 max_eirp;
367};
368
369struct ieee80211_reg_rule {
370 struct ieee80211_freq_range freq_range;
371 struct ieee80211_power_rule power_rule;
372 u32 flags;
373};
374
375struct ieee80211_regdomain {
376 u32 n_reg_rules;
377 char alpha2[2];
378 struct ieee80211_reg_rule reg_rules[];
379};
380
Luis R. Rodriguezb219cee2008-10-30 13:33:55 -0700381#define MHZ_TO_KHZ(freq) ((freq) * 1000)
382#define KHZ_TO_MHZ(freq) ((freq) / 1000)
383#define DBI_TO_MBI(gain) ((gain) * 100)
384#define MBI_TO_DBI(gain) ((gain) / 100)
385#define DBM_TO_MBM(gain) ((gain) * 100)
386#define MBM_TO_DBM(gain) ((gain) / 100)
Luis R. Rodriguezb2e1b302008-09-09 23:19:48 -0700387
388#define REG_RULE(start, end, bw, gain, eirp, reg_flags) { \
Luis R. Rodriguezb219cee2008-10-30 13:33:55 -0700389 .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \
390 .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \
391 .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \
392 .power_rule.max_antenna_gain = DBI_TO_MBI(gain), \
393 .power_rule.max_eirp = DBM_TO_MBM(eirp), \
Luis R. Rodriguezb2e1b302008-09-09 23:19:48 -0700394 .flags = reg_flags, \
395 }
396
colin@cozybit.com93da9cc2008-10-21 12:03:48 -0700397struct mesh_config {
398 /* Timeouts in ms */
399 /* Mesh plink management parameters */
400 u16 dot11MeshRetryTimeout;
401 u16 dot11MeshConfirmTimeout;
402 u16 dot11MeshHoldingTimeout;
403 u16 dot11MeshMaxPeerLinks;
404 u8 dot11MeshMaxRetries;
405 u8 dot11MeshTTL;
406 bool auto_open_plinks;
407 /* HWMP parameters */
408 u8 dot11MeshHWMPmaxPREQretries;
409 u32 path_refresh_time;
410 u16 min_discovery_timeout;
411 u32 dot11MeshHWMPactivePathTimeout;
412 u16 dot11MeshHWMPpreqMinInterval;
413 u16 dot11MeshHWMPnetDiameterTraversalTime;
414};
415
Jouni Malinen31888482008-10-30 16:59:24 +0200416/**
417 * struct ieee80211_txq_params - TX queue parameters
418 * @queue: TX queue identifier (NL80211_TXQ_Q_*)
419 * @txop: Maximum burst time in units of 32 usecs, 0 meaning disabled
420 * @cwmin: Minimum contention window [a value of the form 2^n-1 in the range
421 * 1..32767]
422 * @cwmax: Maximum contention window [a value of the form 2^n-1 in the range
423 * 1..32767]
424 * @aifs: Arbitration interframe space [0..255]
425 */
426struct ieee80211_txq_params {
427 enum nl80211_txq_q queue;
428 u16 txop;
429 u16 cwmin;
430 u16 cwmax;
431 u8 aifs;
432};
433
Johannes Berg704232c2007-04-23 12:20:05 -0700434/* from net/wireless.h */
435struct wiphy;
436
Jouni Malinen72bdcf32008-11-26 16:15:24 +0200437/* from net/ieee80211.h */
438struct ieee80211_channel;
439
Johannes Berg704232c2007-04-23 12:20:05 -0700440/**
441 * struct cfg80211_ops - backend description for wireless configuration
442 *
443 * This struct is registered by fullmac card drivers and/or wireless stacks
444 * in order to handle configuration requests on their interfaces.
445 *
446 * All callbacks except where otherwise noted should return 0
447 * on success or a negative error code.
448 *
Johannes Berg43fb45cb2007-04-24 14:07:27 -0700449 * All operations are currently invoked under rtnl for consistency with the
450 * wireless extensions but this is subject to reevaluation as soon as this
451 * code is used more widely and we have a first user without wext.
452 *
Johannes Berg60719ff2008-09-16 14:55:09 +0200453 * @add_virtual_intf: create a new virtual interface with the given name,
454 * must set the struct wireless_dev's iftype.
Johannes Berg704232c2007-04-23 12:20:05 -0700455 *
456 * @del_virtual_intf: remove the virtual interface determined by ifindex.
Johannes Berg55682962007-09-20 13:09:35 -0400457 *
Johannes Berg60719ff2008-09-16 14:55:09 +0200458 * @change_virtual_intf: change type/configuration of virtual interface,
459 * keep the struct wireless_dev's iftype updated.
Johannes Berg55682962007-09-20 13:09:35 -0400460 *
Johannes Berg41ade002007-12-19 02:03:29 +0100461 * @add_key: add a key with the given parameters. @mac_addr will be %NULL
462 * when adding a group key.
463 *
464 * @get_key: get information about the key with the given parameters.
465 * @mac_addr will be %NULL when requesting information for a group
466 * key. All pointers given to the @callback function need not be valid
467 * after it returns.
468 *
469 * @del_key: remove a key given the @mac_addr (%NULL for a group key)
470 * and @key_index
471 *
472 * @set_default_key: set the default key on an interface
Johannes Berged1b6cc2007-12-19 02:03:32 +0100473 *
474 * @add_beacon: Add a beacon with given parameters, @head, @interval
475 * and @dtim_period will be valid, @tail is optional.
476 * @set_beacon: Change the beacon parameters for an access point mode
477 * interface. This should reject the call when no beacon has been
478 * configured.
479 * @del_beacon: Remove beacon configuration and stop sending the beacon.
Johannes Berg5727ef12007-12-19 02:03:34 +0100480 *
481 * @add_station: Add a new station.
482 *
483 * @del_station: Remove a station; @mac may be NULL to remove all stations.
484 *
485 * @change_station: Modify a given station.
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100486 *
colin@cozybit.com93da9cc2008-10-21 12:03:48 -0700487 * @get_mesh_params: Put the current mesh parameters into *params
488 *
489 * @set_mesh_params: Set mesh parameters.
490 * The mask is a bitfield which tells us which parameters to
491 * set, and which to leave alone.
492 *
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100493 * @set_mesh_cfg: set mesh parameters (by now, just mesh id)
Jouni Malinen9f1ba902008-08-07 20:07:01 +0300494 *
495 * @change_bss: Modify parameters for a given BSS.
Jouni Malinen31888482008-10-30 16:59:24 +0200496 *
497 * @set_txq_params: Set TX queue parameters
Jouni Malinen72bdcf32008-11-26 16:15:24 +0200498 *
499 * @set_channel: Set channel
Johannes Berg704232c2007-04-23 12:20:05 -0700500 */
501struct cfg80211_ops {
502 int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100503 enum nl80211_iftype type, u32 *flags,
504 struct vif_params *params);
Johannes Berg704232c2007-04-23 12:20:05 -0700505 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
Johannes Berg55682962007-09-20 13:09:35 -0400506 int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex,
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100507 enum nl80211_iftype type, u32 *flags,
508 struct vif_params *params);
Johannes Berg41ade002007-12-19 02:03:29 +0100509
510 int (*add_key)(struct wiphy *wiphy, struct net_device *netdev,
511 u8 key_index, u8 *mac_addr,
512 struct key_params *params);
513 int (*get_key)(struct wiphy *wiphy, struct net_device *netdev,
514 u8 key_index, u8 *mac_addr, void *cookie,
515 void (*callback)(void *cookie, struct key_params*));
516 int (*del_key)(struct wiphy *wiphy, struct net_device *netdev,
517 u8 key_index, u8 *mac_addr);
518 int (*set_default_key)(struct wiphy *wiphy,
519 struct net_device *netdev,
520 u8 key_index);
Johannes Berged1b6cc2007-12-19 02:03:32 +0100521
522 int (*add_beacon)(struct wiphy *wiphy, struct net_device *dev,
523 struct beacon_parameters *info);
524 int (*set_beacon)(struct wiphy *wiphy, struct net_device *dev,
525 struct beacon_parameters *info);
526 int (*del_beacon)(struct wiphy *wiphy, struct net_device *dev);
Johannes Berg5727ef12007-12-19 02:03:34 +0100527
528
529 int (*add_station)(struct wiphy *wiphy, struct net_device *dev,
530 u8 *mac, struct station_parameters *params);
531 int (*del_station)(struct wiphy *wiphy, struct net_device *dev,
532 u8 *mac);
533 int (*change_station)(struct wiphy *wiphy, struct net_device *dev,
534 u8 *mac, struct station_parameters *params);
Johannes Bergfd5b74d2007-12-19 02:03:36 +0100535 int (*get_station)(struct wiphy *wiphy, struct net_device *dev,
Luis Carlos Cobo2ec600d2008-02-23 15:17:06 +0100536 u8 *mac, struct station_info *sinfo);
537 int (*dump_station)(struct wiphy *wiphy, struct net_device *dev,
538 int idx, u8 *mac, struct station_info *sinfo);
539
540 int (*add_mpath)(struct wiphy *wiphy, struct net_device *dev,
541 u8 *dst, u8 *next_hop);
542 int (*del_mpath)(struct wiphy *wiphy, struct net_device *dev,
543 u8 *dst);
544 int (*change_mpath)(struct wiphy *wiphy, struct net_device *dev,
545 u8 *dst, u8 *next_hop);
546 int (*get_mpath)(struct wiphy *wiphy, struct net_device *dev,
547 u8 *dst, u8 *next_hop,
548 struct mpath_info *pinfo);
549 int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev,
550 int idx, u8 *dst, u8 *next_hop,
551 struct mpath_info *pinfo);
colin@cozybit.com93da9cc2008-10-21 12:03:48 -0700552 int (*get_mesh_params)(struct wiphy *wiphy,
553 struct net_device *dev,
554 struct mesh_config *conf);
555 int (*set_mesh_params)(struct wiphy *wiphy,
556 struct net_device *dev,
557 const struct mesh_config *nconf, u32 mask);
Jouni Malinen9f1ba902008-08-07 20:07:01 +0300558 int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
559 struct bss_parameters *params);
Jouni Malinen31888482008-10-30 16:59:24 +0200560
561 int (*set_txq_params)(struct wiphy *wiphy,
562 struct ieee80211_txq_params *params);
Jouni Malinen72bdcf32008-11-26 16:15:24 +0200563
564 int (*set_channel)(struct wiphy *wiphy,
565 struct ieee80211_channel *chan,
Sujith094d05d2008-12-12 11:57:43 +0530566 enum nl80211_channel_type channel_type);
Johannes Berg704232c2007-04-23 12:20:05 -0700567};
568
Johannes Bergfee52672008-11-26 22:36:31 +0100569/* temporary wext handlers */
570int cfg80211_wext_giwname(struct net_device *dev,
571 struct iw_request_info *info,
572 char *name, char *extra);
Johannes Berge60c7742008-11-26 23:31:40 +0100573int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
574 u32 *mode, char *extra);
575int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info,
576 u32 *mode, char *extra);
Johannes Bergfee52672008-11-26 22:36:31 +0100577
Johannes Berg704232c2007-04-23 12:20:05 -0700578#endif /* __NET_CFG80211_H */