From: Jiri Slaby <jirislaby@gmail.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: John Linville <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org,
Nick Kossifidis <mickflemm@gmail.com>
Subject: Re: [PATCH 5/7] ath5k: Move OFDM timings into a helper routine
Date: Thu, 01 Nov 2007 22:57:17 +0100 [thread overview]
Message-ID: <472A4BBD.4050207@gmail.com> (raw)
In-Reply-To: <20071101215318.GC4182@pogo>
On 11/01/2007 10:53 PM, Luis R. Rodriguez wrote:
> ** Resending after checkpatch.pl..
>
> This move the OFDM timings on ath5k_hw_reset() onto a helper,
> ath5k_hw_write_ofdm_timings() to make code cleaner.
>
> Changes to ath5k.h, hw.c
> Changes-licensed-under: ISC
>
> Signed-off-by: Luis R. Rodriguez <mcgrof@gmail.com>
> ---
> drivers/net/wireless/ath5k/hw.c | 83 ++++++++++++++++++++++++++-------------
> 1 files changed, 55 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
> index 3f78d20..1b9c4f0 100644
> --- a/drivers/net/wireless/ath5k/hw.c
> +++ b/drivers/net/wireless/ath5k/hw.c
> @@ -458,6 +458,56 @@ void ath5k_hw_detach(struct ath5k_hw *ah)
> */
>
> /**
> + * ath5k_hw_write_ofdm_timings - set OFDM timings on AR5212
> + *
> + * @ah: the &struct ath5k_hw
> + * @channel: the currently set channel upon reset
> + *
> + * Write the OFDM timings for the AR5212 upon reset. This is a helper for
> + * ath5k_hw_reset(). This seems to tune the PLL a specified frequency
> + * depending on the bandwidth of the channel.
> + *
> + */
> +static inline int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah,
> + struct ieee80211_channel *channel)
> +{
> + /* Get exponent and mantissa and set it */
> + u32 coef_scaled, coef_exp, coef_man,
> + ds_coef_exp, ds_coef_man, clock;
> +
> + if (!(ah->ah_version == AR5K_AR5212) ||
> + !(channel->val & CHANNEL_OFDM))
> + BUG();
Note, that BUG can return (on configurations where !CONFIG_BUG). It is my fault
writing you it won't, sorry! Could you post a patch which will add return from
here and also from places where the BUG() is used in other places?
> +
> + /* Seems there are two PLLs, one for baseband sampling and one
> + * for tuning. Tuning basebands are 40 MHz or 80MHz when in
> + * turbo. */
> + clock = channel->val & CHANNEL_TURBO ? 80 : 40;
> + coef_scaled = ((5 * (clock << 24)) / 2) /
> + channel->freq;
thanks,
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
next prev parent reply other threads:[~2007-11-01 21:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 4:35 [PATCH 2/7] ath5k: Remove opaque pointers from ath5k_hw_attach() Luis R. Rodriguez
2007-11-01 4:37 ` [PATCH 3/7] ath5k: Clean up ath5k rate duration settings Luis R. Rodriguez
2007-11-01 4:38 ` [PATCH 4/7] ath5k: Fix clock on OFDM timing computation Luis R. Rodriguez
2007-11-01 4:38 ` [PATCH 5/7] ath5k: Move OFDM timings into a helper routine Luis R. Rodriguez
2007-11-01 4:39 ` [PATCH 6/7] ath5k: Clear up settings of AR5K_RSSI_THR register settings Luis R. Rodriguez
2007-11-01 4:40 ` [PATCH 7/7] ath5k: Add documentation for struct ath5k_rate Luis R. Rodriguez
2007-11-01 13:16 ` Nick Kossifidis
2007-11-01 16:47 ` Luis R. Rodriguez
2007-11-01 21:56 ` Luis R. Rodriguez
2007-11-01 22:06 ` Randy Dunlap
2007-11-02 3:11 ` Luis R. Rodriguez
2007-11-01 13:27 ` [PATCH 6/7] ath5k: Clear up settings of AR5K_RSSI_THR register settings Nick Kossifidis
2007-11-01 21:55 ` Luis R. Rodriguez
2007-11-01 21:53 ` [PATCH 5/7] ath5k: Move OFDM timings into a helper routine Luis R. Rodriguez
2007-11-01 21:57 ` Jiri Slaby [this message]
2007-11-01 22:01 ` Luis R. Rodriguez
2007-11-01 22:02 ` Jiri Slaby
2007-11-01 22:21 ` Jiri Slaby
2007-11-01 22:27 ` Nick Kossifidis
2007-11-01 21:50 ` [PATCH 3/7] ath5k: Clean up ath5k rate duration settings Luis R. Rodriguez
2007-11-01 13:06 ` [PATCH 2/7] ath5k: Remove opaque pointers from ath5k_hw_attach() Nick Kossifidis
2007-11-01 17:27 ` Christoph Hellwig
2007-11-01 18:44 ` Luis R. Rodriguez
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=472A4BBD.4050207@gmail.com \
--to=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).