From patchwork Mon Aug 3 15:03:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 38917 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n73F5JnH007333 for ; Mon, 3 Aug 2009 15:05:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932288AbZHCPE3 (ORCPT ); Mon, 3 Aug 2009 11:04:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932287AbZHCPE1 (ORCPT ); Mon, 3 Aug 2009 11:04:27 -0400 Received: from xc.sipsolutions.net ([83.246.72.84]:35354 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932283AbZHCPEZ (ORCPT ); Mon, 3 Aug 2009 11:04:25 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MXz5M-00005T-Lh; Mon, 03 Aug 2009 17:04:24 +0200 Subject: [PATCH] cfg80211: clear SSID on disconnect From: Johannes Berg To: John Linville Cc: Joerg Albert , linux-wireless Date: Mon, 03 Aug 2009 17:03:52 +0200 Message-Id: <1249311832.4561.2.camel@johannes.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The SME state machine in cfg80211 uses the SSID stored in struct wireless_dev internally, but fails to clear it when disconnecting. This doesn't matter to the SME state machine, but does matter for IBSS. Thus, when disconnecting, clear the SSID to avoid messing up the IBSS state machine. Reported-by: Joerg Albert Signed-off-by: Johannes Berg --- net/wireless/sme.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- wireless-testing.orig/net/wireless/sme.c 2009-08-03 16:45:01.000000000 +0200 +++ wireless-testing/net/wireless/sme.c 2009-08-03 16:59:02.000000000 +0200 @@ -550,6 +550,7 @@ void __cfg80211_disconnected(struct net_ wdev->current_bss = NULL; wdev->sme_state = CFG80211_SME_IDLE; + wdev->ssid_len = 0; if (wdev->conn) { kfree(wdev->conn->ie);