aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/scan.h
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2019-12-17 16:15:35 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-18 15:56:30 +0100
commitd1c015b4ef6f2ab74b19c216cfff07742b7665cf (patch)
tree73069d085b1160225b972dc01b85274c9799fd8a /drivers/staging/wfx/scan.h
parentstaging: wfx: simplify hif_set_template_frame() usage (diff)
downloadlinux-dev-d1c015b4ef6f2ab74b19c216cfff07742b7665cf.tar.xz
linux-dev-d1c015b4ef6f2ab74b19c216cfff07742b7665cf.zip
staging: wfx: rewrite wfx_hw_scan()
Scan requests from mac80211 must be splitted in a few hardware requests (it is necessary to split channels with active scan and channels with passive scan). Current code schedules a work_struct for each hardware request and one delayed_work to handle scan timeout. It is far simpler to run send all the hardware requests synchronously and replace delayed_work with a simple wait_for_completion_timeout(). Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-51-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/scan.h')
-rw-r--r--drivers/staging/wfx/scan.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/staging/wfx/scan.h b/drivers/staging/wfx/scan.h
index e71e5f0f522e..03bc6c7e562d 100644
--- a/drivers/staging/wfx/scan.h
+++ b/drivers/staging/wfx/scan.h
@@ -8,8 +8,6 @@
#ifndef WFX_SCAN_H
#define WFX_SCAN_H
-#include <linux/semaphore.h>
-#include <linux/workqueue.h>
#include <net/mac80211.h>
#include "hif_api_cmd.h"
@@ -17,26 +15,9 @@
struct wfx_dev;
struct wfx_vif;
-struct wfx_scan {
- struct semaphore lock;
- struct work_struct work;
- struct delayed_work timeout;
- struct cfg80211_scan_request *req;
- struct ieee80211_channel **begin;
- struct ieee80211_channel **curr;
- struct ieee80211_channel **end;
- struct hif_ssid_def ssids[HIF_API_MAX_NB_SSIDS];
- int output_power;
- int n_ssids;
- int status;
- atomic_t in_progress;
-};
-
int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_scan_request *req);
-void wfx_scan_work(struct work_struct *work);
-void wfx_scan_timeout(struct work_struct *work);
-void wfx_scan_complete_cb(struct wfx_vif *wvif,
- const struct hif_ind_scan_cmpl *arg);
+void wfx_scan_complete(struct wfx_vif *wvif,
+ const struct hif_ind_scan_cmpl *ind);
#endif /* WFX_SCAN_H */