From: Bruno Randolf <br1@einfach.org>
To: Bob Copeland <me@bobcopeland.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
mickflemm@gmail.com, jirislaby@gmail.com, lrodriguez@atheros.com
Subject: Re: [PATCH 2/2] ath5k: correct endianness of frame duration
Date: Tue, 25 Jan 2011 14:23:31 +0900 [thread overview]
Message-ID: <201101251423.32008.br1@einfach.org> (raw)
In-Reply-To: <1295929904-11806-2-git-send-email-me@bobcopeland.com>
On Tue January 25 2011 13:31:44 Bob Copeland wrote:
> The ath5k version of ieee80211_generic_frame_duration() returns
> an __le16 for standard modes but a cpu-endian int for turbo/half/
> quarter rates. Make it always return cpu-endian values.
>
> Signed-off-by: Bob Copeland <me@bobcopeland.com>
> ---
> drivers/net/wireless/ath/ath5k/pcu.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/pcu.c
> b/drivers/net/wireless/ath/ath5k/pcu.c index e5f2b96..a702817 100644
> --- a/drivers/net/wireless/ath/ath5k/pcu.c
> +++ b/drivers/net/wireless/ath/ath5k/pcu.c
> @@ -86,7 +86,7 @@ int ath5k_hw_get_frame_duration(struct ath5k_hw *ah,
> if (!ah->ah_bwmode) {
> dur = ieee80211_generic_frame_duration(sc->hw,
> NULL, len, rate);
> - return dur;
> + return le16_to_cpu(dur);
> }
>
> bitrate = rate->bitrate;
> @@ -265,8 +265,6 @@ static inline void ath5k_hw_write_rate_duration(struct
> ath5k_hw *ah) * what rate we should choose to TX ACKs. */
> tx_time = ath5k_hw_get_frame_duration(ah, 10, rate);
>
> - tx_time = le16_to_cpu(tx_time);
> -
> ath5k_hw_reg_write(ah, tx_time, reg);
>
> if (!(rate->flags & IEEE80211_RATE_SHORT_PREAMBLE))
I wonder what effect this has in ath5k_hw_set_ifs_intervals() where
ack_tx_time was little endian before...
But the change makes sense.
Acked-by: Bruno Randolf <br1@einfach.org>
next prev parent reply other threads:[~2011-01-25 5:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 4:31 [PATCH 1/2] ath5k: fix error handling in ath5k_hw_dma_stop Bob Copeland
2011-01-25 4:31 ` [PATCH 2/2] ath5k: correct endianness of frame duration Bob Copeland
2011-01-25 5:23 ` Bruno Randolf [this message]
2011-01-25 10:38 ` Bob Copeland
2011-01-25 10:47 ` Bruno Randolf
2011-01-26 16:17 ` Bob Copeland
2011-01-25 12:26 ` Nick Kossifidis
2011-01-25 5:12 ` [PATCH 1/2] ath5k: fix error handling in ath5k_hw_dma_stop Bruno Randolf
2011-01-25 12:24 ` Nick Kossifidis
2011-01-25 13:52 ` Stanislaw Gruszka
2011-01-26 1:50 ` Bob Copeland
2011-01-26 7:05 ` Stanislaw Gruszka
2011-01-26 17:06 ` Nick Kossifidis
2011-01-26 19:28 ` 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=201101251423.32008.br1@einfach.org \
--to=br1@einfach.org \
--cc=jirislaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.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.