mirror_ubuntu-kernels/drivers/net/wireless
Arnd Bergmann a39644b235 rsi: fix integer overflow warning
gcc produces a harmless warning about a recently introduced
signed integer overflow:

drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_prepare_mgmt_desc':
include/uapi/linux/swab.h:13:15: error: integer overflow in expression [-Werror=overflow]
  (((__u16)(x) & (__u16)0x00ffU) << 8) |   \
   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
include/uapi/linux/swab.h:104:2: note: in expansion of macro '___constant_swab16'
  ___constant_swab16(x) :   \
  ^~~~~~~~~~~~~~~~~~
include/uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab16'
 #define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
                                           ^~~~~~~~
include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le16'
 #define cpu_to_le16 __cpu_to_le16
                     ^~~~~~~~~~~~~
drivers/net/wireless/rsi/rsi_91x_hal.c:136:3: note: in expansion of macro 'cpu_to_le16'
   cpu_to_le16((tx_params->vap_id << RSI_DESC_VAP_ID_OFST) &
   ^~~~~~~~~~~

The problem is that the 'mask' value is a signed integer that gets
turned into a negative number when truncated to 16 bits. Making it
an unsigned constant avoids this.

Fixes: eac4eed322 ("rsi: tx and rx path enhancements for p2p mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-10-13 13:00:42 +03:00
..
admtek networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
ath Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 2017-08-31 21:34:22 +03:00
atmel at76c50x: constify usb_device_id 2017-08-10 11:55:57 +03:00
broadcom brcmfmac: Delete redundant length check 2017-10-02 17:07:00 +03:00
cisco wireless: airo: remove unnecessary static in writerids() 2017-07-19 16:33:57 -07:00
intel iwlwifi: remove dflt_pwr_limit from the transport 2017-10-06 15:22:34 +03:00
intersil p54: don't unregister leds when they are not initialized 2017-10-10 11:08:27 +03:00
marvell mwifiex: Use put_unaligned_le32 2017-10-13 12:39:49 +03:00
mediatek mt7601u: check memory allocation failure 2017-08-24 12:54:33 +03:00
quantenna qtnfmac: do not cache current channel info in driver's state 2017-10-13 12:59:32 +03:00
ralink rt2800: fix TX_PIN_CFG setting for non MT7620 chips 2017-08-30 19:50:09 +03:00
realtek rtlwifi: Remove unused cur_rfstate variables 2017-10-13 12:58:11 +03:00
rsi rsi: fix integer overflow warning 2017-10-13 13:00:42 +03:00
st cw1200: add const to hwbus_ops structures 2017-06-28 21:17:46 +03:00
ti wl1251: add a missing spin_lock_init() 2017-08-31 13:11:15 -07:00
zydas zd1211rw: constify usb_device_id 2017-08-10 11:56:04 +03:00
Kconfig qtnfmac: introduce new FullMAC driver for Quantenna chipsets 2017-05-24 17:04:13 +03:00
mac80211_hwsim.c mac80211_hwsim: Use proper TX power 2017-09-05 11:28:52 +02:00
mac80211_hwsim.h mac80211_hwsim: fix command documentation indentation 2017-03-06 09:21:48 +01:00
Makefile qtnfmac: introduce new FullMAC driver for Quantenna chipsets 2017-05-24 17:04:13 +03:00
ray_cs.c ray_cs: Avoid reading past end of buffer 2017-05-22 18:27:22 +03:00
ray_cs.h
rayctl.h
rndis_wlan.c Another set of patches for -next: 2017-04-28 14:41:15 -04:00
wl3501_cs.c wl3501_cs: fix spelling mistake: "Insupported" -> "Unsupported" 2017-07-28 18:06:31 +03:00
wl3501.h