Module Name: src
Committed By: joerg
Date: Mon May 30 13:58:24 UTC 2011
Modified Files:
src/sys/external/isc/atheros_hal/dist/ar5210: ar5210reg.h
src/sys/external/isc/atheros_hal/dist/ar5211: ar5211reg.h
Log Message:
Define a few macros as unsigned to avoid UB when later shifting them
in ways that involve integer overflow.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h
diff -u src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h:1.1.1.1 Thu Dec 11 04:46:30 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5210/ar5210reg.h Mon May 30 13:58:23 2011
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ar5210reg.h,v 1.1.1.1 2008/12/11 04:46:30 alc Exp $
+ * $Id: ar5210reg.h,v 1.2 2011/05/30 13:58:23 joerg Exp $
*/
#ifndef _DEV_ATH_AR5210REG_H
#define _DEV_ATH_AR5210REG_H
@@ -246,8 +246,8 @@
#define AR_SCR_SLE 0x00030000 /* sleep enable */
#define AR_SCR_SLE_S 16
#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */
-#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */
-#define AR_SCR_SLE_ALLOW 0x00020000 /* allow to control sleep */
+#define AR_SCR_SLE_SLP 0x00010000U /* force sleep */
+#define AR_SCR_SLE_ALLOW 0x00020000U /* allow to control sleep */
#define AR_SCR_BITS "\20\20SLE_SLP\21SLE_ALLOW"
#define AR_INTPEND_IP 0x00000001 /* interrupt pending */
Index: src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h
diff -u src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h:1.1.1.1 src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h:1.2
--- src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h:1.1.1.1 Thu Dec 11 04:46:34 2008
+++ src/sys/external/isc/atheros_hal/dist/ar5211/ar5211reg.h Mon May 30 13:58:24 2011
@@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: ar5211reg.h,v 1.1.1.1 2008/12/11 04:46:34 alc Exp $
+ * $Id: ar5211reg.h,v 1.2 2011/05/30 13:58:24 joerg Exp $
*/
#ifndef _DEV_ATH_AR5211REG_H
#define _DEV_ATH_AR5211REG_H
@@ -619,8 +619,8 @@
#define AR_SCR_SLE 0x00030000 /* sleep enable mask */
#define AR_SCR_SLE_S 16 /* sleep enable bits shift */
#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */
-#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */
-#define AR_SCR_SLE_NORM 0x00020000 /* sleep logic normal operation */
+#define AR_SCR_SLE_SLP 0x00010000U /* force sleep */
+#define AR_SCR_SLE_NORM 0x00020000U /* sleep logic normal operation */
#define AR_SCR_SLE_UNITS 0x00000008 /* SCR units/TU */
#define AR_SCR_BITS "\20\20SLE_SLP\21SLE"