Skip to content
  1. Nov 15, 2019
  2. Nov 14, 2019
  3. Nov 08, 2019
  4. Nov 07, 2019
    • Yan-Hsuan Chuang's avatar
      rtw88: fix potential NULL pointer access for firmware · f530c196
      Yan-Hsuan Chuang authored
      Driver could access a NULL firmware pointer if we don't
      return here.
      
      Fixes: 5195b904
      
       ("rtw88: avoid FW info flood")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarYan-Hsuan Chuang <yhchuang@realtek.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      f530c196
    • Ping-Ke Shih's avatar
      rtlwifi: fix memory leak in rtl92c_set_fw_rsvdpagepkt() · 5174f1e4
      Ping-Ke Shih authored
      
      
      This leak was found by testing the EDIMAX EW-7612 on Raspberry Pi 3B+ with
      Linux 5.4-rc5 (multi_v7_defconfig + rtlwifi + kmemleak) and noticed a
      single memory leak during probe:
      
      unreferenced object 0xec13ee40 (size 176):
        comm "kworker/u8:1", pid 36, jiffies 4294939321 (age 5580.790s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<fc1bbb3e>] __netdev_alloc_skb+0x9c/0x164
          [<863dfa6e>] rtl92c_set_fw_rsvdpagepkt+0x254/0x340 [rtl8192c_common]
          [<9572be0d>] rtl92cu_set_hw_reg+0xf48/0xfa4 [rtl8192cu]
          [<116df4d8>] rtl_op_bss_info_changed+0x234/0x96c [rtlwifi]
          [<8933575f>] ieee80211_bss_info_change_notify+0xb8/0x264 [mac80211]
          [<d4061e86>] ieee80211_assoc_success+0x934/0x1798 [mac80211]
          [<e55adb56>] ieee80211_rx_mgmt_assoc_resp+0x174/0x314 [mac80211]
          [<5974629e>] ieee80211_sta_rx_queued_mgmt+0x3f4/0x7f0 [mac80211]
          [<d91091c6>] ieee80211_iface_work+0x208/0x318 [mac80211]
          [<ac5fcae4>] process_one_work+0x22c/0x564
          [<f5e6d3b6>] worker_thread+0x44/0x5d8
          [<82c7b073>] kthread+0x150/0x154
          [<b43e1b7d>] ret_from_fork+0x14/0x2c
          [<794dff30>] 0x0
      
      It is because 8192cu doesn't implement usb_cmd_send_packet(), and this
      patch just frees the skb within the function to resolve memleak problem
      by now. Since 8192cu doesn't turn on fwctrl_lps that needs to download
      command packet for firmware via the function, applying this patch doesn't
      affect driver behavior.
      
      Reported-by: default avatarStefan Wahren <wahrenst@gmx.net>
      Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      5174f1e4
    • Daniel Golle's avatar
      rt2800: remove errornous duplicate condition · a1f7c2ca
      Daniel Golle authored
      On 2019-10-28 06:07, wbob wrote:
      > Hello Roman,
      >
      > while reading around drivers/net/wireless/ralink/rt2x00/rt2800lib.c
      > I stumbled on what I think is an edit of yours made in error in march
      > 2017:
      >
      > https://github.com/torvalds/linux/commit/41977e86#diff-dae5dc10da180f3b055809a48118e18aR5281
      >
      > RT6352 in line 5281 should not have been introduced as the "else if"
      > below line 5291 can then not take effect for a RT6352 device. Another
      > possibility is for line 5291 to be not for RT6352, but this seems
      > very unlikely. Are you able to clarify still after this substantial time?
      >
      > 5277: static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
      > ...
      > 5279:  } else if (rt2x00_rt(rt2x00dev, RT5390) ||
      > 5280:         rt2x00_rt(rt2x00dev, RT5392) ||
      > 5281:         rt2x00_rt(rt2x00dev, RT6352)) {
      > ...
      > 5291:  } else if (rt2x00_rt(rt2x00dev, RT6352)) {
      > ...
      
      Hence remove errornous line 5281 to make the driver actually
      execute the correct initialization routine for MT7620 chips.
      
      As it was requested by Stanislaw Gruszka remove setting values of
      MIMO_PS_CFG and TX_PIN_CFG. MIMO_PS_CFG is responsible for MIMO
      power-safe mode (which is disabled), hence we can drop setting it.
      TX_PIN_CFG is set correctly in other functions, and as setting this
      value breaks some devices, rather don't set it here during init, but
      only modify it later on.
      
      Fixes: 41977e86
      
       ("rt2x00: add support for MT7620")
      Reported-by: default avatarwbob <wbob@jify.de>
      Reported-by: default avatarRoman Yeryomin <roman@advem.lv>
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      Acked-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      a1f7c2ca
    • YueHaibing's avatar
      rtlwifi: rtl8225se: remove some unused const variables · a3a03716
      YueHaibing authored
      
      
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:83:17: warning: 'rtl8225sez2_tx_power_cck' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:79:17: warning: 'rtl8225sez2_tx_power_cck_A' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:75:17: warning: 'rtl8225sez2_tx_power_cck_B' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:71:17: warning: 'rtl8225sez2_tx_power_cck_ch14' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:62:17: warning: 'rtl8225se_tx_power_ofdm' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:53:17: warning: 'rtl8225se_tx_power_cck_ch14' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:44:17: warning: 'rtl8225se_tx_power_cck' defined but not used [-Wunused-const-variable=]
      drivers/net/wireless//realtek/rtl818x/rtl8180/rtl8225se.c:40:17: warning: 'rtl8225se_tx_gain_cck_ofdm' defined but not used [-Wunused-const-variable=]
      
      They are never used, so can be removed.
      
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      a3a03716
    • YueHaibing's avatar
      brcmsmac: remove set but not used variables · 55653311
      YueHaibing authored
      
      
      drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:841:7: warning: variable free_pdu set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:842:30: warning: variable tx_rts_count set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:842:6: warning: variable tx_rts set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:843:7: warning: variable totlen set but not used [-Wunused-but-set-variable]
      
      They are never used, so can be removed.
      
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      55653311
    • Yan-Hsuan Chuang's avatar
      rtw88: raise LPS threshold to 50, for less power consumption · bf9840cc
      Yan-Hsuan Chuang authored
      
      
      The LPS threshold was set to 2, means driver will leave LPS
      mode if there is more than 2 frames TX/RX for every 2 seconds.
      This makes driver enter/leave LPS frequently even if we just
      "ping -i1" to the others.
      
      Apparently we do not want to leave LPS mode if there is only
      some background traffics or web surfing. By experiment, set
      this to 50 is a more reasonable value to lower the over all
      power consumption.
      
      Signed-off-by: default avatarYan-Hsuan Chuang <yhchuang@realtek.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      bf9840cc
    • zhong jiang's avatar
      iwlegacy: Remove redundant variable "ret" · ea7ad5f1
      zhong jiang authored
      
      
      local variable "ret" is not used. hence it is safe to remove and
      just return 0.
      
      Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      ea7ad5f1
    • zhong jiang's avatar
      ipw2x00: Remove redundant variable "rc" · e3108132
      zhong jiang authored
      
      
      local variable "rc" is not used. It is safe to remove and
      There is only one caller of libipw_qos_convert_ac_to_parameters().
      hence make it void
      
      Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      e3108132
    • Kalle Valo's avatar
      Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git · 83e3a672
      Kalle Valo authored
      ath.git patches for 5.5. Major changes:
      
      wil6210
      
      * add SPDX license identifiers
      83e3a672
  5. Nov 06, 2019
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-2019-11-05' of... · a3ead21d
      David S. Miller authored
      
      Merge tag 'wireless-drivers-next-2019-11-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers-next patches for 5.5
      
      First set of patches for 5.5. The most active driver here clearly is
      rtw88, lots of patches for it. More quiet on other drivers, smaller
      fixes and cleanups all over.
      
      This pull request also has a trivial conflict, the report and example
      resolution here:
      
      https://lkml.kernel.org/r/20191031111242.50ab1eca@canb.auug.org.au
      
      Major changes:
      
      rtw88
      
      * add deep power save support
      
      * add mac80211 software tx queue (wake_tx_queue) support
      
      * enable hardware rate control
      
      * add TX-AMSDU support
      
      * add NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 support
      
      * add power tracking support
      
      * add 802.11ac beamformee support
      
      * add set_bitrate_mask support
      
      * add phy_info debugfs to show Tx/Rx physical status
      
      * add RFE type 3 support for 8822b
      
      ath10k
      
      * add support for hardware rfkill on devices where firmware supports it
      
      rtl8xxxu
      
      * add bluetooth co-existence support for single antenna
      
      iwlwifi
      
      * Revamp the debugging infrastructure
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a3ead21d
    • David S. Miller's avatar
      Merge tag 'batadv-next-for-davem-20191105' of git://git.open-mesh.org/linux-merge · d673f563
      David S. Miller authored
      
      
      Simon Wunderlich says:
      
      ====================
      This feature/cleanup patchset includes the following patches:
      
       - bump version strings, by Simon Wunderlich
      
       - Simplify batadv_v_ogm_aggr_list_free using skb_queue_purge,
         by Christophe Jaillet
      
       - Replace aggr_list_lock with lock free skb handlers,
         by Christophe Jaillet
      
       - explicitly mark fallthrough cases, by Sven Eckelmann
      
       - Drop lockdep.h include from soft-interface.c, by Sven Eckelmann
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d673f563
    • Kai-Heng Feng's avatar
      r8152: Add macpassthru support for ThinkPad Thunderbolt 3 Dock Gen 2 · 9647722b
      Kai-Heng Feng authored
      
      
      ThinkPad Thunderbolt 3 Dock Gen 2 is another docking station that uses
      RTL8153 based USB ethernet.
      
      The device supports macpassthru, but it failed to pass the test of -AD,
      -BND and -BD. Simply bypass these tests since the device supports this
      feature just fine.
      
      Also the ACPI objects have some differences between Dell's and Lenovo's,
      so make those ACPI infos no longer hardcoded.
      
      BugLink: https://bugs.launchpad.net/bugs/1827961
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Acked-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9647722b
    • Vishal Kulkarni's avatar
      cxgb4: Add pci reset handler · 86e8f298
      Vishal Kulkarni authored
      
      
      This patch implements reset_prepare and reset_done, which are used
      for handling FLR.
      
      Signed-off-by: default avatarVishal Kulkarni <vishal@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86e8f298