2007-02-10 07:25:27 -07:00
|
|
|
/**
|
|
|
|
* Interface for the wlan network scan routines
|
|
|
|
*
|
|
|
|
* Driver interface functions and type declarations for the scan module
|
2007-11-15 16:05:47 -07:00
|
|
|
* implemented in scan.c.
|
2007-02-10 07:25:27 -07:00
|
|
|
*/
|
2007-11-15 16:05:47 -07:00
|
|
|
#ifndef _LBS_SCAN_H
|
|
|
|
#define _LBS_SCAN_H
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2007-05-10 20:51:28 -06:00
|
|
|
#include <net/ieee80211.h>
|
2007-02-10 07:25:27 -07:00
|
|
|
#include "hostcmd.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Maximum number of channels that can be sent in a setuserscan ioctl
|
|
|
|
*/
|
2007-11-15 16:05:47 -07:00
|
|
|
#define LBS_IOCTL_USER_SCAN_CHAN_MAX 50
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2008-03-03 04:18:03 -07:00
|
|
|
//! Infrastructure BSS scan type in cmd_ds_802_11_scan
|
2007-11-15 16:05:47 -07:00
|
|
|
#define LBS_SCAN_BSS_TYPE_BSS 1
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2008-03-03 04:18:03 -07:00
|
|
|
//! Adhoc BSS scan type in cmd_ds_802_11_scan
|
2007-11-15 16:05:47 -07:00
|
|
|
#define LBS_SCAN_BSS_TYPE_IBSS 2
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2008-03-03 04:18:03 -07:00
|
|
|
//! Adhoc or Infrastructure BSS scan type in cmd_ds_802_11_scan, no filter
|
2007-11-15 16:05:47 -07:00
|
|
|
#define LBS_SCAN_BSS_TYPE_ANY 3
|
2007-02-10 07:25:27 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Structure used to store information for each beacon/probe response
|
|
|
|
*/
|
|
|
|
struct bss_descriptor {
|
2007-05-25 11:16:38 -06:00
|
|
|
u8 bssid[ETH_ALEN];
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2007-05-28 21:54:55 -06:00
|
|
|
u8 ssid[IW_ESSID_MAX_SIZE + 1];
|
|
|
|
u8 ssid_len;
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2007-08-02 08:43:44 -06:00
|
|
|
u16 capability;
|
2008-03-19 10:08:32 -06:00
|
|
|
u32 rssi;
|
2007-02-10 07:25:27 -07:00
|
|
|
u32 channel;
|
|
|
|
u16 beaconperiod;
|
|
|
|
u32 atimwindow;
|
|
|
|
|
2007-08-02 11:12:45 -06:00
|
|
|
/* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */
|
2007-05-10 20:58:02 -06:00
|
|
|
u8 mode;
|
2007-08-02 11:12:45 -06:00
|
|
|
|
2007-08-02 09:40:45 -06:00
|
|
|
/* zero-terminated array of supported data rates */
|
|
|
|
u8 rates[MAX_RATES + 1];
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2007-05-25 14:15:56 -06:00
|
|
|
unsigned long last_scanned;
|
|
|
|
|
2007-02-10 07:25:27 -07:00
|
|
|
union ieeetypes_phyparamset phyparamset;
|
|
|
|
union IEEEtypes_ssparamset ssparamset;
|
|
|
|
|
|
|
|
struct ieeetypes_countryinfofullset countryinfo;
|
|
|
|
|
2007-05-10 20:51:28 -06:00
|
|
|
u8 wpa_ie[MAX_WPA_IE_LEN];
|
|
|
|
size_t wpa_ie_len;
|
|
|
|
u8 rsn_ie[MAX_WPA_IE_LEN];
|
|
|
|
size_t rsn_ie_len;
|
2007-05-25 14:15:56 -06:00
|
|
|
|
2007-08-02 08:51:27 -06:00
|
|
|
u8 mesh;
|
|
|
|
|
2007-05-25 14:15:56 -06:00
|
|
|
struct list_head list;
|
2007-02-10 07:25:27 -07:00
|
|
|
};
|
|
|
|
|
2007-11-15 16:05:47 -07:00
|
|
|
int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
|
2007-05-25 14:15:56 -06:00
|
|
|
|
2007-12-08 13:04:36 -07:00
|
|
|
struct bss_descriptor *lbs_find_ssid_in_list(struct lbs_private *priv,
|
2007-11-15 16:05:47 -07:00
|
|
|
u8 *ssid, u8 ssid_len, u8 *bssid, u8 mode,
|
|
|
|
int channel);
|
2007-05-25 14:15:56 -06:00
|
|
|
|
2007-12-08 13:04:36 -07:00
|
|
|
struct bss_descriptor *lbs_find_bssid_in_list(struct lbs_private *priv,
|
2007-11-15 16:05:47 -07:00
|
|
|
u8 *bssid, u8 mode);
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2007-11-23 07:43:44 -07:00
|
|
|
int lbs_find_best_network_ssid(struct lbs_private *priv, u8 *out_ssid,
|
2007-05-28 21:54:55 -06:00
|
|
|
u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2007-11-23 07:43:44 -07:00
|
|
|
int lbs_send_specific_ssid_scan(struct lbs_private *priv, u8 *ssid,
|
2008-03-04 23:05:32 -07:00
|
|
|
u8 ssid_len);
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2007-11-15 16:05:47 -07:00
|
|
|
int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
|
2007-02-10 07:25:27 -07:00
|
|
|
struct iw_point *dwrq, char *extra);
|
2007-11-15 16:05:47 -07:00
|
|
|
int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
|
2008-03-04 23:05:32 -07:00
|
|
|
union iwreq_data *wrqu, char *extra);
|
2007-02-10 07:25:27 -07:00
|
|
|
|
2007-11-15 16:05:47 -07:00
|
|
|
void lbs_scan_worker(struct work_struct *work);
|
2007-08-02 11:19:04 -06:00
|
|
|
|
2007-11-15 16:05:47 -07:00
|
|
|
#endif
|