cfg80211: remove enum ieee80211_band
[cascardo/linux.git] / include / net / cfg80211.h
index 0bbfbf3..183916e 100644 (file)
@@ -67,26 +67,6 @@ struct wiphy;
  * wireless hardware capability structures
  */
 
-/**
- * enum ieee80211_band - supported frequency bands
- *
- * The bands are assigned this way because the supported
- * bitrates differ in these bands.
- *
- * @IEEE80211_BAND_2GHZ: 2.4GHz ISM band
- * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7)
- * @IEEE80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
- * @IEEE80211_NUM_BANDS: number of defined bands
- */
-enum ieee80211_band {
-       IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ,
-       IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ,
-       IEEE80211_BAND_60GHZ = NL80211_BAND_60GHZ,
-
-       /* keep last */
-       IEEE80211_NUM_BANDS
-};
-
 /**
  * enum ieee80211_channel_flags - channel flags
  *
@@ -167,7 +147,7 @@ enum ieee80211_channel_flags {
  * @dfs_cac_ms: DFS CAC time in milliseconds, this is valid for DFS channels.
  */
 struct ieee80211_channel {
-       enum ieee80211_band band;
+       enum nl80211_band band;
        u16 center_freq;
        u16 hw_value;
        u32 flags;
@@ -324,7 +304,7 @@ struct ieee80211_sta_vht_cap {
 struct ieee80211_supported_band {
        struct ieee80211_channel *channels;
        struct ieee80211_rate *bitrates;
-       enum ieee80211_band band;
+       enum nl80211_band band;
        int n_channels;
        int n_bitrates;
        struct ieee80211_sta_ht_cap ht_cap;
@@ -816,6 +796,7 @@ enum station_parameters_apply_mask {
  * @supported_oper_classes_len: number of supported operating classes
  * @opmode_notif: operating mode field from Operating Mode Notification
  * @opmode_notif_used: information if operating mode field is used
+ * @support_p2p_ps: information if station supports P2P PS mechanism
  */
 struct station_parameters {
        const u8 *supported_rates;
@@ -841,6 +822,7 @@ struct station_parameters {
        u8 supported_oper_classes_len;
        u8 opmode_notif;
        bool opmode_notif_used;
+       int support_p2p_ps;
 };
 
 /**
@@ -1368,7 +1350,7 @@ struct mesh_setup {
        bool user_mpm;
        u8 dtim_period;
        u16 beacon_interval;
-       int mcast_rate[IEEE80211_NUM_BANDS];
+       int mcast_rate[NUM_NL80211_BANDS];
        u32 basic_rates;
 };
 
@@ -1466,7 +1448,7 @@ struct cfg80211_scan_request {
        size_t ie_len;
        u32 flags;
 
-       u32 rates[IEEE80211_NUM_BANDS];
+       u32 rates[NUM_NL80211_BANDS];
 
        struct wireless_dev *wdev;
 
@@ -1619,7 +1601,7 @@ struct cfg80211_inform_bss {
 };
 
 /**
- * struct cfg80211_bss_ie_data - BSS entry IE data
+ * struct cfg80211_bss_ies - BSS entry IE data
  * @tsf: TSF contained in the frame that carried these IEs
  * @rcu_head: internal use, for freeing
  * @len: length of the IEs
@@ -1748,7 +1730,12 @@ enum cfg80211_assoc_req_flags {
  * @ie_len: Length of ie buffer in octets
  * @use_mfp: Use management frame protection (IEEE 802.11w) in this association
  * @crypto: crypto settings
- * @prev_bssid: previous BSSID, if not %NULL use reassociate frame
+ * @prev_bssid: previous BSSID, if not %NULL use reassociate frame. This is used
+ *     to indicate a request to reassociate within the ESS instead of a request
+ *     do the initial association with the ESS. When included, this is set to
+ *     the BSSID of the current association, i.e., to the value that is
+ *     included in the Current AP address field of the Reassociation Request
+ *     frame.
  * @flags:  See &enum cfg80211_assoc_req_flags
  * @ht_capa:  HT Capabilities over-rides.  Values set in ht_capa_mask
  *     will be used in ht_capa.  Un-supported values will be ignored.
@@ -1853,7 +1840,7 @@ struct cfg80211_ibss_params {
        bool privacy;
        bool control_port;
        bool userspace_handles_dfs;
-       int mcast_rate[IEEE80211_NUM_BANDS];
+       int mcast_rate[NUM_NL80211_BANDS];
        struct ieee80211_ht_cap ht_capa;
        struct ieee80211_ht_cap ht_capa_mask;
 };
@@ -1865,7 +1852,7 @@ struct cfg80211_ibss_params {
  * @delta: value of RSSI level adjustment.
  */
 struct cfg80211_bss_select_adjust {
-       enum ieee80211_band band;
+       enum nl80211_band band;
        s8 delta;
 };
 
@@ -1880,7 +1867,7 @@ struct cfg80211_bss_select_adjust {
 struct cfg80211_bss_selection {
        enum nl80211_bss_select_attr behaviour;
        union {
-               enum ieee80211_band band_pref;
+               enum nl80211_band band_pref;
                struct cfg80211_bss_select_adjust adjust;
        } param;
 };
@@ -1923,6 +1910,12 @@ struct cfg80211_bss_selection {
  * @pbss: if set, connect to a PCP instead of AP. Valid for DMG
  *     networks.
  * @bss_select: criteria to be used for BSS selection.
+ * @prev_bssid: previous BSSID, if not %NULL use reassociate frame. This is used
+ *     to indicate a request to reassociate within the ESS instead of a request
+ *     do the initial association with the ESS. When included, this is set to
+ *     the BSSID of the current association, i.e., to the value that is
+ *     included in the Current AP address field of the Reassociation Request
+ *     frame.
  */
 struct cfg80211_connect_params {
        struct ieee80211_channel *channel;
@@ -1947,6 +1940,7 @@ struct cfg80211_connect_params {
        struct ieee80211_vht_cap vht_capa_mask;
        bool pbss;
        struct cfg80211_bss_selection bss_select;
+       const u8 *prev_bssid;
 };
 
 /**
@@ -1976,7 +1970,7 @@ struct cfg80211_bitrate_mask {
                u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
                u16 vht_mcs[NL80211_VHT_NSS_MAX];
                enum nl80211_txrate_gi gi;
-       } control[IEEE80211_NUM_BANDS];
+       } control[NUM_NL80211_BANDS];
 };
 /**
  * struct cfg80211_pmksa - PMK Security Association
@@ -2373,7 +2367,17 @@ struct cfg80211_qos_map {
  * @connect: Connect to the ESS with the specified parameters. When connected,
  *     call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS.
  *     If the connection fails for some reason, call cfg80211_connect_result()
- *     with the status from the AP.
+ *     with the status from the AP. The driver is allowed to roam to other
+ *     BSSes within the ESS when the other BSS matches the connect parameters.
+ *     When such roaming is initiated by the driver, the driver is expected to
+ *     verify that the target matches the configured security parameters and
+ *     to use Reassociation Request frame instead of Association Request frame.
+ *     The connect function can also be used to request the driver to perform
+ *     a specific roam when connected to an ESS. In that case, the prev_bssid
+ *     parameter is set to the BSSID of the currently associated BSS as an
+ *     indication of requesting reassociation. In both the driver-initiated and
+ *     new connect() call initiated roaming cases, the result of roaming is
+ *     indicated with a call to cfg80211_roamed() or cfg80211_roamed_bss().
  *     (invoked with the wireless_dev mutex held)
  * @disconnect: Disconnect from the BSS/ESS.
  *     (invoked with the wireless_dev mutex held)
@@ -2653,7 +2657,7 @@ struct cfg80211_ops {
        int     (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev);
 
        int     (*set_mcast_rate)(struct wiphy *wiphy, struct net_device *dev,
-                                 int rate[IEEE80211_NUM_BANDS]);
+                                 int rate[NUM_NL80211_BANDS]);
 
        int     (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
 
@@ -3299,7 +3303,7 @@ struct wiphy {
         * help determine whether you own this wiphy or not. */
        const void *privid;
 
-       struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS];
+       struct ieee80211_supported_band *bands[NUM_NL80211_BANDS];
 
        /* Lets us get back the wiphy on the callback */
        void (*reg_notifier)(struct wiphy *wiphy,
@@ -3634,7 +3638,7 @@ static inline void *wdev_priv(struct wireless_dev *wdev)
  * @band: band, necessary due to channel number overlap
  * Return: The corresponding frequency (in MHz), or 0 if the conversion failed.
  */
-int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band);
+int ieee80211_channel_to_frequency(int chan, enum nl80211_band band);
 
 /**
  * ieee80211_frequency_to_channel - convert frequency to channel number
@@ -5065,7 +5069,7 @@ void cfg80211_ch_switch_started_notify(struct net_device *dev,
  * Returns %true if the conversion was successful, %false otherwise.
  */
 bool ieee80211_operating_class_to_band(u8 operating_class,
-                                      enum ieee80211_band *band);
+                                      enum nl80211_band *band);
 
 /**
  * ieee80211_chandef_to_operating_class - convert chandef to operation class