freebsd-nq/sys/dev/ath/ath_hal/ar5211
Dimitry Andric 46fb42dc9d Fix shift overflow problem in sys/dev/ath/ath_hal/ar5210/ar5210_power.c
and sys/dev/ath/ath_hal/ar5211/ar5211_power.c:

sys/dev/ath/ath_hal/ar5210/ar5210_power.c:36:3: warning: signed shift result (0x200000000) requires 35 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
                OS_REG_RMW_FIELD(ah, AR_SCR, AR_SCR_SLE, AR_SCR_SLE_ALLOW);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sys/dev/ath/ath_hal/ah_internal.h:472:42: note: expanded from:
                (OS_REG_READ(_a, _r) &~ (_f)) | (((_v) << _f##_S) & (_f)))
                                                       ^
sys/dev/ath/ah_osdep.h:127:49: note: expanded from:
            (bus_space_handle_t)(_ah)->ah_sh, (_reg), (_val))
                                                       ^~~~

The AR_SCR_SLE_{WAKE,SLP,NORM} values are pre-shifted in ar5210reg.h and
ar5211reg.h, while they should be unshifted, like in ar5212reg.h.  Then,
when the OS_REG_RMW_FIELD() macro shifts them again, the values will
overflow, becoming effectively zero.

MFC after: 1 week
2011-12-21 17:16:43 +00:00
..
ar5211_attach.c Fix a corner case in the HAL debugging changes, where ah was NULL. 2011-09-30 05:17:57 +00:00
ar5211_beacon.c Update the TSF and next-TBTT methods to work for the AR5416 and later NICs. 2011-09-08 01:23:05 +00:00
ar5211_interrupts.c
ar5211_keycache.c Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ar5211_misc.c ANI changes #1 - split out the ANI polling from the RxMonitor hook. 2011-01-21 05:21:00 +00:00
ar5211_phy.c
ar5211_power.c Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ar5211_recv.c Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ar5211_reset.c Due to the way HALDEBUG() is defined, we need to add curly brackets 2010-05-29 16:14:02 +00:00
ar5211_xmit.c Break out most of the HAL related tweaks into a per-HAL instance, 2011-06-23 02:38:36 +00:00
ar5211.h Update the TSF and next-TBTT methods to work for the AR5416 and later NICs. 2011-09-08 01:23:05 +00:00
ar5211desc.h Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ar5211phy.h Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00
ar5211reg.h Fix shift overflow problem in sys/dev/ath/ath_hal/ar5210/ar5210_power.c 2011-12-21 17:16:43 +00:00
boss.ini Replace Id keyword with FreeBSD keyword and set the svn props correctly. 2010-03-03 17:32:32 +00:00