Commit 62819fd9 authored by Jeff Chua's avatar Jeff Chua Committed by Greg Kroah-Hartman

staging: r8712u: Fix driver to support ad-hoc mode

Driver r8712u is unable to handle ad-hoc mode. The issue is that when
the driver first starts, there will not be an SSID for association.
The fix is to always call the "select and join from scan" routine when
in ad-hoc mode.

Note: Ad-hoc mode worked intermittently before. If the driver had
previously been associated, then things were OK.
Signed-off-by: default avatarJeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3d51406d
......@@ -68,7 +68,10 @@ static u8 do_join(struct _adapter *padapter)
pmlmepriv->fw_state |= _FW_UNDER_LINKING;
pmlmepriv->pscanned = plist;
pmlmepriv->to_join = true;
if (_queue_empty(queue) == true) {
/* adhoc mode will start with an empty queue, but skip checking */
if (!check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) &&
_queue_empty(queue)) {
if (pmlmepriv->fw_state & _FW_UNDER_LINKING)
pmlmepriv->fw_state ^= _FW_UNDER_LINKING;
/* when set_ssid/set_bssid for do_join(), but scanning queue
......
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