Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[safe/jmp/linux-2.6] / include / net / cfg80211.h
index 0d73441..a3f0a7e 100644 (file)
@@ -626,8 +626,14 @@ enum cfg80211_signal_type {
  * @beacon_interval: the beacon interval as from the frame
  * @capability: the capability field in host byte order
  * @information_elements: the information elements (Note that there
- *     is no guarantee that these are well-formed!)
+ *     is no guarantee that these are well-formed!); this is a pointer to
+ *     either the beacon_ies or proberesp_ies depending on whether Probe
+ *     Response frame has been received
  * @len_information_elements: total length of the information elements
+ * @beacon_ies: the information elements from the last Beacon frame
+ * @len_beacon_ies: total length of the beacon_ies
+ * @proberesp_ies: the information elements from the last Probe Response frame
+ * @len_proberesp_ies: total length of the proberesp_ies
  * @signal: signal strength value (type depends on the wiphy's signal_type)
  * @free_priv: function pointer to free private data
  * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes
@@ -641,6 +647,10 @@ struct cfg80211_bss {
        u16 capability;
        u8 *information_elements;
        size_t len_information_elements;
+       u8 *beacon_ies;
+       size_t len_beacon_ies;
+       u8 *proberesp_ies;
+       size_t len_proberesp_ies;
 
        s32 signal;
 
@@ -1185,6 +1195,10 @@ enum wiphy_flags {
        WIPHY_FLAG_4ADDR_STATION        = BIT(6),
 };
 
+struct mac_address {
+       u8 addr[ETH_ALEN];
+};
+
 /**
  * struct wiphy - wireless hardware description
  * @idx: the wiphy index assigned to this item
@@ -1203,12 +1217,28 @@ enum wiphy_flags {
  *     -1 = fragmentation disabled, only odd values >= 256 used
  * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled
  * @net: the network namespace this wiphy currently lives in
+ * @perm_addr: permanent MAC address of this device
+ * @addr_mask: If the device supports multiple MAC addresses by masking,
+ *     set this to a mask with variable bits set to 1, e.g. if the last
+ *     four bits are variable then set it to 00:...:00:0f. The actual
+ *     variable bits shall be determined by the interfaces added, with
+ *     interfaces not matching the mask being rejected to be brought up.
+ * @n_addresses: number of addresses in @addresses.
+ * @addresses: If the device has more than one address, set this pointer
+ *     to a list of addresses (6 bytes each). The first one will be used
+ *     by default for perm_addr. In this case, the mask should be set to
+ *     all-zeroes. In this case it is assumed that the device can handle
+ *     the same number of arbitrary MAC addresses.
  */
 struct wiphy {
        /* assign these fields before you register the wiphy */
 
-       /* permanent MAC address */
+       /* permanent MAC address(es) */
        u8 perm_addr[ETH_ALEN];
+       u8 addr_mask[ETH_ALEN];
+
+       u16 n_addresses;
+       struct mac_address *addresses;
 
        /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
        u16 interface_modes;
@@ -1628,6 +1658,22 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
  */
 unsigned int cfg80211_classify8021d(struct sk_buff *skb);
 
+/**
+ * cfg80211_find_ie - find information element in data
+ *
+ * @eid: element ID
+ * @ies: data consisting of IEs
+ * @len: length of data
+ *
+ * This function will return %NULL if the element ID could
+ * not be found or if the element is invalid (claims to be
+ * longer than the given data), or a pointer to the first byte
+ * of the requested element, that is the byte containing the
+ * element ID. There are no checks on the element length
+ * other than having to fit into the given data.
+ */
+const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len);
+
 /*
  * Regulatory helper functions for wiphys
  */