diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-08-07 06:34:19 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:13:40 -0400 |
commit | 7a33732fd9f2181bfe639691ead3def7a1e87c7d (patch) | |
tree | 4fc307d7442fd64ed285615188569774d3b5e063 /drivers/net/wireless/wl12xx | |
parent | e2fd4611d50a1cd13a370f84b672a5f29472ee09 (diff) |
wl1251: remove wait parameter from wl1251_cmd_join()
We should wait everytime for the join command to finish, not waiting for
it might create problems.
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 | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_main.c | 8 |
3 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.c b/drivers/net/wireless/wl12xx/wl1251_cmd.c index 9cd46ce88e51..e276cb5f5be7 100644 --- a/drivers/net/wireless/wl12xx/wl1251_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1251_cmd.c | |||
@@ -252,7 +252,7 @@ out: | |||
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, u16 beacon_interval, |
255 | u8 dtim_interval, bool wait) | 255 | u8 dtim_interval) |
256 | { | 256 | { |
257 | unsigned long timeout; | 257 | unsigned long timeout; |
258 | struct cmd_join *join; | 258 | struct cmd_join *join; |
@@ -273,10 +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%s", | 276 | wl1251_debug(DEBUG_CMD, "cmd join%s %d %d", |
277 | bss_type == BSS_TYPE_IBSS ? " ibss" : "", | 277 | bss_type == BSS_TYPE_IBSS ? " ibss" : "", |
278 | beacon_interval, dtim_interval, | 278 | beacon_interval, dtim_interval); |
279 | wait ? " wait" : ""); | ||
280 | 279 | ||
281 | /* Reverse order BSSID */ | 280 | /* Reverse order BSSID */ |
282 | bssid = (u8 *) &join->bssid_lsb; | 281 | bssid = (u8 *) &join->bssid_lsb; |
@@ -307,8 +306,7 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, | |||
307 | * ugly hack: we should wait for JOIN_EVENT_COMPLETE_ID but to | 306 | * ugly hack: we should wait for JOIN_EVENT_COMPLETE_ID but to |
308 | * simplify locking we just sleep instead, for now | 307 | * simplify locking we just sleep instead, for now |
309 | */ | 308 | */ |
310 | if (wait) | 309 | msleep(10); |
311 | msleep(10); | ||
312 | 310 | ||
313 | out: | 311 | out: |
314 | kfree(join); | 312 | kfree(join); |
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.h b/drivers/net/wireless/wl12xx/wl1251_cmd.h index f9177d6941d8..ffeabf28d341 100644 --- a/drivers/net/wireless/wl12xx/wl1251_cmd.h +++ b/drivers/net/wireless/wl12xx/wl1251_cmd.h | |||
@@ -37,7 +37,7 @@ 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, u16 beacon_interval, |
40 | u8 dtim_interval, bool wait); | 40 | 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 701423345414..d03169266b29 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c | |||
@@ -325,7 +325,7 @@ static void wl1251_filter_work(struct work_struct *work) | |||
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->beacon_int, |
328 | wl->dtim_period, false); | 328 | wl->dtim_period); |
329 | if (ret < 0) | 329 | if (ret < 0) |
330 | goto out_sleep; | 330 | goto out_sleep; |
331 | 331 | ||
@@ -565,7 +565,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) | |||
565 | 565 | ||
566 | if (channel != wl->channel) { | 566 | if (channel != wl->channel) { |
567 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, | 567 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, |
568 | wl->dtim_period, false); | 568 | wl->dtim_period); |
569 | if (ret < 0) | 569 | if (ret < 0) |
570 | goto out_sleep; | 570 | goto out_sleep; |
571 | 571 | ||
@@ -1124,7 +1124,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1124 | if (wl->bss_type != BSS_TYPE_IBSS) { | 1124 | if (wl->bss_type != BSS_TYPE_IBSS) { |
1125 | ret = wl1251_cmd_join(wl, wl->bss_type, | 1125 | ret = wl1251_cmd_join(wl, wl->bss_type, |
1126 | wl->beacon_int, | 1126 | wl->beacon_int, |
1127 | wl->dtim_period, true); | 1127 | wl->dtim_period); |
1128 | if (ret < 0) | 1128 | if (ret < 0) |
1129 | goto out_sleep; | 1129 | goto out_sleep; |
1130 | wl1251_warning("Set ctsprotect failed %d", ret); | 1130 | wl1251_warning("Set ctsprotect failed %d", ret); |
@@ -1151,7 +1151,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1151 | goto out; | 1151 | goto out; |
1152 | 1152 | ||
1153 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, | 1153 | ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, |
1154 | wl->dtim_period, false); | 1154 | wl->dtim_period); |
1155 | 1155 | ||
1156 | if (ret < 0) | 1156 | if (ret < 0) |
1157 | goto out; | 1157 | goto out; |