All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Nick Kossifidis <mickflemm@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>,
	ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org,
	linville@tuxdriver.com, jirislaby@gmail.com, mcgrof@gmail.com
Subject: Re: [ath5k-devel] [PATCH 5/5] ath5k: Update reset code
Date: Sat, 31 Jan 2009 19:56:25 +0100	[thread overview]
Message-ID: <49849ED9.6080300@openwrt.org> (raw)
In-Reply-To: <40f31dec0901311048t3834612cgc6b1dd01aa42a5c0@mail.gmail.com>

Nick Kossifidis wrote:
>>> [...]
>>> @@ -2156,7 +2157,8 @@
>>>  #define      AR5K_PHY_ANT_CTL_TXRX_EN        0x00000001      /* Enable TX/RX (?) */
>>>  #define      AR5K_PHY_ANT_CTL_SECTORED_ANT   0x00000004      /* Sectored Antenna */
>>>  #define      AR5K_PHY_ANT_CTL_HITUNE5        0x00000008      /* Hitune5 (?) */
>>> -#define      AR5K_PHY_ANT_CTL_SWTABLE_IDLE   0x00000010      /* Switch table idle (?) */
>>> +#define      AR5K_PHY_ANT_CTL_SWTABLE_IDLE   0x000003f9      /* Switch table idle (?) */
>>> +#define      AR5K_PHY_ANT_CTL_SWTABLE_IDLE_S 4
>>
>> That doesn't look right.. should be 3f0?  (still probably works, I guess).
>>
> 
> I know, but HAL does this...
> 	AR_PHY_BIS(ah, 68, 0xFFFFFC06,
> 		(ee->ee_antennaControl[0][arrayMode] << 4) | 0x1);
> 
> ~0xFFFFFC06 = 3F9
How about splitting it up and making the 0x1 a separate flag?

> My intention is to reimplement hw_htoclock to account for half/quarter
> rate so it'll soon be
> clock = ath5k_hw_htoclock(1, channel->hw_value);
AFAIK Sam's HAL might have a bug there. If I remember correctly, the MAC
runs at the same clock speed with Half/Quarter rate.
It's done that way in the legacy HAL. Though there is a possibility of
it being hardware dependent, I'm pretty sure that it is that way at least
on 5413.

>>> +     /* Set DAC/ADC delays */
>>> +     if (ah->ah_version == AR5K_AR5212) {
>>> +             if (ah->ah_mac_version == (AR5K_SREV_AR2417 >> 4))
>>> +                     data = AR5K_PHY_SCAL_32MHZ_2417;
>>> +             else if (ath5k_eeprom_is_hb63(ah))
>>> +                     data = AR5K_PHY_SCAL_32MHZ_HB63;
>>> +             else
>>> +                     data = AR5K_PHY_SCAL_32MHZ;
>>> +             ath5k_hw_reg_write(ah, data, AR5K_PHY_SCAL);
>>> +             data = 0;
>>
>> why data = 0; ?
>>
> Instead of having multiple temporary variables, i use only "data". To
> be sure that "data" is ok for use i always zero it each time i use it
> so that we don't write any weird stuff by mistake.
Wouldn't multiple temporary values be preferable, since the compiler
optimizes that stuff anyway?

- Felix

  reply	other threads:[~2009-01-31 18:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-31  2:31 [PATCH 5/5] ath5k: Update reset code Nick Kossifidis
2009-01-31 17:08 ` Bob Copeland
2009-01-31 18:48   ` [ath5k-devel] " Nick Kossifidis
2009-01-31 18:56     ` Felix Fietkau [this message]
2009-01-31 20:50       ` Nick Kossifidis
2009-01-31 21:45         ` Felix Fietkau
2009-01-31 22:38     ` Bob Copeland
2009-01-31 22:58       ` Nick Kossifidis
2009-02-01  4:41         ` Bob Copeland
2009-02-01  3:50       ` Nick Kossifidis
2009-02-01  4:05         ` Felix Fietkau
2009-02-01  4:50           ` Nick Kossifidis
2009-02-01  5:07             ` Felix Fietkau
2009-02-01  5:14               ` Nick Kossifidis
2009-02-03 16:24 ` Bob Copeland
2009-02-03 16:28   ` [ath5k-devel] " Nick Kossifidis
2009-02-04  4:52     ` Bob Copeland
2009-02-04  5:14       ` Nick Kossifidis
2009-02-04  6:58         ` Nick Kossifidis
2009-02-04 21:57 ` Nick Kossifidis
2009-02-05 15:51   ` Bob Copeland
2009-02-05 15:59     ` [ath5k-devel] " Maxim Levitsky
2009-02-05 21:06     ` Nick Kossifidis
2009-02-06  3:52       ` Bob Copeland
2009-02-07  5:03       ` Bob Copeland
2009-02-07  5:20         ` Nick Kossifidis
2009-02-07 14:39           ` Bob Copeland
2009-02-07 16:13             ` Nick Kossifidis
2009-02-08 17:56               ` John W. Linville
2009-02-08 18:01                 ` Nick Kossifidis
2009-02-05 23:28     ` Nick Kossifidis
2009-02-06  3:50       ` Bob Copeland

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=49849ED9.6080300@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --cc=me@bobcopeland.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.