nl80211: Event notifications for MLME events
[safe/jmp/linux-2.6] / include / net / wireless.h
index f68602e..64a7620 100644 (file)
@@ -69,6 +69,9 @@ enum ieee80211_channel_flags {
  * @band: band this channel belongs to.
  * @max_antenna_gain: maximum antenna gain in dBi
  * @max_power: maximum transmission power (in dBm)
+ * @beacon_found: helper to regulatory code to indicate when a beacon
+ *     has been found on this channel. Use regulatory_hint_found_beacon()
+ *     to enable this, this is is useful only on 5 GHz band.
  * @orig_mag: internal use
  * @orig_mpwr: internal use
  */
@@ -80,6 +83,7 @@ struct ieee80211_channel {
        u32 flags;
        int max_antenna_gain;
        int max_power;
+       bool beacon_found;
        u32 orig_flags;
        int orig_mag, orig_mpwr;
 };
@@ -181,16 +185,26 @@ struct ieee80211_supported_band {
  * struct wiphy - wireless hardware description
  * @idx: the wiphy index assigned to this item
  * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name>
- * @fw_handles_regulatory: tells us the firmware for this device
- *     has its own regulatory solution and cannot identify the
+ * @custom_regulatory: tells us the driver for this device
+ *     has its own custom regulatory domain and cannot identify the
  *     ISO / IEC 3166 alpha2 it belongs to. When this is enabled
  *     we will disregard the first regulatory hint (when the
  *     initiator is %REGDOM_SET_BY_CORE).
+ * @strict_regulatory: tells us the driver for this device will ignore
+ *     regulatory domain settings until it gets its own regulatory domain
+ *     via its regulatory_hint(). After its gets its own regulatory domain
+ *     it will only allow further regulatory domain settings to further
+ *     enhance compliance. For example if channel 13 and 14 are disabled
+ *     by this regulatory domain no user regulatory domain can enable these
+ *     channels at a later time. This can be used for devices which do not
+ *     have calibration information gauranteed for frequencies or settings
+ *     outside of its regulatory domain.
  * @reg_notifier: the driver's regulatory notification callback
  * @regd: the driver's regulatory domain, if one was requested via
  *     the regulatory_hint() API. This can be used by the driver
  *     on the reg_notifier() if it chooses to ignore future
  *     regulatory domain changes caused by other drivers.
+ * @signal_type: signal type reported in &struct cfg80211_bss.
  */
 struct wiphy {
        /* assign these fields before you register the wiphy */
@@ -201,7 +215,13 @@ struct wiphy {
        /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
        u16 interface_modes;
 
-       bool fw_handles_regulatory;
+       bool custom_regulatory;
+       bool strict_regulatory;
+
+       enum cfg80211_signal_type signal_type;
+
+       int bss_priv_size;
+       u8 max_scan_ssids;
 
        /* If multiple wiphys are registered and you're handed e.g.
         * a regular netdev with assigned ieee80211_ptr, you won't
@@ -213,7 +233,8 @@ struct wiphy {
        struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS];
 
        /* Lets us get back the wiphy on the callback */
-       int (*reg_notifier)(struct wiphy *wiphy, enum reg_set_by setby);
+       int (*reg_notifier)(struct wiphy *wiphy,
+                           struct regulatory_request *request);
 
        /* fields below are read-only, assigned by cfg80211 */
 
@@ -384,8 +405,15 @@ ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
  * domain should be in or by providing a completely build regulatory domain.
  * If the driver provides an ISO/IEC 3166 alpha2 userspace will be queried
  * for a regulatory domain structure for the respective country.
+ *
+ * The wiphy must have been registered to cfg80211 prior to this call.
+ * For cfg80211 drivers this means you must first use wiphy_register(),
+ * for mac80211 drivers you must first use ieee80211_register_hw().
+ *
+ * Drivers should check the return value, its possible you can get
+ * an -ENOMEM.
  */
-extern void regulatory_hint(struct wiphy *wiphy, const char *alpha2);
+extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2);
 
 /**
  * regulatory_hint_11d - hints a country IE as a regulatory domain
@@ -401,7 +429,6 @@ extern void regulatory_hint(struct wiphy *wiphy, const char *alpha2);
 extern void regulatory_hint_11d(struct wiphy *wiphy,
                                u8 *country_ie,
                                u8 country_ie_len);
-
 /**
  * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain
  * @wiphy: the wireless device we want to process the regulatory domain on