1. 18 4月, 2021 2 次提交
    • M
      rsi: Use resume_noirq for SDIO · c434e5e4
      Marek Vasut 提交于
      The rsi_resume() does access the bus to enable interrupts on the RSI
      SDIO WiFi card, however when calling sdio_claim_host() in the resume
      path, it is possible the bus is already claimed and sdio_claim_host()
      spins indefinitelly. Enable the SDIO card interrupts in resume_noirq
      instead to prevent anything else from claiming the SDIO bus first.
      
      Fixes: 20db0733 ("rsi: sdio suspend and resume support")
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Amitkumar Karwar <amit.karwar@redpinesignals.com>
      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: Karun Eagalapati <karun256@gmail.com>
      Cc: Martin Kepplinger <martink@posteo.de>
      Cc: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
      Cc: Siva Rebbagondla <siva8118@gmail.com>
      Cc: netdev@vger.kernel.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20210327235932.175896-1-marex@denx.de
      c434e5e4
    • A
      rsi: fix comment syntax in file headers · 30519460
      Aditya Srivastava 提交于
      The opening comment mark '/**' is used for highlighting the beginning of
      kernel-doc comments.
      There are some files in drivers/net/wireless/rsi which follow this syntax
      in their file headers, i.e. start with '/**' like comments, which causes
      unexpected warnings from kernel-doc.
      
      E.g., running scripts/kernel-doc -none on drivers/net/wireless/rsi/rsi_coex.h
      causes this warning:
      "warning: wrong kernel-doc identifier on line:
       * Copyright (c) 2018 Redpine Signals Inc."
      
      Similarly for other files too.
      
      Provide a simple fix by replacing such occurrences with general comment
      format, i.e., "/*", to prevent kernel-doc from parsing it.
      Signed-off-by: NAditya Srivastava <yashsri421@gmail.com>
      Reviewed-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20210315173259.8757-1-yashsri421@gmail.com
      30519460
  2. 14 4月, 2021 1 次提交
  3. 18 3月, 2021 1 次提交
  4. 08 2月, 2021 1 次提交
  5. 24 11月, 2020 1 次提交
  6. 11 11月, 2020 2 次提交
    • M
      rsi: Clean up loop in the interrupt handler · abd131a1
      Marek Vasut 提交于
      The inner do { ... } while loop is completely useless, all it does
      is iterate over a switch-case statement, one bit at a time. This
      can easily be replaced by simple if (status & bit) { ... } tests
      for each bit. No functional change.
      Signed-off-by: NMarek 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
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201103180941.443528-2-marex@denx.de
      abd131a1
    • M
      rsi: Move card interrupt handling to RX thread · 28743146
      Marek Vasut 提交于
      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: NMarek 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: NMartin Kepplinger <martin.kepplinger@puri.sm>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201103180941.443528-1-marex@denx.de
      28743146
  7. 08 11月, 2020 2 次提交
    • L
      rsi: rsi_91x_usb_ops: Source file headers are not good candidates for kernel-doc · 63636b38
      Lee Jones 提交于
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-5-lee.jones@linaro.org
      63636b38
    • L
      rsi: rsi_91x_usb: Fix some basic kernel-doc issues · f21e6c58
      Lee Jones 提交于
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201102112410.1049272-3-lee.jones@linaro.org
      f21e6c58
  8. 07 11月, 2020 1 次提交
    • M
      rsi: Fix TX EAPOL packet handling against iwlwifi AP · 65277100
      Marek Vasut 提交于
      In case RSI9116 SDIO WiFi operates in STA mode against Intel 9260 in AP mode,
      the association fails. The former is using wpa_supplicant during association,
      the later is set up using hostapd:
      
      iwl$ cat hostapd.conf
      interface=wlp1s0
      ssid=test
      country_code=DE
      hw_mode=g
      channel=1
      wpa=2
      wpa_passphrase=test
      wpa_key_mgmt=WPA-PSK
      iwl$ hostapd -d hostapd.conf
      
      rsi$ wpa_supplicant -i wlan0 -c <(wpa_passphrase test test)
      
      The problem is that the TX EAPOL data descriptor RSI_DESC_REQUIRE_CFM_TO_HOST
      flag and extended descriptor EAPOL4_CONFIRM frame type are not set in case the
      AP is iwlwifi, because in that case the TX EAPOL packet is 2 bytes shorter.
      
      The downstream vendor driver has this change in place already [1], however
      there is no explanation for it, neither is there any commit history from which
      such explanation could be obtained.
      
      [1] https://github.com/SiliconLabs/RS911X-nLink-OSD/blob/master/rsi/rsi_91x_hal.c#L238Signed-off-by: NMarek 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
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20201015111616.429220-1-marex@denx.de
      65277100
  9. 01 9月, 2020 13 次提交
    • L
      rsi: rsi_91x_sdio_ops: File headers are not good kernel-doc candidates · 73ffcd40
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_sdio_ops.c:24: warning: Incorrect use of kernel-doc format:  * rsi_sdio_master_access_msword() - This function sets the AHB master access
       drivers/net/wireless/rsi/rsi_91x_sdio_ops.c:32: warning: Function parameter or member 'adapter' not described in 'rsi_sdio_master_access_msword'
       drivers/net/wireless/rsi/rsi_91x_sdio_ops.c:32: warning: Function parameter or member 'ms_word' not described in 'rsi_sdio_master_access_msword'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200826093401.1458456-23-lee.jones@linaro.org
      73ffcd40
    • L
      rsi: rsi_91x_sdio: Fix a few kernel-doc related issues · 64403dc3
      Lee Jones 提交于
      - File headers do not make for good kernel-doc candidates
       - Kernel-doc header lines should start with " *"
       - Fix doc-rot issue
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_sdio.c:25: warning: cannot understand function prototype: 'u16 dev_oper_mode = DEV_OPMODE_STA_BT_DUAL; '
       drivers/net/wireless/rsi/rsi_91x_sdio.c:802: warning: bad line:                                    from the device.
       drivers/net/wireless/rsi/rsi_91x_sdio.c:842: warning: Function parameter or member 'pfunction' not described in 'rsi_init_sdio_interface'
       drivers/net/wireless/rsi/rsi_91x_sdio.c:842: warning: Excess function parameter 'pkt' description in 'rsi_init_sdio_interface'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200826093401.1458456-17-lee.jones@linaro.org
      64403dc3
    • L
      rsi: Source file headers are not suitable for kernel-doc · 5316050e
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_debugfs.c:21: warning: Incorrect use of kernel-doc format:  * rsi_sdio_stats_read() - This function returns the sdio status of the driver.
       drivers/net/wireless/rsi/rsi_91x_debugfs.c:28: warning: Function parameter or member 'seq' not described in 'rsi_sdio_stats_read'
       drivers/net/wireless/rsi/rsi_91x_debugfs.c:28: warning: Function parameter or member 'data' not described in 'rsi_sdio_stats_read'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200821071644.109970-21-lee.jones@linaro.org
      5316050e
    • L
      rsi: File headers are not suitable for kernel-doc · 7a03124c
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_coex.c:24: warning: Function parameter or member 'coex_cb' not described in 'rsi_coex_determine_coex_q'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200821071644.109970-15-lee.jones@linaro.org
      7a03124c
    • L
      rsi: Source file headers do not make good kernel-doc candidates · 246fe9f1
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_ps.c:26: warning: Function parameter or member 'state' not described in 'str_psstate'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200821071644.109970-11-lee.jones@linaro.org
      246fe9f1
    • L
      rsi: Add descriptions for rsi_set_vap_capabilities()'s parameters · a451ff85
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:713: warning: Function parameter or member 'mac_addr' not described in 'rsi_set_vap_capabilities'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:713: warning: Function parameter or member 'vap_id' not described in 'rsi_set_vap_capabilities'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:713: warning: Function parameter or member 'vap_status' not described in 'rsi_set_vap_capabilities'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200821071644.109970-7-lee.jones@linaro.org
      a451ff85
    • L
      rsi: Add description for function param 'sta' · 501c0980
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_mac80211.c:1021: warning: Function parameter or member 'sta' not described in 'rsi_mac80211_set_key'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200821071644.109970-3-lee.jones@linaro.org
      501c0980
    • L
      rsi: File header comments should not be kernel-doc · 9463fd55
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_hal.c:25: warning: cannot understand function prototype: 'struct ta_metadata metadata_flash_content[] = '
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200819072402.3085022-24-lee.jones@linaro.org
      9463fd55
    • L
      rsi: Fix a myriad of documentation issues · 31117517
      Lee Jones 提交于
      Too many, not enough, misnamed and formatting problems, all resolved.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:24: warning: cannot understand function prototype: 'struct bootup_params boot_params_20 = '
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:487: warning: Excess function parameter 'type' description in 'rsi_mgmt_pkt_to_core'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:538: warning: Function parameter or member 'sta_id' not described in 'rsi_hal_send_sta_notify_frame'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:538: warning: Function parameter or member 'vif' not described in 'rsi_hal_send_sta_notify_frame'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:615: warning: Function parameter or member 'sta_id' not described in 'rsi_send_aggregation_params_frame'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Function parameter or member 'mode' not described in 'rsi_set_vap_capabilities'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Function parameter or member 'mac_addr' not described in 'rsi_set_vap_capabilities'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Function parameter or member 'vap_id' not described in 'rsi_set_vap_capabilities'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Function parameter or member 'vap_status' not described in 'rsi_set_vap_capabilities'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:711: warning: Excess function parameter 'opmode' description in 'rsi_set_vap_capabilities'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:794: warning: Function parameter or member 'sta_id' not described in 'rsi_hal_load_key'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:794: warning: Function parameter or member 'vif' not described in 'rsi_hal_load_key'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1053: warning: Function parameter or member 'curchan' not described in 'rsi_band_check'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1173: warning: Excess function parameter 'channel' description in 'rsi_send_radio_params_update'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1299: warning: Function parameter or member 'sta' not described in 'rsi_send_auto_rate_request'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1299: warning: Function parameter or member 'sta_id' not described in 'rsi_send_auto_rate_request'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1299: warning: Function parameter or member 'vif' not described in 'rsi_send_auto_rate_request'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'opmode' not described in 'rsi_inform_bss_status'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'addr' not described in 'rsi_inform_bss_status'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'sta' not described in 'rsi_inform_bss_status'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'sta_id' not described in 'rsi_inform_bss_status'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'assoc_cap' not described in 'rsi_inform_bss_status'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Function parameter or member 'vif' not described in 'rsi_inform_bss_status'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1459: warning: Excess function parameter 'bssid' description in 'rsi_inform_bss_status'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1543: warning: Function parameter or member 'common' not described in 'rsi_send_block_unblock_frame'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1543: warning: Function parameter or member 'block_event' not described in 'rsi_send_block_unblock_frame'
       drivers/net/wireless/rsi/rsi_91x_mgmt.c:1587: warning: Excess function parameter 'Return' description in 'rsi_send_rx_filter_frame'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200819072402.3085022-21-lee.jones@linaro.org
      31117517
    • L
      rsi: Fix a few kerneldoc misdemeanours · 5dfcdc7a
      Lee Jones 提交于
      - File headers should not be kernel-doc
       - Misnaming issues
       - Missing function parameter documentation
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_mac80211.c:24: warning: cannot understand function prototype: 'const struct ieee80211_channel rsi_2ghz_channels[] = '
       drivers/net/wireless/rsi/rsi_91x_mac80211.c:739: warning: Function parameter or member 'vif' not described in 'rsi_get_connected_channel'
       drivers/net/wireless/rsi/rsi_91x_mac80211.c:739: warning: Excess function parameter 'adapter' description in 'rsi_get_connected_channel'
       drivers/net/wireless/rsi/rsi_91x_mac80211.c:868: warning: Function parameter or member 'changed_flags' not described in 'rsi_mac80211_conf_filter'
       drivers/net/wireless/rsi/rsi_91x_mac80211.c:868: warning: Excess function parameter 'changed' description in 'rsi_mac80211_conf_filter'
       drivers/net/wireless/rsi/rsi_91x_mac80211.c:946: warning: Function parameter or member 'sta' not described in 'rsi_hal_key_config'
       drivers/net/wireless/rsi/rsi_91x_mac80211.c:1245: warning: Function parameter or member 'vif' not described in 'rsi_perform_cqm'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200819072402.3085022-19-lee.jones@linaro.org
      5dfcdc7a
    • L
      rsi: Fix misnamed function parameter 'rx_pkt' · a8433a92
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_main.c:157: warning: Function parameter or member 'rx_pkt' not described in 'rsi_read_pkt'
       drivers/net/wireless/rsi/rsi_91x_main.c:157: warning: Excess function parameter 'rcv_pkt' description in 'rsi_read_pkt'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200819072402.3085022-18-lee.jones@linaro.org
      a8433a92
    • L
      rsi: File header should not be kernel-doc · 2fc4c9ff
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_core.c:23: warning: Incorrect use of kernel-doc format:  * rsi_determine_min_weight_queue() - This function determines the queue with
       drivers/net/wireless/rsi/rsi_91x_core.c:30: warning: Function parameter or member 'common' not described in 'rsi_determine_min_weight_queue'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200819072402.3085022-4-lee.jones@linaro.org
      2fc4c9ff
    • L
      rsi: Fix some kernel-doc issues · 470d48c1
      Lee Jones 提交于
      The file header should not be kernel-doc.  Add missing 'rec_pkt'
      description.  Update 'rsi_91x_init()'s parameter description.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wireless/rsi/rsi_91x_main.c:17: warning: Function parameter or member 'fmt' not described in 'pr_fmt'
       drivers/net/wireless/rsi/rsi_91x_main.c:156: warning: Function parameter or member 'rx_pkt' not described in 'rsi_read_pkt'
       drivers/net/wireless/rsi/rsi_91x_main.c:287: warning: Function parameter or member 'oper_mode' not described in 'rsi_91x_init'
       drivers/net/wireless/rsi/rsi_91x_main.c:287: warning: Excess function parameter 'void' description in 'rsi_91x_init'
      
      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: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20200819072402.3085022-3-lee.jones@linaro.org
      470d48c1
  10. 13 7月, 2020 1 次提交
  11. 14 6月, 2020 1 次提交
    • M
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada 提交于
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
  12. 14 4月, 2020 1 次提交
  13. 13 2月, 2020 1 次提交
  14. 19 12月, 2019 6 次提交
    • J
      rsi_91x_usb: fix interface sanity check · 3139b180
      Johan Hovold 提交于
      Make sure to use the current alternate setting when verifying the
      interface descriptors to avoid binding to an invalid interface.
      
      Failing to do so could cause the driver to misbehave or trigger a WARN()
      in usb_submit_urb() that kernels with panic_on_warn set would choke on.
      
      Fixes: dad0d04f ("rsi: Add RS9113 wireless driver")
      Cc: stable <stable@vger.kernel.org>     # 3.15
      Cc: Fariya Fatima <fariyaf@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      3139b180
    • J
      rsi: add missing endpoint sanity checks · 960da557
      Johan Hovold 提交于
      The driver expects at least one bulk-in endpoint when in "wifi-alone"
      operating mode and two bulk-in endpoints otherwise, and would otherwise
      fail to to submit the corresponding bulk URB to the default pipe during
      probe with a somewhat cryptic message:
      
      	rsi_91x: rsi_rx_urb_submit: Failed in urb submission
      	rsi_91x: rsi_probe: Failed in probe...Exiting
      	RSI-USB WLAN: probe of 2-2.4:1.0 failed with error -8
      
      The current endpoint sanity check looks broken and would only bail out
      early if there was no bulk-in endpoint but at least one bulk-out
      endpoint.
      
      Tighten this check to always require at least one bulk-in and one
      bulk-out endpoint, and add the missing sanity check for a Bluetooth
      bulk-in endpoint when in a BT operating mode. Also make sure to log an
      informative error message when the expected endpoints are missing.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      960da557
    • J
      rsi: fix non-atomic allocation in completion handler · b9b9f9fe
      Johan Hovold 提交于
      USB completion handlers are called in atomic context and must
      specifically not allocate memory using GFP_KERNEL.
      
      Fixes: a1854fae ("rsi: improve RX packet handling in USB interface")
      Cc: stable <stable@vger.kernel.org> # 4.17
      Cc: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      b9b9f9fe
    • J
      rsi: fix memory leak on failed URB submission · 47768297
      Johan Hovold 提交于
      Make sure to free the skb on failed receive-URB submission (e.g. on
      disconnect or currently also due to a missing endpoint).
      
      Fixes: a1854fae ("rsi: improve RX packet handling in USB interface")
      Cc: stable <stable@vger.kernel.org>     # 4.17
      Cc: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      47768297
    • J
      rsi: fix use-after-free on probe errors · 92aafe77
      Johan Hovold 提交于
      The driver would fail to stop the command timer in most error paths,
      something which specifically could lead to the timer being freed while
      still active on I/O errors during probe.
      
      Fix this by making sure that each function starting the timer also stops
      it in all relevant error paths.
      
      Reported-by: syzbot+1d1597a5aa3679c65b9f@syzkaller.appspotmail.com
      Fixes: b78e91bc ("rsi: Add new firmware loading method")
      Cc: stable <stable@vger.kernel.org>     # 4.12
      Cc: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
      Cc: Amitkumar Karwar <amit.karwar@redpinesignals.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      92aafe77
    • J
      rsi: fix use-after-free on failed probe and unbind · e93cd351
      Johan Hovold 提交于
      Make sure to stop both URBs before returning after failed probe as well
      as on disconnect to avoid use-after-free in the completion handler.
      
      Reported-by: syzbot+b563b7f8dbe8223a51e8@syzkaller.appspotmail.com
      Fixes: a4302bff ("rsi: add bluetooth rx endpoint")
      Fixes: dad0d04f ("rsi: Add RS9113 wireless driver")
      Cc: stable <stable@vger.kernel.org>     # 3.15
      Cc: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
      Cc: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
      Cc: Amitkumar Karwar <amit.karwar@redpinesignals.com>
      Cc: Fariya Fatima <fariyaf@gmail.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      e93cd351
  15. 09 10月, 2019 2 次提交
  16. 04 10月, 2019 2 次提交
  17. 01 10月, 2019 1 次提交
  18. 03 9月, 2019 1 次提交
    • H
      rsi: fix a double free bug in rsi_91x_deinit() · 8b51dc72
      Hui Peng 提交于
      `dev` (struct rsi_91x_usbdev *) field of adapter
      (struct rsi_91x_usbdev *) is allocated  and initialized in
      `rsi_init_usb_interface`. If any error is detected in information
      read from the device side,  `rsi_init_usb_interface` will be
      freed. However, in the higher level error handling code in
      `rsi_probe`, if error is detected, `rsi_91x_deinit` is called
      again, in which `dev` will be freed again, resulting double free.
      
      This patch fixes the double free by removing the free operation on
      `dev` in `rsi_init_usb_interface`, because `rsi_91x_deinit` is also
      used in `rsi_disconnect`, in that code path, the `dev` field is not
       (and thus needs to be) freed.
      
      This bug was found in v4.19, but is also present in the latest version
      of kernel. Fixes CVE-2019-15504.
      Reported-by: NHui Peng <benquike@gmail.com>
      Reported-by: NMathias Payer <mathias.payer@nebelwelt.net>
      Signed-off-by: NHui Peng <benquike@gmail.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      8b51dc72