cfg80211.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  1. #ifndef __NET_CFG80211_H
  2. #define __NET_CFG80211_H
  3. #include <linux/netlink.h>
  4. #include <linux/skbuff.h>
  5. #include <linux/nl80211.h>
  6. #include <net/genetlink.h>
  7. /* remove once we remove the wext stuff */
  8. #include <net/iw_handler.h>
  9. /*
  10. * 802.11 configuration in-kernel interface
  11. *
  12. * Copyright 2006, 2007 Johannes Berg <johannes@sipsolutions.net>
  13. */
  14. /**
  15. * struct vif_params - describes virtual interface parameters
  16. * @mesh_id: mesh ID to use
  17. * @mesh_id_len: length of the mesh ID
  18. */
  19. struct vif_params {
  20. u8 *mesh_id;
  21. int mesh_id_len;
  22. };
  23. /* Radiotap header iteration
  24. * implemented in net/wireless/radiotap.c
  25. * docs in Documentation/networking/radiotap-headers.txt
  26. */
  27. /**
  28. * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args
  29. * @rtheader: pointer to the radiotap header we are walking through
  30. * @max_length: length of radiotap header in cpu byte ordering
  31. * @this_arg_index: IEEE80211_RADIOTAP_... index of current arg
  32. * @this_arg: pointer to current radiotap arg
  33. * @arg_index: internal next argument index
  34. * @arg: internal next argument pointer
  35. * @next_bitmap: internal pointer to next present u32
  36. * @bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present
  37. */
  38. struct ieee80211_radiotap_iterator {
  39. struct ieee80211_radiotap_header *rtheader;
  40. int max_length;
  41. int this_arg_index;
  42. u8 *this_arg;
  43. int arg_index;
  44. u8 *arg;
  45. __le32 *next_bitmap;
  46. u32 bitmap_shifter;
  47. };
  48. extern int ieee80211_radiotap_iterator_init(
  49. struct ieee80211_radiotap_iterator *iterator,
  50. struct ieee80211_radiotap_header *radiotap_header,
  51. int max_length);
  52. extern int ieee80211_radiotap_iterator_next(
  53. struct ieee80211_radiotap_iterator *iterator);
  54. /**
  55. * struct key_params - key information
  56. *
  57. * Information about a key
  58. *
  59. * @key: key material
  60. * @key_len: length of key material
  61. * @cipher: cipher suite selector
  62. * @seq: sequence counter (IV/PN) for TKIP and CCMP keys, only used
  63. * with the get_key() callback, must be in little endian,
  64. * length given by @seq_len.
  65. */
  66. struct key_params {
  67. u8 *key;
  68. u8 *seq;
  69. int key_len;
  70. int seq_len;
  71. u32 cipher;
  72. };
  73. /**
  74. * struct beacon_parameters - beacon parameters
  75. *
  76. * Used to configure the beacon for an interface.
  77. *
  78. * @head: head portion of beacon (before TIM IE)
  79. * or %NULL if not changed
  80. * @tail: tail portion of beacon (after TIM IE)
  81. * or %NULL if not changed
  82. * @interval: beacon interval or zero if not changed
  83. * @dtim_period: DTIM period or zero if not changed
  84. * @head_len: length of @head
  85. * @tail_len: length of @tail
  86. */
  87. struct beacon_parameters {
  88. u8 *head, *tail;
  89. int interval, dtim_period;
  90. int head_len, tail_len;
  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. * @STATION_FLAG_MFP: station uses management frame protection
  104. */
  105. enum station_flags {
  106. STATION_FLAG_CHANGED = 1<<0,
  107. STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED,
  108. STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE,
  109. STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME,
  110. STATION_FLAG_MFP = 1<<NL80211_STA_FLAG_MFP,
  111. };
  112. /**
  113. * enum plink_action - actions to perform in mesh peers
  114. *
  115. * @PLINK_ACTION_INVALID: action 0 is reserved
  116. * @PLINK_ACTION_OPEN: start mesh peer link establishment
  117. * @PLINK_ACTION_BLOCL: block traffic from this mesh peer
  118. */
  119. enum plink_actions {
  120. PLINK_ACTION_INVALID,
  121. PLINK_ACTION_OPEN,
  122. PLINK_ACTION_BLOCK,
  123. };
  124. /**
  125. * struct station_parameters - station parameters
  126. *
  127. * Used to change and create a new station.
  128. *
  129. * @vlan: vlan interface station should belong to
  130. * @supported_rates: supported rates in IEEE 802.11 format
  131. * (or NULL for no change)
  132. * @supported_rates_len: number of supported rates
  133. * @station_flags: station flags (see &enum station_flags)
  134. * @listen_interval: listen interval or -1 for no change
  135. * @aid: AID or zero for no change
  136. */
  137. struct station_parameters {
  138. u8 *supported_rates;
  139. struct net_device *vlan;
  140. u32 station_flags;
  141. int listen_interval;
  142. u16 aid;
  143. u8 supported_rates_len;
  144. u8 plink_action;
  145. struct ieee80211_ht_cap *ht_capa;
  146. };
  147. /**
  148. * enum station_info_flags - station information flags
  149. *
  150. * Used by the driver to indicate which info in &struct station_info
  151. * it has filled in during get_station() or dump_station().
  152. *
  153. * @STATION_INFO_INACTIVE_TIME: @inactive_time filled
  154. * @STATION_INFO_RX_BYTES: @rx_bytes filled
  155. * @STATION_INFO_TX_BYTES: @tx_bytes filled
  156. * @STATION_INFO_LLID: @llid filled
  157. * @STATION_INFO_PLID: @plid filled
  158. * @STATION_INFO_PLINK_STATE: @plink_state filled
  159. * @STATION_INFO_SIGNAL: @signal filled
  160. * @STATION_INFO_TX_BITRATE: @tx_bitrate fields are filled
  161. * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
  162. */
  163. enum station_info_flags {
  164. STATION_INFO_INACTIVE_TIME = 1<<0,
  165. STATION_INFO_RX_BYTES = 1<<1,
  166. STATION_INFO_TX_BYTES = 1<<2,
  167. STATION_INFO_LLID = 1<<3,
  168. STATION_INFO_PLID = 1<<4,
  169. STATION_INFO_PLINK_STATE = 1<<5,
  170. STATION_INFO_SIGNAL = 1<<6,
  171. STATION_INFO_TX_BITRATE = 1<<7,
  172. };
  173. /**
  174. * enum station_info_rate_flags - bitrate info flags
  175. *
  176. * Used by the driver to indicate the specific rate transmission
  177. * type for 802.11n transmissions.
  178. *
  179. * @RATE_INFO_FLAGS_MCS: @tx_bitrate_mcs filled
  180. * @RATE_INFO_FLAGS_40_MHZ_WIDTH: 40 Mhz width transmission
  181. * @RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval
  182. */
  183. enum rate_info_flags {
  184. RATE_INFO_FLAGS_MCS = 1<<0,
  185. RATE_INFO_FLAGS_40_MHZ_WIDTH = 1<<1,
  186. RATE_INFO_FLAGS_SHORT_GI = 1<<2,
  187. };
  188. /**
  189. * struct rate_info - bitrate information
  190. *
  191. * Information about a receiving or transmitting bitrate
  192. *
  193. * @flags: bitflag of flags from &enum rate_info_flags
  194. * @mcs: mcs index if struct describes a 802.11n bitrate
  195. * @legacy: bitrate in 100kbit/s for 802.11abg
  196. */
  197. struct rate_info {
  198. u8 flags;
  199. u8 mcs;
  200. u16 legacy;
  201. };
  202. /**
  203. * struct station_info - station information
  204. *
  205. * Station information filled by driver for get_station() and dump_station.
  206. *
  207. * @filled: bitflag of flags from &enum station_info_flags
  208. * @inactive_time: time since last station activity (tx/rx) in milliseconds
  209. * @rx_bytes: bytes received from this station
  210. * @tx_bytes: bytes transmitted to this station
  211. * @llid: mesh local link id
  212. * @plid: mesh peer link id
  213. * @plink_state: mesh peer link state
  214. * @signal: signal strength of last received packet in dBm
  215. * @txrate: current unicast bitrate to this station
  216. */
  217. struct station_info {
  218. u32 filled;
  219. u32 inactive_time;
  220. u32 rx_bytes;
  221. u32 tx_bytes;
  222. u16 llid;
  223. u16 plid;
  224. u8 plink_state;
  225. s8 signal;
  226. struct rate_info txrate;
  227. };
  228. /**
  229. * enum monitor_flags - monitor flags
  230. *
  231. * Monitor interface configuration flags. Note that these must be the bits
  232. * according to the nl80211 flags.
  233. *
  234. * @MONITOR_FLAG_FCSFAIL: pass frames with bad FCS
  235. * @MONITOR_FLAG_PLCPFAIL: pass frames with bad PLCP
  236. * @MONITOR_FLAG_CONTROL: pass control frames
  237. * @MONITOR_FLAG_OTHER_BSS: disable BSSID filtering
  238. * @MONITOR_FLAG_COOK_FRAMES: report frames after processing
  239. */
  240. enum monitor_flags {
  241. MONITOR_FLAG_FCSFAIL = 1<<NL80211_MNTR_FLAG_FCSFAIL,
  242. MONITOR_FLAG_PLCPFAIL = 1<<NL80211_MNTR_FLAG_PLCPFAIL,
  243. MONITOR_FLAG_CONTROL = 1<<NL80211_MNTR_FLAG_CONTROL,
  244. MONITOR_FLAG_OTHER_BSS = 1<<NL80211_MNTR_FLAG_OTHER_BSS,
  245. MONITOR_FLAG_COOK_FRAMES = 1<<NL80211_MNTR_FLAG_COOK_FRAMES,
  246. };
  247. /**
  248. * enum mpath_info_flags - mesh path information flags
  249. *
  250. * Used by the driver to indicate which info in &struct mpath_info it has filled
  251. * in during get_station() or dump_station().
  252. *
  253. * MPATH_INFO_FRAME_QLEN: @frame_qlen filled
  254. * MPATH_INFO_DSN: @dsn filled
  255. * MPATH_INFO_METRIC: @metric filled
  256. * MPATH_INFO_EXPTIME: @exptime filled
  257. * MPATH_INFO_DISCOVERY_TIMEOUT: @discovery_timeout filled
  258. * MPATH_INFO_DISCOVERY_RETRIES: @discovery_retries filled
  259. * MPATH_INFO_FLAGS: @flags filled
  260. */
  261. enum mpath_info_flags {
  262. MPATH_INFO_FRAME_QLEN = BIT(0),
  263. MPATH_INFO_DSN = BIT(1),
  264. MPATH_INFO_METRIC = BIT(2),
  265. MPATH_INFO_EXPTIME = BIT(3),
  266. MPATH_INFO_DISCOVERY_TIMEOUT = BIT(4),
  267. MPATH_INFO_DISCOVERY_RETRIES = BIT(5),
  268. MPATH_INFO_FLAGS = BIT(6),
  269. };
  270. /**
  271. * struct mpath_info - mesh path information
  272. *
  273. * Mesh path information filled by driver for get_mpath() and dump_mpath().
  274. *
  275. * @filled: bitfield of flags from &enum mpath_info_flags
  276. * @frame_qlen: number of queued frames for this destination
  277. * @dsn: destination sequence number
  278. * @metric: metric (cost) of this mesh path
  279. * @exptime: expiration time for the mesh path from now, in msecs
  280. * @flags: mesh path flags
  281. * @discovery_timeout: total mesh path discovery timeout, in msecs
  282. * @discovery_retries: mesh path discovery retries
  283. */
  284. struct mpath_info {
  285. u32 filled;
  286. u32 frame_qlen;
  287. u32 dsn;
  288. u32 metric;
  289. u32 exptime;
  290. u32 discovery_timeout;
  291. u8 discovery_retries;
  292. u8 flags;
  293. };
  294. /**
  295. * struct bss_parameters - BSS parameters
  296. *
  297. * Used to change BSS parameters (mainly for AP mode).
  298. *
  299. * @use_cts_prot: Whether to use CTS protection
  300. * (0 = no, 1 = yes, -1 = do not change)
  301. * @use_short_preamble: Whether the use of short preambles is allowed
  302. * (0 = no, 1 = yes, -1 = do not change)
  303. * @use_short_slot_time: Whether the use of short slot time is allowed
  304. * (0 = no, 1 = yes, -1 = do not change)
  305. * @basic_rates: basic rates in IEEE 802.11 format
  306. * (or NULL for no change)
  307. * @basic_rates_len: number of basic rates
  308. */
  309. struct bss_parameters {
  310. int use_cts_prot;
  311. int use_short_preamble;
  312. int use_short_slot_time;
  313. u8 *basic_rates;
  314. u8 basic_rates_len;
  315. };
  316. /**
  317. * enum reg_set_by - Indicates who is trying to set the regulatory domain
  318. * @REGDOM_SET_BY_INIT: regulatory domain was set by initialization. We will be
  319. * using a static world regulatory domain by default.
  320. * @REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world regulatory domain.
  321. * @REGDOM_SET_BY_USER: User asked the wireless core to set the
  322. * regulatory domain.
  323. * @REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the wireless core
  324. * it thinks its knows the regulatory domain we should be in.
  325. * @REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an 802.11 country
  326. * information element with regulatory information it thinks we
  327. * should consider.
  328. */
  329. enum reg_set_by {
  330. REGDOM_SET_BY_INIT,
  331. REGDOM_SET_BY_CORE,
  332. REGDOM_SET_BY_USER,
  333. REGDOM_SET_BY_DRIVER,
  334. REGDOM_SET_BY_COUNTRY_IE,
  335. };
  336. /**
  337. * enum environment_cap - Environment parsed from country IE
  338. * @ENVIRON_ANY: indicates country IE applies to both indoor and
  339. * outdoor operation.
  340. * @ENVIRON_INDOOR: indicates country IE applies only to indoor operation
  341. * @ENVIRON_OUTDOOR: indicates country IE applies only to outdoor operation
  342. */
  343. enum environment_cap {
  344. ENVIRON_ANY,
  345. ENVIRON_INDOOR,
  346. ENVIRON_OUTDOOR,
  347. };
  348. /**
  349. * struct regulatory_request - receipt of last regulatory request
  350. *
  351. * @wiphy: this is set if this request's initiator is
  352. * %REGDOM_SET_BY_COUNTRY_IE or %REGDOM_SET_BY_DRIVER. This
  353. * can be used by the wireless core to deal with conflicts
  354. * and potentially inform users of which devices specifically
  355. * cased the conflicts.
  356. * @initiator: indicates who sent this request, could be any of
  357. * of those set in reg_set_by, %REGDOM_SET_BY_*
  358. * @alpha2: the ISO / IEC 3166 alpha2 country code of the requested
  359. * regulatory domain. We have a few special codes:
  360. * 00 - World regulatory domain
  361. * 99 - built by driver but a specific alpha2 cannot be determined
  362. * 98 - result of an intersection between two regulatory domains
  363. * @intersect: indicates whether the wireless core should intersect
  364. * the requested regulatory domain with the presently set regulatory
  365. * domain.
  366. * @country_ie_checksum: checksum of the last processed and accepted
  367. * country IE
  368. * @country_ie_env: lets us know if the AP is telling us we are outdoor,
  369. * indoor, or if it doesn't matter
  370. */
  371. struct regulatory_request {
  372. struct wiphy *wiphy;
  373. enum reg_set_by initiator;
  374. char alpha2[2];
  375. bool intersect;
  376. u32 country_ie_checksum;
  377. enum environment_cap country_ie_env;
  378. };
  379. struct ieee80211_freq_range {
  380. u32 start_freq_khz;
  381. u32 end_freq_khz;
  382. u32 max_bandwidth_khz;
  383. };
  384. struct ieee80211_power_rule {
  385. u32 max_antenna_gain;
  386. u32 max_eirp;
  387. };
  388. struct ieee80211_reg_rule {
  389. struct ieee80211_freq_range freq_range;
  390. struct ieee80211_power_rule power_rule;
  391. u32 flags;
  392. };
  393. struct ieee80211_regdomain {
  394. u32 n_reg_rules;
  395. char alpha2[2];
  396. struct ieee80211_reg_rule reg_rules[];
  397. };
  398. #define MHZ_TO_KHZ(freq) ((freq) * 1000)
  399. #define KHZ_TO_MHZ(freq) ((freq) / 1000)
  400. #define DBI_TO_MBI(gain) ((gain) * 100)
  401. #define MBI_TO_DBI(gain) ((gain) / 100)
  402. #define DBM_TO_MBM(gain) ((gain) * 100)
  403. #define MBM_TO_DBM(gain) ((gain) / 100)
  404. #define REG_RULE(start, end, bw, gain, eirp, reg_flags) { \
  405. .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \
  406. .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \
  407. .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \
  408. .power_rule.max_antenna_gain = DBI_TO_MBI(gain), \
  409. .power_rule.max_eirp = DBM_TO_MBM(eirp), \
  410. .flags = reg_flags, \
  411. }
  412. struct mesh_config {
  413. /* Timeouts in ms */
  414. /* Mesh plink management parameters */
  415. u16 dot11MeshRetryTimeout;
  416. u16 dot11MeshConfirmTimeout;
  417. u16 dot11MeshHoldingTimeout;
  418. u16 dot11MeshMaxPeerLinks;
  419. u8 dot11MeshMaxRetries;
  420. u8 dot11MeshTTL;
  421. bool auto_open_plinks;
  422. /* HWMP parameters */
  423. u8 dot11MeshHWMPmaxPREQretries;
  424. u32 path_refresh_time;
  425. u16 min_discovery_timeout;
  426. u32 dot11MeshHWMPactivePathTimeout;
  427. u16 dot11MeshHWMPpreqMinInterval;
  428. u16 dot11MeshHWMPnetDiameterTraversalTime;
  429. };
  430. /**
  431. * struct ieee80211_txq_params - TX queue parameters
  432. * @queue: TX queue identifier (NL80211_TXQ_Q_*)
  433. * @txop: Maximum burst time in units of 32 usecs, 0 meaning disabled
  434. * @cwmin: Minimum contention window [a value of the form 2^n-1 in the range
  435. * 1..32767]
  436. * @cwmax: Maximum contention window [a value of the form 2^n-1 in the range
  437. * 1..32767]
  438. * @aifs: Arbitration interframe space [0..255]
  439. */
  440. struct ieee80211_txq_params {
  441. enum nl80211_txq_q queue;
  442. u16 txop;
  443. u16 cwmin;
  444. u16 cwmax;
  445. u8 aifs;
  446. };
  447. /**
  448. * struct mgmt_extra_ie_params - Extra management frame IE parameters
  449. *
  450. * Used to add extra IE(s) into management frames. If the driver cannot add the
  451. * requested data into all management frames of the specified subtype that are
  452. * generated in kernel or firmware/hardware, it must reject the configuration
  453. * call. The IE data buffer is added to the end of the specified management
  454. * frame body after all other IEs. This addition is not applied to frames that
  455. * are injected through a monitor interface.
  456. *
  457. * @subtype: Management frame subtype
  458. * @ies: IE data buffer or %NULL to remove previous data
  459. * @ies_len: Length of @ies in octets
  460. */
  461. struct mgmt_extra_ie_params {
  462. u8 subtype;
  463. u8 *ies;
  464. int ies_len;
  465. };
  466. /* from net/wireless.h */
  467. struct wiphy;
  468. /* from net/ieee80211.h */
  469. struct ieee80211_channel;
  470. /**
  471. * struct cfg80211_ops - backend description for wireless configuration
  472. *
  473. * This struct is registered by fullmac card drivers and/or wireless stacks
  474. * in order to handle configuration requests on their interfaces.
  475. *
  476. * All callbacks except where otherwise noted should return 0
  477. * on success or a negative error code.
  478. *
  479. * All operations are currently invoked under rtnl for consistency with the
  480. * wireless extensions but this is subject to reevaluation as soon as this
  481. * code is used more widely and we have a first user without wext.
  482. *
  483. * @suspend: wiphy device needs to be suspended
  484. * @resume: wiphy device needs to be resumed
  485. *
  486. * @add_virtual_intf: create a new virtual interface with the given name,
  487. * must set the struct wireless_dev's iftype.
  488. *
  489. * @del_virtual_intf: remove the virtual interface determined by ifindex.
  490. *
  491. * @change_virtual_intf: change type/configuration of virtual interface,
  492. * keep the struct wireless_dev's iftype updated.
  493. *
  494. * @add_key: add a key with the given parameters. @mac_addr will be %NULL
  495. * when adding a group key.
  496. *
  497. * @get_key: get information about the key with the given parameters.
  498. * @mac_addr will be %NULL when requesting information for a group
  499. * key. All pointers given to the @callback function need not be valid
  500. * after it returns.
  501. *
  502. * @del_key: remove a key given the @mac_addr (%NULL for a group key)
  503. * and @key_index
  504. *
  505. * @set_default_key: set the default key on an interface
  506. *
  507. * @set_default_mgmt_key: set the default management frame key on an interface
  508. *
  509. * @add_beacon: Add a beacon with given parameters, @head, @interval
  510. * and @dtim_period will be valid, @tail is optional.
  511. * @set_beacon: Change the beacon parameters for an access point mode
  512. * interface. This should reject the call when no beacon has been
  513. * configured.
  514. * @del_beacon: Remove beacon configuration and stop sending the beacon.
  515. *
  516. * @add_station: Add a new station.
  517. *
  518. * @del_station: Remove a station; @mac may be NULL to remove all stations.
  519. *
  520. * @change_station: Modify a given station.
  521. *
  522. * @get_mesh_params: Put the current mesh parameters into *params
  523. *
  524. * @set_mesh_params: Set mesh parameters.
  525. * The mask is a bitfield which tells us which parameters to
  526. * set, and which to leave alone.
  527. *
  528. * @set_mesh_cfg: set mesh parameters (by now, just mesh id)
  529. *
  530. * @change_bss: Modify parameters for a given BSS.
  531. *
  532. * @set_txq_params: Set TX queue parameters
  533. *
  534. * @set_channel: Set channel
  535. *
  536. * @set_mgmt_extra_ie: Set extra IE data for management frames
  537. */
  538. struct cfg80211_ops {
  539. int (*suspend)(struct wiphy *wiphy);
  540. int (*resume)(struct wiphy *wiphy);
  541. int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
  542. enum nl80211_iftype type, u32 *flags,
  543. struct vif_params *params);
  544. int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
  545. int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex,
  546. enum nl80211_iftype type, u32 *flags,
  547. struct vif_params *params);
  548. int (*add_key)(struct wiphy *wiphy, struct net_device *netdev,
  549. u8 key_index, u8 *mac_addr,
  550. struct key_params *params);
  551. int (*get_key)(struct wiphy *wiphy, struct net_device *netdev,
  552. u8 key_index, u8 *mac_addr, void *cookie,
  553. void (*callback)(void *cookie, struct key_params*));
  554. int (*del_key)(struct wiphy *wiphy, struct net_device *netdev,
  555. u8 key_index, u8 *mac_addr);
  556. int (*set_default_key)(struct wiphy *wiphy,
  557. struct net_device *netdev,
  558. u8 key_index);
  559. int (*set_default_mgmt_key)(struct wiphy *wiphy,
  560. struct net_device *netdev,
  561. u8 key_index);
  562. int (*add_beacon)(struct wiphy *wiphy, struct net_device *dev,
  563. struct beacon_parameters *info);
  564. int (*set_beacon)(struct wiphy *wiphy, struct net_device *dev,
  565. struct beacon_parameters *info);
  566. int (*del_beacon)(struct wiphy *wiphy, struct net_device *dev);
  567. int (*add_station)(struct wiphy *wiphy, struct net_device *dev,
  568. u8 *mac, struct station_parameters *params);
  569. int (*del_station)(struct wiphy *wiphy, struct net_device *dev,
  570. u8 *mac);
  571. int (*change_station)(struct wiphy *wiphy, struct net_device *dev,
  572. u8 *mac, struct station_parameters *params);
  573. int (*get_station)(struct wiphy *wiphy, struct net_device *dev,
  574. u8 *mac, struct station_info *sinfo);
  575. int (*dump_station)(struct wiphy *wiphy, struct net_device *dev,
  576. int idx, u8 *mac, struct station_info *sinfo);
  577. int (*add_mpath)(struct wiphy *wiphy, struct net_device *dev,
  578. u8 *dst, u8 *next_hop);
  579. int (*del_mpath)(struct wiphy *wiphy, struct net_device *dev,
  580. u8 *dst);
  581. int (*change_mpath)(struct wiphy *wiphy, struct net_device *dev,
  582. u8 *dst, u8 *next_hop);
  583. int (*get_mpath)(struct wiphy *wiphy, struct net_device *dev,
  584. u8 *dst, u8 *next_hop,
  585. struct mpath_info *pinfo);
  586. int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev,
  587. int idx, u8 *dst, u8 *next_hop,
  588. struct mpath_info *pinfo);
  589. int (*get_mesh_params)(struct wiphy *wiphy,
  590. struct net_device *dev,
  591. struct mesh_config *conf);
  592. int (*set_mesh_params)(struct wiphy *wiphy,
  593. struct net_device *dev,
  594. const struct mesh_config *nconf, u32 mask);
  595. int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
  596. struct bss_parameters *params);
  597. int (*set_txq_params)(struct wiphy *wiphy,
  598. struct ieee80211_txq_params *params);
  599. int (*set_channel)(struct wiphy *wiphy,
  600. struct ieee80211_channel *chan,
  601. enum nl80211_channel_type channel_type);
  602. int (*set_mgmt_extra_ie)(struct wiphy *wiphy,
  603. struct net_device *dev,
  604. struct mgmt_extra_ie_params *params);
  605. };
  606. /* temporary wext handlers */
  607. int cfg80211_wext_giwname(struct net_device *dev,
  608. struct iw_request_info *info,
  609. char *name, char *extra);
  610. int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
  611. u32 *mode, char *extra);
  612. int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info,
  613. u32 *mode, char *extra);
  614. #endif /* __NET_CFG80211_H */