1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 #ifndef __WL18XX_SCAN_H__
   9 #define __WL18XX_SCAN_H__
  10 
  11 #include "../wlcore/wlcore.h"
  12 #include "../wlcore/cmd.h"
  13 #include "../wlcore/scan.h"
  14 
  15 struct tracking_ch_params {
  16         struct conn_scan_ch_params channel;
  17 
  18         __le32 bssid_lsb;
  19         __le16 bssid_msb;
  20 
  21         u8 padding[2];
  22 } __packed;
  23 
  24 
  25 enum
  26 {
  27         WL18XX_SCAN_RATE_1      = 0,
  28         WL18XX_SCAN_RATE_5_5    = 1,
  29         WL18XX_SCAN_RATE_6      = 2,
  30 };
  31 
  32 #define WL18XX_MAX_CHANNELS_5GHZ 32
  33 
  34 struct wl18xx_cmd_scan_params {
  35         struct wl1271_cmd_header header;
  36 
  37         u8 role_id;
  38         u8 scan_type;
  39 
  40         s8 rssi_threshold; 
  41         s8 snr_threshold;  
  42 
  43         u8 bss_type;       
  44         u8 ssid_from_list; 
  45         u8 filter;         
  46 
  47         
  48 
  49 
  50 
  51         u8 add_broadcast;
  52 
  53         u8 urgency;
  54         u8 protect;      
  55         u8 n_probe_reqs;    
  56         u8 terminate_after; 
  57 
  58         u8 passive[SCAN_MAX_BANDS]; 
  59         u8 active[SCAN_MAX_BANDS];  
  60         u8 dfs;            
  61         u8 passive_active; 
  62 
  63         __le16 short_cycles_msec;
  64         __le16 long_cycles_msec;
  65         u8 short_cycles_count;
  66         u8 total_cycles; 
  67         u8 padding[2];
  68 
  69         union {
  70                 struct {
  71                         struct conn_scan_ch_params channels_2[MAX_CHANNELS_2GHZ];
  72                         struct conn_scan_ch_params channels_5[WL18XX_MAX_CHANNELS_5GHZ];
  73                         struct conn_scan_ch_params channels_4[MAX_CHANNELS_4GHZ];
  74                 };
  75                 struct tracking_ch_params channels_tracking[WL1271_SCAN_MAX_CHANNELS];
  76         } ;
  77 
  78         u8 ssid[IEEE80211_MAX_SSID_LEN];
  79         u8 ssid_len;     
  80         u8 tag;
  81         u8 rate;
  82 
  83         
  84 
  85 
  86 
  87         u8 report_threshold;
  88 
  89         
  90 
  91 
  92         u8 terminate_on_report;
  93 
  94         u8 padding1[3];
  95 } __packed;
  96 
  97 struct wl18xx_cmd_scan_stop {
  98         struct wl1271_cmd_header header;
  99 
 100         u8 role_id;
 101         u8 scan_type;
 102         u8 padding[2];
 103 } __packed;
 104 
 105 int wl18xx_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 106                       struct cfg80211_scan_request *req);
 107 int wl18xx_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif);
 108 void wl18xx_scan_completed(struct wl1271 *wl, struct wl12xx_vif *wlvif);
 109 int wl18xx_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 110                             struct cfg80211_sched_scan_request *req,
 111                             struct ieee80211_scan_ies *ies);
 112 void wl18xx_scan_sched_scan_stop(struct wl1271 *wl, struct wl12xx_vif *wlvif);
 113 #endif