diff options
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 287 |
1 files changed, 247 insertions, 40 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 0884b9a0f778..3d134a1fb96b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * 802.11 device and configuration interface | 4 | * 802.11 device and configuration interface |
5 | * | 5 | * |
6 | * Copyright 2006-2009 Johannes Berg <johannes@sipsolutions.net> | 6 | * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -39,8 +39,8 @@ | |||
39 | * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7) | 39 | * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7) |
40 | */ | 40 | */ |
41 | enum ieee80211_band { | 41 | enum ieee80211_band { |
42 | IEEE80211_BAND_2GHZ, | 42 | IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ, |
43 | IEEE80211_BAND_5GHZ, | 43 | IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ, |
44 | 44 | ||
45 | /* keep last */ | 45 | /* keep last */ |
46 | IEEE80211_NUM_BANDS | 46 | IEEE80211_NUM_BANDS |
@@ -626,8 +626,14 @@ enum cfg80211_signal_type { | |||
626 | * @beacon_interval: the beacon interval as from the frame | 626 | * @beacon_interval: the beacon interval as from the frame |
627 | * @capability: the capability field in host byte order | 627 | * @capability: the capability field in host byte order |
628 | * @information_elements: the information elements (Note that there | 628 | * @information_elements: the information elements (Note that there |
629 | * is no guarantee that these are well-formed!) | 629 | * is no guarantee that these are well-formed!); this is a pointer to |
630 | * either the beacon_ies or proberesp_ies depending on whether Probe | ||
631 | * Response frame has been received | ||
630 | * @len_information_elements: total length of the information elements | 632 | * @len_information_elements: total length of the information elements |
633 | * @beacon_ies: the information elements from the last Beacon frame | ||
634 | * @len_beacon_ies: total length of the beacon_ies | ||
635 | * @proberesp_ies: the information elements from the last Probe Response frame | ||
636 | * @len_proberesp_ies: total length of the proberesp_ies | ||
631 | * @signal: signal strength value (type depends on the wiphy's signal_type) | 637 | * @signal: signal strength value (type depends on the wiphy's signal_type) |
632 | * @free_priv: function pointer to free private data | 638 | * @free_priv: function pointer to free private data |
633 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes | 639 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes |
@@ -641,6 +647,10 @@ struct cfg80211_bss { | |||
641 | u16 capability; | 647 | u16 capability; |
642 | u8 *information_elements; | 648 | u8 *information_elements; |
643 | size_t len_information_elements; | 649 | size_t len_information_elements; |
650 | u8 *beacon_ies; | ||
651 | size_t len_beacon_ies; | ||
652 | u8 *proberesp_ies; | ||
653 | size_t len_proberesp_ies; | ||
644 | 654 | ||
645 | s32 signal; | 655 | s32 signal; |
646 | 656 | ||
@@ -837,6 +847,7 @@ enum wiphy_params_flags { | |||
837 | WIPHY_PARAM_RETRY_LONG = 1 << 1, | 847 | WIPHY_PARAM_RETRY_LONG = 1 << 1, |
838 | WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2, | 848 | WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2, |
839 | WIPHY_PARAM_RTS_THRESHOLD = 1 << 3, | 849 | WIPHY_PARAM_RTS_THRESHOLD = 1 << 3, |
850 | WIPHY_PARAM_COVERAGE_CLASS = 1 << 4, | ||
840 | }; | 851 | }; |
841 | 852 | ||
842 | /** | 853 | /** |
@@ -856,20 +867,11 @@ enum tx_power_setting { | |||
856 | * cfg80211_bitrate_mask - masks for bitrate control | 867 | * cfg80211_bitrate_mask - masks for bitrate control |
857 | */ | 868 | */ |
858 | struct cfg80211_bitrate_mask { | 869 | struct cfg80211_bitrate_mask { |
859 | /* | ||
860 | * As discussed in Berlin, this struct really | ||
861 | * should look like this: | ||
862 | |||
863 | struct { | 870 | struct { |
864 | u32 legacy; | 871 | u32 legacy; |
865 | u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; | 872 | /* TODO: add support for masking MCS rates; e.g.: */ |
873 | /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */ | ||
866 | } control[IEEE80211_NUM_BANDS]; | 874 | } control[IEEE80211_NUM_BANDS]; |
867 | |||
868 | * Since we can always fix in-kernel users, let's keep | ||
869 | * it simpler for now: | ||
870 | */ | ||
871 | u32 fixed; /* fixed bitrate, 0 == not fixed */ | ||
872 | u32 maxrate; /* in kbps, 0 == no limit */ | ||
873 | }; | 875 | }; |
874 | /** | 876 | /** |
875 | * struct cfg80211_pmksa - PMK Security Association | 877 | * struct cfg80211_pmksa - PMK Security Association |
@@ -988,6 +990,16 @@ struct cfg80211_pmksa { | |||
988 | * | 990 | * |
989 | * @dump_survey: get site survey information. | 991 | * @dump_survey: get site survey information. |
990 | * | 992 | * |
993 | * @remain_on_channel: Request the driver to remain awake on the specified | ||
994 | * channel for the specified duration to complete an off-channel | ||
995 | * operation (e.g., public action frame exchange). When the driver is | ||
996 | * ready on the requested channel, it must indicate this with an event | ||
997 | * notification by calling cfg80211_ready_on_channel(). | ||
998 | * @cancel_remain_on_channel: Cancel an on-going remain-on-channel operation. | ||
999 | * This allows the operation to be terminated prior to timeout based on | ||
1000 | * the duration value. | ||
1001 | * @action: Transmit an action frame | ||
1002 | * | ||
991 | * @testmode_cmd: run a test mode command | 1003 | * @testmode_cmd: run a test mode command |
992 | * | 1004 | * |
993 | * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac | 1005 | * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac |
@@ -1123,7 +1135,21 @@ struct cfg80211_ops { | |||
1123 | struct cfg80211_pmksa *pmksa); | 1135 | struct cfg80211_pmksa *pmksa); |
1124 | int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev); | 1136 | int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev); |
1125 | 1137 | ||
1126 | /* some temporary stuff to finish wext */ | 1138 | int (*remain_on_channel)(struct wiphy *wiphy, |
1139 | struct net_device *dev, | ||
1140 | struct ieee80211_channel *chan, | ||
1141 | enum nl80211_channel_type channel_type, | ||
1142 | unsigned int duration, | ||
1143 | u64 *cookie); | ||
1144 | int (*cancel_remain_on_channel)(struct wiphy *wiphy, | ||
1145 | struct net_device *dev, | ||
1146 | u64 cookie); | ||
1147 | |||
1148 | int (*action)(struct wiphy *wiphy, struct net_device *dev, | ||
1149 | struct ieee80211_channel *chan, | ||
1150 | enum nl80211_channel_type channel_type, | ||
1151 | const u8 *buf, size_t len, u64 *cookie); | ||
1152 | |||
1127 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, | 1153 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, |
1128 | bool enabled, int timeout); | 1154 | bool enabled, int timeout); |
1129 | }; | 1155 | }; |
@@ -1174,6 +1200,10 @@ enum wiphy_flags { | |||
1174 | WIPHY_FLAG_4ADDR_STATION = BIT(6), | 1200 | WIPHY_FLAG_4ADDR_STATION = BIT(6), |
1175 | }; | 1201 | }; |
1176 | 1202 | ||
1203 | struct mac_address { | ||
1204 | u8 addr[ETH_ALEN]; | ||
1205 | }; | ||
1206 | |||
1177 | /** | 1207 | /** |
1178 | * struct wiphy - wireless hardware description | 1208 | * struct wiphy - wireless hardware description |
1179 | * @idx: the wiphy index assigned to this item | 1209 | * @idx: the wiphy index assigned to this item |
@@ -1192,12 +1222,28 @@ enum wiphy_flags { | |||
1192 | * -1 = fragmentation disabled, only odd values >= 256 used | 1222 | * -1 = fragmentation disabled, only odd values >= 256 used |
1193 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled | 1223 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled |
1194 | * @net: the network namespace this wiphy currently lives in | 1224 | * @net: the network namespace this wiphy currently lives in |
1225 | * @perm_addr: permanent MAC address of this device | ||
1226 | * @addr_mask: If the device supports multiple MAC addresses by masking, | ||
1227 | * set this to a mask with variable bits set to 1, e.g. if the last | ||
1228 | * four bits are variable then set it to 00:...:00:0f. The actual | ||
1229 | * variable bits shall be determined by the interfaces added, with | ||
1230 | * interfaces not matching the mask being rejected to be brought up. | ||
1231 | * @n_addresses: number of addresses in @addresses. | ||
1232 | * @addresses: If the device has more than one address, set this pointer | ||
1233 | * to a list of addresses (6 bytes each). The first one will be used | ||
1234 | * by default for perm_addr. In this case, the mask should be set to | ||
1235 | * all-zeroes. In this case it is assumed that the device can handle | ||
1236 | * the same number of arbitrary MAC addresses. | ||
1195 | */ | 1237 | */ |
1196 | struct wiphy { | 1238 | struct wiphy { |
1197 | /* assign these fields before you register the wiphy */ | 1239 | /* assign these fields before you register the wiphy */ |
1198 | 1240 | ||
1199 | /* permanent MAC address */ | 1241 | /* permanent MAC address(es) */ |
1200 | u8 perm_addr[ETH_ALEN]; | 1242 | u8 perm_addr[ETH_ALEN]; |
1243 | u8 addr_mask[ETH_ALEN]; | ||
1244 | |||
1245 | u16 n_addresses; | ||
1246 | struct mac_address *addresses; | ||
1201 | 1247 | ||
1202 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ | 1248 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ |
1203 | u16 interface_modes; | 1249 | u16 interface_modes; |
@@ -1217,6 +1263,7 @@ struct wiphy { | |||
1217 | u8 retry_long; | 1263 | u8 retry_long; |
1218 | u32 frag_threshold; | 1264 | u32 frag_threshold; |
1219 | u32 rts_threshold; | 1265 | u32 rts_threshold; |
1266 | u8 coverage_class; | ||
1220 | 1267 | ||
1221 | char fw_version[ETHTOOL_BUSINFO_LEN]; | 1268 | char fw_version[ETHTOOL_BUSINFO_LEN]; |
1222 | u32 hw_version; | 1269 | u32 hw_version; |
@@ -1403,6 +1450,8 @@ struct cfg80211_cached_keys; | |||
1403 | * set by driver (if supported) on add_interface BEFORE registering the | 1450 | * set by driver (if supported) on add_interface BEFORE registering the |
1404 | * netdev and may otherwise be used by driver read-only, will be update | 1451 | * netdev and may otherwise be used by driver read-only, will be update |
1405 | * by cfg80211 on change_interface | 1452 | * by cfg80211 on change_interface |
1453 | * @action_registrations: list of registrations for action frames | ||
1454 | * @action_registrations_lock: lock for the list | ||
1406 | */ | 1455 | */ |
1407 | struct wireless_dev { | 1456 | struct wireless_dev { |
1408 | struct wiphy *wiphy; | 1457 | struct wiphy *wiphy; |
@@ -1412,6 +1461,9 @@ struct wireless_dev { | |||
1412 | struct list_head list; | 1461 | struct list_head list; |
1413 | struct net_device *netdev; | 1462 | struct net_device *netdev; |
1414 | 1463 | ||
1464 | struct list_head action_registrations; | ||
1465 | spinlock_t action_registrations_lock; | ||
1466 | |||
1415 | struct mutex mtx; | 1467 | struct mutex mtx; |
1416 | 1468 | ||
1417 | struct work_struct cleanup_work; | 1469 | struct work_struct cleanup_work; |
@@ -1436,6 +1488,9 @@ struct wireless_dev { | |||
1436 | struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; | 1488 | struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; |
1437 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ | 1489 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ |
1438 | 1490 | ||
1491 | bool ps; | ||
1492 | int ps_timeout; | ||
1493 | |||
1439 | #ifdef CONFIG_CFG80211_WEXT | 1494 | #ifdef CONFIG_CFG80211_WEXT |
1440 | /* wext data */ | 1495 | /* wext data */ |
1441 | struct { | 1496 | struct { |
@@ -1447,8 +1502,7 @@ struct wireless_dev { | |||
1447 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; | 1502 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; |
1448 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 1503 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
1449 | s8 default_key, default_mgmt_key; | 1504 | s8 default_key, default_mgmt_key; |
1450 | bool ps, prev_bssid_valid; | 1505 | bool prev_bssid_valid; |
1451 | int ps_timeout; | ||
1452 | } wext; | 1506 | } wext; |
1453 | #endif | 1507 | #endif |
1454 | }; | 1508 | }; |
@@ -1519,37 +1573,82 @@ ieee80211_get_response_rate(struct ieee80211_supported_band *sband, | |||
1519 | * Documentation in Documentation/networking/radiotap-headers.txt | 1573 | * Documentation in Documentation/networking/radiotap-headers.txt |
1520 | */ | 1574 | */ |
1521 | 1575 | ||
1576 | struct radiotap_align_size { | ||
1577 | uint8_t align:4, size:4; | ||
1578 | }; | ||
1579 | |||
1580 | struct ieee80211_radiotap_namespace { | ||
1581 | const struct radiotap_align_size *align_size; | ||
1582 | int n_bits; | ||
1583 | uint32_t oui; | ||
1584 | uint8_t subns; | ||
1585 | }; | ||
1586 | |||
1587 | struct ieee80211_radiotap_vendor_namespaces { | ||
1588 | const struct ieee80211_radiotap_namespace *ns; | ||
1589 | int n_ns; | ||
1590 | }; | ||
1591 | |||
1522 | /** | 1592 | /** |
1523 | * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args | 1593 | * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args |
1524 | * @rtheader: pointer to the radiotap header we are walking through | 1594 | * @this_arg_index: index of current arg, valid after each successful call |
1525 | * @max_length: length of radiotap header in cpu byte ordering | 1595 | * to ieee80211_radiotap_iterator_next() |
1526 | * @this_arg_index: IEEE80211_RADIOTAP_... index of current arg | 1596 | * @this_arg: pointer to current radiotap arg; it is valid after each |
1527 | * @this_arg: pointer to current radiotap arg | 1597 | * call to ieee80211_radiotap_iterator_next() but also after |
1528 | * @arg_index: internal next argument index | 1598 | * ieee80211_radiotap_iterator_init() where it will point to |
1529 | * @arg: internal next argument pointer | 1599 | * the beginning of the actual data portion |
1530 | * @next_bitmap: internal pointer to next present u32 | 1600 | * @this_arg_size: length of the current arg, for convenience |
1531 | * @bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present | 1601 | * @current_namespace: pointer to the current namespace definition |
1602 | * (or internally %NULL if the current namespace is unknown) | ||
1603 | * @is_radiotap_ns: indicates whether the current namespace is the default | ||
1604 | * radiotap namespace or not | ||
1605 | * | ||
1606 | * @overrides: override standard radiotap fields | ||
1607 | * @n_overrides: number of overrides | ||
1608 | * | ||
1609 | * @_rtheader: pointer to the radiotap header we are walking through | ||
1610 | * @_max_length: length of radiotap header in cpu byte ordering | ||
1611 | * @_arg_index: next argument index | ||
1612 | * @_arg: next argument pointer | ||
1613 | * @_next_bitmap: internal pointer to next present u32 | ||
1614 | * @_bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present | ||
1615 | * @_vns: vendor namespace definitions | ||
1616 | * @_next_ns_data: beginning of the next namespace's data | ||
1617 | * @_reset_on_ext: internal; reset the arg index to 0 when going to the | ||
1618 | * next bitmap word | ||
1619 | * | ||
1620 | * Describes the radiotap parser state. Fields prefixed with an underscore | ||
1621 | * must not be used by users of the parser, only by the parser internally. | ||
1532 | */ | 1622 | */ |
1533 | 1623 | ||
1534 | struct ieee80211_radiotap_iterator { | 1624 | struct ieee80211_radiotap_iterator { |
1535 | struct ieee80211_radiotap_header *rtheader; | 1625 | struct ieee80211_radiotap_header *_rtheader; |
1536 | int max_length; | 1626 | const struct ieee80211_radiotap_vendor_namespaces *_vns; |
1627 | const struct ieee80211_radiotap_namespace *current_namespace; | ||
1628 | |||
1629 | unsigned char *_arg, *_next_ns_data; | ||
1630 | uint32_t *_next_bitmap; | ||
1631 | |||
1632 | unsigned char *this_arg; | ||
1537 | int this_arg_index; | 1633 | int this_arg_index; |
1538 | u8 *this_arg; | 1634 | int this_arg_size; |
1635 | |||
1636 | int is_radiotap_ns; | ||
1539 | 1637 | ||
1540 | int arg_index; | 1638 | int _max_length; |
1541 | u8 *arg; | 1639 | int _arg_index; |
1542 | __le32 *next_bitmap; | 1640 | uint32_t _bitmap_shifter; |
1543 | u32 bitmap_shifter; | 1641 | int _reset_on_ext; |
1544 | }; | 1642 | }; |
1545 | 1643 | ||
1546 | extern int ieee80211_radiotap_iterator_init( | 1644 | extern int ieee80211_radiotap_iterator_init( |
1547 | struct ieee80211_radiotap_iterator *iterator, | 1645 | struct ieee80211_radiotap_iterator *iterator, |
1548 | struct ieee80211_radiotap_header *radiotap_header, | 1646 | struct ieee80211_radiotap_header *radiotap_header, |
1549 | int max_length); | 1647 | int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns); |
1550 | 1648 | ||
1551 | extern int ieee80211_radiotap_iterator_next( | 1649 | extern int ieee80211_radiotap_iterator_next( |
1552 | struct ieee80211_radiotap_iterator *iterator); | 1650 | struct ieee80211_radiotap_iterator *iterator); |
1651 | |||
1553 | 1652 | ||
1554 | extern const unsigned char rfc1042_header[6]; | 1653 | extern const unsigned char rfc1042_header[6]; |
1555 | extern const unsigned char bridge_tunnel_header[6]; | 1654 | extern const unsigned char bridge_tunnel_header[6]; |
@@ -1578,7 +1677,7 @@ unsigned int ieee80211_hdrlen(__le16 fc); | |||
1578 | * @addr: the device MAC address | 1677 | * @addr: the device MAC address |
1579 | * @iftype: the virtual interface type | 1678 | * @iftype: the virtual interface type |
1580 | */ | 1679 | */ |
1581 | int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, | 1680 | int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, |
1582 | enum nl80211_iftype iftype); | 1681 | enum nl80211_iftype iftype); |
1583 | 1682 | ||
1584 | /** | 1683 | /** |
@@ -1589,15 +1688,49 @@ int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, | |||
1589 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) | 1688 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) |
1590 | * @qos: build 802.11 QoS data frame | 1689 | * @qos: build 802.11 QoS data frame |
1591 | */ | 1690 | */ |
1592 | int ieee80211_data_from_8023(struct sk_buff *skb, u8 *addr, | 1691 | int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, |
1593 | enum nl80211_iftype iftype, u8 *bssid, bool qos); | 1692 | enum nl80211_iftype iftype, u8 *bssid, bool qos); |
1594 | 1693 | ||
1595 | /** | 1694 | /** |
1695 | * ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame | ||
1696 | * | ||
1697 | * Decode an IEEE 802.11n A-MSDU frame and convert it to a list of | ||
1698 | * 802.3 frames. The @list will be empty if the decode fails. The | ||
1699 | * @skb is consumed after the function returns. | ||
1700 | * | ||
1701 | * @skb: The input IEEE 802.11n A-MSDU frame. | ||
1702 | * @list: The output list of 802.3 frames. It must be allocated and | ||
1703 | * initialized by by the caller. | ||
1704 | * @addr: The device MAC address. | ||
1705 | * @iftype: The device interface type. | ||
1706 | * @extra_headroom: The hardware extra headroom for SKBs in the @list. | ||
1707 | */ | ||
1708 | void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, | ||
1709 | const u8 *addr, enum nl80211_iftype iftype, | ||
1710 | const unsigned int extra_headroom); | ||
1711 | |||
1712 | /** | ||
1596 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame | 1713 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame |
1597 | * @skb: the data frame | 1714 | * @skb: the data frame |
1598 | */ | 1715 | */ |
1599 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); | 1716 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); |
1600 | 1717 | ||
1718 | /** | ||
1719 | * cfg80211_find_ie - find information element in data | ||
1720 | * | ||
1721 | * @eid: element ID | ||
1722 | * @ies: data consisting of IEs | ||
1723 | * @len: length of data | ||
1724 | * | ||
1725 | * This function will return %NULL if the element ID could | ||
1726 | * not be found or if the element is invalid (claims to be | ||
1727 | * longer than the given data), or a pointer to the first byte | ||
1728 | * of the requested element, that is the byte containing the | ||
1729 | * element ID. There are no checks on the element length | ||
1730 | * other than having to fit into the given data. | ||
1731 | */ | ||
1732 | const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); | ||
1733 | |||
1601 | /* | 1734 | /* |
1602 | * Regulatory helper functions for wiphys | 1735 | * Regulatory helper functions for wiphys |
1603 | */ | 1736 | */ |
@@ -2129,5 +2262,79 @@ void cfg80211_roamed(struct net_device *dev, const u8 *bssid, | |||
2129 | void cfg80211_disconnected(struct net_device *dev, u16 reason, | 2262 | void cfg80211_disconnected(struct net_device *dev, u16 reason, |
2130 | u8 *ie, size_t ie_len, gfp_t gfp); | 2263 | u8 *ie, size_t ie_len, gfp_t gfp); |
2131 | 2264 | ||
2265 | /** | ||
2266 | * cfg80211_ready_on_channel - notification of remain_on_channel start | ||
2267 | * @dev: network device | ||
2268 | * @cookie: the request cookie | ||
2269 | * @chan: The current channel (from remain_on_channel request) | ||
2270 | * @channel_type: Channel type | ||
2271 | * @duration: Duration in milliseconds that the driver intents to remain on the | ||
2272 | * channel | ||
2273 | * @gfp: allocation flags | ||
2274 | */ | ||
2275 | void cfg80211_ready_on_channel(struct net_device *dev, u64 cookie, | ||
2276 | struct ieee80211_channel *chan, | ||
2277 | enum nl80211_channel_type channel_type, | ||
2278 | unsigned int duration, gfp_t gfp); | ||
2279 | |||
2280 | /** | ||
2281 | * cfg80211_remain_on_channel_expired - remain_on_channel duration expired | ||
2282 | * @dev: network device | ||
2283 | * @cookie: the request cookie | ||
2284 | * @chan: The current channel (from remain_on_channel request) | ||
2285 | * @channel_type: Channel type | ||
2286 | * @gfp: allocation flags | ||
2287 | */ | ||
2288 | void cfg80211_remain_on_channel_expired(struct net_device *dev, | ||
2289 | u64 cookie, | ||
2290 | struct ieee80211_channel *chan, | ||
2291 | enum nl80211_channel_type channel_type, | ||
2292 | gfp_t gfp); | ||
2293 | |||
2294 | |||
2295 | /** | ||
2296 | * cfg80211_new_sta - notify userspace about station | ||
2297 | * | ||
2298 | * @dev: the netdev | ||
2299 | * @mac_addr: the station's address | ||
2300 | * @sinfo: the station information | ||
2301 | * @gfp: allocation flags | ||
2302 | */ | ||
2303 | void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr, | ||
2304 | struct station_info *sinfo, gfp_t gfp); | ||
2305 | |||
2306 | /** | ||
2307 | * cfg80211_rx_action - notification of received, unprocessed Action frame | ||
2308 | * @dev: network device | ||
2309 | * @freq: Frequency on which the frame was received in MHz | ||
2310 | * @buf: Action frame (header + body) | ||
2311 | * @len: length of the frame data | ||
2312 | * @gfp: context flags | ||
2313 | * Returns %true if a user space application is responsible for rejecting the | ||
2314 | * unrecognized Action frame; %false if no such application is registered | ||
2315 | * (i.e., the driver is responsible for rejecting the unrecognized Action | ||
2316 | * frame) | ||
2317 | * | ||
2318 | * This function is called whenever an Action frame is received for a station | ||
2319 | * mode interface, but is not processed in kernel. | ||
2320 | */ | ||
2321 | bool cfg80211_rx_action(struct net_device *dev, int freq, const u8 *buf, | ||
2322 | size_t len, gfp_t gfp); | ||
2323 | |||
2324 | /** | ||
2325 | * cfg80211_action_tx_status - notification of TX status for Action frame | ||
2326 | * @dev: network device | ||
2327 | * @cookie: Cookie returned by cfg80211_ops::action() | ||
2328 | * @buf: Action frame (header + body) | ||
2329 | * @len: length of the frame data | ||
2330 | * @ack: Whether frame was acknowledged | ||
2331 | * @gfp: context flags | ||
2332 | * | ||
2333 | * This function is called whenever an Action frame was requested to be | ||
2334 | * transmitted with cfg80211_ops::action() to report the TX status of the | ||
2335 | * transmission attempt. | ||
2336 | */ | ||
2337 | void cfg80211_action_tx_status(struct net_device *dev, u64 cookie, | ||
2338 | const u8 *buf, size_t len, bool ack, gfp_t gfp); | ||
2132 | 2339 | ||
2133 | #endif /* __NET_CFG80211_H */ | 2340 | #endif /* __NET_CFG80211_H */ |