linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bob Copeland" <me@bobcopeland.com>
To: Nick Kossifidis <mick@madwifi-project.org>,
	ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, jirislaby@gmail.com, mcgrof@gmail.com,
	nbd@openwrt.org
Subject: Re: [PATCH 5/5] ath5k: Update reset code
Date: Tue, 3 Feb 2009 11:24:04 -0500	[thread overview]
Message-ID: <20090203161317.M71923@bobcopeland.com> (raw)
In-Reply-To: <20090131023147.GE3342@makis>

On Sat, 31 Jan 2009 04:31:47 +0200, Nick Kossifidis wrote
>  int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
>  	struct ieee80211_channel *channel, bool change_channel)

Here's another thing I just noticed:

>  {
> +	u32 s_seq[10], s_ant, s_led[3], staid1_flags, tsf_up, tsf_lo;

s_seq is now an array (we used to initialize s_seq to 0)

[...]
> +		if (change_channel) {
> +			/*
> +			 * Save frame sequence count
> +			 * For revs. after Oahu, only save
> +			 * seq num for DCU 0 (Global seq num)
> +			 */
> +			if (ah->ah_mac_srev < AR5K_SREV_AR5211) {
> +
> +				for (i = 0; i < 10; i++)
> +					s_seq[i] = ath5k_hw_reg_read(ah,
> +						AR5K_QUEUE_DCU_SEQNUM(i));
> +
> +			} else {
> +				s_seq[0] = ath5k_hw_reg_read(ah,
> +						AR5K_QUEUE_DCU_SEQNUM(0));
> +			}

We only save the DCU sequence values if changing a channel

[...]

>  	if (ah->ah_version != AR5K_AR5210) {
> -		ath5k_hw_reg_write(ah, s_seq, AR5K_QUEUE_DFS_SEQNUM(0));
> +
> +		if (ah->ah_mac_srev < AR5K_SREV_AR5211) {
> +			for (i = 0; i < 10; i++)
> +				ath5k_hw_reg_write(ah, s_seq[i],
> +					AR5K_QUEUE_DCU_SEQNUM(i));
> +		} else {
> +			ath5k_hw_reg_write(ah, s_seq[0],
> +				AR5K_QUEUE_DCU_SEQNUM(0));
> +		}

But always write it.  The old code did this too, the only difference
was we explicitly initialized the s_seq[0] to 0.  Since it's an array,
gcc won't warn about it but s_seq[] probably has random crap in it.

-- 
Bob Copeland %% www.bobcopeland.com



  parent reply	other threads:[~2009-02-03 16:24 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
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 [this message]
2009-02-03 16:28   ` 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=20090203161317.M71923@bobcopeland.com \
    --to=me@bobcopeland.com \
    --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=mick@madwifi-project.org \
    --cc=nbd@openwrt.org \
    /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).