diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-05-08 21:29:27 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-05-08 21:29:27 -0400 |
commit | d585a021c0b10b0477d6b608c53e1feb8cde0507 (patch) | |
tree | 5ca059da1db7f15d4b29427644ad9c08270c885c /include/net/cfg80211.h | |
parent | 84e5b0d00f8f84c4ae226be131d4bebbcee88bd3 (diff) | |
parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) |
Merge commit 'v2.6.30-rc5' into next
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 417 |
1 files changed, 400 insertions, 17 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 23c0ab74ded6..5389afdc1297 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -4,6 +4,10 @@ | |||
4 | #include <linux/netlink.h> | 4 | #include <linux/netlink.h> |
5 | #include <linux/skbuff.h> | 5 | #include <linux/skbuff.h> |
6 | #include <linux/nl80211.h> | 6 | #include <linux/nl80211.h> |
7 | #include <linux/if_ether.h> | ||
8 | #include <linux/ieee80211.h> | ||
9 | #include <linux/wireless.h> | ||
10 | #include <net/iw_handler.h> | ||
7 | #include <net/genetlink.h> | 11 | #include <net/genetlink.h> |
8 | /* remove once we remove the wext stuff */ | 12 | /* remove once we remove the wext stuff */ |
9 | #include <net/iw_handler.h> | 13 | #include <net/iw_handler.h> |
@@ -112,12 +116,14 @@ struct beacon_parameters { | |||
112 | * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | 116 | * @STATION_FLAG_SHORT_PREAMBLE: station is capable of receiving frames |
113 | * with short preambles | 117 | * with short preambles |
114 | * @STATION_FLAG_WME: station is WME/QoS capable | 118 | * @STATION_FLAG_WME: station is WME/QoS capable |
119 | * @STATION_FLAG_MFP: station uses management frame protection | ||
115 | */ | 120 | */ |
116 | enum station_flags { | 121 | enum station_flags { |
117 | STATION_FLAG_CHANGED = 1<<0, | 122 | STATION_FLAG_CHANGED = 1<<0, |
118 | STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED, | 123 | STATION_FLAG_AUTHORIZED = 1<<NL80211_STA_FLAG_AUTHORIZED, |
119 | STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE, | 124 | STATION_FLAG_SHORT_PREAMBLE = 1<<NL80211_STA_FLAG_SHORT_PREAMBLE, |
120 | STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME, | 125 | STATION_FLAG_WME = 1<<NL80211_STA_FLAG_WME, |
126 | STATION_FLAG_MFP = 1<<NL80211_STA_FLAG_MFP, | ||
121 | }; | 127 | }; |
122 | 128 | ||
123 | /** | 129 | /** |
@@ -172,6 +178,8 @@ struct station_parameters { | |||
172 | * @STATION_INFO_SIGNAL: @signal filled | 178 | * @STATION_INFO_SIGNAL: @signal filled |
173 | * @STATION_INFO_TX_BITRATE: @tx_bitrate fields are filled | 179 | * @STATION_INFO_TX_BITRATE: @tx_bitrate fields are filled |
174 | * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) | 180 | * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) |
181 | * @STATION_INFO_RX_PACKETS: @rx_packets filled | ||
182 | * @STATION_INFO_TX_PACKETS: @tx_packets filled | ||
175 | */ | 183 | */ |
176 | enum station_info_flags { | 184 | enum station_info_flags { |
177 | STATION_INFO_INACTIVE_TIME = 1<<0, | 185 | STATION_INFO_INACTIVE_TIME = 1<<0, |
@@ -182,6 +190,8 @@ enum station_info_flags { | |||
182 | STATION_INFO_PLINK_STATE = 1<<5, | 190 | STATION_INFO_PLINK_STATE = 1<<5, |
183 | STATION_INFO_SIGNAL = 1<<6, | 191 | STATION_INFO_SIGNAL = 1<<6, |
184 | STATION_INFO_TX_BITRATE = 1<<7, | 192 | STATION_INFO_TX_BITRATE = 1<<7, |
193 | STATION_INFO_RX_PACKETS = 1<<8, | ||
194 | STATION_INFO_TX_PACKETS = 1<<9, | ||
185 | }; | 195 | }; |
186 | 196 | ||
187 | /** | 197 | /** |
@@ -229,6 +239,8 @@ struct rate_info { | |||
229 | * @plink_state: mesh peer link state | 239 | * @plink_state: mesh peer link state |
230 | * @signal: signal strength of last received packet in dBm | 240 | * @signal: signal strength of last received packet in dBm |
231 | * @txrate: current unicast bitrate to this station | 241 | * @txrate: current unicast bitrate to this station |
242 | * @rx_packets: packets received from this station | ||
243 | * @tx_packets: packets transmitted to this station | ||
232 | */ | 244 | */ |
233 | struct station_info { | 245 | struct station_info { |
234 | u32 filled; | 246 | u32 filled; |
@@ -240,6 +252,8 @@ struct station_info { | |||
240 | u8 plink_state; | 252 | u8 plink_state; |
241 | s8 signal; | 253 | s8 signal; |
242 | struct rate_info txrate; | 254 | struct rate_info txrate; |
255 | u32 rx_packets; | ||
256 | u32 tx_packets; | ||
243 | }; | 257 | }; |
244 | 258 | ||
245 | /** | 259 | /** |
@@ -335,24 +349,50 @@ struct bss_parameters { | |||
335 | }; | 349 | }; |
336 | 350 | ||
337 | /** | 351 | /** |
338 | * enum reg_set_by - Indicates who is trying to set the regulatory domain | 352 | * enum environment_cap - Environment parsed from country IE |
339 | * @REGDOM_SET_BY_INIT: regulatory domain was set by initialization. We will be | 353 | * @ENVIRON_ANY: indicates country IE applies to both indoor and |
340 | * using a static world regulatory domain by default. | 354 | * outdoor operation. |
341 | * @REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world regulatory domain. | 355 | * @ENVIRON_INDOOR: indicates country IE applies only to indoor operation |
342 | * @REGDOM_SET_BY_USER: User asked the wireless core to set the | 356 | * @ENVIRON_OUTDOOR: indicates country IE applies only to outdoor operation |
343 | * regulatory domain. | 357 | */ |
344 | * @REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the wireless core | 358 | enum environment_cap { |
345 | * it thinks its knows the regulatory domain we should be in. | 359 | ENVIRON_ANY, |
346 | * @REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an 802.11 country | 360 | ENVIRON_INDOOR, |
347 | * information element with regulatory information it thinks we | 361 | ENVIRON_OUTDOOR, |
348 | * should consider. | 362 | }; |
363 | |||
364 | /** | ||
365 | * struct regulatory_request - used to keep track of regulatory requests | ||
366 | * | ||
367 | * @wiphy_idx: this is set if this request's initiator is | ||
368 | * %REGDOM_SET_BY_COUNTRY_IE or %REGDOM_SET_BY_DRIVER. This | ||
369 | * can be used by the wireless core to deal with conflicts | ||
370 | * and potentially inform users of which devices specifically | ||
371 | * cased the conflicts. | ||
372 | * @initiator: indicates who sent this request, could be any of | ||
373 | * of those set in nl80211_reg_initiator (%NL80211_REGDOM_SET_BY_*) | ||
374 | * @alpha2: the ISO / IEC 3166 alpha2 country code of the requested | ||
375 | * regulatory domain. We have a few special codes: | ||
376 | * 00 - World regulatory domain | ||
377 | * 99 - built by driver but a specific alpha2 cannot be determined | ||
378 | * 98 - result of an intersection between two regulatory domains | ||
379 | * @intersect: indicates whether the wireless core should intersect | ||
380 | * the requested regulatory domain with the presently set regulatory | ||
381 | * domain. | ||
382 | * @country_ie_checksum: checksum of the last processed and accepted | ||
383 | * country IE | ||
384 | * @country_ie_env: lets us know if the AP is telling us we are outdoor, | ||
385 | * indoor, or if it doesn't matter | ||
386 | * @list: used to insert into the reg_requests_list linked list | ||
349 | */ | 387 | */ |
350 | enum reg_set_by { | 388 | struct regulatory_request { |
351 | REGDOM_SET_BY_INIT, | 389 | int wiphy_idx; |
352 | REGDOM_SET_BY_CORE, | 390 | enum nl80211_reg_initiator initiator; |
353 | REGDOM_SET_BY_USER, | 391 | char alpha2[2]; |
354 | REGDOM_SET_BY_DRIVER, | 392 | bool intersect; |
355 | REGDOM_SET_BY_COUNTRY_IE, | 393 | u32 country_ie_checksum; |
394 | enum environment_cap country_ie_env; | ||
395 | struct list_head list; | ||
356 | }; | 396 | }; |
357 | 397 | ||
358 | struct ieee80211_freq_range { | 398 | struct ieee80211_freq_range { |
@@ -438,6 +478,187 @@ struct wiphy; | |||
438 | struct ieee80211_channel; | 478 | struct ieee80211_channel; |
439 | 479 | ||
440 | /** | 480 | /** |
481 | * struct cfg80211_ssid - SSID description | ||
482 | * @ssid: the SSID | ||
483 | * @ssid_len: length of the ssid | ||
484 | */ | ||
485 | struct cfg80211_ssid { | ||
486 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | ||
487 | u8 ssid_len; | ||
488 | }; | ||
489 | |||
490 | /** | ||
491 | * struct cfg80211_scan_request - scan request description | ||
492 | * | ||
493 | * @ssids: SSIDs to scan for (active scan only) | ||
494 | * @n_ssids: number of SSIDs | ||
495 | * @channels: channels to scan on. | ||
496 | * @n_channels: number of channels for each band | ||
497 | * @ie: optional information element(s) to add into Probe Request or %NULL | ||
498 | * @ie_len: length of ie in octets | ||
499 | * @wiphy: the wiphy this was for | ||
500 | * @ifidx: the interface index | ||
501 | */ | ||
502 | struct cfg80211_scan_request { | ||
503 | struct cfg80211_ssid *ssids; | ||
504 | int n_ssids; | ||
505 | struct ieee80211_channel **channels; | ||
506 | u32 n_channels; | ||
507 | u8 *ie; | ||
508 | size_t ie_len; | ||
509 | |||
510 | /* internal */ | ||
511 | struct wiphy *wiphy; | ||
512 | int ifidx; | ||
513 | }; | ||
514 | |||
515 | /** | ||
516 | * enum cfg80211_signal_type - signal type | ||
517 | * | ||
518 | * @CFG80211_SIGNAL_TYPE_NONE: no signal strength information available | ||
519 | * @CFG80211_SIGNAL_TYPE_MBM: signal strength in mBm (100*dBm) | ||
520 | * @CFG80211_SIGNAL_TYPE_UNSPEC: signal strength, increasing from 0 through 100 | ||
521 | */ | ||
522 | enum cfg80211_signal_type { | ||
523 | CFG80211_SIGNAL_TYPE_NONE, | ||
524 | CFG80211_SIGNAL_TYPE_MBM, | ||
525 | CFG80211_SIGNAL_TYPE_UNSPEC, | ||
526 | }; | ||
527 | |||
528 | /** | ||
529 | * struct cfg80211_bss - BSS description | ||
530 | * | ||
531 | * This structure describes a BSS (which may also be a mesh network) | ||
532 | * for use in scan results and similar. | ||
533 | * | ||
534 | * @bssid: BSSID of the BSS | ||
535 | * @tsf: timestamp of last received update | ||
536 | * @beacon_interval: the beacon interval as from the frame | ||
537 | * @capability: the capability field in host byte order | ||
538 | * @information_elements: the information elements (Note that there | ||
539 | * is no guarantee that these are well-formed!) | ||
540 | * @len_information_elements: total length of the information elements | ||
541 | * @signal: signal strength value (type depends on the wiphy's signal_type) | ||
542 | * @hold: BSS should not expire | ||
543 | * @free_priv: function pointer to free private data | ||
544 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes | ||
545 | */ | ||
546 | struct cfg80211_bss { | ||
547 | struct ieee80211_channel *channel; | ||
548 | |||
549 | u8 bssid[ETH_ALEN]; | ||
550 | u64 tsf; | ||
551 | u16 beacon_interval; | ||
552 | u16 capability; | ||
553 | u8 *information_elements; | ||
554 | size_t len_information_elements; | ||
555 | |||
556 | s32 signal; | ||
557 | |||
558 | void (*free_priv)(struct cfg80211_bss *bss); | ||
559 | u8 priv[0] __attribute__((__aligned__(sizeof(void *)))); | ||
560 | }; | ||
561 | |||
562 | /** | ||
563 | * struct cfg80211_auth_request - Authentication request data | ||
564 | * | ||
565 | * This structure provides information needed to complete IEEE 802.11 | ||
566 | * authentication. | ||
567 | * NOTE: This structure will likely change when more code from mac80211 is | ||
568 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | ||
569 | * Before using this in a driver that does not use mac80211, it would be better | ||
570 | * to check the status of that work and better yet, volunteer to work on it. | ||
571 | * | ||
572 | * @chan: The channel to use or %NULL if not specified (auto-select based on | ||
573 | * scan results) | ||
574 | * @peer_addr: The address of the peer STA (AP BSSID in infrastructure case); | ||
575 | * this field is required to be present; if the driver wants to help with | ||
576 | * BSS selection, it should use (yet to be added) MLME event to allow user | ||
577 | * space SME to be notified of roaming candidate, so that the SME can then | ||
578 | * use the authentication request with the recommended BSSID and whatever | ||
579 | * other data may be needed for authentication/association | ||
580 | * @ssid: SSID or %NULL if not yet available | ||
581 | * @ssid_len: Length of ssid in octets | ||
582 | * @auth_type: Authentication type (algorithm) | ||
583 | * @ie: Extra IEs to add to Authentication frame or %NULL | ||
584 | * @ie_len: Length of ie buffer in octets | ||
585 | */ | ||
586 | struct cfg80211_auth_request { | ||
587 | struct ieee80211_channel *chan; | ||
588 | u8 *peer_addr; | ||
589 | const u8 *ssid; | ||
590 | size_t ssid_len; | ||
591 | enum nl80211_auth_type auth_type; | ||
592 | const u8 *ie; | ||
593 | size_t ie_len; | ||
594 | }; | ||
595 | |||
596 | /** | ||
597 | * struct cfg80211_assoc_request - (Re)Association request data | ||
598 | * | ||
599 | * This structure provides information needed to complete IEEE 802.11 | ||
600 | * (re)association. | ||
601 | * NOTE: This structure will likely change when more code from mac80211 is | ||
602 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | ||
603 | * Before using this in a driver that does not use mac80211, it would be better | ||
604 | * to check the status of that work and better yet, volunteer to work on it. | ||
605 | * | ||
606 | * @chan: The channel to use or %NULL if not specified (auto-select based on | ||
607 | * scan results) | ||
608 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
609 | * to be present and the STA must be in State 2 (authenticated) with the | ||
610 | * peer STA | ||
611 | * @ssid: SSID | ||
612 | * @ssid_len: Length of ssid in octets | ||
613 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL | ||
614 | * @ie_len: Length of ie buffer in octets | ||
615 | */ | ||
616 | struct cfg80211_assoc_request { | ||
617 | struct ieee80211_channel *chan; | ||
618 | u8 *peer_addr; | ||
619 | const u8 *ssid; | ||
620 | size_t ssid_len; | ||
621 | const u8 *ie; | ||
622 | size_t ie_len; | ||
623 | }; | ||
624 | |||
625 | /** | ||
626 | * struct cfg80211_deauth_request - Deauthentication request data | ||
627 | * | ||
628 | * This structure provides information needed to complete IEEE 802.11 | ||
629 | * deauthentication. | ||
630 | * | ||
631 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
632 | * to be present and the STA must be authenticated with the peer STA | ||
633 | * @ie: Extra IEs to add to Deauthentication frame or %NULL | ||
634 | * @ie_len: Length of ie buffer in octets | ||
635 | */ | ||
636 | struct cfg80211_deauth_request { | ||
637 | u8 *peer_addr; | ||
638 | u16 reason_code; | ||
639 | const u8 *ie; | ||
640 | size_t ie_len; | ||
641 | }; | ||
642 | |||
643 | /** | ||
644 | * struct cfg80211_disassoc_request - Disassociation request data | ||
645 | * | ||
646 | * This structure provides information needed to complete IEEE 802.11 | ||
647 | * disassocation. | ||
648 | * | ||
649 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
650 | * to be present and the STA must be associated with the peer STA | ||
651 | * @ie: Extra IEs to add to Disassociation frame or %NULL | ||
652 | * @ie_len: Length of ie buffer in octets | ||
653 | */ | ||
654 | struct cfg80211_disassoc_request { | ||
655 | u8 *peer_addr; | ||
656 | u16 reason_code; | ||
657 | const u8 *ie; | ||
658 | size_t ie_len; | ||
659 | }; | ||
660 | |||
661 | /** | ||
441 | * struct cfg80211_ops - backend description for wireless configuration | 662 | * struct cfg80211_ops - backend description for wireless configuration |
442 | * | 663 | * |
443 | * This struct is registered by fullmac card drivers and/or wireless stacks | 664 | * This struct is registered by fullmac card drivers and/or wireless stacks |
@@ -450,6 +671,9 @@ struct ieee80211_channel; | |||
450 | * wireless extensions but this is subject to reevaluation as soon as this | 671 | * 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. | 672 | * code is used more widely and we have a first user without wext. |
452 | * | 673 | * |
674 | * @suspend: wiphy device needs to be suspended | ||
675 | * @resume: wiphy device needs to be resumed | ||
676 | * | ||
453 | * @add_virtual_intf: create a new virtual interface with the given name, | 677 | * @add_virtual_intf: create a new virtual interface with the given name, |
454 | * must set the struct wireless_dev's iftype. | 678 | * must set the struct wireless_dev's iftype. |
455 | * | 679 | * |
@@ -471,6 +695,8 @@ struct ieee80211_channel; | |||
471 | * | 695 | * |
472 | * @set_default_key: set the default key on an interface | 696 | * @set_default_key: set the default key on an interface |
473 | * | 697 | * |
698 | * @set_default_mgmt_key: set the default management frame key on an interface | ||
699 | * | ||
474 | * @add_beacon: Add a beacon with given parameters, @head, @interval | 700 | * @add_beacon: Add a beacon with given parameters, @head, @interval |
475 | * and @dtim_period will be valid, @tail is optional. | 701 | * and @dtim_period will be valid, @tail is optional. |
476 | * @set_beacon: Change the beacon parameters for an access point mode | 702 | * @set_beacon: Change the beacon parameters for an access point mode |
@@ -497,8 +723,21 @@ struct ieee80211_channel; | |||
497 | * @set_txq_params: Set TX queue parameters | 723 | * @set_txq_params: Set TX queue parameters |
498 | * | 724 | * |
499 | * @set_channel: Set channel | 725 | * @set_channel: Set channel |
726 | * | ||
727 | * @scan: Request to do a scan. If returning zero, the scan request is given | ||
728 | * the driver, and will be valid until passed to cfg80211_scan_done(). | ||
729 | * For scan results, call cfg80211_inform_bss(); you can call this outside | ||
730 | * the scan/scan_done bracket too. | ||
731 | * | ||
732 | * @auth: Request to authenticate with the specified peer | ||
733 | * @assoc: Request to (re)associate with the specified peer | ||
734 | * @deauth: Request to deauthenticate from the specified peer | ||
735 | * @disassoc: Request to disassociate from the specified peer | ||
500 | */ | 736 | */ |
501 | struct cfg80211_ops { | 737 | struct cfg80211_ops { |
738 | int (*suspend)(struct wiphy *wiphy); | ||
739 | int (*resume)(struct wiphy *wiphy); | ||
740 | |||
502 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, | 741 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, |
503 | enum nl80211_iftype type, u32 *flags, | 742 | enum nl80211_iftype type, u32 *flags, |
504 | struct vif_params *params); | 743 | struct vif_params *params); |
@@ -518,6 +757,9 @@ struct cfg80211_ops { | |||
518 | int (*set_default_key)(struct wiphy *wiphy, | 757 | int (*set_default_key)(struct wiphy *wiphy, |
519 | struct net_device *netdev, | 758 | struct net_device *netdev, |
520 | u8 key_index); | 759 | u8 key_index); |
760 | int (*set_default_mgmt_key)(struct wiphy *wiphy, | ||
761 | struct net_device *netdev, | ||
762 | u8 key_index); | ||
521 | 763 | ||
522 | int (*add_beacon)(struct wiphy *wiphy, struct net_device *dev, | 764 | int (*add_beacon)(struct wiphy *wiphy, struct net_device *dev, |
523 | struct beacon_parameters *info); | 765 | struct beacon_parameters *info); |
@@ -564,6 +806,18 @@ struct cfg80211_ops { | |||
564 | int (*set_channel)(struct wiphy *wiphy, | 806 | int (*set_channel)(struct wiphy *wiphy, |
565 | struct ieee80211_channel *chan, | 807 | struct ieee80211_channel *chan, |
566 | enum nl80211_channel_type channel_type); | 808 | enum nl80211_channel_type channel_type); |
809 | |||
810 | int (*scan)(struct wiphy *wiphy, struct net_device *dev, | ||
811 | struct cfg80211_scan_request *request); | ||
812 | |||
813 | int (*auth)(struct wiphy *wiphy, struct net_device *dev, | ||
814 | struct cfg80211_auth_request *req); | ||
815 | int (*assoc)(struct wiphy *wiphy, struct net_device *dev, | ||
816 | struct cfg80211_assoc_request *req); | ||
817 | int (*deauth)(struct wiphy *wiphy, struct net_device *dev, | ||
818 | struct cfg80211_deauth_request *req); | ||
819 | int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, | ||
820 | struct cfg80211_disassoc_request *req); | ||
567 | }; | 821 | }; |
568 | 822 | ||
569 | /* temporary wext handlers */ | 823 | /* temporary wext handlers */ |
@@ -574,5 +828,134 @@ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info, | |||
574 | u32 *mode, char *extra); | 828 | u32 *mode, char *extra); |
575 | int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info, | 829 | int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info, |
576 | u32 *mode, char *extra); | 830 | u32 *mode, char *extra); |
831 | int cfg80211_wext_siwscan(struct net_device *dev, | ||
832 | struct iw_request_info *info, | ||
833 | union iwreq_data *wrqu, char *extra); | ||
834 | int cfg80211_wext_giwscan(struct net_device *dev, | ||
835 | struct iw_request_info *info, | ||
836 | struct iw_point *data, char *extra); | ||
837 | int cfg80211_wext_giwrange(struct net_device *dev, | ||
838 | struct iw_request_info *info, | ||
839 | struct iw_point *data, char *extra); | ||
840 | |||
841 | /** | ||
842 | * cfg80211_scan_done - notify that scan finished | ||
843 | * | ||
844 | * @request: the corresponding scan request | ||
845 | * @aborted: set to true if the scan was aborted for any reason, | ||
846 | * userspace will be notified of that | ||
847 | */ | ||
848 | void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted); | ||
849 | |||
850 | /** | ||
851 | * cfg80211_inform_bss - inform cfg80211 of a new BSS | ||
852 | * | ||
853 | * @wiphy: the wiphy reporting the BSS | ||
854 | * @bss: the found BSS | ||
855 | * @signal: the signal strength, type depends on the wiphy's signal_type | ||
856 | * @gfp: context flags | ||
857 | * | ||
858 | * This informs cfg80211 that BSS information was found and | ||
859 | * the BSS should be updated/added. | ||
860 | */ | ||
861 | struct cfg80211_bss* | ||
862 | cfg80211_inform_bss_frame(struct wiphy *wiphy, | ||
863 | struct ieee80211_channel *channel, | ||
864 | struct ieee80211_mgmt *mgmt, size_t len, | ||
865 | s32 signal, gfp_t gfp); | ||
866 | |||
867 | struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, | ||
868 | struct ieee80211_channel *channel, | ||
869 | const u8 *bssid, | ||
870 | const u8 *ssid, size_t ssid_len, | ||
871 | u16 capa_mask, u16 capa_val); | ||
872 | static inline struct cfg80211_bss * | ||
873 | cfg80211_get_ibss(struct wiphy *wiphy, | ||
874 | struct ieee80211_channel *channel, | ||
875 | const u8 *ssid, size_t ssid_len) | ||
876 | { | ||
877 | return cfg80211_get_bss(wiphy, channel, NULL, ssid, ssid_len, | ||
878 | WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS); | ||
879 | } | ||
880 | |||
881 | struct cfg80211_bss *cfg80211_get_mesh(struct wiphy *wiphy, | ||
882 | struct ieee80211_channel *channel, | ||
883 | const u8 *meshid, size_t meshidlen, | ||
884 | const u8 *meshcfg); | ||
885 | void cfg80211_put_bss(struct cfg80211_bss *bss); | ||
886 | /** | ||
887 | * cfg80211_unlink_bss - unlink BSS from internal data structures | ||
888 | * @wiphy: the wiphy | ||
889 | * @bss: the bss to remove | ||
890 | * | ||
891 | * This function removes the given BSS from the internal data structures | ||
892 | * thereby making it no longer show up in scan results etc. Use this | ||
893 | * function when you detect a BSS is gone. Normally BSSes will also time | ||
894 | * out, so it is not necessary to use this function at all. | ||
895 | */ | ||
896 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | ||
897 | |||
898 | /** | ||
899 | * cfg80211_send_rx_auth - notification of processed authentication | ||
900 | * @dev: network device | ||
901 | * @buf: authentication frame (header + body) | ||
902 | * @len: length of the frame data | ||
903 | * | ||
904 | * This function is called whenever an authentication has been processed in | ||
905 | * station mode. | ||
906 | */ | ||
907 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | ||
908 | |||
909 | /** | ||
910 | * cfg80211_send_rx_assoc - notification of processed association | ||
911 | * @dev: network device | ||
912 | * @buf: (re)association response frame (header + body) | ||
913 | * @len: length of the frame data | ||
914 | * | ||
915 | * This function is called whenever a (re)association response has been | ||
916 | * processed in station mode. | ||
917 | */ | ||
918 | void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); | ||
919 | |||
920 | /** | ||
921 | * cfg80211_send_rx_deauth - notification of processed deauthentication | ||
922 | * @dev: network device | ||
923 | * @buf: deauthentication frame (header + body) | ||
924 | * @len: length of the frame data | ||
925 | * | ||
926 | * This function is called whenever deauthentication has been processed in | ||
927 | * station mode. | ||
928 | */ | ||
929 | void cfg80211_send_rx_deauth(struct net_device *dev, const u8 *buf, | ||
930 | size_t len); | ||
931 | |||
932 | /** | ||
933 | * cfg80211_send_rx_disassoc - notification of processed disassociation | ||
934 | * @dev: network device | ||
935 | * @buf: disassociation response frame (header + body) | ||
936 | * @len: length of the frame data | ||
937 | * | ||
938 | * This function is called whenever disassociation has been processed in | ||
939 | * station mode. | ||
940 | */ | ||
941 | void cfg80211_send_rx_disassoc(struct net_device *dev, const u8 *buf, | ||
942 | size_t len); | ||
943 | |||
944 | /** | ||
945 | * cfg80211_hold_bss - exclude bss from expiration | ||
946 | * @bss: bss which should not expire | ||
947 | * | ||
948 | * In a case when the BSS is not updated but it shouldn't expire this | ||
949 | * function can be used to mark the BSS to be excluded from expiration. | ||
950 | */ | ||
951 | void cfg80211_hold_bss(struct cfg80211_bss *bss); | ||
952 | |||
953 | /** | ||
954 | * cfg80211_unhold_bss - remove expiration exception from the BSS | ||
955 | * @bss: bss which can expire again | ||
956 | * | ||
957 | * This function marks the BSS to be expirable again. | ||
958 | */ | ||
959 | void cfg80211_unhold_bss(struct cfg80211_bss *bss); | ||
577 | 960 | ||
578 | #endif /* __NET_CFG80211_H */ | 961 | #endif /* __NET_CFG80211_H */ |