original_kernel/drivers/net/wireless/realtek/rtlwifi
Ping-Ke Shih 82b85a836a wifi: rtlwifi: 8192d: initialize rate_mask in rtl92de_update_hal_rate_mask()
le32p_replace_bits() only updates partial bits of rate_mask, and GCC warns
below. Set initial value to avoid warnings, and prevent random value of
missed bits (bit 6 of rate_mask.macid_and_short_gi).

In file included from ./include/linux/fortify-string.h:5,
                 from ./include/linux/string.h:369,
                 from ./include/linux/bitmap.h:13,
                 from ./include/linux/cpumask.h:13,
                 from ./include/linux/sched.h:16,
                 from drivers/net/wireless/realtek/rtlwifi/rtl8192d/../wifi.h:9,
                 from drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:4:
In function 'le32p_replace_bits',
    inlined from 'rtl92de_update_hal_rate_mask.isra' at drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:986:2:
./include/linux/bitfield.h:189:15: warning: 'rate_mask' is used uninitialized [-Wuninitialized]
  189 |         *p = (*p & ~to(field)) | type##_encode_bits(val, field);        \
      |               ^~
./include/linux/bitfield.h:196:9: note: in expansion of macro '____MAKE_OP'
  196 |         ____MAKE_OP(le##size,u##size,cpu_to_le##size,le##size##_to_cpu) \
      |         ^~~~~~~~~~~
./include/linux/bitfield.h:201:1: note: in expansion of macro '__MAKE_OP'
  201 | __MAKE_OP(32)
      | ^~~~~~~~~
drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c: In function 'rtl92de_update_hal_rate_mask.isra':
drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c:863:37: note: 'rate_mask' declared here
  863 |         struct rtl92d_rate_mask_h2c rate_mask;
      |                                     ^~~~~~~~~

Compile tested only.

Fixes: 014bba73b5 ("wifi: rtlwifi: Adjust rtl8192d-common for USB")
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240504111916.31445-1-pkshih@realtek.com
2024-05-04 20:05:14 +08:00
..
btcoexist
rtl8188ee
rtl8192c
rtl8192ce
rtl8192cu
rtl8192d wifi: rtlwifi: 8192d: initialize rate_mask in rtl92de_update_hal_rate_mask() 2024-05-04 20:05:14 +08:00
rtl8192de wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common 2024-05-02 10:39:07 +08:00
rtl8192ee
rtl8192se
rtl8723ae
rtl8723be
rtl8723com
rtl8821ae
Kconfig wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common 2024-05-02 10:39:07 +08:00
Makefile wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common 2024-05-02 10:39:07 +08:00
base.c
base.h
cam.c wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common 2024-05-02 10:39:07 +08:00
cam.h wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common 2024-05-02 10:39:07 +08:00
core.c
core.h
debug.c
debug.h
efuse.c wifi: rtlwifi: Adjust rtl8192d-common for USB 2024-05-02 10:46:12 +08:00
efuse.h wifi: rtlwifi: Adjust rtl8192d-common for USB 2024-05-02 10:46:12 +08:00
pci.c
pci.h
ps.c
ps.h
pwrseqcmd.h
rc.c
rc.h
regd.c
regd.h
stats.c
stats.h
usb.c wifi: rtlwifi: Adjust rtl8192d-common for USB 2024-05-02 10:46:12 +08:00
usb.h
wifi.h wifi: rtlwifi: Remove unused structs and avoid multiple -Wfamnae warnings 2024-05-04 08:17:00 +08:00