linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] ath5k: few fixes for regressions
@ 2009-10-07  0:44 Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 1/7] ath5k: fix regression on setting bssid mask on association Luis R. Rodriguez
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07  0:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

I wasn't able to connect to some AP and it turned out the issue
was a few regressions introduced in my series. It was hard to note
as I was able to connect at work and at home, so I guess this would
only have been seen with some specific APs. This series fixed my
connection but since I introduced them I figured I'd throw in
an extra patch at the end for setting the association ID.

Luis R. Rodriguez (7):
  ath5k: fix regression on setting bssid mask on association
  ath5k: use ath_hw_setbssidmask() for bssid mask setting upon assoc
  ath5k: fix regression introduced upon the removal of AR5K_HIGH_ID()
  ath5k: simplify passed params to ath5k_hw_set_associd()
  ath5k: remove temporary low_id and high_id vars on
    ath5k_hw_set_associd()
  ath5k: fix regression which triggers an SME join upon assoc
  ath5k: enable Power-Save Polls by setting the association ID

 drivers/net/wireless/ath/ath5k/ath5k.h  |    2 +-
 drivers/net/wireless/ath/ath5k/attach.c |    2 +-
 drivers/net/wireless/ath/ath5k/base.c   |   13 ++++++++++---
 drivers/net/wireless/ath/ath5k/pcu.c    |   30 +++++++++++++-----------------
 drivers/net/wireless/ath/ath5k/reset.c  |    5 ++---
 5 files changed, 27 insertions(+), 25 deletions(-)


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/7] ath5k: fix regression on setting bssid mask on association
  2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
@ 2009-10-07  0:44 ` Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 2/7] ath5k: use ath_hw_setbssidmask() for bssid mask setting upon assoc Luis R. Rodriguez
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07  0:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

There was a typo on the second bssid mask register.
This was caused by the patch titled:

"ath5k: use common curbssid, bssidmask and macaddr"

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath5k/pcu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index 9ac7638..0385e80 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -292,7 +292,7 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
 		ath5k_hw_reg_write(ah, get_unaligned_le32(common->bssidmask),
 				   AR_BSSMSKL);
 		ath5k_hw_reg_write(ah,
-				   get_unaligned_le16(common->curbssid + 4),
+				   get_unaligned_le16(common->bssidmask + 4),
 				   AR_BSSMSKU);
 	}
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/7] ath5k: use ath_hw_setbssidmask() for bssid mask setting upon assoc
  2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 1/7] ath5k: fix regression on setting bssid mask on association Luis R. Rodriguez
@ 2009-10-07  0:44 ` Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 3/7] ath5k: fix regression introduced upon the removal of AR5K_HIGH_ID() Luis R. Rodriguez
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07  0:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

This should avoid future typos.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath5k/pcu.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index 0385e80..32fd5f8 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -288,13 +288,8 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
 	/*
 	 * Set simple BSSID mask on 5212
 	 */
-	if (ah->ah_version == AR5K_AR5212) {
-		ath5k_hw_reg_write(ah, get_unaligned_le32(common->bssidmask),
-				   AR_BSSMSKL);
-		ath5k_hw_reg_write(ah,
-				   get_unaligned_le16(common->bssidmask + 4),
-				   AR_BSSMSKU);
-	}
+	if (ah->ah_version == AR5K_AR5212)
+		ath_hw_setbssidmask(common);
 
 	/*
 	 * Set BSSID which triggers the "SME Join" operation
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/7] ath5k: fix regression introduced upon the removal of AR5K_HIGH_ID()
  2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 1/7] ath5k: fix regression on setting bssid mask on association Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 2/7] ath5k: use ath_hw_setbssidmask() for bssid mask setting upon assoc Luis R. Rodriguez
@ 2009-10-07  0:44 ` Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 4/7] ath5k: simplify passed params to ath5k_hw_set_associd() Luis R. Rodriguez
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07  0:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

The trick was to add four bytes whenever this was used. There
are two places where this was missed.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath5k/pcu.c   |    2 +-
 drivers/net/wireless/ath/ath5k/reset.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index 32fd5f8..9e6e41b 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -295,7 +295,7 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
 	 * Set BSSID which triggers the "SME Join" operation
 	 */
 	low_id = get_unaligned_le32(bssid);
-	high_id = get_unaligned_le16(bssid);
+	high_id = get_unaligned_le16(bssid + 4);
 	ath5k_hw_reg_write(ah, low_id, AR_BSSMSKL);
 	ath5k_hw_reg_write(ah, high_id | ((assoc_id & 0x3fff) <<
 				AR5K_BSS_ID1_AID_S), AR_BSSMSKU);
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index 51aff76..39346a2 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -1178,7 +1178,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
 			   get_unaligned_le32(common->macaddr),
 			   AR5K_STA_ID0);
 	ath5k_hw_reg_write(ah,
-			   staid1_flags | get_unaligned_le16(common->macaddr),
+			   staid1_flags | get_unaligned_le16(common->macaddr + 4),
 			   AR5K_STA_ID1);
 
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/7] ath5k: simplify passed params to ath5k_hw_set_associd()
  2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
                   ` (2 preceding siblings ...)
  2009-10-07  0:44 ` [PATCH 3/7] ath5k: fix regression introduced upon the removal of AR5K_HIGH_ID() Luis R. Rodriguez
@ 2009-10-07  0:44 ` Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 5/7] ath5k: remove temporary low_id and high_id vars on ath5k_hw_set_associd() Luis R. Rodriguez
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07  0:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

We have access to common->curbssid and common->curaid so just
use those. Note that common->curaid is always 0 so this keeps
our current behaviour of always using 0 for now. Once we fix
storing the association ID passed by mac80211 this will
require no changes here.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath5k/ath5k.h  |    2 +-
 drivers/net/wireless/ath/ath5k/attach.c |    2 +-
 drivers/net/wireless/ath/ath5k/base.c   |    2 +-
 drivers/net/wireless/ath/ath5k/pcu.c    |   10 +++++-----
 drivers/net/wireless/ath/ath5k/reset.c  |    2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index 43585d5..647d826 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -1191,7 +1191,7 @@ extern bool ath5k_eeprom_is_hb63(struct ath5k_hw *ah);
 extern int ath5k_hw_set_opmode(struct ath5k_hw *ah);
 /* BSSID Functions */
 extern int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac);
-extern void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id);
+extern void ath5k_hw_set_associd(struct ath5k_hw *ah);
 extern void ath5k_hw_set_bssid_mask(struct ath5k_hw *ah, const u8 *mask);
 /* Receive start/stop functions */
 extern void ath5k_hw_start_rx_pcu(struct ath5k_hw *ah);
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
index e230de8..92995ad 100644
--- a/drivers/net/wireless/ath/ath5k/attach.c
+++ b/drivers/net/wireless/ath/ath5k/attach.c
@@ -326,7 +326,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc)
 
 	/* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */
 	memcpy(common->curbssid, ath_bcast_mac, ETH_ALEN);
-	ath5k_hw_set_associd(ah, common->curbssid, 0);
+	ath5k_hw_set_associd(ah);
 	ath5k_hw_set_opmode(ah);
 
 	ath5k_hw_rfgain_opt_init(ah);
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 5aaa9bd..01da83d 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -3213,7 +3213,7 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
 		memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
 		/* XXX: assoc id is set to 0 for now, mac80211 doesn't have
 		 * a clean way of letting us retrieve this yet. */
-		ath5k_hw_set_associd(ah, common->curbssid, 0);
+		ath5k_hw_set_associd(ah);
 		mmiowb();
 	}
 
diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index 9e6e41b..23e5e7e 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -279,7 +279,7 @@ int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
  *
  * Sets the BSSID which trigers the "SME Join" operation
  */
-void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
+void ath5k_hw_set_associd(struct ath5k_hw *ah)
 {
 	struct ath_common *common = ath5k_hw_common(ah);
 	u32 low_id, high_id;
@@ -294,13 +294,13 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
 	/*
 	 * Set BSSID which triggers the "SME Join" operation
 	 */
-	low_id = get_unaligned_le32(bssid);
-	high_id = get_unaligned_le16(bssid + 4);
+	low_id = get_unaligned_le32(common->curbssid);
+	high_id = get_unaligned_le16(common->curbssid + 4);
 	ath5k_hw_reg_write(ah, low_id, AR_BSSMSKL);
-	ath5k_hw_reg_write(ah, high_id | ((assoc_id & 0x3fff) <<
+	ath5k_hw_reg_write(ah, high_id | ((common->curaid & 0x3fff) <<
 				AR5K_BSS_ID1_AID_S), AR_BSSMSKU);
 
-	if (assoc_id == 0) {
+	if (common->curaid == 0) {
 		ath5k_hw_disable_pspoll(ah);
 		return;
 	}
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index 39346a2..fb89815 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -1188,7 +1188,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
 
 	/* Restore bssid and bssid mask */
 	/* XXX: add ah->aid once mac80211 gives this to us */
-	ath5k_hw_set_associd(ah, common->curbssid, 0);
+	ath5k_hw_set_associd(ah);
 
 	/* Set PCU config */
 	ath5k_hw_set_opmode(ah);
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/7] ath5k: remove temporary low_id and high_id vars on ath5k_hw_set_associd()
  2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
                   ` (3 preceding siblings ...)
  2009-10-07  0:44 ` [PATCH 4/7] ath5k: simplify passed params to ath5k_hw_set_associd() Luis R. Rodriguez
@ 2009-10-07  0:44 ` Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 6/7] ath5k: fix regression which triggers an SME join upon assoc Luis R. Rodriguez
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07  0:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath5k/pcu.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index 23e5e7e..2ab9c0e 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -282,7 +282,6 @@ int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
 void ath5k_hw_set_associd(struct ath5k_hw *ah)
 {
 	struct ath_common *common = ath5k_hw_common(ah);
-	u32 low_id, high_id;
 	u16 tim_offset = 0;
 
 	/*
@@ -294,11 +293,13 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah)
 	/*
 	 * Set BSSID which triggers the "SME Join" operation
 	 */
-	low_id = get_unaligned_le32(common->curbssid);
-	high_id = get_unaligned_le16(common->curbssid + 4);
-	ath5k_hw_reg_write(ah, low_id, AR_BSSMSKL);
-	ath5k_hw_reg_write(ah, high_id | ((common->curaid & 0x3fff) <<
-				AR5K_BSS_ID1_AID_S), AR_BSSMSKU);
+	ath5k_hw_reg_write(ah,
+			   get_unaligned_le32(common->curbssid),
+			   AR_BSSMSKL);
+	ath5k_hw_reg_write(ah,
+			   get_unaligned_le16(common->curbssid + 4) |
+			   ((common->curaid & 0x3fff) << AR5K_BSS_ID1_AID_S),
+			   AR_BSSMSKU);
 
 	if (common->curaid == 0) {
 		ath5k_hw_disable_pspoll(ah);
@@ -306,7 +307,7 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah)
 	}
 
 	AR5K_REG_WRITE_BITS(ah, AR5K_BEACON, AR5K_BEACON_TIM,
-			tim_offset ? tim_offset + 4 : 0);
+			    tim_offset ? tim_offset + 4 : 0);
 
 	ath5k_hw_enable_pspoll(ah, NULL, 0);
 }
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/7] ath5k: fix regression which triggers an SME join upon assoc
  2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
                   ` (4 preceding siblings ...)
  2009-10-07  0:44 ` [PATCH 5/7] ath5k: remove temporary low_id and high_id vars on ath5k_hw_set_associd() Luis R. Rodriguez
@ 2009-10-07  0:44 ` Luis R. Rodriguez
  2009-10-07  0:44 ` [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID Luis R. Rodriguez
  2009-10-07 19:53 ` [PATCH 0/7] ath5k: few fixes for regressions John W. Linville
  7 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07  0:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

This fixes a regression introduced by patch titled:

"atheros: define shared bssidmask setting"

The register for the BSSID was exchanged for the bssid mask register.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath5k/pcu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c
index 2ab9c0e..64fc1eb 100644
--- a/drivers/net/wireless/ath/ath5k/pcu.c
+++ b/drivers/net/wireless/ath/ath5k/pcu.c
@@ -295,11 +295,11 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah)
 	 */
 	ath5k_hw_reg_write(ah,
 			   get_unaligned_le32(common->curbssid),
-			   AR_BSSMSKL);
+			   AR5K_BSS_ID0);
 	ath5k_hw_reg_write(ah,
 			   get_unaligned_le16(common->curbssid + 4) |
 			   ((common->curaid & 0x3fff) << AR5K_BSS_ID1_AID_S),
-			   AR_BSSMSKU);
+			   AR5K_BSS_ID1);
 
 	if (common->curaid == 0) {
 		ath5k_hw_disable_pspoll(ah);
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID
  2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
                   ` (5 preceding siblings ...)
  2009-10-07  0:44 ` [PATCH 6/7] ath5k: fix regression which triggers an SME join upon assoc Luis R. Rodriguez
@ 2009-10-07  0:44 ` Luis R. Rodriguez
  2009-10-07 19:41   ` John W. Linville
  2009-10-08 18:26   ` Bob Copeland
  2009-10-07 19:53 ` [PATCH 0/7] ath5k: few fixes for regressions John W. Linville
  7 siblings, 2 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07  0:44 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez

mac80211 has long provided us the association ID. This isn't useful except
for Power-Save polling which now gets enabled. We can now poll for our
pending frames on the AP during power save.

You can review the details of Power-Save on the wireless wiki:

http://wireless.kernel.org/en/developers/Documentation/ieee80211/power-savings

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath5k/base.c  |   11 +++++++++--
 drivers/net/wireless/ath/ath5k/reset.c |    1 -
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 01da83d..07c1e52 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -3211,8 +3211,7 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
 	if (changes & BSS_CHANGED_BSSID) {
 		/* Cache for later use during resets */
 		memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN);
-		/* XXX: assoc id is set to 0 for now, mac80211 doesn't have
-		 * a clean way of letting us retrieve this yet. */
+		common->curaid = 0;
 		ath5k_hw_set_associd(ah);
 		mmiowb();
 	}
@@ -3226,6 +3225,14 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
 			set_beacon_filter(hw, sc->assoc);
 		ath5k_hw_set_ledstate(sc->ah, sc->assoc ?
 			AR5K_LED_ASSOC : AR5K_LED_INIT);
+		if (bss_conf->assoc) {
+			ATH5K_DBG(sc, ATH5K_DEBUG_ANY,
+				  "Bss Info ASSOC %d, bssid: %pM\n",
+				  bss_conf->aid, common->curbssid);
+			common->curaid = bss_conf->aid;
+			ath5k_hw_set_associd(ah);
+			/* Once ANI is available you would start it here */
+		}
 	}
 
 	if (changes & BSS_CHANGED_BEACON) {
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index fb89815..3dab3d8 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -1187,7 +1187,6 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
 	 */
 
 	/* Restore bssid and bssid mask */
-	/* XXX: add ah->aid once mac80211 gives this to us */
 	ath5k_hw_set_associd(ah);
 
 	/* Set PCU config */
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID
  2009-10-07  0:44 ` [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID Luis R. Rodriguez
@ 2009-10-07 19:41   ` John W. Linville
  2009-10-07 20:24     ` Luis R. Rodriguez
  2009-10-08 18:26   ` Bob Copeland
  1 sibling, 1 reply; 14+ messages in thread
From: John W. Linville @ 2009-10-07 19:41 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On Tue, Oct 06, 2009 at 08:44:34PM -0400, Luis R. Rodriguez wrote:
> mac80211 has long provided us the association ID. This isn't useful except
> for Power-Save polling which now gets enabled. We can now poll for our
> pending frames on the AP during power save.
> 
> You can review the details of Power-Save on the wireless wiki:
> 
> http://wireless.kernel.org/en/developers/Documentation/ieee80211/power-savings
> 
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Nice try, but how is this a fix? :-)

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/7] ath5k: few fixes for regressions
  2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
                   ` (6 preceding siblings ...)
  2009-10-07  0:44 ` [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID Luis R. Rodriguez
@ 2009-10-07 19:53 ` John W. Linville
  2009-10-07 20:23   ` Luis R. Rodriguez
  7 siblings, 1 reply; 14+ messages in thread
From: John W. Linville @ 2009-10-07 19:53 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On Tue, Oct 06, 2009 at 08:44:27PM -0400, Luis R. Rodriguez wrote:
> I wasn't able to connect to some AP and it turned out the issue
> was a few regressions introduced in my series. It was hard to note
> as I was able to connect at work and at home, so I guess this would
> only have been seen with some specific APs. This series fixed my
> connection but since I introduced them I figured I'd throw in
> an extra patch at the end for setting the association ID.
> 
> Luis R. Rodriguez (7):
>   ath5k: fix regression on setting bssid mask on association
>   ath5k: use ath_hw_setbssidmask() for bssid mask setting upon assoc
>   ath5k: fix regression introduced upon the removal of AR5K_HIGH_ID()
>   ath5k: simplify passed params to ath5k_hw_set_associd()
>   ath5k: remove temporary low_id and high_id vars on
>     ath5k_hw_set_associd()
>   ath5k: fix regression which triggers an SME join upon assoc
>   ath5k: enable Power-Save Polls by setting the association ID
> 
>  drivers/net/wireless/ath/ath5k/ath5k.h  |    2 +-
>  drivers/net/wireless/ath/ath5k/attach.c |    2 +-
>  drivers/net/wireless/ath/ath5k/base.c   |   13 ++++++++++---
>  drivers/net/wireless/ath/ath5k/pcu.c    |   30 +++++++++++++-----------------
>  drivers/net/wireless/ath/ath5k/reset.c  |    5 ++---
>  5 files changed, 27 insertions(+), 25 deletions(-)

Actually, none of these seem to apply against 2.6.32...did you mean
for them to go there?

I'll queue them for -next for now...

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/7] ath5k: few fixes for regressions
  2009-10-07 19:53 ` [PATCH 0/7] ath5k: few fixes for regressions John W. Linville
@ 2009-10-07 20:23   ` Luis R. Rodriguez
  0 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07 20:23 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless

On Wed, Oct 7, 2009 at 3:53 PM, John W. Linville <linville@tuxdriver.com> wrote:
> On Tue, Oct 06, 2009 at 08:44:27PM -0400, Luis R. Rodriguez wrote:
>> I wasn't able to connect to some AP and it turned out the issue
>> was a few regressions introduced in my series. It was hard to note
>> as I was able to connect at work and at home, so I guess this would
>> only have been seen with some specific APs. This series fixed my
>> connection but since I introduced them I figured I'd throw in
>> an extra patch at the end for setting the association ID.
>>
>> Luis R. Rodriguez (7):
>>   ath5k: fix regression on setting bssid mask on association
>>   ath5k: use ath_hw_setbssidmask() for bssid mask setting upon assoc
>>   ath5k: fix regression introduced upon the removal of AR5K_HIGH_ID()
>>   ath5k: simplify passed params to ath5k_hw_set_associd()
>>   ath5k: remove temporary low_id and high_id vars on
>>     ath5k_hw_set_associd()
>>   ath5k: fix regression which triggers an SME join upon assoc
>>   ath5k: enable Power-Save Polls by setting the association ID
>>
>>  drivers/net/wireless/ath/ath5k/ath5k.h  |    2 +-
>>  drivers/net/wireless/ath/ath5k/attach.c |    2 +-
>>  drivers/net/wireless/ath/ath5k/base.c   |   13 ++++++++++---
>>  drivers/net/wireless/ath/ath5k/pcu.c    |   30 +++++++++++++-----------------
>>  drivers/net/wireless/ath/ath5k/reset.c  |    5 ++---
>>  5 files changed, 27 insertions(+), 25 deletions(-)
>
> Actually, none of these seem to apply against 2.6.32...did you mean
> for them to go there?
>
> I'll queue them for -next for now...

Nope -- none of them are for 2.6.32 -- all of them are just for 2.6.33.

  Luis

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID
  2009-10-07 19:41   ` John W. Linville
@ 2009-10-07 20:24     ` Luis R. Rodriguez
  0 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-07 20:24 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless

On Wed, Oct 7, 2009 at 3:41 PM, John W. Linville <linville@tuxdriver.com> wrote:
> On Tue, Oct 06, 2009 at 08:44:34PM -0400, Luis R. Rodriguez wrote:
>> mac80211 has long provided us the association ID. This isn't useful except
>> for Power-Save polling which now gets enabled. We can now poll for our
>> pending frames on the AP during power save.
>>
>> You can review the details of Power-Save on the wireless wiki:
>>
>> http://wireless.kernel.org/en/developers/Documentation/ieee80211/power-savings
>>
>> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
>
> Nice try, but how is this a fix? :-)

It isn't -- by no means do I want this in for 2.6.32, sorry if I was
misleading. Its a regression as things *used* to work :) but yeah not
a regression for 2.6.32.

  Luis

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID
  2009-10-07  0:44 ` [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID Luis R. Rodriguez
  2009-10-07 19:41   ` John W. Linville
@ 2009-10-08 18:26   ` Bob Copeland
  2009-10-08 19:51     ` Luis R. Rodriguez
  1 sibling, 1 reply; 14+ messages in thread
From: Bob Copeland @ 2009-10-08 18:26 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless

On Tue, Oct 6, 2009 at 8:44 PM, Luis R. Rodriguez
<lrodriguez@atheros.com> wrote:
> @@ -3226,6 +3225,14 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
>                        set_beacon_filter(hw, sc->assoc);
>                ath5k_hw_set_ledstate(sc->ah, sc->assoc ?
>                        AR5K_LED_ASSOC : AR5K_LED_INIT);
> +               if (bss_conf->assoc) {
> +                       ATH5K_DBG(sc, ATH5K_DEBUG_ANY,
> +                                 "Bss Info ASSOC %d, bssid: %pM\n",
> +                                 bss_conf->aid, common->curbssid);
> +                       common->curaid = bss_conf->aid;
> +                       ath5k_hw_set_associd(ah);
> +                       /* Once ANI is available you would start it here */
> +               }

Just quick question - do we only want to call this if we are associated?

Or maybe we should call it to reset the mask if we are unassociated...

I wrote a patch a while ago to the ath5k list that did something similar,
but I did:

       if (changes & (BSS_CHANGED_BSSID | BSS_CHANGED_ASSOC)) {
               ath5k_hw_set_associd(ah, ah->ah_bssid, ah->ah_aid);
       }

Thus if it changed regardless of the reason why, we update the mask.

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID
  2009-10-08 18:26   ` Bob Copeland
@ 2009-10-08 19:51     ` Luis R. Rodriguez
  0 siblings, 0 replies; 14+ messages in thread
From: Luis R. Rodriguez @ 2009-10-08 19:51 UTC (permalink / raw)
  To: Bob Copeland; +Cc: linville, linux-wireless

On Thu, Oct 8, 2009 at 2:26 PM, Bob Copeland <me@bobcopeland.com> wrote:
> On Tue, Oct 6, 2009 at 8:44 PM, Luis R. Rodriguez
> <lrodriguez@atheros.com> wrote:
>> @@ -3226,6 +3225,14 @@ static void ath5k_bss_info_changed(struct ieee80211_hw *hw,
>>                        set_beacon_filter(hw, sc->assoc);
>>                ath5k_hw_set_ledstate(sc->ah, sc->assoc ?
>>                        AR5K_LED_ASSOC : AR5K_LED_INIT);
>> +               if (bss_conf->assoc) {
>> +                       ATH5K_DBG(sc, ATH5K_DEBUG_ANY,
>> +                                 "Bss Info ASSOC %d, bssid: %pM\n",
>> +                                 bss_conf->aid, common->curbssid);
>> +                       common->curaid = bss_conf->aid;
>> +                       ath5k_hw_set_associd(ah);
>> +                       /* Once ANI is available you would start it here */
>> +               }
>
> Just quick question - do we only want to call this if we are associated?
>
> Or maybe we should call it to reset the mask if we are unassociated...
>
> I wrote a patch a while ago to the ath5k list that did something similar,
> but I did:
>
>       if (changes & (BSS_CHANGED_BSSID | BSS_CHANGED_ASSOC)) {
>               ath5k_hw_set_associd(ah, ah->ah_bssid, ah->ah_aid);
>       }
>
> Thus if it changed regardless of the reason why, we update the mask.

Yeah might be a good idea to do it that way -- although upon disassoc
you should also just disable ps.

  Luis

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-10-08 19:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07  0:44 [PATCH 0/7] ath5k: few fixes for regressions Luis R. Rodriguez
2009-10-07  0:44 ` [PATCH 1/7] ath5k: fix regression on setting bssid mask on association Luis R. Rodriguez
2009-10-07  0:44 ` [PATCH 2/7] ath5k: use ath_hw_setbssidmask() for bssid mask setting upon assoc Luis R. Rodriguez
2009-10-07  0:44 ` [PATCH 3/7] ath5k: fix regression introduced upon the removal of AR5K_HIGH_ID() Luis R. Rodriguez
2009-10-07  0:44 ` [PATCH 4/7] ath5k: simplify passed params to ath5k_hw_set_associd() Luis R. Rodriguez
2009-10-07  0:44 ` [PATCH 5/7] ath5k: remove temporary low_id and high_id vars on ath5k_hw_set_associd() Luis R. Rodriguez
2009-10-07  0:44 ` [PATCH 6/7] ath5k: fix regression which triggers an SME join upon assoc Luis R. Rodriguez
2009-10-07  0:44 ` [PATCH 7/7] ath5k: enable Power-Save Polls by setting the association ID Luis R. Rodriguez
2009-10-07 19:41   ` John W. Linville
2009-10-07 20:24     ` Luis R. Rodriguez
2009-10-08 18:26   ` Bob Copeland
2009-10-08 19:51     ` Luis R. Rodriguez
2009-10-07 19:53 ` [PATCH 0/7] ath5k: few fixes for regressions John W. Linville
2009-10-07 20:23   ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).