All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath6kl: Fix disconnect event reporting
@ 2011-09-20 16:09 Vasanthakumar Thiagarajan
  2011-09-22  7:47 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-09-20 16:09 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

Driver does not report disconnect event properly when in connecting state,
this leads to issues like not reporting the unavailablity of the
connected AP and failures in starting reconnection. Send a disconnect
command to target when a disconnect event is received with reason code
other than 3 (DISCONNECT_CMD - disconnect request from host) to make the
stop trying even after giving disconnect event. There will be one more
disconnect event for this disconnect command which will be notified to
cfg80211.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 3280ff1..8125e71 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -615,22 +615,11 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason,
 		}
 	}
 
-	if (!test_bit(CONNECT_PEND, &ar->flag)) {
-		if (reason != DISCONNECT_CMD)
-			ath6kl_wmi_disconnect_cmd(ar->wmi);
-
-		return;
-	}
-
-	if (reason == NO_NETWORK_AVAIL) {
-		/* connect cmd failed */
+	if (reason != DISCONNECT_CMD) {
 		ath6kl_wmi_disconnect_cmd(ar->wmi);
 		return;
 	}
 
-	if (reason != DISCONNECT_CMD)
-		return;
-
 	clear_bit(CONNECT_PEND, &ar->flag);
 
 	if (ar->sme_state == SME_CONNECTING) {
-- 
1.7.0.4


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

* Re: [PATCH] ath6kl: Fix disconnect event reporting
  2011-09-20 16:09 [PATCH] ath6kl: Fix disconnect event reporting Vasanthakumar Thiagarajan
@ 2011-09-22  7:47 ` Kalle Valo
  2011-09-22  8:30   ` Vasanthakumar Thiagarajan
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2011-09-22  7:47 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan; +Cc: linux-wireless

On 09/20/2011 07:09 PM, Vasanthakumar Thiagarajan wrote:
> Driver does not report disconnect event properly when in connecting state,
> this leads to issues like not reporting the unavailablity of the
> connected AP and failures in starting reconnection. Send a disconnect
> command to target when a disconnect event is received with reason code
> other than 3 (DISCONNECT_CMD - disconnect request from host) to make the
> stop trying even after giving disconnect event. There will be one more
> disconnect event for this disconnect command which will be notified to
> cfg80211.

A similar comment in the code would be nice. It's not obvious from the
code why a separate disconnect command is needed.

Kalle

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

* Re: [PATCH] ath6kl: Fix disconnect event reporting
  2011-09-22  7:47 ` Kalle Valo
@ 2011-09-22  8:30   ` Vasanthakumar Thiagarajan
  0 siblings, 0 replies; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-09-22  8:30 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

On Thu, Sep 22, 2011 at 10:47:36AM +0300, Kalle Valo wrote:
> On 09/20/2011 07:09 PM, Vasanthakumar Thiagarajan wrote:
> > Driver does not report disconnect event properly when in connecting state,
> > this leads to issues like not reporting the unavailablity of the
> > connected AP and failures in starting reconnection. Send a disconnect
> > command to target when a disconnect event is received with reason code
> > other than 3 (DISCONNECT_CMD - disconnect request from host) to make the
> > stop trying even after giving disconnect event. There will be one more
> > disconnect event for this disconnect command which will be notified to
> > cfg80211.
> 
> A similar comment in the code would be nice. It's not obvious from the
> code why a separate disconnect command is needed.

Sure.

Vasanth

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

end of thread, other threads:[~2011-09-22  8:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-20 16:09 [PATCH] ath6kl: Fix disconnect event reporting Vasanthakumar Thiagarajan
2011-09-22  7:47 ` Kalle Valo
2011-09-22  8:30   ` Vasanthakumar Thiagarajan

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.