Skip to contentSkip to conversation

ath9k: Don't delete key from hw if using sw-crypt.

PATCH In review [email protected] 3 participants 6 messages Apr 2, 2012 – Apr 4, 2012 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Don't delete key from hw if using sw-crypt.

From: Ben Greear <[email protected]>

This spams logs if we are using large numbers of stations, for instance:

ath: wiphy0: keyreset: keycache entry 228 out of range
ath: wiphy0: keyreset: keycache entry 228 out of range

---
:100644 100644 917032a... 65e7281... M drivers/net/wireless/ath/ath9k/main.c

 drivers/net/wireless/ath/ath9k/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +3 -0
index 917032a..65e7281 100644
@@ -1771,6 +1771,9 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
 	if (!an->ps_key)
 	    return;
 
+	if (ath9k_modparam_nohwcrypt)
+		return;
+
 	ath_key_delete(common, &ps_key);
 }
 
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 19 lines · On 2012-04-02 10:41 PM, [email protected] wrote:

From: Ben Greear <[email protected]>

This spams logs if we are using large numbers of stations, for instance:

ath: wiphy0: keyreset: keycache entry 228 out of range
ath: wiphy0: keyreset: keycache entry 228 out of range

---
:100644 100644 917032a... 65e7281... M drivers/net/wireless/ath/ath9k/main.c

 drivers/net/wireless/ath/ath9k/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +0 -0
index 917032a..65e7281 100644

drivers/net/wireless/ath/ath9k/main.c static void ath9k_del_ps_key(struct ath_softc *sc, · line 1776

Quoted 6 lines
drivers/net/wireless/ath/ath9k/main.c +3 -0
@@ -1771,6 +1771,9 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
 	if (!an->ps_key)
 	    return;
 
+	if (ath9k_modparam_nohwcrypt)
+		return;
+

This looks wrong to me. ps_key is used for better powersave handling of both unencrypted and encrypted stations (using the keycache only for tx filtering on unencrypted stations).

- Felix

author
#2 lore raw
Quoted 23 lines · Felix Fietkau
Quoted 22 lines · On 2012-04-02 10:41 PM, [email protected] wrote:

From: Ben Greear<[email protected]>

This spams logs if we are using large numbers of stations, for instance:

ath: wiphy0: keyreset: keycache entry 228 out of range
ath: wiphy0: keyreset: keycache entry 228 out of range

---
:100644 100644 917032a... 65e7281... M drivers/net/wireless/ath/ath9k/main.c

  drivers/net/wireless/ath/ath9k/main.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +0 -0
index 917032a..65e7281 100644
@@ -1771,6 +1771,9 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
  	if (!an->ps_key)
  	    return;
 
Quoted 6 lines

drivers/net/wireless/ath/ath9k/main.c static void ath9k_del_ps_key(struct ath_softc *sc, · line 1776

Quoted 3 lines
drivers/net/wireless/ath/ath9k/main.c +3 -0
+	if (ath9k_modparam_nohwcrypt)
+		return;
+

This looks wrong to me. ps_key is used for better powersave handling of both unencrypted and encrypted stations (using the keycache only for tx filtering on unencrypted stations).

Ok..should we just remove the spammy printk when the keycache entry is out of range then?

THanks,
Ben

Quoted 2 lines

- Felix

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#3 lore raw
Quoted 31 lines · Ben Greear
Quoted 23 lines · Felix Fietkau
Quoted 22 lines · On 2012-04-02 10:41 PM, [email protected] wrote:

From: Ben Greear<[email protected]>

This spams logs if we are using large numbers of stations, for instance:

ath: wiphy0: keyreset: keycache entry 228 out of range
ath: wiphy0: keyreset: keycache entry 228 out of range

---
:100644 100644 917032a... 65e7281... M drivers/net/wireless/ath/ath9k/main.c

 drivers/net/wireless/ath/ath9k/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +0 -0
index 917032a..65e7281 100644
@@ -1771,6 +1771,9 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
     if (!an->ps_key)
         return;
 
Quoted 6 lines

drivers/net/wireless/ath/ath9k/main.c static void ath9k_del_ps_key(struct ath_softc *sc, · line 1776

Quoted 3 lines
drivers/net/wireless/ath/ath9k/main.c +3 -0
+    if (ath9k_modparam_nohwcrypt)
+        return;
+

This looks wrong to me. ps_key is used for better powersave handling of both unencrypted and encrypted stations (using the keycache only for tx filtering on unencrypted stations).

Quoted 2 lines

Ok..should we just remove the spammy printk when the keycache entry is out of range then?

I'd say we should figure out why it triggers at all.

- Felix

author
#4 lore raw
Quoted 34 lines · Felix Fietkau
Quoted 31 lines · Ben Greear
Quoted 29 lines · Felix Fietkau
Quoted 19 lines · On 2012-04-02 10:41 PM, [email protected] wrote:

From: Ben Greear<[email protected]>

This spams logs if we are using large numbers of stations, for instance:

ath: wiphy0: keyreset: keycache entry 228 out of range
ath: wiphy0: keyreset: keycache entry 228 out of range

---
:100644 100644 917032a... 65e7281... M drivers/net/wireless/ath/ath9k/main.c

  drivers/net/wireless/ath/ath9k/main.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +0 -0
index 917032a..65e7281 100644

drivers/net/wireless/ath/ath9k/main.c static void ath9k_del_ps_key(struct ath_softc *sc, · line 1776

Quoted 6 lines
drivers/net/wireless/ath/ath9k/main.c +3 -0
@@ -1771,6 +1771,9 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
      if (!an->ps_key)
          return;
 
+    if (ath9k_modparam_nohwcrypt)
+        return;
+

This looks wrong to me. ps_key is used for better powersave handling of both unencrypted and encrypted stations (using the keycache only for tx filtering on unencrypted stations).

Quoted 3 lines
Quoted 2 lines

Ok..should we just remove the spammy printk when the keycache entry is out of range then?

I'd say we should figure out why it triggers at all.

I have more than 200 stations associating, and that is more than there are key-indexes it appears. I can add a WARN_ON if you'd like to see a backtrace or any other info...

Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#5 lore raw
Quoted 35 lines · Ben Greear
Quoted 34 lines · Felix Fietkau
Quoted 31 lines · Ben Greear
Quoted 29 lines · Felix Fietkau
Quoted 19 lines · On 2012-04-02 10:41 PM, [email protected] wrote:

From: Ben Greear<[email protected]>

This spams logs if we are using large numbers of stations, for instance:

ath: wiphy0: keyreset: keycache entry 228 out of range
ath: wiphy0: keyreset: keycache entry 228 out of range

---
:100644 100644 917032a... 65e7281... M drivers/net/wireless/ath/ath9k/main.c

  drivers/net/wireless/ath/ath9k/main.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +0 -0
index 917032a..65e7281 100644

drivers/net/wireless/ath/ath9k/main.c static void ath9k_del_ps_key(struct ath_softc *sc, · line 1776

Quoted 6 lines
drivers/net/wireless/ath/ath9k/main.c +3 -0
@@ -1771,6 +1771,9 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
      if (!an->ps_key)
          return;
 
+    if (ath9k_modparam_nohwcrypt)
+        return;
+

This looks wrong to me. ps_key is used for better powersave handling of both unencrypted and encrypted stations (using the keycache only for tx filtering on unencrypted stations).

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

Ok..should we just remove the spammy printk when the keycache entry is out of range then?

I'd say we should figure out why it triggers at all.

I have more than 200 stations associating, and that is more than there are key-indexes it appears. I can add a WARN_ON if you'd like to see a backtrace or any other info...

In that case key index allocation should simply fail instead of returning something that it refuses to delete later.

- Felix