blob: 8fb1706d752667ae0682fd2a730665d16a765f21 [file] [log] [blame]
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02001/**
2 * Interface for the wlan network scan routines
3 *
4 * Driver interface functions and type declarations for the scan module
Holger Schurig10078322007-11-15 18:05:47 -05005 * implemented in scan.c.
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02006 */
Holger Schurig10078322007-11-15 18:05:47 -05007#ifndef _LBS_SCAN_H
8#define _LBS_SCAN_H
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02009
Johannes Berg2c7060022008-10-30 22:09:54 +010010#include <net/iw_handler.h>
11
Holger Schurig2d465022009-10-22 15:30:48 +020012struct lbs_private;
13
Johannes Berg2c7060022008-10-30 22:09:54 +010014#define MAX_NETWORK_COUNT 128
15
Holger Schurig2d465022009-10-22 15:30:48 +020016/** Chan-freq-TxPower mapping table*/
17struct chan_freq_power {
18 /** channel Number */
19 u16 channel;
20 /** frequency of this channel */
21 u32 freq;
22 /** Max allowed Tx power level */
23 u16 maxtxpower;
24 /** TRUE:channel unsupported; FLASE:supported*/
25 u8 unsupported;
26};
27
28/** region-band mapping table*/
29struct region_channel {
30 /** TRUE if this entry is valid */
31 u8 valid;
32 /** region code for US, Japan ... */
33 u8 region;
34 /** band B/G/A, used for BAND_CONFIG cmd */
35 u8 band;
36 /** Actual No. of elements in the array below */
37 u8 nrcfp;
38 /** chan-freq-txpower mapping table*/
39 struct chan_freq_power *CFP;
40};
41
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020042/**
43 * @brief Maximum number of channels that can be sent in a setuserscan ioctl
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020044 */
Holger Schurig10078322007-11-15 18:05:47 -050045#define LBS_IOCTL_USER_SCAN_CHAN_MAX 50
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020046
Holger Schurig10078322007-11-15 18:05:47 -050047int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
Dan Williamsfcdb53d2007-05-25 16:15:56 -040048
Holger Schurig2d465022009-10-22 15:30:48 +020049int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band);
50
Holger Schurig69f90322007-11-23 15:43:44 +010051int lbs_send_specific_ssid_scan(struct lbs_private *priv, u8 *ssid,
Holger Schurig52933d82008-03-05 07:05:32 +010052 u8 ssid_len);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020053
Holger Schurig10078322007-11-15 18:05:47 -050054int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020055 struct iw_point *dwrq, char *extra);
Holger Schurig10078322007-11-15 18:05:47 -050056int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
Holger Schurig52933d82008-03-05 07:05:32 +010057 union iwreq_data *wrqu, char *extra);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020058
Holger Schurig245bf202008-04-02 16:27:42 +020059int lbs_scan_networks(struct lbs_private *priv, int full_scan);
60
Holger Schurig10078322007-11-15 18:05:47 -050061void lbs_scan_worker(struct work_struct *work);
Dan Williams2afc0c52007-08-02 13:19:04 -040062
Holger Schurig10078322007-11-15 18:05:47 -050063#endif