linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pedersen, Thomas" <c_tpeder@qca.qualcomm.com>
To: <kvalo@qca.qualcomm.com>
Cc: <ath6kl-devel@qualcomm.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath6kl: issue wmi disconnect after notifying cfg80211
Date: Wed, 16 May 2012 14:06:42 -0700	[thread overview]
Message-ID: <20120516210642.GA4203@pista> (raw)
In-Reply-To: <1337200873-3698-1-git-send-email-c_tpeder@qca.qualcomm.com>

On Wed, May 16, 2012 at 01:41:13PM -0700, Thomas Pedersen wrote:
> ath6kl would issue a wmi disconnect command in response to a remote
> disconnect and return early without notifying cfg80211, only sending a
> cfg80211_disconnected (with reason code always 3) in response to the
> second disconnect firmware event.
> 
> Pass the right reason code to cfg80211 on the first disconnect instead.

This fixes at least one bug where a p2p client would stop trying to
connect after receiving a stale RSN deauth which was reported to
cfg80211 as GO leaving BSS.

> Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath6kl/cfg80211.c |   27 ++++++++++++---------------
>  1 files changed, 12 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> index f3a6cfc..7845d33 100644
> --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
> +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> @@ -860,20 +860,6 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason,
>  		}
>  	}
>  
> -	/*
> -	 * 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 firmware stop trying to connect even
> -	 * after giving disconnect event. There will be one more disconnect
> -	 * event for this disconnect command with reason code DISCONNECT_CMD
> -	 * which will be notified to cfg80211.
> -	 */
> -
> -	if (reason != DISCONNECT_CMD) {
> -		ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx);
> -		return;
> -	}
> -
>  	clear_bit(CONNECT_PEND, &vif->flags);
>  
>  	if (vif->sme_state == SME_CONNECTING) {
> @@ -883,11 +869,22 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason,
>  					WLAN_STATUS_UNSPECIFIED_FAILURE,
>  					GFP_KERNEL);
>  	} else if (vif->sme_state == SME_CONNECTED) {
> -		cfg80211_disconnected(vif->ndev, reason,
> +		cfg80211_disconnected(vif->ndev, proto_reason,
>  				      NULL, 0, GFP_KERNEL);
>  	}
>  
>  	vif->sme_state = SME_DISCONNECTED;
> +
> +	/*
> +	 * 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 firmware stop trying to connect even
> +	 * after giving disconnect event. There will be one more disconnect
> +	 * event for this disconnect command with reason code DISCONNECT_CMD
> +	 * which won't be notified to cfg80211.
> +	 */
> +	if (reason != DISCONNECT_CMD)
> +		ath6kl_wmi_disconnect_cmd(ar->wmi, vif->fw_vif_idx);
>  }
>  
>  static int ath6kl_set_probed_ssids(struct ath6kl *ar,
> -- 
> 1.7.4.1
> 

  reply	other threads:[~2012-05-16 21:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 20:41 [PATCH] ath6kl: issue wmi disconnect after notifying cfg80211 Thomas Pedersen
2012-05-16 21:06 ` Pedersen, Thomas [this message]
2012-05-17  6:15 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120516210642.GA4203@pista \
    --to=c_tpeder@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).