Search Linux Wireless

Re: [PATCH 2/2] ath5k: correct endianness of frame duration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/1/25 Bob Copeland <me@xxxxxxxxxxxxxxx>:
> 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@xxxxxxxxxxxxxxx>
> ---
> Â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))
> --
> 1.7.1.1

Acked-by: Nick Kossifidis <mickflemm@xxxxxxxxx>


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux