From: Nils <linuxuser@knabber.homelinux.net>
To: Elias Oltmanns <eo@nebensachen.de>,
"Nick Kossifidis" <mickflemm@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"Jiri Slaby" <jirislaby@gmail.com>,
"Luis R. Rodriguez" <mcgrof@gmail.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath5k: Fix reset sequence for AR5212 in general and RF5111 in particular
Date: Mon, 27 Oct 2008 19:36:17 +0100 [thread overview]
Message-ID: <200810271936.17807.linuxuser@knabber.homelinux.net> (raw)
In-Reply-To: <87abcrtfa8.fsf@denkblock.local>
> [Bcc'ing Nils who has reported similar issues with ath5k on 2.6.27.
> Nils, can you perhaps test my patch below and report back? ]
Yes! I test the patch with 2.6.27.4 and everything works fine.
"iwlist ath0 scan" shows all wireless LANs at my location and I can connect to
my accesspoint.
Thanks,
Nils
> "Nick Kossifidis" <mickflemm@gmail.com> wrote:
> > 2008/10/23 Elias Oltmanns <eo@nebensachen.de>:
> >> Take care to handle register 0xa228 exactly as in the HAL released by
> >>
> >> Atheros. This change is required to make ath5k work again on my system
> >> since commit 2203d6be (ath5k: Misc hw_reset updates), thus fixing a
> >> regression in 2.6.27 and therefore hopefully eligible for inclusion into
> >> a stable release.
> >>
> >> Cc: stable <stable@kernel.org>
> >> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
> >> ---
> >> Applies to 2.6.27. Please let me know if I should do something
> >> differently and resend.
> >>
> >> drivers/net/wireless/ath5k/hw.c | 1 +
> >> drivers/net/wireless/ath5k/initvals.c | 2 ++
> >> 2 files changed, 3 insertions(+), 0 deletions(-)
> >
> > Current code works fine on my CM6 (AR5212 + RF5111) and i see nothing
> > like
> >
> > data |= 0x00000800
> >
> > on the HAL Atheros released
>
> Let me quote from legacy-hal:
>
> ar5212/ar5212_reset.c:
> 373: OS_REG_RMW_FIELD(ah, AR_PHY_DAG_CTRLCCK,
> 374: AR_PHY_DAG_CTRLCCK_RSSI_THR, 2);
>
> ah_internal.h:
> 598: #define OS_REG_RMW_FIELD(_a, _r, _f, _v) \
> 599: OS_REG_WRITE(_a, _r, \
> 600: (OS_REG_READ(_a, _r) &~ _f) | (((_v) << _f##_S) & _f))
>
> Please note the last argument to OS_REG_RMW_FIELD() which is 2 in this
> case. Unless I've made a mistake, this translates into the
>
> data |= 0x00000800;
>
> in my patch.
>
> There definitely is no way for me to connect to an ap (or even get a
> list of aps) with current 2.6.27.4. Perhaps we'll hear something from
> Nils on that matter too.
>
> > Problem is that we are updating 0xa228 (RSSI threshold in this case)
> > for all AR5212 based cards and we are not checking right now for BB
> > revision. These settings according to Atheros HAL are only for BB
> > revisions > 2. I'm going to update reset.c this week hopefully.
> >
> > BTW can you please run latest ath_info on your card ? Let's see what's
> > the rssi threshold stored on EEPROM and how much different is from my
> > card.
>
> Well, I don't see how to get that information from the dump. Please have
> a look for yourself, I'm going to send you my dump by pm.
>
> Since my original email has not appeared on linux-wireless (due to a
> mistake of mine), I'm attaching the patch again, so others can have a
> look at it and, more importantly, Nils can test it.
>
> Regards,
>
> Elias
>
> --------
> From: Elias Oltmanns <eo@nebensachen.de>
> Subject: [PATCH] ath5k: Fix reset sequence for AR5212 in general and RF5111
> in particular
>
> Take care to handle register 0xa228 exactly as in the HAL released by
> Atheros. This change is required to make ath5k work again on my system
> since commit 2203d6be (ath5k: Misc hw_reset updates), thus fixing a
> regression in 2.6.27 and therefore hopefully eligible for inclusion into
> a stable release.
>
> Cc: stable <stable@kernel.org>
> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
> ---
>
> drivers/net/wireless/ath5k/hw.c | 1 +
> drivers/net/wireless/ath5k/initvals.c | 2 ++
> 2 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath5k/hw.c
> b/drivers/net/wireless/ath5k/hw.c index ad1a5b4..f1a7f71 100644
> --- a/drivers/net/wireless/ath5k/hw.c
> +++ b/drivers/net/wireless/ath5k/hw.c
> @@ -858,6 +858,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum
> ieee80211_if_types op_mode,
>
> data = ath5k_hw_reg_read(ah, 0xa228);
> data &= 0xfffe03ff;
> + data |= 0x00000800;
> ath5k_hw_reg_write(ah, data, 0xa228);
> data = 0;
>
> diff --git a/drivers/net/wireless/ath5k/initvals.c
> b/drivers/net/wireless/ath5k/initvals.c index 2806b21..cf7ebd1 100644
> --- a/drivers/net/wireless/ath5k/initvals.c
> +++ b/drivers/net/wireless/ath5k/initvals.c
> @@ -810,6 +810,8 @@ static const struct ath5k_ini_mode
> ar5212_rf5111_ini_mode_end[] = { { 0x00000000, 0x00000000, 0x00000000,
> 0x00000000, 0x00000000 } }, { AR5K_PHY(642),
> { 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } },
> + { 0xa228,
> + { 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5 } },
> { 0xa23c,
> { 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } },
> };
prev parent reply other threads:[~2008-10-27 18:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87prlr9mna.fsf@denkblock.local>
2008-10-25 23:21 ` [PATCH] ath5k: Fix reset sequence for AR5212 in general and RF5111 in particular Nick Kossifidis
2008-10-26 17:52 ` Elias Oltmanns
2008-10-26 18:32 ` Nick Kossifidis
2008-10-26 20:47 ` Elias Oltmanns
2008-10-26 22:33 ` Nick Kossifidis
2008-10-26 22:52 ` Elias Oltmanns
2008-10-27 20:31 ` Nick Kossifidis
2008-10-29 13:25 ` Elias Oltmanns
2008-10-29 14:49 ` Nick Kossifidis
2008-10-29 15:07 ` Elias Oltmanns
2008-10-29 15:28 ` Bob Copeland
2008-10-29 17:51 ` Nick Kossifidis
2008-10-29 23:25 ` Elias Oltmanns
2008-10-29 23:34 ` John W. Linville
2008-10-29 23:56 ` Elias Oltmanns
2008-10-30 0:04 ` Elias Oltmanns
2008-10-27 18:36 ` Nils [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200810271936.17807.linuxuser@knabber.homelinux.net \
--to=linuxuser@knabber.homelinux.net \
--cc=eo@nebensachen.de \
--cc=jirislaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@gmail.com \
--cc=mickflemm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).