Skip to contentSkip to conversation

pull-request: wireless-drivers-next-2021-12-07

DISCUSSION Kalle Valo 4 participants 10 messages Dec 7, 2021 – Dec 19, 2021

Subsystems (2)
lore
Share & tools
lore

Kalle Valo

author
#0 lore raw

Hi,

here's a pull request to net-next tree, more info below. Please let me know if there are any problems.

Kalle

The following changes since commit 3b1abcf1289466eca4c46db8b55c06422f0abf34:

Merge tag 'regmap-no-bus-update-bits' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap (2021-11-18 17:50:18 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git tags/wireless-drivers-next-2021-12-07

for you to fetch changes up to fe6db7eda9306d665f7b8fc3decdb556ec10fb85:

iwlwifi: mei: fix linking when tracing is not enabled (2021-12-05 13:55:15 +0200)

----------------------------------------------------------------
wireless-drivers-next patches for v5.17

First set of patches for v5.17. The biggest change is the iwlmei driver for Intel's AMT devices. Also now WCN6855 support in ath11k should be usable.

Major changes:

ath10k

* fetch (pre-)calibration data via nvmem subsystem

ath11k

* enable 802.11 power save mode in station mode for qca6390 and wcn6855

* trace log support

* proper board file detection for WCN6855 based on PCI ids

* BSS color change support

rtw88

* add debugfs file to force lowest basic rate

* add quirk to disable PCI ASPM on HP 250 G7 Notebook PC

mwifiex

* add quirk to disable deep sleep with certain hardware revision in Surface Book 2 devices

iwlwifi

* add iwlmei driver for co-operating with Intel's Active Management Technology (AMT) devices

----------------------------------------------------------------
Ajay Singh (1):
wilc1000: remove '-Wunused-but-set-variable' warning in chip_wakeup()

Alexander Usyskin (1):
mei: bus: add client dma interface

Anilkumar Kolli (1):
ath11k: Add missing qmi_txn_cancel()

Baochen Qiang (1):
ath11k: Fix crash caused by uninitialized TX ring

Benjamin Li (5):
wcn36xx: add debug prints for sw_scan start/complete
wcn36xx: implement flush op to speed up connected scan
wcn36xx: ensure pairing of init_scan/finish_scan and start_scan/end_scan
wcn36xx: populate band before determining rate on RX
wcn36xx: fix RX BD rate mapping for 5GHz legacy rates

Bryan O'Donoghue (4):
wcn36xx: Indicate beacon not connection loss on MISSED_BEACON_IND
wcn36xx: Fix DMA channel enable/disable cycle
wcn36xx: Release DMA channel descriptor allocations
wcn36xx: Put DXE block into reset before freeing memory

Carl Huang (1):
ath11k: enable 802.11 power save mode in station mode

Changcheng Deng (1):
rtw89: remove unneeded variable

Chia-Yuan Li (1):
rtw89: add AXIDMA and TX FIFO dump in mac_mem_dump

Christian Lamparter (1):
ath10k: fetch (pre-)calibration data via nvmem subsystem

Emmanuel Grumbach (6):
iwlwifi: mei: add the driver to allow cooperation with CSME
iwlwifi: mei: add debugfs hooks
iwlwifi: integrate with iwlmei
iwlwifi: mvm: add vendor commands needed for iwlmei
iwlwifi: mvm: read the rfkill state and feed it to iwlmei
iwlwifi: mei: fix linking when tracing is not enabled

Jason Wang (1):
wlcore: no need to initialise statics to false

John Crispin (1):
ath11k: add support for BSS color change

Jonas Dreßler (4):
mwifiex: Use a define for firmware version string length
mwifiex: Add quirk to disable deep sleep with certain hardware revision
mwifiex: Ensure the version string from the firmware is 0-terminated
mwifiex: Ignore BTCOEX events from the 88W8897 firmware

Kalle Valo (2):
ath11k: convert ath11k_wmi_pdev_set_ps_mode() to use enum wmi_sta_ps_mode Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git

Karthikeyan Kathirvel (2):
ath11k: clear the keys properly via DISABLE_KEY
ath11k: reset RSN/WPA present state for open BSS

Karthikeyan Periyasamy (4):
ath11k: fix fw crash due to peer get authorized before key install
ath11k: fix error routine when fallback of add interface fails
ath11k: avoid unnecessary BH disable lock in STA kickout event
ath11k: fix DMA memory free in CE pipe cleanup

Kees Cook (5):
libertas: Use struct_group() for memcpy() region
libertas_tf: Use struct_group() for memcpy() region
intersil: Use struct_group() for memcpy() region
mwl8k: Use named struct for memcpy() region
rtlwifi: rtl8192de: Style clean-ups

Loic Poulain (1):
brcmfmac: Configure keep-alive packet on suspend

P Praneesh (16):
ath11k: disable unused CE8 interrupts for ipq8074
ath11k: allocate dst ring descriptors from cacheable memory
ath11k: modify dp_rx desc access wrapper calls inline
ath11k: avoid additional access to ath11k_hal_srng_dst_num_free
ath11k: avoid active pdev check for each msdu
ath11k: remove usage quota while processing rx packets
ath11k: add branch predictors in process_rx
ath11k: allocate HAL_WBM2SW_RELEASE ring from cacheable memory
ath11k: remove mod operator in dst ring processing
ath11k: avoid while loop in ring selection of tx completion interrupt
ath11k: add branch predictors in dp_tx path
ath11k: avoid unnecessary lock contention in tx_completion path
ath11k: fix FCS_ERR flag in radio tap header
ath11k: send proper txpower and maxregpower values to firmware
ath11k: Increment pending_mgmt_tx count before tx send invoke
ath11k: Disabling credit flow for WMI path

Peter Seiderer (1):
ath9k: fix intr_txqs setting

Ping-Ke Shih (2):
rtw89: fix potentially access out of range of RF register array
rtw88: add quirk to disable pci caps on HP 250 G7 Notebook PC

Rameshkumar Sundaram (3):
ath11k: Send PPDU_STATS_CFG with proper pdev mask to firmware
ath11k: Clear auth flag only for actual association in security mode
ath11k: use cache line aligned buffers for dbring

Seevalamuthu Mariappan (2):
ath11k: Fix 'unused-but-set-parameter' error
ath11k: add hw_param for wakeup_mhi

Sven Eckelmann (1):
ath11k: Fix ETSI regd with weather radar overlap

Venkateswara Naralasetty (2):
ath11k: fix firmware crash during channel switch
ath11k: add trace log support

Wen Gong (6):
ath11k: set correct NL80211_FEATURE_DYNAMIC_SMPS for WCN6855
ath11k: enable IEEE80211_VHT_EXT_NSS_BW_CAPABLE if NSS ratio enabled
ath11k: remove return for empty tx bitrate in mac_op_sta_statistics
ath11k: fix the value of msecs_to_jiffies in ath11k_debugfs_fw_stats_request
ath11k: move peer delete after vdev stop of station for QCA6390 and WCN6855
ath11k: add string type to search board data in board-2.bin for WCN6855

Yang Guang (1):
ath9k: use swap() to make code cleaner

Ye Guojin (1):
rtw89: remove unnecessary conditional operators

Yu-Yen Ting (2):
rtw88: follow the AP basic rates for tx mgmt frame
rtw88: add debugfs to force lowest basic rate

Zekun Shen (4):
ar5523: Fix null-ptr-deref with unexpected WDCMSG_TARGET_START reply
mwifiex: Fix skb_over_panic in mwifiex_usb_recv()
rsi: Fix use-after-free in rsi_rx_done_handler()
rsi: Fix out-of-bounds read in rsi_read_pkt()

Zong-Zhe Yang (4):
rtw89: fill regd field of limit/limit_ru tables by enum
rtw89: update rtw89 regulation definition to R58-R31
rtw89: update tx power limit/limit_ru tables to R54
rtw89: update rtw89_regulatory map to R58-R31

 drivers/misc/mei/bus.c                             |    67 +-
 drivers/misc/mei/client.c                          |     3 +
 drivers/misc/mei/hw.h                              |     5 +
 drivers/net/wireless/ath/ar5523/ar5523.c           |     4 +
 drivers/net/wireless/ath/ath10k/core.c             |    64 +-
 drivers/net/wireless/ath/ath10k/core.h             |     6 +
 drivers/net/wireless/ath/ath11k/ce.c               |    55 +-
 drivers/net/wireless/ath/ath11k/ce.h               |     3 +-
 drivers/net/wireless/ath/ath11k/core.c             |    52 +-
 drivers/net/wireless/ath/ath11k/core.h             |    16 +
 drivers/net/wireless/ath/ath11k/dbring.c           |    16 +-
 drivers/net/wireless/ath/ath11k/dbring.h           |     2 +-
 drivers/net/wireless/ath/ath11k/debug.c            |    12 +-
 drivers/net/wireless/ath/ath11k/debug.h            |     3 +-
 drivers/net/wireless/ath/ath11k/debugfs.c          |     2 +-
 drivers/net/wireless/ath/ath11k/dp.c               |    48 +-
 drivers/net/wireless/ath/ath11k/dp.h               |     4 +-
 drivers/net/wireless/ath/ath11k/dp_rx.c            |   225 +-
 drivers/net/wireless/ath/ath11k/dp_tx.c            |    86 +-
 drivers/net/wireless/ath/ath11k/hal.c              |    35 +-
 drivers/net/wireless/ath/ath11k/hal.h              |     1 +
 drivers/net/wireless/ath/ath11k/htc.c              |    71 +-
 drivers/net/wireless/ath/ath11k/htc.h              |     9 +-
 drivers/net/wireless/ath/ath11k/hw.c               |     2 -
 drivers/net/wireless/ath/ath11k/hw.h               |     5 +
 drivers/net/wireless/ath/ath11k/mac.c              |   324 +-
 drivers/net/wireless/ath/ath11k/mac.h              |     1 +
 drivers/net/wireless/ath/ath11k/pci.c              |    22 +-
 drivers/net/wireless/ath/ath11k/peer.h             |     1 +
 drivers/net/wireless/ath/ath11k/qmi.c              |    21 +-
 drivers/net/wireless/ath/ath11k/reg.c              |   103 +-
 drivers/net/wireless/ath/ath11k/trace.c            |     1 +
 drivers/net/wireless/ath/ath11k/trace.h            |   172 +
 drivers/net/wireless/ath/ath11k/wmi.c              |   159 +-
 drivers/net/wireless/ath/ath11k/wmi.h              |    20 +-
 drivers/net/wireless/ath/ath9k/ar9002_mac.c        |     2 +-
 drivers/net/wireless/ath/ath9k/ar9003_calib.c      |    14 +-
 drivers/net/wireless/ath/wcn36xx/dxe.c             |    96 +-
 drivers/net/wireless/ath/wcn36xx/dxe.h             |     1 +
 drivers/net/wireless/ath/wcn36xx/main.c            |    49 +-
 drivers/net/wireless/ath/wcn36xx/smd.c             |     8 +-
 drivers/net/wireless/ath/wcn36xx/txrx.c            |    41 +-
 drivers/net/wireless/ath/wcn36xx/wcn36xx.h         |     1 +
 .../broadcom/brcm80211/brcmfmac/cfg80211.c         |    21 +
 .../broadcom/brcm80211/brcmfmac/fwil_types.h       |    19 +
 drivers/net/wireless/intel/iwlwifi/Kconfig         |    26 +
 drivers/net/wireless/intel/iwlwifi/Makefile        |     1 +
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c |    61 +
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h |    11 +-
 drivers/net/wireless/intel/iwlwifi/iwl-trans.h     |     2 +
 drivers/net/wireless/intel/iwlwifi/mei/Makefile    |     8 +
 drivers/net/wireless/intel/iwlwifi/mei/internal.h  |    20 +
 drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h   |   505 +
 drivers/net/wireless/intel/iwlwifi/mei/main.c      |  1982 +++
 drivers/net/wireless/intel/iwlwifi/mei/net.c       |   409 +
 drivers/net/wireless/intel/iwlwifi/mei/sap.h       |   733 ++
 .../net/wireless/intel/iwlwifi/mei/trace-data.h    |    82 +
 drivers/net/wireless/intel/iwlwifi/mei/trace.c     |    15 +
 drivers/net/wireless/intel/iwlwifi/mei/trace.h     |    76 +
 drivers/net/wireless/intel/iwlwifi/mvm/Makefile    |     1 +
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c        |     3 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |   120 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h       |    74 +
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c       |   203 +-
 drivers/net/wireless/intel/iwlwifi/mvm/sta.h       |     4 +-
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c        |     7 +-
 .../net/wireless/intel/iwlwifi/mvm/vendor-cmd.c    |   151 +
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |    25 +-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c    |    21 +-
 drivers/net/wireless/intersil/hostap/hostap_hw.c   |     5 +-
 drivers/net/wireless/intersil/hostap/hostap_wlan.h |    14 +-
 drivers/net/wireless/marvell/libertas/host.h       |    10 +-
 drivers/net/wireless/marvell/libertas/tx.c         |     5 +-
 .../net/wireless/marvell/libertas_tf/libertas_tf.h |    10 +-
 drivers/net/wireless/marvell/libertas_tf/main.c    |     3 +-
 drivers/net/wireless/marvell/mwifiex/fw.h          |     4 +-
 drivers/net/wireless/marvell/mwifiex/main.c        |    18 +
 drivers/net/wireless/marvell/mwifiex/main.h        |     5 +-
 drivers/net/wireless/marvell/mwifiex/pcie.c        |     3 +
 drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c |    28 +-
 drivers/net/wireless/marvell/mwifiex/sta_event.c   |     3 +
 drivers/net/wireless/marvell/mwifiex/usb.c         |     3 +-
 drivers/net/wireless/marvell/mwl8k.c               |    10 +-
 drivers/net/wireless/microchip/wilc1000/wlan.c     |     5 -
 .../net/wireless/realtek/rtlwifi/rtl8192de/phy.c   |    17 +-
 drivers/net/wireless/realtek/rtlwifi/wifi.h        |     1 -
 drivers/net/wireless/realtek/rtw88/debug.c         |    39 +
 drivers/net/wireless/realtek/rtw88/main.h          |     1 +
 drivers/net/wireless/realtek/rtw88/pci.c           |     9 +
 drivers/net/wireless/realtek/rtw88/tx.c            |    27 +-
 drivers/net/wireless/realtek/rtw89/core.h          |     9 +-
 drivers/net/wireless/realtek/rtw89/debug.c         |     7 +-
 drivers/net/wireless/realtek/rtw89/mac.c           |     5 +-
 drivers/net/wireless/realtek/rtw89/mac.h           |    10 +
 drivers/net/wireless/realtek/rtw89/phy.c           |    47 +-
 drivers/net/wireless/realtek/rtw89/regd.c          |   375 +-
 drivers/net/wireless/realtek/rtw89/rtw8852a.c      |     4 +-
 .../net/wireless/realtek/rtw89/rtw8852a_table.c    | 12201 +++++++++++--------
 drivers/net/wireless/rsi/rsi_91x_main.c            |     4 +
 drivers/net/wireless/rsi/rsi_91x_usb.c             |     9 +-
 drivers/net/wireless/rsi/rsi_usb.h                 |     2 +
 drivers/net/wireless/ti/wlcore/sdio.c              |     2 +-
 include/linux/mei_cl_bus.h                         |     3 +
 103 files changed, 13380 insertions(+), 5930 deletions(-)
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/Makefile
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/internal.h
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/main.c
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/net.c
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/sap.h
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/trace-data.h
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/trace.c
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mei/trace.h
 create mode 100644 drivers/net/wireless/intel/iwlwifi/mvm/vendor-cmd.c
author
#2 lore raw
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Tue, 7 Dec 2021 14:42:11 +0000 (UTC) Kalle Valo wrote:

here's a pull request to net-next tree, more info below. Please let me know if there are any problems.

Pulled, thanks! Could you chase the appropriate people so that the new W=1 C=1 warnings get resolved before the merge window's here?

https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

Just so that I understand right, you are referring to this patchwork test:

Errors and warnings before: 111 this patch: 115

https://patchwork.hopto.org/static/nipa/591659/12662005/build_32bit/

And you want the four new warnings to be fixed? That can be quite time consuming, to be honest I would rather revert the commits than using a lot of my time trying to get people fix the warnings. Is there an easy way to find what are the new warnings?

But in the big picture are you saying the net trees now have a rule that no new W=1 and C=1 warnings are allowed? I do test ath10k and ath11k drivers for W=1 and C=1 warnings, but all other drivers are on their own in this regard. At the moment I have no tooling in place to check all wireless drivers.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
maintainer
#3 lore raw
Quoted 14 lines · On Wed, 08 Dec 2021 10:00:15 +0200 Kalle Valo wrote:
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Tue, 7 Dec 2021 14:42:11 +0000 (UTC) Kalle Valo wrote:

here's a pull request to net-next tree, more info below. Please let me know if there are any problems.

Pulled, thanks! Could you chase the appropriate people so that the new W=1 C=1 warnings get resolved before the merge window's here?

https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

Just so that I understand right, you are referring to this patchwork test:

Quoted 8 lines

Errors and warnings before: 111 this patch: 115

https://patchwork.hopto.org/static/nipa/591659/12662005/build_32bit/

And you want the four new warnings to be fixed? That can be quite time consuming, to be honest I would rather revert the commits than using a lot of my time trying to get people fix the warnings. Is there an easy way to find what are the new warnings?

Yeah, scroll down, there is a diff of the old warnings vs new ones, and a summary of which files have changed their warning count:

+      2 ../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+      3 ../drivers/net/wireless/intel/iwlwifi/mei/main.c
-      1 ../drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+      2 ../drivers/net/wireless/intel/iwlwifi/mvm/ops.c
-      2 ../drivers/net/wireless/microchip/wilc1000/wlan.c

So presumably these are the warnings that were added:

drivers/net/wireless/intel/iwlwifi/mei/main.c:193: warning: cannot understand function prototype: 'struct ' drivers/net/wireless/intel/iwlwifi/mei/main.c:1784: warning: Function parameter or member 'cldev' not described in 'iwl_mei_probe' drivers/net/wireless/intel/iwlwifi/mei/main.c:1784: warning: Function parameter or member 'id' not described in 'iwl_mei_probe'

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28: warning: incorrect type in assignment (different base types)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28: expected restricted __le32 [assigned] [usertype] period_msec
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28: got restricted __le16 [usertype]
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30: warning: incorrect type in assignment (different base types)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30: expected unsigned char [assigned] [usertype] keep_alive_id
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30: got restricted __le16 [usertype]

drivers/net/wireless/intel/iwlwifi/mvm/ops.c:684:12: warning: context imbalance in 'iwl_mvm_start_get_nvm' - wrong count at exit

Quoted 5 lines

But in the big picture are you saying the net trees now have a rule that no new W=1 and C=1 warnings are allowed? I do test ath10k and ath11k drivers for W=1 and C=1 warnings, but all other drivers are on their own in this regard. At the moment I have no tooling in place to check all wireless drivers.

For the code we merge directly we try to make sure there are no new warnings. I realize it's quite a bit of work for larger trees unless you have the infra so not a hard requirement (for you).

FWIW the build bot we wrote is available on GH:

https://github.com/kuba-moo/nipa

But it currently hard codes tree matching logic for bpf and netdev, so would probably take a few hours to adopt it.

maintainer
#4 lore raw
Quoted 1 line · On Wed, 8 Dec 2021 06:50:25 -0800 Jakub Kicinski wrote:

drivers/net/wireless/intel/iwlwifi/mvm/ops.c:684:12: warning: context imbalance in 'iwl_mvm_start_get_nvm' - wrong count at exit

I haven't looked at the code, but sparse is not great at understanding locking so this one may be ignorable.

author
#5 lore raw
In reply to Jakub Kicinski
Quoted 27 lines · Jakub Kicinski
Quoted 14 lines · On Wed, 08 Dec 2021 10:00:15 +0200 Kalle Valo wrote:
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Tue, 7 Dec 2021 14:42:11 +0000 (UTC) Kalle Valo wrote:

here's a pull request to net-next tree, more info below. Please let me know if there are any problems.

Pulled, thanks! Could you chase the appropriate people so that the new W=1 C=1 warnings get resolved before the merge window's here?

https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

Just so that I understand right, you are referring to this patchwork test:

Quoted 8 lines

Errors and warnings before: 111 this patch: 115

https://patchwork.hopto.org/static/nipa/591659/12662005/build_32bit/

And you want the four new warnings to be fixed? That can be quite time consuming, to be honest I would rather revert the commits than using a lot of my time trying to get people fix the warnings. Is there an easy way to find what are the new warnings?

Yeah, scroll down, there is a diff of the old warnings vs new ones, and a summary of which files have changed their warning count:

Review

Quoted 5 lines
(quoted diff) +3 -2
+      2 ../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+      3 ../drivers/net/wireless/intel/iwlwifi/mei/main.c
-      1 ../drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+      2 ../drivers/net/wireless/intel/iwlwifi/mvm/ops.c
-      2 ../drivers/net/wireless/microchip/wilc1000/wlan.c

Ah, that makes it easier.

Quoted 8 lines

So presumably these are the warnings that were added:

drivers/net/wireless/intel/iwlwifi/mei/main.c:193: warning: cannot understand function prototype: 'struct ' drivers/net/wireless/intel/iwlwifi/mei/main.c:1784: warning: Function parameter or member 'cldev' not described in 'iwl_mei_probe' drivers/net/wireless/intel/iwlwifi/mei/main.c:1784: warning: Function parameter or member 'id' not described in 'iwl_mei_probe'

Luca, please take a look and send a patch. I'll then apply it directly to wireless-drivers-next.

Quoted 4 lines

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
warning: incorrect type in assignment (different base types) drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
expected restricted __le32 [assigned] [usertype] period_msec

Quoted 8 lines

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
got restricted __le16 [usertype] drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
warning: incorrect type in assignment (different base types) drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
expected unsigned char [assigned] [usertype] keep_alive_id drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
got restricted __le16 [usertype]

Loic, your patch should fix these, right?

https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

Quoted 2 lines

drivers/net/wireless/intel/iwlwifi/mvm/ops.c:684:12: warning: context imbalance in 'iwl_mvm_start_get_nvm' - wrong count at exit

Luca, please also take a look at this.

Quoted 9 lines
Quoted 5 lines

But in the big picture are you saying the net trees now have a rule that no new W=1 and C=1 warnings are allowed? I do test ath10k and ath11k drivers for W=1 and C=1 warnings, but all other drivers are on their own in this regard. At the moment I have no tooling in place to check all wireless drivers.

For the code we merge directly we try to make sure there are no new warnings. I realize it's quite a bit of work for larger trees unless you have the infra so not a hard requirement (for you).

Yeah, at the moment I really would not be able to catch W=1 or sparse warnings :/ And fixing them afterwards is just too slow. But if we would be able to fix all the warnings in drivers/net/wireless then it would be easy for me to enable W=1 and C=1 in my own build tests.

Quoted 6 lines

FWIW the build bot we wrote is available on GH:

https://github.com/kuba-moo/nipa

But it currently hard codes tree matching logic for bpf and netdev, so would probably take a few hours to adopt it.

Thanks, it would good to have a similar system for wireless trees. Anyone want to help? :)

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author
#6 lore raw
Quoted 8 lines · Kalle Valo
Quoted 3 lines

For the code we merge directly we try to make sure there are no new warnings. I realize it's quite a bit of work for larger trees unless you have the infra so not a hard requirement (for you).

Yeah, at the moment I really would not be able to catch W=1 or sparse warnings :/ And fixing them afterwards is just too slow. But if we would be able to fix all the warnings in drivers/net/wireless then it would be easy for me to enable W=1 and C=1 in my own build tests.

Actually for me to enable W=1 doesn't look so bad, the list is below. Anyone want to fix these? Looks like roughly half of them is the gnu_printf warning.

In function 'init_startup_params',
inlined from 'ray_init' at drivers/net/wireless/ray_cs.c:500:2:
drivers/net/wireless/ray_cs.c:622:17: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]

  622 |                 strncpy(local->sparm.b4.a_current_ess_id, essid, ESSID_SIZE);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/net/wireless/intel/ipw2x00/ipw2100.c:6533: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Initialize the ipw2100 driver/module
drivers/net/wireless/intel/ipw2x00/ipw2100.c:6565: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Cleanup ipw2100 driver registration
In function 'prism2_ioctl_get_encryption',
inlined from 'prism2_ioctl_priv_hostapd' at drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3801:9:
drivers/net/wireless/intersil/hostap/hostap_ioctl.c:3599:17: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation]

 3599 |                 strncpy(param->u.crypt.alg, (*crypt)->ops->name,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 3600 |                         HOSTAP_CRYPT_ALG_NAME_LEN);
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/mvm/ops.c:270: warning: Function parameter or member 'min_size' not described in 'iwl_rx_handlers'
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:2392:5: warning: no previous prototype for 'mt7915_mcu_set_fixed_rate' [-Wmissing-prototypes]
 2392 | int mt7915_mcu_set_fixed_rate(struct mt7915_dev *dev,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~

In file included from ./include/trace/define_trace.h:102,
from drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.h:137,
from drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.c:12:
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/./tracepoint.h: In function 'trace_event_raw_event_brcmf_err':
./include/trace/trace_events.h:727:16: warning: function 'trace_event_raw_event_brcmf_err' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

  727 |         struct trace_event_raw_##call *entry;                           \
      |                ^~~~~~~~~~~~~~~~
./include/trace/trace_events.h:75:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
   75 |         DECLARE_EVENT_CLASS(name,                              \
      |         ^~~~~~~~~~~~~~~~~~~
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/./tracepoint.h:31:1: note: in expansion of macro 'TRACE_EVENT'
   31 | TRACE_EVENT(brcmf_err,
      | ^~~~~~~~~~~
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/./tracepoint.h: In function 'trace_event_raw_event_brcmf_dbg':
./include/trace/trace_events.h:727:16: warning: function 'trace_event_raw_event_brcmf_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
  727 |         struct trace_event_raw_##call *entry;                           \
      |                ^~~~~~~~~~~~~~~~
./include/trace/trace_events.h:75:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
   75 |         DECLARE_EVENT_CLASS(name,                              \
      |         ^~~~~~~~~~~~~~~~~~~
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/./tracepoint.h:47:1: note: in expansion of macro 'TRACE_EVENT'
   47 | TRACE_EVENT(brcmf_dbg,
      | ^~~~~~~~~~~

In file included from ./include/trace/define_trace.h:103,
from drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.h:137,
from drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.c:12:
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/./tracepoint.h: In function 'perf_trace_brcmf_err':
./include/trace/perf.h:41:16: warning: function 'perf_trace_brcmf_err' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

   41 |         struct hlist_head *head;                                        \
      |                ^~~~~~~~~~
./include/trace/trace_events.h:75:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
   75 |         DECLARE_EVENT_CLASS(name,                              \
      |         ^~~~~~~~~~~~~~~~~~~
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/./tracepoint.h:31:1: note: in expansion of macro 'TRACE_EVENT'
   31 | TRACE_EVENT(brcmf_err,
      | ^~~~~~~~~~~
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/./tracepoint.h: In function 'perf_trace_brcmf_dbg':
./include/trace/perf.h:41:16: warning: function 'perf_trace_brcmf_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
   41 |         struct hlist_head *head;                                        \
      |                ^~~~~~~~~~
./include/trace/trace_events.h:75:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
   75 |         DECLARE_EVENT_CLASS(name,                              \
      |         ^~~~~~~~~~~~~~~~~~~
./drivers/net/wireless/broadcom/brcm80211/brcmfmac/./tracepoint.h:47:1: note: in expansion of macro 'TRACE_EVENT'
   47 | TRACE_EVENT(brcmf_dbg,
      | ^~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/debugfs.c: In function 'mt76_rx_queues_read':
drivers/net/wireless/mediatek/mt76/debugfs.c:77:16: warning: variable 'queued' set but not used [-Wunused-but-set-variable]
   77 |         int i, queued;
      |                ^~~~~~

In file included from drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:14:
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.h:39:37: warning: 'iwl_dbgfs_dbg_time_point_ops' defined but not used [-Wunused-const-variable=]
39 | static const struct file_operations iwl_dbgfs_##name##_ops = { \
| ^~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1548:9: note: in expansion of macro '_MVM_DEBUGFS_WRITE_FILE_OPS'

 1548 |         _MVM_DEBUGFS_WRITE_FILE_OPS(name, bufsz, struct iwl_mvm)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c:1867:1: note: in expansion of macro 'MVM_DEBUGFS_WRITE_FILE_OPS'
 1867 | MVM_DEBUGFS_WRITE_FILE_OPS(dbg_time_point, 64);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/net/wireless/intel/iwlwifi/mvm/rfi.c:11: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* DDR needs frequency in units of 16.666MHz, so provide FW with the
In file included from ./include/trace/define_trace.h:102,
from drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_msg.h:86,
from drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_events.h:38,
from drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_events.c:22:
./drivers/net/wireless/broadcom/brcm80211/brcmsmac/./brcms_trace_brcmsmac_msg.h: In function 'trace_event_raw_event_brcms_dbg':
./include/trace/trace_events.h:727:16: warning: function 'trace_event_raw_event_brcms_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

  727 |         struct trace_event_raw_##call *entry;                           \
      |                ^~~~~~~~~~~~~~~~
./include/trace/trace_events.h:75:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
   75 |         DECLARE_EVENT_CLASS(name,                              \
      |         ^~~~~~~~~~~~~~~~~~~
./drivers/net/wireless/broadcom/brcm80211/brcmsmac/./brcms_trace_brcmsmac_msg.h:61:1: note: in expansion of macro 'TRACE_EVENT'
   61 | TRACE_EVENT(brcms_dbg,
      | ^~~~~~~~~~~

In file included from ./include/trace/define_trace.h:103,
from drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_msg.h:86,
from drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_events.h:38,
from drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_events.c:22:
./drivers/net/wireless/broadcom/brcm80211/brcmsmac/./brcms_trace_brcmsmac_msg.h: In function 'perf_trace_brcms_dbg':
./include/trace/perf.h:41:16: warning: function 'perf_trace_brcms_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

   41 |         struct hlist_head *head;                                        \
      |                ^~~~~~~~~~
./include/trace/trace_events.h:75:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
   75 |         DECLARE_EVENT_CLASS(name,                              \
      |         ^~~~~~~~~~~~~~~~~~~
./drivers/net/wireless/broadcom/brcm80211/brcmsmac/./brcms_trace_brcmsmac_msg.h:61:1: note: in expansion of macro 'TRACE_EVENT'
   61 | TRACE_EVENT(brcms_dbg,
      | ^~~~~~~~~~~
drivers/net/wireless/marvell/mwifiex/pcie.c: In function 'mwifiex_pm_wakeup_card':
drivers/net/wireless/marvell/mwifiex/pcie.c:659:13: warning: variable 'retval' set but not used [-Wunused-but-set-variable]
  659 |         int retval;
      |             ^~~~~~

In file included from ./include/trace/define_trace.h:102,
from drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h:75,
from drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h:91,
from drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c:15:
drivers/net/wireless/intel/iwlwifi/./iwl-devtrace-msg.h: In function 'trace_event_raw_event_iwlwifi_dbg':
./include/trace/trace_events.h:727:16: warning: function 'trace_event_raw_event_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

  727 |         struct trace_event_raw_##call *entry;                           \
      |                ^~~~~~~~~~~~~~~~
./include/trace/trace_events.h:75:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
   75 |         DECLARE_EVENT_CLASS(name,                              \
      |         ^~~~~~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/./iwl-devtrace-msg.h:51:1: note: in expansion of macro 'TRACE_EVENT'
   51 | TRACE_EVENT(iwlwifi_dbg,
      | ^~~~~~~~~~~

In file included from ./include/trace/define_trace.h:103,
from drivers/net/wireless/intel/iwlwifi/iwl-devtrace-msg.h:75,
from drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h:91,
from drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c:15:
drivers/net/wireless/intel/iwlwifi/./iwl-devtrace-msg.h: In function 'perf_trace_iwlwifi_dbg':
./include/trace/perf.h:41:16: warning: function 'perf_trace_iwlwifi_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

   41 |         struct hlist_head *head;                                        \
      |                ^~~~~~~~~~
./include/trace/trace_events.h:75:9: note: in expansion of macro 'DECLARE_EVENT_CLASS'
   75 |         DECLARE_EVENT_CLASS(name,                              \
      |         ^~~~~~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/./iwl-devtrace-msg.h:51:1: note: in expansion of macro 'TRACE_EVENT'
   51 | TRACE_EVENT(iwlwifi_dbg,
      | ^~~~~~~~~~~
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#7 lore raw
In reply to Kalle Valo

Hi Kalle,

Quoted 63 lines · Kalle Valo
Quoted 27 lines · Jakub Kicinski
Quoted 14 lines · On Wed, 08 Dec 2021 10:00:15 +0200 Kalle Valo wrote:
Quoted 8 lines · Jakub Kicinski
Quoted 2 lines · On Tue, 7 Dec 2021 14:42:11 +0000 (UTC) Kalle Valo wrote:

here's a pull request to net-next tree, more info below. Please let me know if there are any problems.

Pulled, thanks! Could you chase the appropriate people so that the new W=1 C=1 warnings get resolved before the merge window's here?

https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

Just so that I understand right, you are referring to this patchwork test:

Quoted 8 lines

Errors and warnings before: 111 this patch: 115

https://patchwork.hopto.org/static/nipa/591659/12662005/build_32bit/

And you want the four new warnings to be fixed? That can be quite time consuming, to be honest I would rather revert the commits than using a lot of my time trying to get people fix the warnings. Is there an easy way to find what are the new warnings?

Yeah, scroll down, there is a diff of the old warnings vs new ones, and a summary of which files have changed their warning count:

Review

Quoted 5 lines
(quoted diff) +3 -2
+      2 ../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+      3 ../drivers/net/wireless/intel/iwlwifi/mei/main.c
-      1 ../drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+      2 ../drivers/net/wireless/intel/iwlwifi/mvm/ops.c
-      2 ../drivers/net/wireless/microchip/wilc1000/wlan.c

Ah, that makes it easier.

Quoted 8 lines

So presumably these are the warnings that were added:

drivers/net/wireless/intel/iwlwifi/mei/main.c:193: warning: cannot understand function prototype: 'struct ' drivers/net/wireless/intel/iwlwifi/mei/main.c:1784: warning: Function parameter or member 'cldev' not described in 'iwl_mei_probe' drivers/net/wireless/intel/iwlwifi/mei/main.c:1784: warning: Function parameter or member 'id' not described in 'iwl_mei_probe'

Luca, please take a look and send a patch. I'll then apply it directly to wireless-drivers-next.

Quoted 4 lines

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
warning: incorrect type in assignment (different base types) drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
expected restricted __le32 [assigned] [usertype] period_msec

Quoted 8 lines

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
got restricted __le16 [usertype] drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
warning: incorrect type in assignment (different base types) drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
expected unsigned char [assigned] [usertype] keep_alive_id drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
got restricted __le16 [usertype]

Quoted 3 lines

Loic, your patch should fix these, right?

https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

Yes.

Loic

author
#8 lore raw
Quoted 13 lines · Loic Poulain
Quoted 13 lines
Quoted 12 lines

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
warning: incorrect type in assignment (different base types) drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
expected restricted __le32 [assigned] [usertype] period_msec drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3911:28:
got restricted __le16 [usertype] drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
warning: incorrect type in assignment (different base types) drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
expected unsigned char [assigned] [usertype] keep_alive_id drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3913:30:
got restricted __le16 [usertype]

Quoted 5 lines
Quoted 3 lines

Loic, your patch should fix these, right?

https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

Yes.

Thanks, this is now applied and will be part of next pull request, hopefully sent on Friday. iwlwifi fixes we are planning to submit next week.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#9 lore raw
In reply to Loic Poulain
Quoted 30 lines · Loic Poulain

Hi Kalle,

Quoted 27 lines · Kalle Valo

Review

Quoted 10 lines · Jakub Kicinski
Quoted 1 line · On Wed, 08 Dec 2021 10:00:15 +0200 Kalle Valo wrote:

Jakub Kicinski <[email protected]> writes:

Yeah, scroll down, there is a diff of the old warnings vs new ones, and a summary of which files have changed their warning count:

(quoted diff) +3 -2
+      2 ../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+      3 ../drivers/net/wireless/intel/iwlwifi/mei/main.c
-      1 ../drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+      2 ../drivers/net/wireless/intel/iwlwifi/mvm/ops.c
-      2 ../drivers/net/wireless/microchip/wilc1000/wlan.c

Ah, that makes it easier.

Quoted 8 lines

So presumably these are the warnings that were added:

drivers/net/wireless/intel/iwlwifi/mei/main.c:193: warning: cannot understand function prototype: 'struct ' drivers/net/wireless/intel/iwlwifi/mei/main.c:1784: warning: Function parameter or member 'cldev' not described in 'iwl_mei_probe' drivers/net/wireless/intel/iwlwifi/mei/main.c:1784: warning: Function parameter or member 'id' not described in 'iwl_mei_probe'

Luca, please take a look and send a patch. I'll then apply it directly to wireless-drivers-next.

Kalle, as we agreed, I sent 4 patches fixes this errors/warnings in iwlwifi.

--
Cheers,
Luca.