• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Scan interface for ST-Ericsson CW1200 mac80211 drivers
4  *
5  * Copyright (c) 2010, ST-Ericsson
6  * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
7  */
8 
9 #ifndef SCAN_H_INCLUDED
10 #define SCAN_H_INCLUDED
11 
12 #include <linux/semaphore.h>
13 #include "wsm.h"
14 
15 /* external */ struct sk_buff;
16 /* external */ struct cfg80211_scan_request;
17 /* external */ struct ieee80211_channel;
18 /* external */ struct ieee80211_hw;
19 /* external */ struct work_struct;
20 
21 struct cw1200_scan {
22 	struct semaphore lock;
23 	struct work_struct work;
24 	struct delayed_work timeout;
25 	struct cfg80211_scan_request *req;
26 	struct ieee80211_channel **begin;
27 	struct ieee80211_channel **curr;
28 	struct ieee80211_channel **end;
29 	struct wsm_ssid ssids[WSM_SCAN_MAX_NUM_OF_SSIDS];
30 	int output_power;
31 	int n_ssids;
32 	int status;
33 	atomic_t in_progress;
34 	/* Direct probe requests workaround */
35 	struct delayed_work probe_work;
36 	int direct_probe;
37 };
38 
39 int cw1200_hw_scan(struct ieee80211_hw *hw,
40 		   struct ieee80211_vif *vif,
41 		   struct ieee80211_scan_request *hw_req);
42 void cw1200_scan_work(struct work_struct *work);
43 void cw1200_scan_timeout(struct work_struct *work);
44 void cw1200_clear_recent_scan_work(struct work_struct *work);
45 void cw1200_scan_complete_cb(struct cw1200_common *priv,
46 			     struct wsm_scan_complete *arg);
47 void cw1200_scan_failed_cb(struct cw1200_common *priv);
48 
49 /* ******************************************************************** */
50 /* Raw probe requests TX workaround					*/
51 void cw1200_probe_work(struct work_struct *work);
52 
53 #endif
54