Date: Wed, 28 Jan 2015 04:44:43 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277823 - head/sys/dev/ath/ath_rate/sample Message-ID: <201501280444.t0S4ihvp088610@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501280444.t0S4ihvp088610>