2 * Interface for the wlan network scan routines
4 * Driver interface functions and type declarations for the scan module
5 * implemented in scan.c.
10 #include <net/ieee80211.h>
14 * @brief Maximum number of channels that can be sent in a setuserscan ioctl
16 #define LBS_IOCTL_USER_SCAN_CHAN_MAX 50
18 //! Infrastructure BSS scan type in cmd_ds_802_11_scan
19 #define LBS_SCAN_BSS_TYPE_BSS 1
21 //! Adhoc BSS scan type in cmd_ds_802_11_scan
22 #define LBS_SCAN_BSS_TYPE_IBSS 2
24 //! Adhoc or Infrastructure BSS scan type in cmd_ds_802_11_scan, no filter
25 #define LBS_SCAN_BSS_TYPE_ANY 3
28 * @brief Structure used to store information for each beacon/probe response
30 struct bss_descriptor {
33 u8 ssid[IW_ESSID_MAX_SIZE + 1];
42 /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */
45 /* zero-terminated array of supported data rates */
46 u8 rates[MAX_RATES + 1];
48 unsigned long last_scanned;
50 union ieeetypes_phyparamset phyparamset;
51 union IEEEtypes_ssparamset ssparamset;
53 struct ieeetypes_countryinfofullset countryinfo;
55 u8 wpa_ie[MAX_WPA_IE_LEN];
57 u8 rsn_ie[MAX_WPA_IE_LEN];
62 struct list_head list;
65 int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
67 struct bss_descriptor *lbs_find_ssid_in_list(struct lbs_private *priv,
68 u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode,
71 struct bss_descriptor *lbs_find_bssid_in_list(struct lbs_private *priv,
74 int lbs_find_best_network_ssid(struct lbs_private *priv, u8 *out_ssid,
75 u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
77 int lbs_send_specific_ssid_scan(struct lbs_private *priv, u8 *ssid,
80 int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
81 struct iw_point *dwrq, char *extra);
82 int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
83 union iwreq_data *wrqu, char *extra);
85 void lbs_scan_worker(struct work_struct *work);