svn commit: r277823 - head/sys/dev/ath/ath_rate/sample
Adrian Chadd
adrian at FreeBSD.org
Wed Jan 28 04:44:43 UTC 2015
Author: adrian
Date: Wed Jan 28 04:44:42 2015
New Revision: 277823
URL: https://svnweb.freebsd.org/changeset/base/277823
Log:
Cast everything to something longer than 32 bits so the sample mask
doesn't get truncated to 32 bits.
Without this, 3x3 NICs transmitting at an MCS rate whose rix (rate
index) in the rate table is > 31 end up returning errors, as the
sample rate code doesn't think the rate is set in the rate table.
Tested:
* AR9380, STA, speaking 3x3 to an AP
Modified:
head/sys/dev/ath/ath_rate/sample/sample.h
Modified: head/sys/dev/ath/ath_rate/sample/sample.h
==============================================================================
--- head/sys/dev/ath/ath_rate/sample/sample.h Wed Jan 28 04:42:40 2015 (r277822)
+++ head/sys/dev/ath/ath_rate/sample/sample.h Wed Jan 28 04:44:42 2015 (r277823)
@@ -113,7 +113,7 @@ struct sample_node {
#ifdef _KERNEL
#define ATH_NODE_SAMPLE(an) ((struct sample_node *)&(an)[1])
-#define IS_RATE_DEFINED(sn, rix) (((sn)->ratemask & (1<<(rix))) != 0)
+#define IS_RATE_DEFINED(sn, rix) (((uint64_t) (sn)->ratemask & (1ULL<<((uint64_t) rix))) != 0)
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
More information about the svn-src-head
mailing list