scan.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. * Interface for the wlan network scan routines
  3. *
  4. * Driver interface functions and type declarations for the scan module
  5. * implemented in scan.c.
  6. */
  7. #ifndef _LBS_SCAN_H
  8. #define _LBS_SCAN_H
  9. #include <net/iw_handler.h>
  10. struct lbs_private;
  11. #define MAX_NETWORK_COUNT 128
  12. /** Chan-freq-TxPower mapping table*/
  13. struct chan_freq_power {
  14. /** channel Number */
  15. u16 channel;
  16. /** frequency of this channel */
  17. u32 freq;
  18. /** Max allowed Tx power level */
  19. u16 maxtxpower;
  20. /** TRUE:channel unsupported; FLASE:supported*/
  21. u8 unsupported;
  22. };
  23. /** region-band mapping table*/
  24. struct region_channel {
  25. /** TRUE if this entry is valid */
  26. u8 valid;
  27. /** region code for US, Japan ... */
  28. u8 region;
  29. /** band B/G/A, used for BAND_CONFIG cmd */
  30. u8 band;
  31. /** Actual No. of elements in the array below */
  32. u8 nrcfp;
  33. /** chan-freq-txpower mapping table*/
  34. struct chan_freq_power *CFP;
  35. };
  36. /**
  37. * @brief Maximum number of channels that can be sent in a setuserscan ioctl
  38. */
  39. #define LBS_IOCTL_USER_SCAN_CHAN_MAX 50
  40. int lbs_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
  41. int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band);
  42. int lbs_send_specific_ssid_scan(struct lbs_private *priv, u8 *ssid,
  43. u8 ssid_len);
  44. int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
  45. struct iw_point *dwrq, char *extra);
  46. int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
  47. union iwreq_data *wrqu, char *extra);
  48. int lbs_scan_networks(struct lbs_private *priv, int full_scan);
  49. void lbs_scan_worker(struct work_struct *work);
  50. #endif