Commit 9cf25fed authored by Luciano Coelho's avatar Luciano Coelho Committed by John W. Linville

wl1271: remove workaround for disconnection

Now we're using a the idle information coming from mac80211 to decide when to
disconnect.  If we have joined (ie. we're listening to a channel), whenever
the interface goes to idle, we will issue a disconnect command.  So the
workaround to send a disconnect command before joining is not needed anymore.
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c7f43e45
...@@ -344,19 +344,6 @@ int wl1271_cmd_join(struct wl1271 *wl) ...@@ -344,19 +344,6 @@ int wl1271_cmd_join(struct wl1271 *wl)
do_cal = false; do_cal = false;
} }
/* FIXME: This is a workaround, because with the current stack, we
* cannot know when we have disassociated. So, if we have already
* joined, we disconnect before joining again. */
if (wl->joined) {
ret = wl1271_cmd_disconnect(wl);
if (ret < 0) {
wl1271_error("failed to disconnect before rejoining");
goto out;
}
wl->joined = false;
}
join = kzalloc(sizeof(*join), GFP_KERNEL); join = kzalloc(sizeof(*join), GFP_KERNEL);
if (!join) { if (!join) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -421,8 +408,6 @@ int wl1271_cmd_join(struct wl1271 *wl) ...@@ -421,8 +408,6 @@ int wl1271_cmd_join(struct wl1271 *wl)
goto out_free; goto out_free;
} }
wl->joined = true;
/* /*
* 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment