提交 7a33732f 编写于 作者: K Kalle Valo 提交者: John W. Linville

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: NKalle Valo <kalle.valo@nokia.com>
Reviewed-by: NVidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 e2fd4611
...@@ -252,7 +252,7 @@ int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable) ...@@ -252,7 +252,7 @@ int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable)
} }
int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval,
u8 dtim_interval, bool wait) u8 dtim_interval)
{ {
unsigned long timeout; unsigned long timeout;
struct cmd_join *join; struct cmd_join *join;
...@@ -273,10 +273,9 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, ...@@ -273,10 +273,9 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval,
if (ret < 0) if (ret < 0)
goto out; goto out;
wl1251_debug(DEBUG_CMD, "cmd join%s %d %d%s", wl1251_debug(DEBUG_CMD, "cmd join%s %d %d",
bss_type == BSS_TYPE_IBSS ? " ibss" : "", bss_type == BSS_TYPE_IBSS ? " ibss" : "",
beacon_interval, dtim_interval, beacon_interval, dtim_interval);
wait ? " wait" : "");
/* Reverse order BSSID */ /* Reverse order BSSID */
bssid = (u8 *) &join->bssid_lsb; bssid = (u8 *) &join->bssid_lsb;
...@@ -307,8 +306,7 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, ...@@ -307,8 +306,7 @@ int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval,
* ugly hack: we should wait for JOIN_EVENT_COMPLETE_ID but to * ugly hack: we should wait for JOIN_EVENT_COMPLETE_ID but to
* simplify locking we just sleep instead, for now * simplify locking we just sleep instead, for now
*/ */
if (wait) msleep(10);
msleep(10);
out: out:
kfree(join); kfree(join);
......
...@@ -37,7 +37,7 @@ int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity, ...@@ -37,7 +37,7 @@ int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity,
void *bitmap, u16 bitmap_len, u8 bitmap_control); void *bitmap, u16 bitmap_len, u8 bitmap_control);
int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable); int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable);
int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval, int wl1251_cmd_join(struct wl1251 *wl, u8 bss_type, u16 beacon_interval,
u8 dtim_interval, bool wait); u8 dtim_interval);
int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode); int wl1251_cmd_ps_mode(struct wl1251 *wl, u8 ps_mode);
int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer, int wl1251_cmd_read_memory(struct wl1251 *wl, u32 addr, void *answer,
size_t len); size_t len);
......
...@@ -325,7 +325,7 @@ static void wl1251_filter_work(struct work_struct *work) ...@@ -325,7 +325,7 @@ static void wl1251_filter_work(struct work_struct *work)
goto out; goto out;
ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int,
wl->dtim_period, false); wl->dtim_period);
if (ret < 0) if (ret < 0)
goto out_sleep; goto out_sleep;
...@@ -565,7 +565,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -565,7 +565,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
if (channel != wl->channel) { if (channel != wl->channel) {
ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int,
wl->dtim_period, false); wl->dtim_period);
if (ret < 0) if (ret < 0)
goto out_sleep; goto out_sleep;
...@@ -1124,7 +1124,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1124,7 +1124,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
if (wl->bss_type != BSS_TYPE_IBSS) { if (wl->bss_type != BSS_TYPE_IBSS) {
ret = wl1251_cmd_join(wl, wl->bss_type, ret = wl1251_cmd_join(wl, wl->bss_type,
wl->beacon_int, wl->beacon_int,
wl->dtim_period, true); wl->dtim_period);
if (ret < 0) if (ret < 0)
goto out_sleep; goto out_sleep;
wl1251_warning("Set ctsprotect failed %d", ret); wl1251_warning("Set ctsprotect failed %d", ret);
...@@ -1151,7 +1151,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1151,7 +1151,7 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
goto out; goto out;
ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int, ret = wl1251_cmd_join(wl, wl->bss_type, wl->beacon_int,
wl->dtim_period, false); wl->dtim_period);
if (ret < 0) if (ret < 0)
goto out; goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册