瀏覽代碼

wil6210: fix secondary connect

when STA receiving connect() when already connected,
it should return error

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev 11 年之前
父節點
當前提交
4cd9e8377f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/net/wireless/ath/wil6210/cfg80211.c

+ 4 - 0
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);