X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fwireless%2Flibertas%2Fscan.h;h=c29c031bef8cf8a9798ee9bf31e9314e0acc0676;hb=e56188ac4163cb276b7650949c1e8e20fb2f9c73;hp=d93aa7fa44fd9ad3c19815d0d03fa5fec2279420;hpb=805f53f085346b6765eda02820721a14ce0d644f;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/wireless/libertas/scan.h b/drivers/net/wireless/libertas/scan.h index d93aa7fa44f..c29c031bef8 100644 --- a/drivers/net/wireless/libertas/scan.h +++ b/drivers/net/wireless/libertas/scan.h @@ -1,6 +1,3 @@ -/* -*- mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ -/* vi: set expandtab shiftwidth=4 tabstop=4 textwidth=78: */ - /** * Interface for the wlan network scan routines * @@ -10,6 +7,7 @@ #ifndef _WLAN_SCAN_H #define _WLAN_SCAN_H +#include #include "hostcmd.h" /** @@ -53,7 +51,7 @@ struct wlan_scan_cmd_config { /** * @brief Specific BSSID used to filter scan results in the firmware */ - u8 specificBSSID[ETH_ALEN]; + u8 bssid[ETH_ALEN]; /** * @brief length of TLVs sent in command starting at tlvBuffer @@ -93,15 +91,6 @@ struct wlan_ioctl_user_scan_chan { * @sa libertas_set_user_scan_ioctl */ struct wlan_ioctl_user_scan_cfg { - - /** - * @brief Flag set to keep the previous scan table intact - * - * If set, the scan results will accumulate, replacing any previous - * matched entries for a BSS with the new scan data - */ - u8 keeppreviousscan; //!< Do not erase the existing scan results - /** * @brief BSS type to be sent in the firmware command * @@ -119,15 +108,22 @@ struct wlan_ioctl_user_scan_cfg { */ u8 numprobes; - /** - * @brief BSSID filter sent in the firmware command to limit the results - */ - u8 specificBSSID[ETH_ALEN]; + /** + * @brief BSSID filter sent in the firmware command to limit the results + */ + u8 bssid[ETH_ALEN]; - /** - * @brief SSID filter sent in the firmware command to limit the results - */ - char specificSSID[IW_ESSID_MAX_SIZE + 1]; + /* Clear existing scan results matching this BSSID */ + u8 clear_bssid; + + /** + * @brief SSID filter sent in the firmware command to limit the results + */ + char ssid[IW_ESSID_MAX_SIZE]; + u8 ssid_len; + + /* Clear existing scan results matching this SSID */ + u8 clear_ssid; /** * @brief Variable number (fixed maximum) of channels to scan up @@ -139,12 +135,12 @@ struct wlan_ioctl_user_scan_cfg { * @brief Structure used to store information for each beacon/probe response */ struct bss_descriptor { - u8 macaddress[ETH_ALEN]; + u8 bssid[ETH_ALEN]; - struct WLAN_802_11_SSID ssid; + u8 ssid[IW_ESSID_MAX_SIZE + 1]; + u8 ssid_len; - /* WEP encryption requirement */ - u32 privacy; + u16 capability; /* receive signal strength in dBm */ long rssi; @@ -155,62 +151,65 @@ struct bss_descriptor { u32 atimwindow; - enum WLAN_802_11_NETWORK_INFRASTRUCTURE inframode; - u8 libertas_supported_rates[WLAN_SUPPORTED_RATES]; + /* IW_MODE_AUTO, IW_MODE_ADHOC, IW_MODE_INFRA */ + u8 mode; + + /* zero-terminated array of supported data rates */ + u8 rates[MAX_RATES + 1]; - int extra_ie; + unsigned long last_scanned; - u8 timestamp[8]; //!< TSF value included in the beacon/probe response union ieeetypes_phyparamset phyparamset; union IEEEtypes_ssparamset ssparamset; - struct ieeetypes_capinfo cap; - u8 datarates[WLAN_SUPPORTED_RATES]; - - __le64 networktsf; //!< TSF timestamp from the current firmware TSF struct ieeetypes_countryinfofullset countryinfo; - struct WPA_SUPPLICANT wpa_supplicant; - struct WPA_SUPPLICANT wpa2_supplicant; + u8 wpa_ie[MAX_WPA_IE_LEN]; + size_t wpa_ie_len; + u8 rsn_ie[MAX_WPA_IE_LEN]; + size_t rsn_ie_len; + u8 mesh; + + struct list_head list; }; -extern int libertas_SSID_cmp(struct WLAN_802_11_SSID *ssid1, - struct WLAN_802_11_SSID *ssid2); -extern int libertas_find_SSID_in_list(wlan_adapter * adapter, struct WLAN_802_11_SSID *ssid, - u8 * bssid, int mode); -int libertas_find_best_SSID_in_list(wlan_adapter * adapter, enum WLAN_802_11_NETWORK_INFRASTRUCTURE mode); -extern int libertas_find_BSSID_in_list(wlan_adapter * adapter, u8 * bssid, int mode); - -int libertas_find_best_network_SSID(wlan_private * priv, - struct WLAN_802_11_SSID *pSSID, - enum WLAN_802_11_NETWORK_INFRASTRUCTURE preferred_mode, - enum WLAN_802_11_NETWORK_INFRASTRUCTURE *out_mode); - -extern int libertas_send_specific_SSID_scan(wlan_private * priv, - struct WLAN_802_11_SSID *prequestedssid, - u8 keeppreviousscan); -extern int libertas_send_specific_BSSID_scan(wlan_private * priv, - u8 * bssid, u8 keeppreviousscan); - -extern int libertas_cmd_80211_scan(wlan_private * priv, +int libertas_ssid_cmp(u8 *ssid1, u8 ssid1_len, u8 *ssid2, u8 ssid2_len); + +struct bss_descriptor * libertas_find_ssid_in_list(wlan_adapter * adapter, + u8 *ssid, u8 ssid_len, u8 * bssid, u8 mode, + int channel); + +struct bss_descriptor * libertas_find_bssid_in_list(wlan_adapter * adapter, + u8 * bssid, u8 mode); + +int libertas_find_best_network_ssid(wlan_private * priv, u8 *out_ssid, + u8 *out_ssid_len, u8 preferred_mode, u8 *out_mode); + +int libertas_send_specific_ssid_scan(wlan_private * priv, u8 *ssid, + u8 ssid_len, u8 clear_ssid); + +int libertas_cmd_80211_scan(wlan_private * priv, struct cmd_ds_command *cmd, void *pdata_buf); -extern int libertas_ret_80211_scan(wlan_private * priv, +int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp); int wlan_scan_networks(wlan_private * priv, - const struct wlan_ioctl_user_scan_cfg * puserscanin); + const struct wlan_ioctl_user_scan_cfg * puserscanin, + int full_scan); struct ifreq; struct iw_point; struct iw_param; struct iw_request_info; -extern int libertas_get_scan(struct net_device *dev, struct iw_request_info *info, +int libertas_get_scan(struct net_device *dev, struct iw_request_info *info, struct iw_point *dwrq, char *extra); -extern int libertas_set_scan(struct net_device *dev, struct iw_request_info *info, +int libertas_set_scan(struct net_device *dev, struct iw_request_info *info, struct iw_param *vwrq, char *extra); +void libertas_scan_worker(struct work_struct *work); + #endif /* _WLAN_SCAN_H */