1. 10 Nov, 2020 4 commits
    • Marek Vasut's avatar
      rsi: Move card interrupt handling to RX thread · 28743146
      Marek Vasut authored
      The interrupt handling of the RS911x is particularly heavy. For each RX
      packet, the card does three SDIO transactions, one to read interrupt
      status register, one to RX buffer length, one to read the RX packet(s).
      This translates to ~330 uS per one cycle of interrupt handler. In case
      there is more incoming traffic, this will be more.
      
      The drivers/mmc/core/sdio_irq.c has the following comment, quote "Just
      like traditional hard IRQ handlers, we expect SDIO IRQ handlers to be
      quick and to the point, so that the holding of the host lock does not
      cover too much work that doesn't require that lock to be held."
      
      The RS911x interrupt handler does not fit that. This patch therefore
      changes it such that the entire IRQ handler is moved to the RX thread
      instead, and the interrupt handler only wakes the RX thread.
      
      This is OK, because the interrupt handler only does things which can
      also be done in the RX thread, that is, it checks for firmware loading
      error(s), it checks buffer status, it checks whether a packet arrived
      and if so, reads out the packet and passes it to network stack.
      
      Moreover, this change permits removal of a code which allocated an
      skbuff only to get 4-byte-aligned buffer, read up to 8kiB of data
      into the skbuff, queue this skbuff into local private queue, then in
      RX thread, this buffer is dequeued, the data in the skbuff as passed
      to the RSI driver core, and the skbuff is deallocated. All this is
      replaced by directly calling the RSI driver core with local buffer.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Angus Ainslie <angus@akkea.ca>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: Martin Kepplinger <martink@posteo.de>
      Cc: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
      Cc: Siva Rebbagondla <siva8118@gmail.com>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Tested-by: default avatarMartin Kepplinger <martin.kepplinger@puri.sm>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201103180941.443528-1-marex@denx.de
      28743146
    • Tsuchiya Yuto's avatar
      mwifiex: pcie: skip cancel_work_sync() on reset failure path · 4add4d98
      Tsuchiya Yuto authored
      If a reset is performed, but even the reset fails for some reasons (e.g.,
      on Surface devices, the fw reset requires another quirks),
      cancel_work_sync() hangs in mwifiex_cleanup_pcie().
      
          # firmware went into a bad state
          [...]
          [ 1608.281690] mwifiex_pcie 0000:03:00.0: info: shutdown mwifiex...
          [ 1608.282724] mwifiex_pcie 0000:03:00.0: rx_pending=0, tx_pending=1,	cmd_pending=0
          [ 1608.292400] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [ 1608.292405] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          # reset performed after firmware went into a bad state
          [ 1609.394320] mwifiex_pcie 0000:03:00.0: WLAN FW already running! Skip FW dnld
          [ 1609.394335] mwifiex_pcie 0000:03:00.0: WLAN FW is active
          # but even the reset failed
          [ 1619.499049] mwifiex_pcie 0000:03:00.0: mwifiex_cmd_timeout_func: Timeout cmd id = 0xfa, act = 0xe000
          [ 1619.499094] mwifiex_pcie 0000:03:00.0: num_data_h2c_failure = 0
          [ 1619.499103] mwifiex_pcie 0000:03:00.0: num_cmd_h2c_failure = 0
          [ 1619.499110] mwifiex_pcie 0000:03:00.0: is_cmd_timedout = 1
          [ 1619.499117] mwifiex_pcie 0000:03:00.0: num_tx_timeout = 0
          [ 1619.499124] mwifiex_pcie 0000:03:00.0: last_cmd_index = 0
          [ 1619.499133] mwifiex_pcie 0000:03:00.0: last_cmd_id: fa 00 07 01 07 01 07 01 07 01
          [ 1619.499140] mwifiex_pcie 0000:03:00.0: last_cmd_act: 00 e0 00 00 00 00 00 00 00 00
          [ 1619.499147] mwifiex_pcie 0000:03:00.0: last_cmd_resp_index = 3
          [ 1619.499155] mwifiex_pcie 0000:03:00.0: last_cmd_resp_id: 07 81 07 81 07 81 07 81 07 81
          [ 1619.499162] mwifiex_pcie 0000:03:00.0: last_event_index = 2
          [ 1619.499169] mwifiex_pcie 0000:03:00.0: last_event: 58 00 58 00 58 00 58 00 58 00
          [ 1619.499177] mwifiex_pcie 0000:03:00.0: data_sent=0 cmd_sent=1
          [ 1619.499185] mwifiex_pcie 0000:03:00.0: ps_mode=0 ps_state=0
          [ 1619.499215] mwifiex_pcie 0000:03:00.0: info: _mwifiex_fw_dpc: unregister device
          # mwifiex_pcie_work hang happening
          [ 1823.233923] INFO: task kworker/3:1:44 blocked for more than 122 seconds.
          [ 1823.233932]       Tainted: G        WC OE     5.10.0-rc1-1-mainline #1
          [ 1823.233935] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
          [ 1823.233940] task:kworker/3:1     state:D stack:    0 pid:   44 ppid:     2 flags:0x00004000
          [ 1823.233960] Workqueue: events mwifiex_pcie_work [mwifiex_pcie]
          [ 1823.233965] Call Trace:
          [ 1823.233981]  __schedule+0x292/0x820
          [ 1823.233990]  schedule+0x45/0xe0
          [ 1823.233995]  schedule_timeout+0x11c/0x160
          [ 1823.234003]  wait_for_completion+0x9e/0x100
          [ 1823.234012]  __flush_work.isra.0+0x156/0x210
          [ 1823.234018]  ? flush_workqueue_prep_pwqs+0x130/0x130
          [ 1823.234026]  __cancel_work_timer+0x11e/0x1a0
          [ 1823.234035]  mwifiex_cleanup_pcie+0x28/0xd0 [mwifiex_pcie]
          [ 1823.234049]  mwifiex_free_adapter+0x24/0xe0 [mwifiex]
          [ 1823.234060]  _mwifiex_fw_dpc+0x294/0x560 [mwifiex]
          [ 1823.234074]  mwifiex_reinit_sw+0x15d/0x300 [mwifiex]
          [ 1823.234080]  mwifiex_pcie_reset_done+0x50/0x80 [mwifiex_pcie]
          [ 1823.234087]  pci_try_reset_function+0x5c/0x90
          [ 1823.234094]  process_one_work+0x1d6/0x3a0
          [ 1823.234100]  worker_thread+0x4d/0x3d0
          [ 1823.234107]  ? rescuer_thread+0x410/0x410
          [ 1823.234112]  kthread+0x142/0x160
          [ 1823.234117]  ? __kthread_bind_mask+0x60/0x60
          [ 1823.234124]  ret_from_fork+0x22/0x30
          [...]
      
      This is a deadlock caused by calling cancel_work_sync() in
      mwifiex_cleanup_pcie():
      
      - Device resets are done via mwifiex_pcie_card_reset()
      - which schedules card->work to call mwifiex_pcie_card_reset_work()
      - which calls pci_try_reset_function().
      - This leads to mwifiex_pcie_reset_done() be called on the same workqueue,
        which in turn calls
      - mwifiex_reinit_sw() and that calls
      - _mwifiex_fw_dpc().
      
      The problem is now that _mwifiex_fw_dpc() calls mwifiex_free_adapter()
      in case firmware initialization fails. That ends up calling
      mwifiex_cleanup_pcie().
      
      Note that all those calls are still running on the workqueue. So when
      mwifiex_cleanup_pcie() now calls cancel_work_sync(), it's really waiting
      on itself to complete, causing a deadlock.
      
      This commit fixes the deadlock by skipping cancel_work_sync() on a reset
      failure path.
      
      After this commit, when reset fails, the following output is
      expected to be shown:
      
          kernel: mwifiex_pcie 0000:03:00.0: info: _mwifiex_fw_dpc: unregister device
          kernel: mwifiex: Failed to bring up adapter: -5
          kernel: mwifiex_pcie 0000:03:00.0: reinit failed: -5
      
      To reproduce this issue, for example, try putting the root port of wifi
      into D3 (replace "00:1d.3" with your setup).
      
          # put into D3 (root port)
          sudo setpci -v -s 00:1d.3 CAP_PM+4.b=0b
      
      Cc: Maximilian Luz <luzmaximilian@gmail.com>
      Signed-off-by: default avatarTsuchiya Yuto <kitakar@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201028142346.18355-1-kitakar@gmail.com
      4add4d98
    • Tsuchiya Yuto's avatar
      mwifiex: update comment for shutdown_sw()/reinit_sw() to reflect current state · 566b4cb9
      Tsuchiya Yuto authored
      The functions mwifiex_shutdown_sw() and mwifiex_reinit_sw() can be used
      for more general purposes than the PCIe function level reset. Also, these
      are even not PCIe-specific.
      
      So, let's update the comments at the top of each function accordingly.
      Signed-off-by: default avatarTsuchiya Yuto <kitakar@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201028142110.18144-3-kitakar@gmail.com
      566b4cb9
    • Tsuchiya Yuto's avatar
      mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure · fa74cb1d
      Tsuchiya Yuto authored
      When a PCIe function level reset (FLR) is performed but without fw reset for
      some reasons (e.g., on Microsoft Surface devices, fw reset requires other
      quirks), it fails to reset wifi properly. You can trigger the issue on such
      devices via debugfs entry for reset:
      
          $ echo 1 | sudo tee /sys/kernel/debug/mwifiex/mlan0/reset
      
      and the resulting dmesg log:
      
          [   45.740508] mwifiex_pcie 0000:03:00.0: Resetting per request
          [   45.742937] mwifiex_pcie 0000:03:00.0: info: successfully disconnected from [BSSID]: reason code 3
          [   45.744666] mwifiex_pcie 0000:03:00.0: info: shutdown mwifiex...
          [   45.751530] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [   45.751539] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [   45.771691] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [   45.771695] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [   45.771697] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [   45.771698] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [   45.771699] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [   45.771701] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [   45.771702] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [   45.771703] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [   45.771704] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [   45.771705] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [   45.771707] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
          [   45.771708] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [   53.099343] mwifiex_pcie 0000:03:00.0: info: trying to associate to '[SSID]' bssid [BSSID]
          [   53.241870] mwifiex_pcie 0000:03:00.0: info: associated to bssid [BSSID] successfully
          [   75.377942] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110
          [   85.385491] mwifiex_pcie 0000:03:00.0: info: successfully disconnected from [BSSID]: reason code 15
          [   87.539408] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110
          [   87.539412] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [   99.699917] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110
          [   99.699925] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [  111.859802] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110
          [  111.859808] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
          [...]
      
      When comparing mwifiex_shutdown_sw() with mwifiex_pcie_remove(), it
      lacks mwifiex_init_shutdown_fw().
      
      This commit fixes mwifiex_shutdown_sw() by adding the missing
      mwifiex_init_shutdown_fw().
      
      Fixes: 4c5dae59 ("mwifiex: add PCIe function level reset support")
      Signed-off-by: default avatarTsuchiya Yuto <kitakar@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201028142110.18144-2-kitakar@gmail.com
      fa74cb1d
  2. 07 Nov, 2020 36 commits
    • Seung-Woo Kim's avatar
      brcmfmac: Fix memory leak for unpaired brcmf_{alloc/free} · 9db94628
      Seung-Woo Kim authored
      There are missig brcmf_free() for brcmf_alloc(). Fix memory leak
      by adding missed brcmf_free().
      Reported-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
      Fixes: a1f5aac1 ("brcmfmac: don't realloc wiphy during PCIe reset")
      Signed-off-by: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
      Reviewed-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/1603849967-22817-1-git-send-email-sw0312.kim@samsung.com
      9db94628
    • Lee Jones's avatar
      rtlwifi: rtl8821ae: Place braces around empty if() body · 398d816a
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c: In function ‘_rtl8812ae_phy_get_txpower_limit’:
       drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:2453:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-35-lee.jones@linaro.org
      398d816a
    • Lee Jones's avatar
      rtlwifi: rtl8821ae: phy: Remove a couple of unused variables · 29c6099a
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c: In function ‘rtl8821ae_phy_switch_wirelessband’:
       drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:597:14: warning: variable ‘rxpath’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:597:6: warning: variable ‘txpath’ set but not used [-Wunused-but-set-variable]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-34-lee.jones@linaro.org
      29c6099a
    • Lee Jones's avatar
      rtlwifi: rtl8723be: Remove set but unused variable 'cck_highpwr' · 44ec6d9d
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c: In function ‘_rtl8723be_query_rxphystatus’:
       drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c:53:6: warning: variable ‘cck_highpwr’ set but not used [-Wunused-but-set-variable]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-33-lee.jones@linaro.org
      44ec6d9d
    • Lee Jones's avatar
      rtlwifi: halbtc8821a2ant: Remove a bunch of unused variables · 28f81187
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c: In function ‘btc8821a2ant_action_bt_inquiry’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1451:40: warning: variable ‘bt_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1451:22: warning: variable ‘wifi_rssi_state1’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1451:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c: In function ‘btc8821a2ant_action_wifi_idle_process’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1519:40: warning: variable ‘bt_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:1519:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c: In function ‘btc8821a2ant_action_pan_hs’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2990:22: warning: variable ‘wifi_rssi_state1’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c: In function ‘btc8821a2ant_action_hid_a2dp’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3277:22: warning: variable ‘wifi_rssi_state1’ set but not used [-Wunused-but-set-variable]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-31-lee.jones@linaro.org
      28f81187
    • Lee Jones's avatar
      rtlwifi: rtl8188ee: Remove set but unused variable 'reg_ea4' · 6c75eab0
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c: In function ‘_rtl88e_phy_path_a_iqk’:
       drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c:1351:33: warning: variable ‘reg_ea4’ set but not used [-Wunused-but-set-variable]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-30-lee.jones@linaro.org
      6c75eab0
    • Lee Jones's avatar
      rtlwifi: rtl8723be: Remove set but unused variable 'lc_cal' · 0a43d993
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c: In function ‘_rtl8723be_phy_lc_calibrate’:
       drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c:2181:36: warning: variable ‘lc_cal’ set but not used [-Wunused-but-set-variable]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-29-lee.jones@linaro.org
      0a43d993
    • Lee Jones's avatar
      rtlwifi: halbtc8821a1ant: Remove set but unused variable 'wifi_rssi_state' · 0c73dab7
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c: In function ‘btc8821a1ant_run_coexist_mechanism’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:1904:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-28-lee.jones@linaro.org
      0c73dab7
    • Lee Jones's avatar
      rtlwifi: phy: Remove set but unused variable 'bbvalue' · 87b08d1e
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c: In function ‘_rtl8723e_phy_iq_calibrate’:
       drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c:1150:6: warning: variable ‘bbvalue’ set but not used [-Wunused-but-set-variable]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-27-lee.jones@linaro.org
      87b08d1e
    • Lee Jones's avatar
      rtlwifi: halbtc8723b2ant: Remove a bunch of set but unused variables · bb053d02
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_wifi_idle_process’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:1631:40: warning: variable ‘bt_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:1631:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_sco’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2767:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_hid’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2810:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_a2dp’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2855:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_a2dp_pan_hs’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2929:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_pan_edr’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2976:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_pan_hs’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3028:22: warning: variable ‘wifi_rssi_state1’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3028:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_pan_edr_a2dp’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3066:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_pan_edr_hid’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3121:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_hid_a2dp_pan_edr’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3185:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c: In function ‘btc8723b2ant_action_hid_a2dp’:
       drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:3244:5: warning: variable ‘wifi_rssi_state’ set but not used [-Wunused-but-set-variable]
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-26-lee.jones@linaro.org
      bb053d02
    • Lee Jones's avatar
      rtlwifi: rtl8192cu: trx: Demote clear abuse of kernel-doc format · 906a1b4f
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c:455: warning: Function parameter or member 'txdesc' not described in '_rtl_tx_desc_checksum'
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-6-lee.jones@linaro.org
      906a1b4f
    • Lee Jones's avatar
      rtlwifi: rtl8192cu: mac: Fix some missing/ill-documented function parameters · 230f874e
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:124: warning: Function parameter or member 'hw' not described in 'rtl92c_llt_write'
       drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:124: warning: Excess function parameter 'io' description in 'rtl92c_llt_write'
       drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:155: warning: Function parameter or member 'hw' not described in 'rtl92c_init_llt_table'
       drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c:155: warning: Excess function parameter 'io' description in 'rtl92c_init_llt_table'
      
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Larry Finger <Larry.Finger@lwfinger.net>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-4-lee.jones@linaro.org
      230f874e
    • Lee Jones's avatar
      rtw88: rtw8822c: Remove unused variable 'corr_val' · dff07dda
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/realtek/rtw88/rtw8822c.c: In function ‘rtw8822c_dpk_dc_corr_check’:
       drivers/net/wireless/realtek/rtw88/rtw8822c.c:2445:5: warning: variable ‘corr_val’ set but not used [-Wunused-but-set-variable]
      
      Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-39-lee.jones@linaro.org
      Link: https://lore.kernel.org/r/20201102112410.1049272-39-lee.jones@linaro.org
      dff07dda
    • Lee Jones's avatar
      wlcore: spi: Demote a non-compliant function header, fix another · 409d1c82
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/ti/wlcore/spi.c:403: warning: Function parameter or member 'child' not described in 'wl12xx_spi_set_block_size'
       drivers/net/wireless/ti/wlcore/spi.c:403: warning: Function parameter or member 'blksz' not described in 'wl12xx_spi_set_block_size'
       drivers/net/wireless/ti/wlcore/spi.c:440: warning: Excess function parameter 'res' description in 'wlcore_probe_of'
      
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Cc: Luciano Coelho <luciano.coelho@nokia.com>
      Cc: Juuso Oikarinen <juuso.oikarinen@nokia.com>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-36-lee.jones@linaro.org
      Link: https://lore.kernel.org/r/20201102112410.1049272-37-lee.jones@linaro.org
      409d1c82
    • Lee Jones's avatar
      mwifiex: pcie: Remove a couple of unchecked 'ret's · 5e43d496
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/marvell/mwifiex/pcie.c: In function ‘mwifiex_pcie_remove’:
       drivers/net/wireless/marvell/mwifiex/pcie.c:432:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
       drivers/net/wireless/marvell/mwifiex/pcie.c: In function ‘mwifiex_cleanup_pcie’:
       drivers/net/wireless/marvell/mwifiex/pcie.c:3142:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
      
      Cc: Amitkumar Karwar <amitkarwar@gmail.com>
      Cc: Ganapathi Bhat <ganapathi.bhat@nxp.com>
      Cc: Xinming Hu <huxinming820@gmail.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-32-lee.jones@linaro.org
      5e43d496
    • Lee Jones's avatar
      wl3501_cs: Fix misspelling and provide missing documentation · 8b8a6f8c
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       In file included from drivers/net/wireless/wl3501_cs.c:57:
       drivers/net/wireless/wl3501_cs.c:143: warning: Function parameter or member 'reg_domain' not described in 'iw_valid_channel'
       drivers/net/wireless/wl3501_cs.c:143: warning: Excess function parameter 'reg_comain' description in 'iw_valid_channel'
       drivers/net/wireless/wl3501_cs.c:469: warning: Function parameter or member 'data' not described in 'wl3501_send_pkt'
       drivers/net/wireless/wl3501_cs.c:469: warning: Function parameter or member 'len' not described in 'wl3501_send_pkt'
      
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Fox Chen <mhchen@golf.ccl.itri.org.tw>
      Cc: de Melo <acme@conectiva.com.br>
      Cc: Gustavo Niemeyer <niemeyer@conectiva.com>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-25-lee.jones@linaro.org
      8b8a6f8c
    • Lee Jones's avatar
      prism54: isl_ioctl: Fix one function header and demote another · 9afcf322
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       from drivers/net/wireless/intersil/prism54/isl_ioctl.c:22:
       inlined from ‘prism54_get_name’ at drivers/net/wireless/intersil/prism54/isl_ioctl.c:283:2:
       drivers/net/wireless/intersil/prism54/isl_ioctl.c:68: warning: Function parameter or member 'priv' not described in 'prism54_mib_mode_helper'
       drivers/net/wireless/intersil/prism54/isl_ioctl.c:68: warning: Excess function parameter 'mib' description in 'prism54_mib_mode_helper'
       drivers/net/wireless/intersil/prism54/isl_ioctl.c:127: warning: Function parameter or member 'priv' not described in 'prism54_mib_init'
      
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Aurelien Alleaume <slts@free.fr>
      Cc: Valerio Riedel <hvr@gnu.org>
      Cc: "Luis R. Rodriguez" <mcgrof@ruslug.rutgers.edu>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-15-lee.jones@linaro.org
      9afcf322
    • Lee Jones's avatar
      wl1251: cmd: Rename 'len' to 'buf_len' in the documentation · 641291ec
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/ti/wl1251/cmd.c:70: warning: Function parameter or member 'buf_len' not described in 'wl1251_cmd_test'
       drivers/net/wireless/ti/wl1251/cmd.c:70: warning: Excess function parameter 'len' description in 'wl1251_cmd_test'
      
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-10-lee.jones@linaro.org
      641291ec
    • Lee Jones's avatar
      brcmfmac: fweh: Add missing description for 'gfp' · 9bd28c66
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c:394: warning: Function parameter or member 'gfp' not described in 'brcmf_fweh_process_event'
      
      Cc: Arend van Spriel <arend.vanspriel@broadcom.com>
      Cc: Franky Lin <franky.lin@broadcom.com>
      Cc: Hante Meuleman <hante.meuleman@broadcom.com>
      Cc: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
      Cc: Wright Feng <wright.feng@cypress.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: brcm80211-dev-list.pdl@broadcom.com
      Cc: brcm80211-dev-list@cypress.com
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-19-lee.jones@linaro.org
      9bd28c66
    • Lee Jones's avatar
      brcmfmac: pcie: Provide description for missing function parameter 'devinfo' · 05cefa98
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:766: warning: Function parameter or member 'devinfo' not described in 'brcmf_pcie_bus_console_read'
      
      Cc: Arend van Spriel <arend.vanspriel@broadcom.com>
      Cc: Franky Lin <franky.lin@broadcom.com>
      Cc: Hante Meuleman <hante.meuleman@broadcom.com>
      Cc: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
      Cc: Wright Feng <wright.feng@cypress.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: linux-wireless@vger.kernel.org
      Cc: brcm80211-dev-list.pdl@broadcom.com
      Cc: brcm80211-dev-list@cypress.com
      Cc: netdev@vger.kernel.org
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: linaro-mm-sig@lists.linaro.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-8-lee.jones@linaro.org
      05cefa98
    • Lee Jones's avatar
      brcmfmac: bcmsdh: Fix description for function parameter 'pktlist' · 6f0d044f
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:380: warning: Function parameter or member 'pktlist' not described in 'brcmf_sdiod_sglist_rw'
       drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:380: warning: Excess function parameter 'pkt' description in 'brcmf_sdiod_sglist_rw'
      
      Cc: Arend van Spriel <arend.vanspriel@broadcom.com>
      Cc: Franky Lin <franky.lin@broadcom.com>
      Cc: Hante Meuleman <hante.meuleman@broadcom.com>
      Cc: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
      Cc: Wright Feng <wright.feng@cypress.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: brcm80211-dev-list.pdl@broadcom.com
      Cc: brcm80211-dev-list@cypress.com
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-7-lee.jones@linaro.org
      6f0d044f
    • Lee Jones's avatar
      rsi: rsi_91x_usb_ops: Source file headers are not good candidates for kernel-doc · 63636b38
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_usb_ops.c:22: warning: Incorrect use of kernel-doc format:  * rsi_usb_rx_thread() - This is a kernel thread to receive the packets from
       drivers/net/wireless/rsi/rsi_91x_usb_ops.c:29: warning: Function parameter or member 'common' not described in 'rsi_usb_rx_thread'
      
      Cc: Amitkumar Karwar <amitkarwar@gmail.com>
      Cc: Siva Rebbagondla <siva8118@gmail.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-5-lee.jones@linaro.org
      63636b38
    • Lee Jones's avatar
      rsi: rsi_91x_usb: Fix some basic kernel-doc issues · f21e6c58
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_usb.c:26: warning: cannot understand function prototype: 'u16 dev_oper_mode = DEV_OPMODE_STA_BT_DUAL; '
       drivers/net/wireless/rsi/rsi_91x_usb.c:88: warning: Function parameter or member 'endpoint' not described in 'rsi_write_multiple'
       drivers/net/wireless/rsi/rsi_91x_usb.c:88: warning: Excess function parameter 'addr' description in 'rsi_write_multiple'
       drivers/net/wireless/rsi/rsi_91x_usb.c:320: warning: Function parameter or member 'ep_num' not described in 'rsi_rx_urb_submit'
       drivers/net/wireless/rsi/rsi_91x_usb.c:320: warning: Function parameter or member 'mem_flags' not described in 'rsi_rx_urb_submit'
      
      Cc: Amitkumar Karwar <amitkarwar@gmail.com>
      Cc: Siva Rebbagondla <siva8118@gmail.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-3-lee.jones@linaro.org
      f21e6c58
    • Markov Mikhail's avatar
      rt2x00: save survey for every channel visited · 54476269
      Markov Mikhail authored
      rt2800 only gives you survey for current channel.
      
      Survey-based ACS algorithms are failing to perform their job when working
      with rt2800.
      
      Make rt2800 save survey for every channel visited and be able to give away
      that information.
      
      There is a bug registered https://dev.archive.openwrt.org/ticket/19081 and
      this patch solves the issue.
      Signed-off-by: default avatarMarkov Mikhail <markov.mikhail@itmh.ru>
      sgruszka: remove unused variable
      Signed-off-by: default avatarStanislaw Gruszka <stf_xl@wp.pl>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201104142524.94375-1-stf_xl@wp.pl
      54476269
    • Sebastian Andrzej Siewior's avatar
      rtlwifi: Remove in_interrupt() usage in halbtc_send_bt_mp_operation() · 50c61ae1
      Sebastian Andrzej Siewior authored
      halbtc_send_bt_mp_operation() uses in_interrupt() to determine if it is
      safe to invoke wait_for_completion().
      
      The usage of in_interrupt() in drivers is phased out and Linus clearly
      requested that code which changes behaviour depending on context should
      either be separated or the context be conveyed in an argument passed by the
      caller, which usually knows the context.
      
      Aside of that in_interrupt() is not correct as it does not catch preempt
      disabled regions which neither can sleep.
      
      halbtc_send_bt_mp_operation() is called from:
      
       rtl_watchdog_wq_callback()
         rtl_btc_periodical()
           halbtc_get()
             case BTC_GET_U4_BT_PATCH_VER:
               halbtc_get_bt_patch_version()
      
       which is preemtible context.
      
         rtl_c2h_content_parsing()
           btc_ops->btc_btinfo_notify()
             rtl_btc_btinfo_notify()
               exhalbtc_bt_info_notify()
                 ex_btc8723b1ant_bt_info_notify()
      	   ex_btc8821a1ant_bt_info_notify()
      	   ex_btc8821a2ant_bt_info_notify()
                   btcoexist->btc_set_bt_reg()
                     halbtc_set_bt_reg()
      
         rtl_c2h_content_parsing() is in turn called from:
      
         rtl_c2hcmd_wq_callback()
           rtl_c2hcmd_launcher()
      
         which is preemptible context and from:
      
         _rtl_pci_rx_interrupt
           rtl_c2hcmd_enqueue()
      
         which is obviously not preemptible but limited to C2H_BT_MP commands
         which does invoke rtl_c2h_content_parsing().
      
      Aside of that it can be reached from:
      
           halbtc_get()
             case BTC_GET_U4_SUPPORTED_FEATURE:
               halbtc_get_bt_coex_supported_feature()
             case BTC_GET_U4_BT_FORBIDDEN_SLOT_VAL:
               halbtc_get_bt_forbidden_slot_val()
             case BTC_GET_U4_BT_DEVICE_INFO:
               halbtc_get_bt_device_info()
             case BTC_GET_U4_SUPPORTED_VERSION:
               halbtc_get_bt_coex_supported_version()
             case BTC_GET_U4_SUPPORTED_FEATURE:
               halbtc_get_bt_coex_supported_feature()
      
         btcoexist->btc_get_bt_afh_map_from_bt()
           halbtc_get_bt_afh_map_from_bt()
      
         btcoexist->btc_get_ble_scan_para_from_bt()
           halbtc_get_ble_scan_para_from_bt()
      
         btcoexist->btc_get_ble_scan_type_from_bt()
           halbtc_get_ble_scan_type_from_bt()
      
         btcoexist->btc_get_ant_det_val_from_bt()
           halbtc_get_ant_det_val_from_bt()
      
         btcoexist->btc_get_bt_coex_supported_version()
           halbtc_get_bt_coex_supported_version()
      
         btcoexist->btc_get_bt_coex_supported_feature()
           halbtc_get_bt_coex_supported_feature()
      
      None of these have a caller. Welcome to the wonderful world of HALs and
      onion layers.
      
      Remove in_interrupt() check.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101211536.2966644-9-bigeasy@linutronix.de
      50c61ae1
    • Sebastian Andrzej Siewior's avatar
      rtlwifi: Remove in_interrupt() usage in is_any_client_connect_to_ap(). · 317f688b
      Sebastian Andrzej Siewior authored
      is_any_client_connect_to_ap() is using in_interrupt() to determine whether
      it should acquire the lock prior accessing the list.
      
      The usage of in_interrupt() in drivers is phased out and Linus clearly
      requested that code which changes behaviour depending on context should
      either be separated or the context be conveyed in an argument passed by the
      caller, which usually knows the context.
      
      The function is called from:
      
          - halbtc_get()
      
          - halbtc_get()
              halbtc_get_wifi_link_status()
      
          - halbtc_display_dbg_msg()
      	halbtc_display_wifi_status()
                halbtc_get_wifi_link_status()
      
      All top level callers are part of the btc_coexist callback inferface and
      are never invoked from a context which can hold the lock already.
      
      The contexts which hold the lock are either protecting list add/del
      operations or list walks which never call into any of the btc_coexist
      interfaces.
      
      In fact the conditional is outright dangerous because if this function
      would be invoked from a BH disabled context the check would avoid taking
      the lock while on another CPU the list could be manipulated under the lock.
      
      Remove the in_interrupt() check and always acquire the lock.
      
      To simplify the code further use list_empty() instead of walking the list
      and counting the entries just to check the count for > 0 at the end.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101211536.2966644-8-bigeasy@linutronix.de
      317f688b
    • Sebastian Andrzej Siewior's avatar
      zd1211rw: Remove in_atomic() usage. · abcda807
      Sebastian Andrzej Siewior authored
      The usage of in_atomic() in driver code is deprecated as it can not
      always detect all states where it is not allowed to sleep.
      
      All callers are in premptible thread context and all functions invoke core
      functions which have checks for invalid calling contexts already.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Ulrich Kunitz <kune@deine-taler.de>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101211536.2966644-7-bigeasy@linutronix.de
      abcda807
    • Sebastian Andrzej Siewior's avatar
      hostap: Remove in_atomic() check. · 7534fd5e
      Sebastian Andrzej Siewior authored
      hostap_get_wireless_stats() is the iw_handler_if::get_wireless_stats()
      callback of this driver. This callback was not allowed to sleep until
      commit a160ee69 ("wext: let get_wireless_stats() sleep") in v2.6.32.
      
      Remove the therefore pointless in_atomic() check.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Jouni Malinen <j@w1.fi>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101211536.2966644-6-bigeasy@linutronix.de
      7534fd5e
    • Sebastian Andrzej Siewior's avatar
      airo: Replace in_atomic() usage. · 494e46d0
      Sebastian Andrzej Siewior authored
      issuecommand() is using in_atomic() to decide if it is safe to invoke
      schedule() while waiting for the command to be accepted.
      
      Usage of in_atomic() for this is only half correct as it can not detect all
      condition where it is not allowed to schedule(). Also Linus clearly
      requested that code which changes behaviour depending on context should
      either be seperated or the context be conveyed in an argument passed by the
      caller, which usually knows the context.
      
      Add an may_sleep argument to issuecommand() indicating when it is save to
      sleep and change schedule() to cond_resched() because it's pointless to
      invoke schedule() if there is no request to reschedule.
      
      Pass the may_sleep condition through the various call chains leading to
      issuecommand().
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101211536.2966644-5-bigeasy@linutronix.de
      494e46d0
    • Sebastian Andrzej Siewior's avatar
      airo: Always use JOB_STATS and JOB_EVENT · 49eb0199
      Sebastian Andrzej Siewior authored
      issuecommand() is using in_atomic() to decide if it is safe to invoke
      schedule() while waiting for the command to be accepted.
      
      Usage of in_atomic() for this is only half correct as it can not detect all
      condition where it is not allowed to schedule(). Also Linus clearly
      requested that code which changes behaviour depending on context should
      either be seperated or the context be conveyed in an argument passed by the
      caller, which usually knows the context.
      
      Chasing the call chains leading up to issuecommand() is straight forward,
      but airo_link() and airo_get_stats() would require to pass the context
      through a quite large amount of functions.
      
      As this is ancient hardware, avoid the churn and enforce the invocation of
      those functions through the JOB machinery.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101211536.2966644-4-bigeasy@linutronix.de
      49eb0199
    • Sebastian Andrzej Siewior's avatar
      airo: Invoke airo_read_wireless_stats() directly · 24bf941f
      Sebastian Andrzej Siewior authored
      airo_get_wireless_stats() is the iw_handler_if::get_wireless_stats()
      callback of this driver. This callback was not allowed to sleep until
      commit a160ee69 ("wext: let get_wireless_stats() sleep") in v2.6.32.
      
      airo still delegates the readout to a thread, which is not longer
      necessary.
      
      Invoke airo_read_wireless_stats() directly from the callback and remove
      the now unused JOB_WSTATS handling.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101211536.2966644-3-bigeasy@linutronix.de
      24bf941f
    • Sebastian Andrzej Siewior's avatar
      orinoco: Remove BUG_ON(in_interrupt/irq()) · ce4dd05c
      Sebastian Andrzej Siewior authored
      The usage of in_irq()/in_interrupt() in drivers is phased out and the
      BUG_ON()'s based on those are not covering all contexts in which these
      functions cannot be called.
      
      Aside of that BUG_ON() should only be used as last resort, which is clearly
      not the case here.
      
      A broad variety of checks in the invoked functions (always enabled or debug
      option dependent) cover these conditions already, so the BUG_ON()'s do not
      really provide additional value.
      
      Just remove them.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101211536.2966644-2-bigeasy@linutronix.de
      ce4dd05c
    • Tokunori Ikegami's avatar
      rtl8xxxu: Add Buffalo WI-U3-866D to list of supported devices · 28606150
      Tokunori Ikegami authored
      Buffalo WI-U3-866D is supported by the rtl8812au driver.
      Also RTL8812AU software supports the product RTL8192EU also.
      So add Buffalo WI-U3-866D with the RTL8192EU driver info.
      Signed-off-by: default avatarTokunori Ikegami <ikegami.t@gmail.com>
      Cc: linux-wireless@vger.kernel.org
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201101173236.7851-1-ikegami.t@gmail.com
      28606150
    • Chin-Yen Lee's avatar
      rtw88: decide lps deep mode from firmware feature. · fc3ac64a
      Chin-Yen Lee authored
      This patch checks the supported lps deep mode from firmware feature,
      and allows different firmware have different deep power mode.
      Original module parameter rtw_fw_lps_deep_mode is replaced with
      rtw_disable_lps_deep_mode for user to disable lps deep mode.
      Signed-off-by: default avatarChin-Yen Lee <timlee@realtek.com>
      Signed-off-by: default avatarTzu-En Huang <tehuang@realtek.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201030084826.9034-5-tehuang@realtek.com
      fc3ac64a
    • Chin-Yen Lee's avatar
      rtw88: add C2H response for checking firmware leave lps · f31e039f
      Chin-Yen Lee authored
      Originally driver checks if firmware has left lps via reading the setting
      of REG_TCR register. But this way may fail when firmware is frequently
      changing power state. Therefore, firmware provides a safer option for
      driver. When firmware leaves lps successfully, it sends a C2H response
      to inform driver.
      Signed-off-by: default avatarChin-Yen Lee <timlee@realtek.com>
      Signed-off-by: default avatarTzu-En Huang <tehuang@realtek.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201030084826.9034-4-tehuang@realtek.com
      f31e039f
    • Chin-Yen Lee's avatar
      rtw88: store firmware feature in firmware header · a9594960
      Chin-Yen Lee authored
      Some functions need the support of firmware with special version.
      In order to get the feature of current firmware, we store the information
      in firmware header and parse after firmware is loaded. The current feature
      list in firmware header includes checking leave lps via C2H and
      supported lps deep mode.
      Signed-off-by: default avatarChin-Yen Lee <timlee@realtek.com>
      Signed-off-by: default avatarTzu-En Huang <tehuang@realtek.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201030084826.9034-3-tehuang@realtek.com
      a9594960