Skip to contentSkip to conversation

mwifiex: reset encryption mode flag before association

PATCH In review Bing Zhao 2 participants 6 messages Feb 25, 2012 – Feb 27, 2012 Networking drivers (wireless)

lore
Share & tools
lore

Bing Zhao

author
#0 lore raw

PATCH 1/1 mwifiex: reset encryption mode flag before association

From: Amitkumar Karwar <[email protected]>

Recent commit
"mwifiex: clear previous security setting during association" fixes association failure problems observed in some corner cases by clearing previous security setting before each association.

We should reset encryption mode flag as well. This patch takes care of it.

---
 drivers/net/wireless/mwifiex/cfg80211.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/wireless/mwifiex/cfg80211.c +1 -0
index 8d8ee63..e4e6d7d 100644
@@ -872,6 +872,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 	priv->sec_info.wpa_enabled = false;
 	priv->sec_info.wpa2_enabled = false;
 	priv->wep_key_curr_index = 0;
+	priv->sec_info.encryption_mode = 0;
 	ret = mwifiex_set_encode(priv, NULL, 0, 0, 1);
 
 	if (mode == NL80211_IFTYPE_ADHOC) {
Signature · 1 line
1.7.0.2
author
#1 lore raw

PATCH 1/1 mwifiex: remove redundant scan operation

From: Amitkumar Karwar <[email protected]>

It should have been removed by commit "mwifiex: use cfg80211 dynamic scan..." (7c6fa2a843..) after adding code to avoid an extra scan during association because scan entries are valid for 15 seconds in cfg80211 stack.

---
 drivers/net/wireless/mwifiex/cfg80211.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
drivers/net/wireless/mwifiex/cfg80211.c +0 -6
index e4e6d7d..7b98ce0 100644
@@ -924,12 +924,6 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 		}
 	}
 done:
-	/* Do specific SSID scanning */
-	if (mwifiex_request_scan(priv, &req_ssid)) {
-		dev_err(priv->adapter->dev, "scan error\n");
-		return -EFAULT;
-	}
-
 	/*
 	 * Scan entries are valid for some time (15 sec). So we can save one
 	 * active scan time if we just try cfg80211_get_bss first. If it fails
Signature · 1 line
1.7.0.2
#2 lore raw

Re: [PATCH 3.3] mwifiex: remove redundant scan operation

Quoted 20 lines · Bing Zhao

From: Amitkumar Karwar <[email protected]>

It should have been removed by commit "mwifiex: use cfg80211 dynamic scan..." (7c6fa2a843..) after adding code to avoid an extra scan during association because scan entries are valid for 15 seconds in cfg80211 stack.

---
 drivers/net/wireless/mwifiex/cfg80211.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
drivers/net/wireless/mwifiex/cfg80211.c +0 -0
index e4e6d7d..7b98ce0 100644
@@ -924,12 +924,6 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 		}
 	}

drivers/net/wireless/mwifiex/cfg80211.c mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, · line 929

Quoted 10 lines
drivers/net/wireless/mwifiex/cfg80211.c +0 -6
 done:
-	/* Do specific SSID scanning */
-	if (mwifiex_request_scan(priv, &req_ssid)) {
-		dev_err(priv->adapter->dev, "scan error\n");
-		return -EFAULT;
-	}
-
 	/*
 	 * Scan entries are valid for some time (15 sec). So we can save one
 	 * active scan time if we just try cfg80211_get_bss first. If it fails

It seems like this could wait to be fixed in 3.4?

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
author
#3 lore raw

RE: [PATCH 3.3] mwifiex: remove redundant scan operation

Hi John,

Quoted 27 lines

Subject: Re: [PATCH 3.3] mwifiex: remove redundant scan operation

Quoted 24 lines · Bing Zhao

From: Amitkumar Karwar <[email protected]>

It should have been removed by commit "mwifiex: use cfg80211 dynamic scan..." (7c6fa2a843..) after adding code to avoid an extra scan during association because scan entries are valid for 15 seconds in cfg80211 stack.

---
 drivers/net/wireless/mwifiex/cfg80211.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
drivers/net/wireless/mwifiex/cfg80211.c +0 -3
index e4e6d7d..7b98ce0 100644
@@ -924,12 +924,6 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 		}
 	}
 done:
-	/* Do specific SSID scanning */
-	if (mwifiex_request_scan(priv, &req_ssid)) {
-		dev_err(priv->adapter->dev, "scan error\n");
Quoted 8 lines

drivers/net/wireless/mwifiex/cfg80211.c mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, · line 929

Quoted 6 lines
drivers/net/wireless/mwifiex/cfg80211.c +0 -3
-		return -EFAULT;
-	}
-
 	/*
 	 * Scan entries are valid for some time (15 sec). So we can save one
 	 * active scan time if we just try cfg80211_get_bss first. If it fails

It seems like this could wait to be fixed in 3.4?

Yes, this one can be applied for 3.4.

Thanks,
Bing

#4 lore raw
In reply to Bing Zhao
Quoted 21 lines · Bing Zhao

From: Amitkumar Karwar <[email protected]>

Recent commit
"mwifiex: clear previous security setting during association" fixes association failure problems observed in some corner cases by clearing previous security setting before each association.

We should reset encryption mode flag as well. This patch takes care of it.

---
 drivers/net/wireless/mwifiex/cfg80211.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/wireless/mwifiex/cfg80211.c +0 -0
index 8d8ee63..e4e6d7d 100644

drivers/net/wireless/mwifiex/cfg80211.c mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, · line 878

Quoted 7 lines
drivers/net/wireless/mwifiex/cfg80211.c +1 -0
@@ -872,6 +872,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 	priv->sec_info.wpa_enabled = false;
 	priv->sec_info.wpa2_enabled = false;
 	priv->wep_key_curr_index = 0;
+	priv->sec_info.encryption_mode = 0;
 	ret = mwifiex_set_encode(priv, NULL, 0, 0, 1);
 
 	if (mode == NL80211_IFTYPE_ADHOC) {

What bug does this fix? Does it need to be fixed in 3.3? Or can it wait for 3.4?

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
author
#5 lore raw

Hi John,

Quoted 30 lines

Subject: Re: [PATCH 3.3] mwifiex: reset encryption mode flag before association

Quoted 27 lines · Bing Zhao

From: Amitkumar Karwar <[email protected]>

Recent commit
"mwifiex: clear previous security setting during association" fixes association failure problems observed in some corner cases by clearing previous security setting before each association.

We should reset encryption mode flag as well. This patch takes care of it.

---
 drivers/net/wireless/mwifiex/cfg80211.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/net/wireless/mwifiex/cfg80211.c +1 -0
index 8d8ee63..e4e6d7d 100644
@@ -872,6 +872,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
 	priv->sec_info.wpa_enabled = false;
 	priv->sec_info.wpa2_enabled = false;
 	priv->wep_key_curr_index = 0;
+	priv->sec_info.encryption_mode = 0;
 	ret = mwifiex_set_encode(priv, NULL, 0, 0, 1);
 
Quoted 3 lines

drivers/net/wireless/mwifiex/cfg80211.c mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, · line 878

Quoted 1 line
drivers/net/wireless/mwifiex/cfg80211.c +0 -0
 	if (mode == NL80211_IFTYPE_ADHOC) {

What bug does this fix? Does it need to be fixed in 3.3? Or can it wait for 3.4?

This one line code should be part of this patch:
[PATCH 3.3] mwifiex: clear previous security setting during association (in wireless.git)

They altogether fix an association corner case issue. I'd prefer have it for 3.3.

Of course it's your call if you think that's more suitable for 3.4.

Thanks,
Bing

Quoted 5 lines

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.