diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2010-01-05 20:16:51 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-12 13:51:26 -0500 |
commit | 3a98c30f3e8bb1f32b5bcb74a39647b3670de275 (patch) | |
tree | f24eb2e787dab86f3c90ffe4d0f5e92e6fff2d59 /drivers/net/wireless/wl12xx/wl1251_cmd.h | |
parent | 7c12ce8b854df346388ea56d684784e3484012cf (diff) | |
download | blackbird-op-linux-3a98c30f3e8bb1f32b5bcb74a39647b3670de275.tar.gz blackbird-op-linux-3a98c30f3e8bb1f32b5bcb74a39647b3670de275.zip |
wl1251: cleanup scanning code
The current scanning code wasn't following the preferred style. Move code
related to scan and trigger scan to commans to wl1251_cmd.c. Because
there's now less code in wl1251_hw_scan(), the function can be now
merged with wl1251_op_hw_scan().
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_cmd.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_cmd.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.h b/drivers/net/wireless/wl12xx/wl1251_cmd.h index dff798ad0ef5..63ae3193f7c6 100644 --- a/drivers/net/wireless/wl12xx/wl1251_cmd.h +++ b/drivers/net/wireless/wl12xx/wl1251_cmd.h @@ -43,6 +43,9 @@ int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer, size_t len); int wl1251_cmd_template_set(struct wl1251 *wl, u16 cmd_id, void *buf, size_t buf_len); +int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len, + unsigned int n_channels, unsigned int n_probes); +int wl1251_cmd_trigger_scan_to(struct wl1251 *wl, u32 timeout); /* unit ms */ #define WL1251_COMMAND_TIMEOUT 2000 @@ -163,8 +166,10 @@ struct cmd_read_write_memory { #define CMDMBOX_HEADER_LEN 4 #define CMDMBOX_INFO_ELEM_HEADER_LEN 4 +#define WL1251_SCAN_MIN_DURATION 30000 +#define WL1251_SCAN_MAX_DURATION 60000 -struct basic_scan_parameters { +struct wl1251_scan_parameters { u32 rx_config_options; u32 rx_filter_options; @@ -189,11 +194,11 @@ struct basic_scan_parameters { u8 tid_trigger; u8 ssid_len; - u32 ssid[8]; + u8 ssid[32]; } __attribute__ ((packed)); -struct basic_scan_channel_parameters { +struct wl1251_scan_ch_parameters { u32 min_duration; /* in TU */ u32 max_duration; /* in TU */ u32 bssid_lsb; @@ -213,11 +218,11 @@ struct basic_scan_channel_parameters { /* SCAN parameters */ #define SCAN_MAX_NUM_OF_CHANNELS 16 -struct cmd_scan { +struct wl1251_cmd_scan { struct wl1251_cmd_header header; - struct basic_scan_parameters params; - struct basic_scan_channel_parameters channels[SCAN_MAX_NUM_OF_CHANNELS]; + struct wl1251_scan_parameters params; + struct wl1251_scan_ch_parameters channels[SCAN_MAX_NUM_OF_CHANNELS]; } __attribute__ ((packed)); enum { |