All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: r8712u: Fix driver to support ad-hoc mode
@ 2011-04-27 16:25 Larry Finger
  2011-04-28 15:08 ` clemens fischer
  0 siblings, 1 reply; 20+ messages in thread
From: Larry Finger @ 2011-04-27 16:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, jeff.chua.linux; +Cc: wlanfae, ino-news, linux-kernel

From: Jeff Chua <jeff.chua.linux@gmail.com>

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: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
---

Index: linux-2.6/drivers/staging/rtl8712/rtl871x_ioctl_set.c
===================================================================
--- linux-2.6.orig/drivers/staging/rtl8712/rtl871x_ioctl_set.c
+++ linux-2.6/drivers/staging/rtl8712/rtl871x_ioctl_set.c
@@ -68,7 +68,10 @@ static u8 do_join(struct _adapter *padap
 	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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-05-02  5:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 16:25 [PATCH] staging: r8712u: Fix driver to support ad-hoc mode Larry Finger
2011-04-28 15:08 ` clemens fischer
2011-04-28 15:31   ` Larry Finger
2011-04-28 18:05     ` Jeff Chua
2011-04-28 20:15       ` clemens fischer
2011-04-29  0:36         ` Jeff Chua
2011-04-29 21:15           ` clemens fischer
2011-04-29 21:52             ` Jeff Chua
2011-04-29 22:25               ` clemens fischer
2011-04-29 22:36                 ` Jeff Chua
2011-04-30  1:41                   ` clemens fischer
2011-04-30 12:21                     ` clemens fischer
2011-04-30 23:08                       ` Jeff Chua
2011-05-01 16:40                         ` clemens fischer
2011-05-01 17:21                           ` Jeff Chua
2011-05-01 19:55                             ` clemens fischer
2011-05-02  5:08                               ` Jeff Chua
2011-04-28 20:54     ` clemens fischer
2011-04-30  0:36     ` clemens fischer
2011-04-30  5:04       ` Larry Finger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.