Return-path: Received: from wolverine02.qualcomm.com ([199.106.114.251]:45364 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932858AbaCQNfK (ORCPT ); Mon, 17 Mar 2014 09:35:10 -0400 From: Vladimir Kondratiev To: "John W . Linville" CC: Vladimir Kondratiev , , Subject: [PATCH 16/21] wil6210: fix secondary connect Date: Mon, 17 Mar 2014 15:34:20 +0200 Message-ID: <1395063265-6522-17-git-send-email-qca_vkondrat@qca.qualcomm.com> (sfid-20140317_143538_539660_0570B682) In-Reply-To: <1395063265-6522-1-git-send-email-qca_vkondrat@qca.qualcomm.com> References: <1395063265-6522-1-git-send-email-qca_vkondrat@qca.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: when STA receiving connect() when already connected, it should return error Signed-off-by: Vladimir Kondratiev --- drivers/net/wireless/ath/wil6210/cfg80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index f6a12e7..597540a 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -327,6 +327,10 @@ static int wil_cfg80211_connect(struct wiphy *wiphy, int ch; int rc = 0; + if (test_bit(wil_status_fwconnecting, &wil->status) || + test_bit(wil_status_fwconnected, &wil->status)) + return -EALREADY; + bss = cfg80211_get_bss(wiphy, sme->channel, sme->bssid, sme->ssid, sme->ssid_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS); -- 1.8.3.2