linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] ath5k: Correct usage of AR5K_CFG_ADHOC
@ 2008-12-23 12:57 Steve Brown
  2008-12-23 17:09 ` Nick Kossifidis
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Brown @ 2008-12-23 12:57 UTC (permalink / raw)
  To: Nick Kossifidis; +Cc: linux-wireless, Bob Copeland

This corrects usage of AR5K_CFG_ADHOC introduced in 
731818f956854fa3866f14107867969cf6e9b0cb (Update PCU code). Also,
the name of the indicator is changed to AR5K_CFG_IBSS to more
accurately reflect its function. This change restores 
beaconing in AP and mesh modes.

Signed-off-by: Steve Brown <sbrown@cortland.com>
---

Nick,

Is this what you had in mind?

Steve

diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c
index 0cac05c..b6e27a9 100644
--- a/drivers/net/wireless/ath5k/pcu.c
+++ b/drivers/net/wireless/ath5k/pcu.c
@@ -65,7 +65,7 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)
 		if (ah->ah_version == AR5K_AR5210)
 			pcu_reg |= AR5K_STA_ID1_NO_PSPOLL;
 		else
-			AR5K_REG_DISABLE_BITS(ah, AR5K_CFG, AR5K_CFG_ADHOC);
+			AR5K_REG_ENABLE_BITS(ah, AR5K_CFG, AR5K_CFG_IBSS);
 		break;
 
 	case NL80211_IFTYPE_AP:
@@ -75,7 +75,7 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)
 		if (ah->ah_version == AR5K_AR5210)
 			pcu_reg |= AR5K_STA_ID1_NO_PSPOLL;
 		else
-			AR5K_REG_ENABLE_BITS(ah, AR5K_CFG, AR5K_CFG_ADHOC);
+			AR5K_REG_DISABLE_BITS(ah, AR5K_CFG, AR5K_CFG_IBSS);
 		break;
 
 	case NL80211_IFTYPE_STATION:
diff --git a/drivers/net/wireless/ath5k/reg.h b/drivers/net/wireless/ath5k/reg.h
index 91aaeaf..b709ad1 100644
--- a/drivers/net/wireless/ath5k/reg.h
+++ b/drivers/net/wireless/ath5k/reg.h
@@ -73,7 +73,7 @@
 #define	AR5K_CFG_SWRD		0x00000004	/* Byte-swap RX descriptor */
 #define	AR5K_CFG_SWRB		0x00000008	/* Byte-swap RX buffer */
 #define	AR5K_CFG_SWRG		0x00000010	/* Byte-swap Register access */
-#define AR5K_CFG_ADHOC		0x00000020 	/* AP/Adhoc indication [5211+] */
+#define AR5K_CFG_IBSS		0x00000020 	/* 0-BSS, 1-IBSS [5211+] */
 #define AR5K_CFG_PHY_OK		0x00000100	/* [5211+] */
 #define AR5K_CFG_EEBS		0x00000200	/* EEPROM is busy */
 #define	AR5K_CFG_CLKGD		0x00000400	/* Clock gated (Disable dynamic clock) */


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

* Re: [PATCH V2] ath5k: Correct usage of AR5K_CFG_ADHOC
  2008-12-23 12:57 [PATCH V2] ath5k: Correct usage of AR5K_CFG_ADHOC Steve Brown
@ 2008-12-23 17:09 ` Nick Kossifidis
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Kossifidis @ 2008-12-23 17:09 UTC (permalink / raw)
  To: sbrown; +Cc: linux-wireless, Bob Copeland

2008/12/23 Steve Brown <sbrown@cortland.com>:
> This corrects usage of AR5K_CFG_ADHOC introduced in
> 731818f956854fa3866f14107867969cf6e9b0cb (Update PCU code). Also,
> the name of the indicator is changed to AR5K_CFG_IBSS to more
> accurately reflect its function. This change restores beaconing in AP and
> mesh modes.
>
> Signed-off-by: Steve Brown <sbrown@cortland.com>
> ---
>
> Nick,
>
> Is this what you had in mind?
>
> Steve
>
> diff --git a/drivers/net/wireless/ath5k/pcu.c
> b/drivers/net/wireless/ath5k/pcu.c
> index 0cac05c..b6e27a9 100644
> --- a/drivers/net/wireless/ath5k/pcu.c
> +++ b/drivers/net/wireless/ath5k/pcu.c
> @@ -65,7 +65,7 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)
>                if (ah->ah_version == AR5K_AR5210)
>                        pcu_reg |= AR5K_STA_ID1_NO_PSPOLL;
>                else
> -                       AR5K_REG_DISABLE_BITS(ah, AR5K_CFG, AR5K_CFG_ADHOC);
> +                       AR5K_REG_ENABLE_BITS(ah, AR5K_CFG, AR5K_CFG_IBSS);
>                break;
>
>        case NL80211_IFTYPE_AP:
> @@ -75,7 +75,7 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)
>                if (ah->ah_version == AR5K_AR5210)
>                        pcu_reg |= AR5K_STA_ID1_NO_PSPOLL;
>                else
> -                       AR5K_REG_ENABLE_BITS(ah, AR5K_CFG, AR5K_CFG_ADHOC);
> +                       AR5K_REG_DISABLE_BITS(ah, AR5K_CFG, AR5K_CFG_IBSS);
>                break;
>
>        case NL80211_IFTYPE_STATION:
> diff --git a/drivers/net/wireless/ath5k/reg.h
> b/drivers/net/wireless/ath5k/reg.h
> index 91aaeaf..b709ad1 100644
> --- a/drivers/net/wireless/ath5k/reg.h
> +++ b/drivers/net/wireless/ath5k/reg.h
> @@ -73,7 +73,7 @@
> #define AR5K_CFG_SWRD           0x00000004      /* Byte-swap RX descriptor
> */
> #define AR5K_CFG_SWRB           0x00000008      /* Byte-swap RX buffer */
> #define AR5K_CFG_SWRG           0x00000010      /* Byte-swap Register access
> */
> -#define AR5K_CFG_ADHOC         0x00000020      /* AP/Adhoc indication
> [5211+] */
> +#define AR5K_CFG_IBSS          0x00000020      /* 0-BSS, 1-IBSS [5211+] */
> #define AR5K_CFG_PHY_OK         0x00000100      /* [5211+] */
> #define AR5K_CFG_EEBS           0x00000200      /* EEPROM is busy */
> #define AR5K_CFG_CLKGD          0x00000400      /* Clock gated (Disable
> dynamic clock) */
>
>

Yup ;-)

Thanks a lot !


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

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

end of thread, other threads:[~2008-12-23 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-23 12:57 [PATCH V2] ath5k: Correct usage of AR5K_CFG_ADHOC Steve Brown
2008-12-23 17:09 ` Nick Kossifidis

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).