mac80211: pass station to ieee80211_vht_cap_ie_to_sta_vht_cap
[deliverable/linux.git] / net / mac80211 / ieee80211_i.h
index fa6d43e6197f5c58c153258df211aafca5fc3515..9206d43ca5720a02c657c7bb7be5b27bbd961e45 100644 (file)
@@ -86,23 +86,11 @@ struct ieee80211_fragment_entry {
 
 
 struct ieee80211_bss {
-       /* don't want to look up all the time */
-       size_t ssid_len;
-       u8 ssid[IEEE80211_MAX_SSID_LEN];
-
-       u32 device_ts;
+       u32 device_ts_beacon, device_ts_presp;
 
        bool wmm_used;
        bool uapsd_supported;
 
-       unsigned long last_probe_resp;
-
-#ifdef CONFIG_MAC80211_MESH
-       u8 *mesh_id;
-       size_t mesh_id_len;
-       u8 *mesh_cfg;
-#endif
-
 #define IEEE80211_MAX_SUPP_RATES 32
        u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
        size_t supp_rates_len;
@@ -153,31 +141,6 @@ enum ieee80211_bss_valid_data_flags {
        IEEE80211_BSS_VALID_ERP                 = BIT(3)
 };
 
-static inline u8 *bss_mesh_cfg(struct ieee80211_bss *bss)
-{
-#ifdef CONFIG_MAC80211_MESH
-       return bss->mesh_cfg;
-#endif
-       return NULL;
-}
-
-static inline u8 *bss_mesh_id(struct ieee80211_bss *bss)
-{
-#ifdef CONFIG_MAC80211_MESH
-       return bss->mesh_id;
-#endif
-       return NULL;
-}
-
-static inline u8 bss_mesh_id_len(struct ieee80211_bss *bss)
-{
-#ifdef CONFIG_MAC80211_MESH
-       return bss->mesh_id_len;
-#endif
-       return 0;
-}
-
-
 typedef unsigned __bitwise__ ieee80211_tx_result;
 #define TX_CONTINUE    ((__force ieee80211_tx_result) 0u)
 #define TX_DROP                ((__force ieee80211_tx_result) 1u)
@@ -380,6 +343,7 @@ struct ieee80211_mgd_auth_data {
        u8 key[WLAN_KEY_LEN_WEP104];
        u8 key_len, key_idx;
        bool done;
+       bool timeout_started;
 
        u16 sae_trans, sae_status;
        size_t data_len;
@@ -399,12 +363,14 @@ struct ieee80211_mgd_assoc_data {
        u8 ssid_len;
        u8 supp_rates_len;
        bool wmm, uapsd;
-       bool have_beacon;
-       bool sent_assoc;
+       bool have_beacon, need_beacon;
        bool synced;
+       bool timeout_started;
 
        u8 ap_ht_param;
 
+       struct ieee80211_vht_cap ap_vht_cap;
+
        size_t ie_len;
        u8 ie[];
 };
@@ -423,6 +389,7 @@ struct ieee80211_if_managed {
        unsigned long probe_timeout;
        int probe_send_count;
        bool nullfunc_failed;
+       bool connection_loss;
 
        struct mutex mtx;
        struct cfg80211_bss *associated;
@@ -447,6 +414,10 @@ struct ieee80211_if_managed {
        bool beacon_crc_valid;
        u32 beacon_crc;
 
+       bool status_acked;
+       bool status_received;
+       __le16 status_fc;
+
        enum {
                IEEE80211_MFP_DISABLED,
                IEEE80211_MFP_OPTIONAL,
@@ -621,6 +592,11 @@ struct ieee80211_if_mesh {
        s64 sync_offset_clockdrift_max;
        spinlock_t sync_offset_lock;
        bool adjusting_tbtt;
+       /* mesh power save */
+       enum nl80211_mesh_power_mode nonpeer_pm;
+       int ps_peers_light_sleep;
+       int ps_peers_deep_sleep;
+       struct ps_data ps;
 };
 
 #ifdef CONFIG_MAC80211_MESH
@@ -659,10 +635,13 @@ enum ieee80211_sub_if_data_flags {
  *     change handling while the interface is up
  * @SDATA_STATE_OFFCHANNEL: This interface is currently in offchannel
  *     mode, so queues are stopped
+ * @SDATA_STATE_OFFCHANNEL_BEACON_STOPPED: Beaconing was stopped due
+ *     to offchannel, reset when offchannel returns
  */
 enum ieee80211_sdata_state_bits {
        SDATA_STATE_RUNNING,
        SDATA_STATE_OFFCHANNEL,
+       SDATA_STATE_OFFCHANNEL_BEACON_STOPPED,
 };
 
 /**
@@ -685,6 +664,7 @@ struct ieee80211_chanctx {
 
        enum ieee80211_chanctx_mode mode;
        int refcount;
+       bool driver_present;
 
        struct ieee80211_chanctx_conf conf;
 };
@@ -711,9 +691,6 @@ struct ieee80211_sub_if_data {
 
        char name[IFNAMSIZ];
 
-       /* to detect idle changes */
-       bool old_idle;
-
        /* Fragment table for host-based reassembly */
        struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX];
        unsigned int fragment_next;
@@ -741,14 +718,15 @@ struct ieee80211_sub_if_data {
        struct work_struct work;
        struct sk_buff_head skb_queue;
 
-       bool arp_filter_state;
-
        u8 needed_rx_chains;
        enum ieee80211_smps_mode smps_mode;
 
        int user_power_level; /* in dBm */
        int ap_power_level; /* in dBm */
 
+       bool radar_required;
+       struct delayed_work dfs_cac_timer_work;
+
        /*
         * AP this belongs to: self in AP mode and
         * corresponding AP in VLAN mode, NULL for
@@ -783,6 +761,11 @@ struct ieee80211_sub_if_data {
                struct dentry *default_mgmt_key;
        } debugfs;
 #endif
+
+#ifdef CONFIG_PM
+       struct ieee80211_bss_conf suspend_bss_conf;
+#endif
+
        /* must be last, dynamically sized area in this! */
        struct ieee80211_vif vif;
 };
@@ -831,6 +814,7 @@ enum queue_stop_reason {
        IEEE80211_QUEUE_STOP_REASON_AGGREGATION,
        IEEE80211_QUEUE_STOP_REASON_SUSPEND,
        IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
+       IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL,
 };
 
 #ifdef CONFIG_MAC80211_LEDS
@@ -963,6 +947,10 @@ struct ieee80211_local {
        /* wowlan is enabled -- don't reconfig on resume */
        bool wowlan;
 
+       /* DFS/radar detection is enabled */
+       bool radar_detect_enabled;
+       struct work_struct radar_detected_work;
+
        /* number of RX chains the hardware has */
        u8 rx_chains;
 
@@ -977,14 +965,7 @@ struct ieee80211_local {
        struct sk_buff_head skb_queue;
        struct sk_buff_head skb_queue_unreliable;
 
-       /*
-        * Internal FIFO queue which is shared between multiple rx path
-        * stages. Its main task is to provide a serialization mechanism,
-        * so all rx handlers can enjoy having exclusive access to their
-        * private data structures.
-        */
-       struct sk_buff_head rx_skb_queue;
-       bool running_rx_handler;        /* protected by rx_skb_queue.lock */
+       spinlock_t rx_path_lock;
 
        /* Station data */
        /*
@@ -1118,14 +1099,13 @@ struct ieee80211_local {
        struct timer_list dynamic_ps_timer;
        struct notifier_block network_latency_notifier;
        struct notifier_block ifa_notifier;
+       struct notifier_block ifa6_notifier;
 
        /*
         * The dynamic ps timeout configured from user space via WEXT -
         * this will override whatever chosen by mac80211 internally.
         */
        int dynamic_ps_forced_timeout;
-       int dynamic_ps_user_timeout;
-       bool disable_dynamic_ps;
 
        int user_power_level; /* in dBm, for all interfaces */
 
@@ -1195,7 +1175,6 @@ struct ieee802_11_elems {
        struct ieee80211_tim_ie *tim;
        u8 *ibss_params;
        u8 *challenge;
-       u8 *wpa;
        u8 *rsn;
        u8 *erp_info;
        u8 *ext_supp_rates;
@@ -1208,6 +1187,7 @@ struct ieee802_11_elems {
        struct ieee80211_meshconf_ie *mesh_config;
        u8 *mesh_id;
        u8 *peering;
+       __le16 *awake_window;
        u8 *preq;
        u8 *prep;
        u8 *perr;
@@ -1227,7 +1207,6 @@ struct ieee802_11_elems {
        u8 tim_len;
        u8 ibss_params_len;
        u8 challenge_len;
-       u8 wpa_len;
        u8 rsn_len;
        u8 erp_info_len;
        u8 ext_supp_rates_len;
@@ -1308,6 +1287,8 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
 void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
 void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
 void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata);
+void ieee80211_mgd_conn_tx_status(struct ieee80211_sub_if_data *sdata,
+                                 __le16 fc, bool acked);
 
 /* IBSS code */
 void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local);
@@ -1357,10 +1338,8 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);
 void ieee80211_sched_scan_stopped_work(struct work_struct *work);
 
 /* off-channel helpers */
-void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
-                                   bool offchannel_ps_enable);
-void ieee80211_offchannel_return(struct ieee80211_local *local,
-                                bool offchannel_ps_disable);
+void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local);
+void ieee80211_offchannel_return(struct ieee80211_local *local);
 void ieee80211_roc_setup(struct ieee80211_local *local);
 void ieee80211_start_next_roc(struct ieee80211_local *local);
 void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata);
@@ -1421,7 +1400,8 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
                                     u16 initiator, u16 reason, bool stop);
 void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
                                    u16 initiator, u16 reason, bool stop);
-void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, bool tx);
+void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta,
+                                        enum ieee80211_agg_stop_reason reason);
 void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
                             struct sta_info *sta,
                             struct ieee80211_mgmt *mgmt, size_t len);
@@ -1435,11 +1415,9 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
                                     size_t len);
 
 int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
-                                  enum ieee80211_back_parties initiator,
-                                  bool tx);
+                                  enum ieee80211_agg_stop_reason reason);
 int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
-                                   enum ieee80211_back_parties initiator,
-                                   bool tx);
+                                   enum ieee80211_agg_stop_reason reason);
 void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
 void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
 void ieee80211_ba_session_work(struct work_struct *work);
@@ -1452,7 +1430,8 @@ u8 ieee80211_mcs_to_chains(const struct ieee80211_mcs_info *mcs);
 void ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata,
                                         struct ieee80211_supported_band *sband,
                                         struct ieee80211_vht_cap *vht_cap_ie,
-                                        struct ieee80211_sta_vht_cap *vht_cap);
+                                        struct sta_info *sta);
+
 /* Spectrum management */
 void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
                                       struct ieee80211_mgmt *mgmt,
@@ -1571,7 +1550,8 @@ static inline void ieee80211_add_pending_skbs(struct ieee80211_local *local,
 void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
                         u16 transaction, u16 auth_alg, u16 status,
                         u8 *extra, size_t extra_len, const u8 *bssid,
-                        const u8 *da, const u8 *key, u8 key_len, u8 key_idx);
+                        const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
+                        u32 tx_flags);
 void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
                                    const u8 *bssid, u16 stype, u16 reason,
                                    bool send_frame, u8 *frame_buf);
@@ -1588,7 +1568,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
 void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
                              const u8 *ssid, size_t ssid_len,
                              const u8 *ie, size_t ie_len,
-                             u32 ratemask, bool directed, bool no_cck,
+                             u32 ratemask, bool directed, u32 tx_flags,
                              struct ieee80211_channel *channel, bool scan);
 
 void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
@@ -1629,9 +1609,18 @@ ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata,
                          enum ieee80211_chanctx_mode mode);
 void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata);
 void ieee80211_vif_vlan_copy_chanctx(struct ieee80211_sub_if_data *sdata);
+void ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata,
+                                        bool clear);
 
 void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local,
                                   struct ieee80211_chanctx *chanctx);
+void ieee80211_recalc_radar_chanctx(struct ieee80211_local *local,
+                                   struct ieee80211_chanctx *chanctx);
+
+void ieee80211_dfs_cac_timer(unsigned long data);
+void ieee80211_dfs_cac_timer_work(struct work_struct *work);
+void ieee80211_dfs_cac_cancel(struct ieee80211_local *local);
+void ieee80211_dfs_radar_detected_work(struct work_struct *work);
 
 #ifdef CONFIG_MAC80211_NOINLINE
 #define debug_noinline noinline
This page took 0.101412 seconds and 5 git commands to generate.