aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/scan.h
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2008-03-05 01:05:32 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-03-13 16:02:32 -0400
commit52933d815bff78605a490582a2212a8131482e00 (patch)
treed30f7107a771b3ef2b5d1b187fc9baa3c733b0b2 /drivers/net/wireless/libertas/scan.h
parentd9357136ac4729f589543afb6b1d17d443ae4f71 (diff)
libertas: implement SSID scanning for SIOCSIWSCAN
After my bit scan re-writing the SIOCSIWSCAN wext ioctl no longer supported scanning for a specific SSID. However, wpa_supplicant is a possible user of this ioctl, so here is code that add's this. While passing, removed even more of the debugfs-based scanning. You can (and should) the SIOCSIWSCAN to ask for scans, so there is no need for proprietary interfaces for scanning. And, besides, the scan result couldn't be used further, e.g. not for associating. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.h')
-rw-r--r--drivers/net/wireless/libertas/scan.h69
1 files changed, 2 insertions, 67 deletions
diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h
index 10d1196acf78..c50c8b74714b 100644
--- a/drivers/net/wireless/libertas/scan.h
+++ b/drivers/net/wireless/libertas/scan.h
@@ -12,8 +12,6 @@
12 12
13/** 13/**
14 * @brief Maximum number of channels that can be sent in a setuserscan ioctl 14 * @brief Maximum number of channels that can be sent in a setuserscan ioctl
15 *
16 * @sa lbs_ioctl_user_scan_cfg
17 */ 15 */
18#define LBS_IOCTL_USER_SCAN_CHAN_MAX 50 16#define LBS_IOCTL_USER_SCAN_CHAN_MAX 50
19 17
@@ -27,60 +25,6 @@
27#define LBS_SCAN_BSS_TYPE_ANY 3 25#define LBS_SCAN_BSS_TYPE_ANY 3
28 26
29/** 27/**
30 * @brief IOCTL channel sub-structure sent in lbs_ioctl_user_scan_cfg
31 *
32 * Multiple instances of this structure are included in the IOCTL command
33 * to configure a instance of a scan on the specific channel.
34 */
35struct lbs_ioctl_user_scan_chan {
36 u8 channumber; //!< channel Number to scan
37 u8 radiotype; //!< Radio type: 'B/G' band = 0, 'A' band = 1
38 u8 scantype; //!< Scan type: Active = 0, Passive = 1
39 u16 scantime; //!< Scan duration in milliseconds; if 0 default used
40};
41
42/**
43 * @brief IOCTL input structure to configure an immediate scan cmd to firmware
44 *
45 * Used in the setuserscan (LBS_SET_USER_SCAN) private ioctl. Specifies
46 * a number of parameters to be used in general for the scan as well
47 * as a channel list (lbs_ioctl_user_scan_chan) for each scan period
48 * desired.
49 *
50 * @sa lbs_set_user_scan_ioctl
51 */
52struct lbs_ioctl_user_scan_cfg {
53 /**
54 * @brief BSS type to be sent in the firmware command
55 *
56 * Field can be used to restrict the types of networks returned in the
57 * scan. valid settings are:
58 *
59 * - LBS_SCAN_BSS_TYPE_BSS (infrastructure)
60 * - LBS_SCAN_BSS_TYPE_IBSS (adhoc)
61 * - LBS_SCAN_BSS_TYPE_ANY (unrestricted, adhoc and infrastructure)
62 */
63 u8 bsstype;
64
65 /**
66 * @brief BSSID filter sent in the firmware command to limit the results
67 */
68 u8 bssid[ETH_ALEN];
69
70 /* Clear existing scan results matching this BSSID */
71 u8 clear_bssid;
72
73 /**
74 * @brief SSID filter sent in the firmware command to limit the results
75 */
76 char ssid[IW_ESSID_MAX_SIZE];
77 u8 ssid_len;
78
79 /* Clear existing scan results matching this SSID */
80 u8 clear_ssid;
81};
82
83/**
84 * @brief Structure used to store information for each beacon/probe response 28 * @brief Structure used to store information for each beacon/probe response
85 */ 29 */
86struct bss_descriptor { 30struct bss_descriptor {
@@ -136,21 +80,12 @@ int lbs_find_best_network_ssid(struct lbs_private *priv, u8 *out_ssid,
136 u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode); 80 u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
137 81
138int lbs_send_specific_ssid_scan(struct lbs_private *priv, u8 *ssid, 82int lbs_send_specific_ssid_scan(struct lbs_private *priv, u8 *ssid,
139 u8 ssid_len, u8 clear_ssid); 83 u8 ssid_len);
140
141int lbs_scan_networks(struct lbs_private *priv,
142 const struct lbs_ioctl_user_scan_cfg *puserscanin,
143 int full_scan);
144
145struct ifreq;
146 84
147struct iw_point;
148struct iw_param;
149struct iw_request_info;
150int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, 85int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
151 struct iw_point *dwrq, char *extra); 86 struct iw_point *dwrq, char *extra);
152int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, 87int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
153 struct iw_param *vwrq, char *extra); 88 union iwreq_data *wrqu, char *extra);
154 89
155void lbs_scan_worker(struct work_struct *work); 90void lbs_scan_worker(struct work_struct *work);
156 91