diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-08-07 06:34:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:40 -0400 |
commit | c88f87540fa4b90a0b8696dae8bce801ecc142d3 (patch) | |
tree | 1d09286020db78270c11de52957d5fa369186841 /drivers/net/wireless/wl12xx | |
parent | 9780279c60c32cb5f14531aa34ae991bb714c90c (diff) |
wl1251: add channel to wl1251_cmd_join() parameters
Because join channel tunes to a channel, better to make it more obvious
by adding a parameter for it.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_cmd.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_cmd.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_main.c | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.c b/drivers/net/wireless/wl12xx/wl1251_cmd.c index e276cb5f5be7..4e796db16244 100644 --- a/drivers/net/wireless/wl12xx/wl1251_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1251_cmd.c | |||
@@ -251,8 +251,8 @@ out: | |||
251 | return ret; | 251 | return ret; |
252 | } | 252 | } |
253 | 253 | ||
254 | int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, | 254 | int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u8 channel, |
255 | u8 dtim_interval) | 255 | u16 beacon_interval, u8 dtim_interval) |
256 | { | 256 | { |
257 | unsigned long timeout; | 257 | unsigned long timeout; |
258 | struct cmd_join *join; | 258 | struct cmd_join *join; |
@@ -273,9 +273,9 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, | |||
273 | if (ret < 0) | 273 | if (ret < 0) |
274 | goto out; | 274 | goto out; |
275 | 275 | ||
276 | wl1251_debug(DEBUG_CMD, "cmd join%s %d %d", | 276 | wl1251_debug(DEBUG_CMD, "cmd join%s ch %d %d/%d", |
277 | bss_type == BSS_TYPE_IBSS ? " ibss" : "", | 277 | bss_type == BSS_TYPE_IBSS ? " ibss" : "", |
278 | beacon_interval, dtim_interval); | 278 | channel, beacon_interval, dtim_interval); |
279 | 279 | ||
280 | /* Reverse order BSSID */ | 280 | /* Reverse order BSSID */ |
281 | bssid = (u8 *) &join->bssid_lsb; | 281 | bssid = (u8 *) &join->bssid_lsb; |
@@ -291,7 +291,7 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, | |||
291 | join->beacon_interval = beacon_interval; | 291 | join->beacon_interval = beacon_interval; |
292 | join->dtim_interval = dtim_interval; | 292 | join->dtim_interval = dtim_interval; |
293 | join->bss_type = bss_type; | 293 | join->bss_type = bss_type; |
294 | join->channel = wl->channel; | 294 | join->channel = channel; |
295 | join->ctrl = JOIN_CMD_CTRL_TX_FLUSH; | 295 | join->ctrl = JOIN_CMD_CTRL_TX_FLUSH; |
296 | 296 | ||
297 | ret = wl1251_cmd_send(wl, CMD_START_JOIN, join, sizeof(*join)); | 297 | ret = wl1251_cmd_send(wl, CMD_START_JOIN, join, sizeof(*join)); |
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.h b/drivers/net/wireless/wl12xx/wl1251_cmd.h index ffeabf28d341..dff798ad0ef5 100644 --- a/drivers/net/wireless/wl12xx/wl1251_cmd.h +++ b/drivers/net/wireless/wl12xx/wl1251_cmd.h | |||
@@ -36,8 +36,8 @@ int wl1251_cmd_configure(struct wl1251 *wl, u16 id, void *buf, size_t len); | |||
36 | int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity, | 36 | int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity, |
37 | void *bitmap, u16 bitmap_len, u8 bitmap_control); | 37 | void *bitmap, u16 bitmap_len, u8 bitmap_control); |
38 | int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable); | 38 | int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable); |
39 | int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, | 39 | int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u8 channel, |
40 | u8 dtim_interval); | 40 | u16 beacon_interval, u8 dtim_interval); |
41 | int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode); | 41 | int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode); |
42 | int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer, | 42 | int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer, |
43 | size_t len); | 43 | size_t len); |
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index 2514c94294d7..5e9045985e53 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c | |||
@@ -324,7 +324,7 @@ static void wl1251_filter_work(struct work_struct *work) | |||
324 | if (ret < 0) | 324 | if (ret < 0) |
325 | goto out; | 325 | goto out; |
326 | 326 | ||
327 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, | 327 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->channel, wl->beacon_int, |
328 | wl->dtim_period); | 328 | wl->dtim_period); |
329 | if (ret < 0) | 329 | if (ret < 0) |
330 | goto out_sleep; | 330 | goto out_sleep; |
@@ -565,8 +565,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) | |||
565 | goto out; | 565 | goto out; |
566 | 566 | ||
567 | if (channel != wl->channel) { | 567 | if (channel != wl->channel) { |
568 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, | 568 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->channel, |
569 | wl->dtim_period); | 569 | wl->beacon_int, wl->dtim_period); |
570 | if (ret < 0) | 570 | if (ret < 0) |
571 | goto out_sleep; | 571 | goto out_sleep; |
572 | 572 | ||
@@ -1123,7 +1123,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1123 | goto out; | 1123 | goto out; |
1124 | 1124 | ||
1125 | if (wl->bss_type != BSS_TYPE_IBSS) { | 1125 | if (wl->bss_type != BSS_TYPE_IBSS) { |
1126 | ret = wl1251_cmd_join(wl, wl->bss_type, | 1126 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->channel, |
1127 | wl->beacon_int, | 1127 | wl->beacon_int, |
1128 | wl->dtim_period); | 1128 | wl->dtim_period); |
1129 | if (ret < 0) | 1129 | if (ret < 0) |
@@ -1152,7 +1152,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1152 | goto out; | 1152 | goto out; |
1153 | 1153 | ||
1154 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, | 1154 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, |
1155 | wl->dtim_period); | 1155 | wl->channel, wl->dtim_period); |
1156 | 1156 | ||
1157 | if (ret < 0) | 1157 | if (ret < 0) |
1158 | goto out; | 1158 | goto out; |