aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/scan.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/scan.h')
-rw-r--r--drivers/net/wireless/libertas/scan.h81
1 files changed, 43 insertions, 38 deletions
diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h
index 405f4f0fe575..bd019e5ff1eb 100644
--- a/drivers/net/wireless/libertas/scan.h
+++ b/drivers/net/wireless/libertas/scan.h
@@ -51,7 +51,7 @@ struct wlan_scan_cmd_config {
51 /** 51 /**
52 * @brief Specific BSSID used to filter scan results in the firmware 52 * @brief Specific BSSID used to filter scan results in the firmware
53 */ 53 */
54 u8 specificBSSID[ETH_ALEN]; 54 u8 bssid[ETH_ALEN];
55 55
56 /** 56 /**
57 * @brief length of TLVs sent in command starting at tlvBuffer 57 * @brief length of TLVs sent in command starting at tlvBuffer
@@ -91,15 +91,6 @@ struct wlan_ioctl_user_scan_chan {
91 * @sa libertas_set_user_scan_ioctl 91 * @sa libertas_set_user_scan_ioctl
92 */ 92 */
93struct wlan_ioctl_user_scan_cfg { 93struct wlan_ioctl_user_scan_cfg {
94
95 /**
96 * @brief Flag set to keep the previous scan table intact
97 *
98 * If set, the scan results will accumulate, replacing any previous
99 * matched entries for a BSS with the new scan data
100 */
101 u8 keeppreviousscan; //!< Do not erase the existing scan results
102
103 /** 94 /**
104 * @brief BSS type to be sent in the firmware command 95 * @brief BSS type to be sent in the firmware command
105 * 96 *
@@ -117,15 +108,22 @@ struct wlan_ioctl_user_scan_cfg {
117 */ 108 */
118 u8 numprobes; 109 u8 numprobes;
119 110
120 /** 111 /**
121 * @brief BSSID filter sent in the firmware command to limit the results 112 * @brief BSSID filter sent in the firmware command to limit the results
122 */ 113 */
123 u8 specificBSSID[ETH_ALEN]; 114 u8 bssid[ETH_ALEN];
124 115
125 /** 116 /* Clear existing scan results matching this BSSID */
126 * @brief SSID filter sent in the firmware command to limit the results 117 u8 clear_bssid;
127 */ 118
128 char specificSSID[IW_ESSID_MAX_SIZE + 1]; 119 /**
120 * @brief SSID filter sent in the firmware command to limit the results
121 */
122 char ssid[IW_ESSID_MAX_SIZE];
123 u8 ssid_len;
124
125 /* Clear existing scan results matching this SSID */
126 u8 clear_ssid;
129 127
130 /** 128 /**
131 * @brief Variable number (fixed maximum) of channels to scan up 129 * @brief Variable number (fixed maximum) of channels to scan up
@@ -137,9 +135,10 @@ struct wlan_ioctl_user_scan_cfg {
137 * @brief Structure used to store information for each beacon/probe response 135 * @brief Structure used to store information for each beacon/probe response
138 */ 136 */
139struct bss_descriptor { 137struct bss_descriptor {
140 u8 macaddress[ETH_ALEN]; 138 u8 bssid[ETH_ALEN];
141 139
142 struct WLAN_802_11_SSID ssid; 140 u8 ssid[IW_ESSID_MAX_SIZE + 1];
141 u8 ssid_len;
143 142
144 /* WEP encryption requirement */ 143 /* WEP encryption requirement */
145 u32 privacy; 144 u32 privacy;
@@ -156,15 +155,15 @@ struct bss_descriptor {
156 u8 mode; 155 u8 mode;
157 u8 libertas_supported_rates[WLAN_SUPPORTED_RATES]; 156 u8 libertas_supported_rates[WLAN_SUPPORTED_RATES];
158 157
159 int extra_ie; 158 __le64 timestamp; //!< TSF value included in the beacon/probe response
159 unsigned long last_scanned;
160 160
161 u8 timestamp[8]; //!< TSF value included in the beacon/probe response
162 union ieeetypes_phyparamset phyparamset; 161 union ieeetypes_phyparamset phyparamset;
163 union IEEEtypes_ssparamset ssparamset; 162 union IEEEtypes_ssparamset ssparamset;
164 struct ieeetypes_capinfo cap; 163 struct ieeetypes_capinfo cap;
165 u8 datarates[WLAN_SUPPORTED_RATES]; 164 u8 datarates[WLAN_SUPPORTED_RATES];
166 165
167 __le64 networktsf; //!< TSF timestamp from the current firmware TSF 166 u64 networktsf; //!< TSF timestamp from the current firmware TSF
168 167
169 struct ieeetypes_countryinfofullset countryinfo; 168 struct ieeetypes_countryinfofullset countryinfo;
170 169
@@ -172,24 +171,29 @@ struct bss_descriptor {
172 size_t wpa_ie_len; 171 size_t wpa_ie_len;
173 u8 rsn_ie[MAX_WPA_IE_LEN]; 172 u8 rsn_ie[MAX_WPA_IE_LEN];
174 size_t rsn_ie_len; 173 size_t rsn_ie_len;
174
175 struct list_head list;
175}; 176};
176 177
177extern int libertas_SSID_cmp(struct WLAN_802_11_SSID *ssid1, 178extern int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len);
178 struct WLAN_802_11_SSID *ssid2); 179
179extern int libertas_find_SSID_in_list(wlan_adapter * adapter, struct WLAN_802_11_SSID *ssid, 180struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter,
180 u8 * bssid, u8 mode); 181 u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode,
181int libertas_find_best_SSID_in_list(wlan_adapter * adapter, u8 mode); 182 int channel);
182extern int libertas_find_BSSID_in_list(wlan_adapter * adapter, u8 * bssid, u8 mode); 183
184struct bss_descriptor * libertas_find_best_ssid_in_list(wlan_adapter * adapter,
185 u8 mode);
186
187extern struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter,
188 u8 * bssid, u8 mode);
183 189
184int libertas_find_best_network_SSID(wlan_private * priv, 190int libertas_find_best_network_ssid(wlan_private * priv, u8 *out_ssid,
185 struct WLAN_802_11_SSID *pSSID, 191 u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode);
186 u8 preferred_mode, u8 *out_mode);
187 192
188extern int libertas_send_specific_SSID_scan(wlan_private * priv, 193extern int libertas_send_specific_ssid_scan(wlan_private * priv, u8 *ssid,
189 struct WLAN_802_11_SSID *prequestedssid, 194 u8 ssid_len, u8 clear_ssid);
190 u8 keeppreviousscan); 195extern int libertas_send_specific_bssid_scan(wlan_private * priv,
191extern int libertas_send_specific_BSSID_scan(wlan_private * priv, 196 u8 * bssid, u8 clear_bssid);
192 u8 * bssid, u8 keeppreviousscan);
193 197
194extern int libertas_cmd_80211_scan(wlan_private * priv, 198extern int libertas_cmd_80211_scan(wlan_private * priv,
195 struct cmd_ds_command *cmd, 199 struct cmd_ds_command *cmd,
@@ -199,7 +203,8 @@ extern int libertas_ret_80211_scan(wlan_private * priv,
199 struct cmd_ds_command *resp); 203 struct cmd_ds_command *resp);
200 204
201int wlan_scan_networks(wlan_private * priv, 205int wlan_scan_networks(wlan_private * priv,
202 const struct wlan_ioctl_user_scan_cfg * puserscanin); 206 const struct wlan_ioctl_user_scan_cfg * puserscanin,
207 int full_scan);
203 208
204struct ifreq; 209struct ifreq;
205 210