diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2019-09-19 14:25:48 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 10:48:54 +0200 |
commit | 40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1 (patch) | |
tree | d3d7723d90f9ec8ae5c77e30ce61df6ffd523640 /drivers/staging/wfx/wfx.h | |
parent | staging: wfx: implement 802.11 key handling (diff) | |
download | linux-dev-40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1.tar.xz linux-dev-40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1.zip |
staging: wfx: implement the rest of mac80211 API
Finish to fill struct ieee80211_ops with necessary callbacks. Driver is
now ready to be registered to mac80211.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20190919142527.31797-21-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/wfx.h')
-rw-r--r-- | drivers/staging/wfx/wfx.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index a86ddfaed825..489836837b0a 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -11,6 +11,8 @@ #define WFX_H #include <linux/completion.h> +#include <linux/workqueue.h> +#include <linux/mutex.h> #include <net/mac80211.h> #include "bh.h" @@ -61,8 +63,15 @@ struct wfx_dev { struct wfx_vif { struct wfx_dev *wdev; struct ieee80211_vif *vif; + struct ieee80211_channel *channel; int id; + enum wfx_state state; + int delayed_link_loss; + int bss_loss_state; + u32 bss_loss_confirm_id; + struct mutex bss_loss_lock; + struct delayed_work bss_loss_work; u32 link_id_map; struct wfx_link_entry link_id_db[WFX_MAX_STA_IN_AP_MODE]; @@ -72,6 +81,7 @@ struct wfx_vif { bool aid0_bit_set; bool mcast_tx; bool mcast_buffered; + struct wfx_grp_addr_table mcast_filter; struct timer_list mcast_timeout; struct work_struct mcast_start_work; struct work_struct mcast_stop_work; @@ -86,13 +96,40 @@ struct wfx_vif { u32 sta_asleep_mask; u32 pspoll_mask; spinlock_t ps_state_lock; + struct work_struct set_tim_work; + + int dtim_period; + int beacon_int; + bool enable_beacon; + struct work_struct set_beacon_wakeup_period_work; bool filter_bssid; bool fwd_probe_req; + bool disable_beacon_filter; + struct work_struct update_filtering_work; + u32 erp_info; + int cqm_rssi_thold; + bool setbssparams_done; + struct wfx_ht_info ht_info; struct wfx_edca_params edca; + struct hif_mib_set_uapsd_information uapsd_info; + struct hif_req_set_bss_params bss_params; + struct work_struct bss_params_work; + struct work_struct set_cts_work; + + int join_complete_status; + bool delayed_unjoin; + struct work_struct unjoin_work; struct wfx_scan scan; + + struct hif_req_set_pm_mode powersave_mode; + struct completion set_pm_mode_complete; + + struct list_head event_queue; + spinlock_t event_queue_lock; + struct work_struct event_handler_work; }; static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id) @@ -126,6 +163,20 @@ static inline struct wfx_vif *wvif_iterate(struct wfx_dev *wdev, struct wfx_vif return NULL; } +static inline int wvif_count(struct wfx_dev *wdev) +{ + int i; + int ret = 0; + struct wfx_vif *wvif; + + for (i = 0; i < ARRAY_SIZE(wdev->vif); i++) { + wvif = wdev_to_wvif(wdev, i); + if (wvif) + ret++; + } + return ret; +} + static inline void memreverse(uint8_t *src, uint8_t length) { uint8_t *lo = src; |