mbox series

[v8,00/14] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips

Message ID 1552450443-351-1-git-send-email-yhchuang@realtek.com (mailing list archive)
Headers show
Series rtw88: mac80211 driver for Realtek 802.11ac wireless network chips | expand

Message

Tony Chuang March 13, 2019, 4:13 a.m. UTC
From: Yan-Hsuan Chuang <yhchuang@realtek.com>

This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
functionalities. The firmware for both can be found at linux-firmware.

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
For RTL8822BE: rtw88/rtw8822b_fw.bin
For RTL8822CE: rtw88/rtw8822c_fw.bin

And for now, only PCI buses (RTL8xxxE) are supported. We will add support
for USB and SDIO in the future. The bus interface abstraction can be seen
in this driver such as hci.h. Most of the hardware setting are the same
except for some TRX path or probing setup should be separated.

Supported:

 * Basic STA/AP/ADHOC mode, and TDLS (STA is well tested)

Missing feature:

 * WOW/PNO
 * USB & SDIO bus (such as RTL8xxxU/RTL8xxxS)
 * BT coexistence (8822B/8822C are combo ICs)
 * Multiple interfaces (for now single STA is better supported)
 * Dynamic hardware calibrations (to improve/stabilize performance)

Potential problems:

 * static calibration spends too much time, and it is painful for
   driver to leave IDLE state. And slows down associate process.
   But reload function are under development, will be added soon!
 * TRX statictics misleading, as we are not reporting status correctly,
   or say, not reporting for "every" packet.


The next patch set should have BT coexistence code since RTL8822B/C are
combo ICs, and the driver for BT can be found after Linux Kernel v4.20.
So it is better to add it first to make WiFi + BT work concurrently.

Although now rtw88 is simple but we are developing more features for it.
Even we want to add support for more chips such as RTL8821C/RTL8814B.

Finally, rtw88 has many authors, listed alphabetically:

Ping-Ke Shih <pkshih@realtek.com>
Tzu-En Huang <tehuang@realtek.com>
Yan-Hsuan Chuang <yhchuang@realtek.com>


v2

 - add comment for watch dog


v3

 - change tree location to wireless-next


v4

 - remove useless "T:" and "W:" lines in MAINTAINERS file, as we don't have
   our own tree and wiki page now
 - rename patch 13 to "add MAINTAINERS entry"
 - use skb_pull to remove tx descriptors before reporting tx status to
   mac80211 stack, otherwise mac80211 tx status will always fail to match
   addr1/addr2 and will finally trigger to disconnect
 - return back to operating channel when we leave IDLE state, as mac80211
   stack expected. If we don't, mac80211 will assume we are already at
   channel 1 and start to scan. And we will never be able to connect to
   APs that are in channel 1. (which is most AP's default channel)
 - wait for async firmware load successfully, otherwise some slower platform
   might start to download firmware before loaded. And system crashes with a
   null pointer accessed.
 - fix typo for mac.h __RTW_MAc_H__ -> __RTW_MAC_H__


v5

 - add rtw_debug_mask for rtw_dbg to control debug messages
 - use dev_printk for rtw_dbg to not depend on CONFIG_DYNAMIC_DEBUG
 - remove useless rtw_pci_parse_configuration
 - keep struct and MODULE_* declaration close
 - use macro instead of ugly struct layout with #ifdef __LITTLE_ENDIAN
 - simplify efuse logical map parsing function
 - remove unused member and whole map dump for efuse
 - reduce some usage of magic number
 - enable DMA sync to avoid pci bus timeout
 - adjust download firmware sequence to avoid DMA error flag honored
 - change download firmware prototype for further use, sometimes we may
   want to download another special purposed firmware
 - move out rtw_send_rsvd_page_h2c, remove the static


v6

 - merge two patchsets
 - removal of staging/rtlwifi as it is conflicting with rtw88


v7

 - resend for missing util.[ch] in v6


v8

 - add prefix "rtw_" to *_rates and corresponding *_sizes, otherwise
   the extern will confuse the linker there are multiple definitions
   with brcmsmac driver


Yan-Hsuan Chuang (14):
  rtw88: main files
  rtw88: core files
  rtw88: hci files
  rtw88: trx files
  rtw88: mac files
  rtw88: fw and efuse files
  rtw88: phy files
  rtw88: debug files
  rtw88: chip files
  rtw88: 8822B init table
  rtw88: 8822C init table
  rtw88: Kconfig & Makefile
  rtw88: add MAINTAINERS entry
  staging: rtlwifi: remove staging rtlwifi driver

 MAINTAINERS                                        |     6 +
 drivers/net/wireless/realtek/Kconfig               |     1 +
 drivers/net/wireless/realtek/Makefile              |     1 +
 drivers/net/wireless/realtek/rtw88/Kconfig         |    55 +
 drivers/net/wireless/realtek/rtw88/Makefile        |    20 +
 drivers/net/wireless/realtek/rtw88/debug.c         |   637 +
 drivers/net/wireless/realtek/rtw88/debug.h         |    52 +
 drivers/net/wireless/realtek/rtw88/efuse.c         |   160 +
 drivers/net/wireless/realtek/rtw88/efuse.h         |    26 +
 drivers/net/wireless/realtek/rtw88/fw.c            |   633 +
 drivers/net/wireless/realtek/rtw88/fw.h            |   222 +
 drivers/net/wireless/realtek/rtw88/hci.h           |   211 +
 drivers/net/wireless/realtek/rtw88/mac.c           |   965 +
 drivers/net/wireless/realtek/rtw88/mac.h           |    35 +
 drivers/net/wireless/realtek/rtw88/mac80211.c      |   481 +
 drivers/net/wireless/realtek/rtw88/main.c          |  1211 ++
 drivers/net/wireless/realtek/rtw88/main.h          |  1104 +
 drivers/net/wireless/realtek/rtw88/pci.c           |  1211 ++
 drivers/net/wireless/realtek/rtw88/pci.h           |   237 +
 drivers/net/wireless/realtek/rtw88/phy.c           |  1724 ++
 drivers/net/wireless/realtek/rtw88/phy.h           |   134 +
 drivers/net/wireless/realtek/rtw88/ps.c            |   166 +
 drivers/net/wireless/realtek/rtw88/ps.h            |    20 +
 drivers/net/wireless/realtek/rtw88/reg.h           |   421 +
 drivers/net/wireless/realtek/rtw88/regd.c          |   391 +
 drivers/net/wireless/realtek/rtw88/regd.h          |    67 +
 drivers/net/wireless/realtek/rtw88/rtw8822b.c      |  1594 ++
 drivers/net/wireless/realtek/rtw88/rtw8822b.h      |   170 +
 .../net/wireless/realtek/rtw88/rtw8822b_table.c    | 20783 +++++++++++++++++++
 .../net/wireless/realtek/rtw88/rtw8822b_table.h    |    18 +
 drivers/net/wireless/realtek/rtw88/rtw8822c.c      |  1890 ++
 drivers/net/wireless/realtek/rtw88/rtw8822c.h      |   186 +
 .../net/wireless/realtek/rtw88/rtw8822c_table.c    | 11753 +++++++++++
 .../net/wireless/realtek/rtw88/rtw8822c_table.h    |    17 +
 drivers/net/wireless/realtek/rtw88/rx.c            |   151 +
 drivers/net/wireless/realtek/rtw88/rx.h            |    41 +
 drivers/net/wireless/realtek/rtw88/sec.c           |   120 +
 drivers/net/wireless/realtek/rtw88/sec.h           |    39 +
 drivers/net/wireless/realtek/rtw88/tx.c            |   367 +
 drivers/net/wireless/realtek/rtw88/tx.h            |    89 +
 drivers/net/wireless/realtek/rtw88/util.c          |    72 +
 drivers/net/wireless/realtek/rtw88/util.h          |    34 +
 drivers/staging/Kconfig                            |     2 -
 drivers/staging/Makefile                           |     1 -
 drivers/staging/rtlwifi/Kconfig                    |    12 -
 drivers/staging/rtlwifi/Makefile                   |    70 -
 drivers/staging/rtlwifi/TODO                       |    11 -
 drivers/staging/rtlwifi/base.c                     |  2815 ---
 drivers/staging/rtlwifi/base.h                     |   175 -
 drivers/staging/rtlwifi/btcoexist/Makefile         |     8 -
 drivers/staging/rtlwifi/btcoexist/halbt_precomp.h  |    74 -
 .../staging/rtlwifi/btcoexist/halbtc8822b1ant.c    |  5233 -----
 .../staging/rtlwifi/btcoexist/halbtc8822b1ant.h    |   433 -
 .../staging/rtlwifi/btcoexist/halbtc8822b2ant.c    |  5210 -----
 .../staging/rtlwifi/btcoexist/halbtc8822b2ant.h    |   487 -
 .../rtlwifi/btcoexist/halbtc8822bwifionly.c        |    54 -
 .../rtlwifi/btcoexist/halbtc8822bwifionly.h        |    24 -
 drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c   |  1837 --
 drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.h   |   791 -
 drivers/staging/rtlwifi/btcoexist/rtl_btc.c        |   517 -
 drivers/staging/rtlwifi/btcoexist/rtl_btc.h        |    64 -
 drivers/staging/rtlwifi/cam.c                      |   315 -
 drivers/staging/rtlwifi/cam.h                      |    39 -
 drivers/staging/rtlwifi/core.c                     |  1996 --
 drivers/staging/rtlwifi/core.h                     |    71 -
 drivers/staging/rtlwifi/debug.c                    |   624 -
 drivers/staging/rtlwifi/debug.h                    |   223 -
 drivers/staging/rtlwifi/efuse.c                    |  1331 --
 drivers/staging/rtlwifi/efuse.h                    |   109 -
 drivers/staging/rtlwifi/halmac/halmac_2_platform.h |    41 -
 .../halmac_88xx/halmac_8822b/halmac_8822b_cfg.h    |   121 -
 .../halmac_88xx/halmac_8822b/halmac_8822b_phy.c    |    95 -
 .../halmac_8822b/halmac_8822b_pwr_seq.c            |   552 -
 .../halmac_8822b/halmac_8822b_pwr_seq.h            |    29 -
 .../halmac_88xx/halmac_8822b/halmac_api_8822b.c    |   332 -
 .../halmac_88xx/halmac_8822b/halmac_api_8822b.h    |    33 -
 .../halmac_8822b/halmac_api_8822b_pcie.c           |   312 -
 .../halmac_8822b/halmac_api_8822b_pcie.h           |    42 -
 .../halmac_8822b/halmac_api_8822b_sdio.c           |   173 -
 .../halmac_8822b/halmac_api_8822b_sdio.h           |    31 -
 .../halmac_8822b/halmac_api_8822b_usb.c            |   174 -
 .../halmac_8822b/halmac_api_8822b_usb.h            |    34 -
 .../halmac_88xx/halmac_8822b/halmac_func_8822b.c   |   403 -
 .../halmac_88xx/halmac_8822b/halmac_func_8822b.h   |    27 -
 .../rtlwifi/halmac/halmac_88xx/halmac_88xx_cfg.h   |   160 -
 .../rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c   |  5970 ------
 .../rtlwifi/halmac/halmac_88xx/halmac_api_88xx.h   |   385 -
 .../halmac/halmac_88xx/halmac_api_88xx_pcie.c      |   318 -
 .../halmac/halmac_88xx/halmac_api_88xx_pcie.h      |    60 -
 .../halmac/halmac_88xx/halmac_api_88xx_sdio.c      |   963 -
 .../halmac/halmac_88xx/halmac_api_88xx_sdio.h      |    73 -
 .../halmac/halmac_88xx/halmac_api_88xx_usb.c       |   543 -
 .../halmac/halmac_88xx/halmac_api_88xx_usb.h       |    62 -
 .../rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c  |  4462 ----
 .../rtlwifi/halmac/halmac_88xx/halmac_func_88xx.h  |   310 -
 drivers/staging/rtlwifi/halmac/halmac_api.c        |   415 -
 drivers/staging/rtlwifi/halmac/halmac_api.h        |    70 -
 drivers/staging/rtlwifi/halmac/halmac_bit2.h       | 13396 ------------
 drivers/staging/rtlwifi/halmac/halmac_bit_8822b.h  | 12092 -----------
 drivers/staging/rtlwifi/halmac/halmac_fw_info.h    |   111 -
 .../rtlwifi/halmac/halmac_fw_offload_c2h_nic.h     |   173 -
 .../rtlwifi/halmac/halmac_fw_offload_h2c_nic.h     |   504 -
 .../rtlwifi/halmac/halmac_h2c_extra_info_nic.h     |   104 -
 .../staging/rtlwifi/halmac/halmac_intf_phy_cmd.h   |    43 -
 .../rtlwifi/halmac/halmac_original_c2h_nic.h       |   392 -
 .../rtlwifi/halmac/halmac_original_h2c_nic.h       |  1000 -
 .../staging/rtlwifi/halmac/halmac_pwr_seq_cmd.h    |   105 -
 drivers/staging/rtlwifi/halmac/halmac_reg2.h       |  1121 -
 drivers/staging/rtlwifi/halmac/halmac_reg_8822b.h  |   717 -
 drivers/staging/rtlwifi/halmac/halmac_rx_bd_chip.h |    37 -
 drivers/staging/rtlwifi/halmac/halmac_rx_bd_nic.h  |    37 -
 .../staging/rtlwifi/halmac/halmac_rx_desc_chip.h   |   107 -
 .../staging/rtlwifi/halmac/halmac_rx_desc_nic.h    |   122 -
 drivers/staging/rtlwifi/halmac/halmac_sdio_reg.h   |    51 -
 drivers/staging/rtlwifi/halmac/halmac_tx_bd_chip.h |   107 -
 drivers/staging/rtlwifi/halmac/halmac_tx_bd_nic.h  |   112 -
 .../staging/rtlwifi/halmac/halmac_tx_desc_chip.h   |   433 -
 .../staging/rtlwifi/halmac/halmac_tx_desc_nic.h    |   495 -
 drivers/staging/rtlwifi/halmac/halmac_type.h       |  1923 --
 drivers/staging/rtlwifi/halmac/halmac_usb_reg.h    |    17 -
 drivers/staging/rtlwifi/halmac/rtl_halmac.c        |  1373 --
 drivers/staging/rtlwifi/halmac/rtl_halmac.h        |    83 -
 drivers/staging/rtlwifi/pci.c                      |  2496 ---
 drivers/staging/rtlwifi/pci.h                      |   318 -
 drivers/staging/rtlwifi/phydm/halphyrf_ce.c        |   954 -
 drivers/staging/rtlwifi/phydm/halphyrf_ce.h        |    74 -
 drivers/staging/rtlwifi/phydm/mp_precomp.h         |    13 -
 drivers/staging/rtlwifi/phydm/phydm.c              |  1975 --
 drivers/staging/rtlwifi/phydm/phydm.h              |   935 -
 drivers/staging/rtlwifi/phydm/phydm_acs.c          |   189 -
 drivers/staging/rtlwifi/phydm/phydm_acs.h          |    46 -
 drivers/staging/rtlwifi/phydm/phydm_adaptivity.c   |   930 -
 drivers/staging/rtlwifi/phydm/phydm_adaptivity.h   |   108 -
 drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c |   616 -
 drivers/staging/rtlwifi/phydm/phydm_adc_sampling.h |    85 -
 drivers/staging/rtlwifi/phydm/phydm_antdiv.c       |    72 -
 drivers/staging/rtlwifi/phydm/phydm_antdiv.h       |   290 -
 drivers/staging/rtlwifi/phydm/phydm_beamforming.h  |    37 -
 drivers/staging/rtlwifi/phydm/phydm_ccx.c          |   447 -
 drivers/staging/rtlwifi/phydm/phydm_ccx.h          |    72 -
 drivers/staging/rtlwifi/phydm/phydm_cfotracking.c  |   332 -
 drivers/staging/rtlwifi/phydm/phydm_cfotracking.h  |    49 -
 drivers/staging/rtlwifi/phydm/phydm_debug.c        |  2888 ---
 drivers/staging/rtlwifi/phydm/phydm_debug.h        |   164 -
 drivers/staging/rtlwifi/phydm/phydm_dfs.h          |    48 -
 drivers/staging/rtlwifi/phydm/phydm_dig.c          |  1521 --
 drivers/staging/rtlwifi/phydm/phydm_dig.h          |   230 -
 .../staging/rtlwifi/phydm/phydm_dynamic_rx_path.h  |    26 -
 .../rtlwifi/phydm/phydm_dynamicbbpowersaving.c     |   118 -
 .../rtlwifi/phydm/phydm_dynamicbbpowersaving.h     |    39 -
 .../staging/rtlwifi/phydm/phydm_dynamictxpower.c   |    91 -
 .../staging/rtlwifi/phydm/phydm_dynamictxpower.h   |    53 -
 .../staging/rtlwifi/phydm/phydm_edcaturbocheck.c   |   128 -
 .../staging/rtlwifi/phydm/phydm_edcaturbocheck.h   |    33 -
 drivers/staging/rtlwifi/phydm/phydm_features.h     |    22 -
 drivers/staging/rtlwifi/phydm/phydm_hwconfig.c     |  1848 --
 drivers/staging/rtlwifi/phydm/phydm_hwconfig.h     |   487 -
 drivers/staging/rtlwifi/phydm/phydm_interface.c    |   307 -
 drivers/staging/rtlwifi/phydm/phydm_interface.h    |   183 -
 drivers/staging/rtlwifi/phydm/phydm_iqk.h          |    65 -
 drivers/staging/rtlwifi/phydm/phydm_kfree.c        |   217 -
 drivers/staging/rtlwifi/phydm/phydm_kfree.h        |    31 -
 drivers/staging/rtlwifi/phydm/phydm_noisemonitor.c |   319 -
 drivers/staging/rtlwifi/phydm/phydm_noisemonitor.h |    35 -
 .../staging/rtlwifi/phydm/phydm_powertracking_ce.c |   633 -
 .../staging/rtlwifi/phydm/phydm_powertracking_ce.h |   282 -
 drivers/staging/rtlwifi/phydm/phydm_pre_define.h   |   602 -
 drivers/staging/rtlwifi/phydm/phydm_precomp.h      |    74 -
 drivers/staging/rtlwifi/phydm/phydm_psd.c          |   406 -
 drivers/staging/rtlwifi/phydm/phydm_psd.h          |    56 -
 drivers/staging/rtlwifi/phydm/phydm_rainfo.c       |  1196 --
 drivers/staging/rtlwifi/phydm/phydm_rainfo.h       |   258 -
 drivers/staging/rtlwifi/phydm/phydm_reg.h          |   140 -
 .../staging/rtlwifi/phydm/phydm_regdefine11ac.h    |    83 -
 drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h |   202 -
 drivers/staging/rtlwifi/phydm/phydm_types.h        |   119 -
 .../rtlwifi/phydm/rtl8822b/halhwimg8822b_bb.c      |  1956 --
 .../rtlwifi/phydm/rtl8822b/halhwimg8822b_bb.h      |    43 -
 .../rtlwifi/phydm/rtl8822b/halhwimg8822b_mac.c     |   211 -
 .../rtlwifi/phydm/rtl8822b/halhwimg8822b_mac.h     |    27 -
 .../rtlwifi/phydm/rtl8822b/halhwimg8822b_rf.c      |  4730 -----
 .../rtlwifi/phydm/rtl8822b/halhwimg8822b_rf.h      |   118 -
 .../rtlwifi/phydm/rtl8822b/halphyrf_8822b.c        |   340 -
 .../rtlwifi/phydm/rtl8822b/halphyrf_8822b.h        |    34 -
 .../rtlwifi/phydm/rtl8822b/phydm_hal_api8822b.c    |  1804 --
 .../rtlwifi/phydm/rtl8822b/phydm_hal_api8822b.h    |    73 -
 .../rtlwifi/phydm/rtl8822b/phydm_iqk_8822b.c       |  1399 --
 .../rtlwifi/phydm/rtl8822b/phydm_iqk_8822b.h       |    37 -
 .../rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c  |   157 -
 .../rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.h  |    43 -
 .../rtlwifi/phydm/rtl8822b/phydm_rtl8822b.c        |   214 -
 .../rtlwifi/phydm/rtl8822b/phydm_rtl8822b.h        |    19 -
 .../rtlwifi/phydm/rtl8822b/version_rtl8822b.h      |    23 -
 drivers/staging/rtlwifi/phydm/rtl_phydm.c          |   863 -
 drivers/staging/rtlwifi/phydm/rtl_phydm.h          |    34 -
 drivers/staging/rtlwifi/phydm/txbf/halcomtxbf.h    |    56 -
 drivers/staging/rtlwifi/phydm/txbf/haltxbf8822b.h  |    28 -
 .../staging/rtlwifi/phydm/txbf/haltxbfinterface.h  |    27 -
 drivers/staging/rtlwifi/phydm/txbf/haltxbfjaguar.h |    25 -
 .../rtlwifi/phydm/txbf/phydm_hal_txbf_api.h        |    30 -
 drivers/staging/rtlwifi/ps.c                       |   996 -
 drivers/staging/rtlwifi/ps.h                       |    39 -
 drivers/staging/rtlwifi/pwrseqcmd.h                |    83 -
 drivers/staging/rtlwifi/rc.c                       |   309 -
 drivers/staging/rtlwifi/rc.h                       |    38 -
 drivers/staging/rtlwifi/regd.c                     |   458 -
 drivers/staging/rtlwifi/regd.h                     |    52 -
 drivers/staging/rtlwifi/rtl8822be/Makefile         |     7 -
 drivers/staging/rtlwifi/rtl8822be/def.h            |    71 -
 drivers/staging/rtlwifi/rtl8822be/fw.c             |   960 -
 drivers/staging/rtlwifi/rtl8822be/fw.h             |   187 -
 drivers/staging/rtlwifi/rtl8822be/hw.c             |  2430 ---
 drivers/staging/rtlwifi/rtl8822be/hw.h             |    55 -
 drivers/staging/rtlwifi/rtl8822be/led.c            |   116 -
 drivers/staging/rtlwifi/rtl8822be/led.h            |    23 -
 drivers/staging/rtlwifi/rtl8822be/phy.c            |  2223 --
 drivers/staging/rtlwifi/rtl8822be/phy.h            |   134 -
 drivers/staging/rtlwifi/rtl8822be/reg.h            |  1642 --
 drivers/staging/rtlwifi/rtl8822be/sw.c             |   470 -
 drivers/staging/rtlwifi/rtl8822be/sw.h             |    21 -
 drivers/staging/rtlwifi/rtl8822be/trx.c            |  1004 -
 drivers/staging/rtlwifi/rtl8822be/trx.h            |   154 -
 drivers/staging/rtlwifi/stats.c                    |   249 -
 drivers/staging/rtlwifi/stats.h                    |    31 -
 drivers/staging/rtlwifi/wifi.h                     |  3362 ---
 225 files changed, 47515 insertions(+), 123718 deletions(-)
 create mode 100644 drivers/net/wireless/realtek/rtw88/Kconfig
 create mode 100644 drivers/net/wireless/realtek/rtw88/Makefile
 create mode 100644 drivers/net/wireless/realtek/rtw88/debug.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/debug.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/efuse.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/efuse.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/fw.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/fw.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/hci.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/mac.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/mac.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/mac80211.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/main.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/main.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/pci.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/pci.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/phy.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/phy.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/ps.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/ps.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/reg.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/regd.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/regd.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822b.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822b.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822b_table.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822b_table.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822c.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822c.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822c_table.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822c_table.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/rx.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/rx.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/sec.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/sec.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/tx.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/tx.h
 create mode 100644 drivers/net/wireless/realtek/rtw88/util.c
 create mode 100644 drivers/net/wireless/realtek/rtw88/util.h
 delete mode 100644 drivers/staging/rtlwifi/Kconfig
 delete mode 100644 drivers/staging/rtlwifi/Makefile
 delete mode 100644 drivers/staging/rtlwifi/TODO
 delete mode 100644 drivers/staging/rtlwifi/base.c
 delete mode 100644 drivers/staging/rtlwifi/base.h
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/Makefile
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbt_precomp.h
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.h
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbtc8822b2ant.c
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbtc8822b2ant.h
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbtc8822bwifionly.c
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbtc8822bwifionly.h
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.h
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/rtl_btc.c
 delete mode 100644 drivers/staging/rtlwifi/btcoexist/rtl_btc.h
 delete mode 100644 drivers/staging/rtlwifi/cam.c
 delete mode 100644 drivers/staging/rtlwifi/cam.h
 delete mode 100644 drivers/staging/rtlwifi/core.c
 delete mode 100644 drivers/staging/rtlwifi/core.h
 delete mode 100644 drivers/staging/rtlwifi/debug.c
 delete mode 100644 drivers/staging/rtlwifi/debug.h
 delete mode 100644 drivers/staging/rtlwifi/efuse.c
 delete mode 100644 drivers/staging/rtlwifi/efuse.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_2_platform.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_8822b_cfg.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_8822b_phy.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_8822b_pwr_seq.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_8822b_pwr_seq.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_pcie.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_pcie.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_func_8822b.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_func_8822b.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_88xx_cfg.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_pcie.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_pcie.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_sdio.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_sdio.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_usb.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_usb.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_api.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_api.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_bit2.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_bit_8822b.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_fw_info.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_fw_offload_c2h_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_fw_offload_h2c_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_h2c_extra_info_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_intf_phy_cmd.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_original_c2h_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_original_h2c_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_pwr_seq_cmd.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_reg2.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_reg_8822b.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_rx_bd_chip.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_rx_bd_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_rx_desc_chip.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_rx_desc_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_sdio_reg.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_tx_bd_chip.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_tx_bd_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_tx_desc_chip.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_tx_desc_nic.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_type.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/halmac_usb_reg.h
 delete mode 100644 drivers/staging/rtlwifi/halmac/rtl_halmac.c
 delete mode 100644 drivers/staging/rtlwifi/halmac/rtl_halmac.h
 delete mode 100644 drivers/staging/rtlwifi/pci.c
 delete mode 100644 drivers/staging/rtlwifi/pci.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/halphyrf_ce.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/halphyrf_ce.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/mp_precomp.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_acs.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_acs.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_adaptivity.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_adaptivity.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_adc_sampling.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_antdiv.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_antdiv.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_beamforming.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_ccx.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_ccx.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_cfotracking.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_cfotracking.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_debug.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_debug.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_dfs.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_dig.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_dig.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_dynamic_rx_path.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_dynamicbbpowersaving.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_dynamicbbpowersaving.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_dynamictxpower.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_dynamictxpower.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_edcaturbocheck.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_edcaturbocheck.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_features.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_interface.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_interface.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_iqk.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_kfree.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_kfree.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_noisemonitor.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_noisemonitor.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_powertracking_ce.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_powertracking_ce.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_pre_define.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_precomp.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_psd.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_psd.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_rainfo.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_rainfo.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_reg.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_regdefine11ac.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/phydm_types.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_bb.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_bb.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_mac.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_mac.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_rf.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_rf.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/halphyrf_8822b.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/halphyrf_8822b.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/phydm_hal_api8822b.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/phydm_hal_api8822b.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/phydm_iqk_8822b.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/phydm_iqk_8822b.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/phydm_regconfig8822b.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/phydm_rtl8822b.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/phydm_rtl8822b.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl8822b/version_rtl8822b.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl_phydm.c
 delete mode 100644 drivers/staging/rtlwifi/phydm/rtl_phydm.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/txbf/halcomtxbf.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/txbf/haltxbf8822b.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/txbf/haltxbfinterface.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/txbf/haltxbfjaguar.h
 delete mode 100644 drivers/staging/rtlwifi/phydm/txbf/phydm_hal_txbf_api.h
 delete mode 100644 drivers/staging/rtlwifi/ps.c
 delete mode 100644 drivers/staging/rtlwifi/ps.h
 delete mode 100644 drivers/staging/rtlwifi/pwrseqcmd.h
 delete mode 100644 drivers/staging/rtlwifi/rc.c
 delete mode 100644 drivers/staging/rtlwifi/rc.h
 delete mode 100644 drivers/staging/rtlwifi/regd.c
 delete mode 100644 drivers/staging/rtlwifi/regd.h
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/Makefile
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/def.h
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/fw.c
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/fw.h
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/hw.c
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/hw.h
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/led.c
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/led.h
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/phy.c
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/phy.h
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/reg.h
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/sw.c
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/sw.h
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/trx.c
 delete mode 100644 drivers/staging/rtlwifi/rtl8822be/trx.h
 delete mode 100644 drivers/staging/rtlwifi/stats.c
 delete mode 100644 drivers/staging/rtlwifi/stats.h
 delete mode 100644 drivers/staging/rtlwifi/wifi.h

Comments

Kalle Valo March 13, 2019, 6:48 a.m. UTC | #1
<yhchuang@realtek.com> writes:

> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>
> This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> functionalities. The firmware for both can be found at linux-firmware.
>

[...]

> v8
>
>  - add prefix "rtw_" to *_rates and corresponding *_sizes, otherwise
>    the extern will confuse the linker there are multiple definitions
>    with brcmsmac driver

I tried to explain this already last time, but maybe I wasn't clear
enough so I'll try again: PLEASE do not submit any new versions of rtw88
until I explicitly ask you to send v9. If you post new versions too
frequently it makes the review harder. Reviewing full driver is very
different from reviewing normal patches, the patches are larger and it
takes more time to review.

Also you did not switch to using GENMASK() like I asked.

So no more new versions of rtw88 until everyone have reviewed v8 and I
ask you to send v9.
Tony Chuang March 13, 2019, 7:06 a.m. UTC | #2
> -----Original Message-----
> From: Kalle Valo [mailto:kvalo@codeaurora.org]
> 
> <yhchuang@realtek.com> writes:
> 
> > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> >
> > This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> > rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> > functionalities. The firmware for both can be found at linux-firmware.
> >
> 
> [...]
> 
> > v8
> >
> >  - add prefix "rtw_" to *_rates and corresponding *_sizes, otherwise
> >    the extern will confuse the linker there are multiple definitions
> >    with brcmsmac driver
> 
> I tried to explain this already last time, but maybe I wasn't clear
> enough so I'll try again: PLEASE do not submit any new versions of rtw88
> until I explicitly ask you to send v9. If you post new versions too
> frequently it makes the review harder. Reviewing full driver is very
> different from reviewing normal patches, the patches are larger and it
> takes more time to review.

Sorry about that. I thought " please fix that in the next version " was asking
me to send the next version. Now I get it, will include these fixes in my tree,
and send v9 until you ask to.

> 
> Also you did not switch to using GENMASK() like I asked.
> 
> So no more new versions of rtw88 until everyone have reviewed v8 and I
> ask you to send v9.
> 
> --
> Kalle Valo


Yan-Hsuan
Kalle Valo March 13, 2019, 7:10 a.m. UTC | #3
Tony Chuang <yhchuang@realtek.com> writes:

>> > v8
>> >
>> >  - add prefix "rtw_" to *_rates and corresponding *_sizes, otherwise
>> >    the extern will confuse the linker there are multiple definitions
>> >    with brcmsmac driver
>> 
>> I tried to explain this already last time, but maybe I wasn't clear
>> enough so I'll try again: PLEASE do not submit any new versions of rtw88
>> until I explicitly ask you to send v9. If you post new versions too
>> frequently it makes the review harder. Reviewing full driver is very
>> different from reviewing normal patches, the patches are larger and it
>> takes more time to review.
>
> Sorry about that. I thought " please fix that in the next version " was asking
> me to send the next version. Now I get it, will include these fixes in my tree,
> and send v9 until you ask to.

Great, thank you.
Kalle Valo March 19, 2019, 9:01 p.m. UTC | #4
<yhchuang@realtek.com> writes:

> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>
> The rtlwifi driver is conflicting with Realtek's new 802.11ac chip
> series driver rtw88, remove it to avoid racing with the same ID.
>
> The rtw88 driver can be found at drivers/net/wireless/realtek/rtw88
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
> ---
>  drivers/staging/Kconfig                            |     2 -
>  drivers/staging/Makefile                           |     1 -
>  drivers/staging/rtlwifi/Kconfig                    |    12 -
>  drivers/staging/rtlwifi/Makefile                   |    70 -
>  drivers/staging/rtlwifi/TODO                       |    11 -
>  drivers/staging/rtlwifi/base.c                     |  2815 ----
>  drivers/staging/rtlwifi/base.h                     |   175 -

[...]

>  drivers/staging/rtlwifi/stats.c                    |   249 -
>  drivers/staging/rtlwifi/stats.h                    |    31 -
>  drivers/staging/rtlwifi/wifi.h                     |  3362 -----
>  183 files changed, 123718 deletions(-)
>  delete mode 100644 drivers/staging/rtlwifi/Kconfig
>  delete mode 100644 drivers/staging/rtlwifi/Makefile
>  delete mode 100644 drivers/staging/rtlwifi/TODO
>  delete mode 100644 drivers/staging/rtlwifi/base.c
>  delete mode 100644 drivers/staging/rtlwifi/base.h

[...]

> --- a/drivers/staging/Kconfig
> +++ b/drivers/staging/Kconfig
> @@ -40,8 +40,6 @@ source "drivers/staging/rtl8712/Kconfig"
>  
>  source "drivers/staging/rtl8188eu/Kconfig"
>  
> -source "drivers/staging/rtlwifi/Kconfig"
> -
>  source "drivers/staging/rts5208/Kconfig"
>  
>  source "drivers/staging/octeon/Kconfig"
> diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
> index 5868631..49e436f 100644
> --- a/drivers/staging/Makefile
> +++ b/drivers/staging/Makefile
> @@ -10,7 +10,6 @@ obj-$(CONFIG_RTL8192E)		+= rtl8192e/
>  obj-$(CONFIG_RTL8723BS)		+= rtl8723bs/
>  obj-$(CONFIG_R8712U)		+= rtl8712/
>  obj-$(CONFIG_R8188EU)		+= rtl8188eu/
> -obj-$(CONFIG_R8822BE)		+= rtlwifi/
>  obj-$(CONFIG_RTS5208)		+= rts5208/
>  obj-$(CONFIG_NETLOGIC_XLR_NET)	+= netlogic/
>  obj-$(CONFIG_OCTEON_ETHERNET)	+= octeon/
> diff --git a/drivers/staging/rtlwifi/Kconfig b/drivers/staging/rtlwifi/Kconfig
> deleted file mode 100644
> index 7b4276f5..0000000
> --- a/drivers/staging/rtlwifi/Kconfig
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -config R8822BE
> -	tristate "Realtek RTL8822BE Wireless Network Adapter"
> -	depends on PCI && MAC80211 && m
> -	select FW_LOADER
> -	---help---
> -	This is the staging driver for Realtek RTL8822BE 802.11ac PCIe
> -	wireless network adapters.
> -
> -config RTLWIFI_DEBUG_ST
> -	bool
> -	depends on R8822BE
> -	default y

This patch is huge and does not make it to the list because of the size.
Is there a way to optimise the size, any ideas? At least 'git
format-patch -M' or '-C' didn't help, just tried that.
Brian Norris March 25, 2019, 2:36 p.m. UTC | #5
Hi,

On Wed, Mar 13, 2019 at 12:13:49PM +0800, yhchuang@realtek.com wrote:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> 
> This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> functionalities. The firmware for both can be found at linux-firmware.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
> For RTL8822BE: rtw88/rtw8822b_fw.bin
> For RTL8822CE: rtw88/rtw8822c_fw.bin

> Potential problems:

>  * TRX statictics misleading, as we are not reporting status correctly,
>    or say, not reporting for "every" packet.

By the way, I see earlier RFC versions had similar comments/questions
from Stanislaw and Kalle that I had too. So at least Kalle didn't have a
great answer either on what to do with hardware where it is inefficient
to get ACK reports for everything :D But least you did add a little bit
of comments this time, and fixed up some of the reporting.

...

> v5

...

>  - use macro instead of ugly struct layout with #ifdef __LITTLE_ENDIAN

BTW, you technically could still use a struct there if you'd like, but
removing the bitfield / __LITTLE_ENDIAN handling was nice, thank you.

>  - simplify efuse logical map parsing function

Much better, thank you!

...

>  - enable DMA sync to avoid pci bus timeout

...

> v8
> 
>  - add prefix "rtw_" to *_rates and corresponding *_sizes, otherwise
>    the extern will confuse the linker there are multiple definitions
>    with brcmsmac driver

I can't say I've closely reviewed every bit of this driver, but I did
tackle significant portions of it. All my comments have been addressed,
apart from one relatively insignificant piece that I re-commented on
this version. So:

Reviewed-by: Brian Norris <briannorris@chromium.org>

I also gave 8822CE some moderate testing, and while I'm sure it's not
perfect, it's at least stable, and it's in much better than when I
tested approximately v2 (as Tony has rolled in a lot of fixes since
then):

Tested-by: Brian Norris <briannorris@chromium.org>
Stanislaw Gruszka March 26, 2019, 7:54 a.m. UTC | #6
On Mon, Mar 25, 2019 at 02:36:11PM +0000, Brian Norris wrote:
> On Wed, Mar 13, 2019 at 12:13:49PM +0800, yhchuang@realtek.com wrote:
> > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> > 
> > This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> > rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> > functionalities. The firmware for both can be found at linux-firmware.
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
> > For RTL8822BE: rtw88/rtw8822b_fw.bin
> > For RTL8822CE: rtw88/rtw8822c_fw.bin
<snip>
> I also gave 8822CE some moderate testing, and while I'm sure it's not
> perfect, it's at least stable, and it's in much better than when I
> tested approximately v2 (as Tony has rolled in a lot of fixes since
> then):
> 
> Tested-by: Brian Norris <briannorris@chromium.org>

I also tested on RTL8822CE we generously got from Tony. I replaced wifi
card on my laptop by the 8822CE device. I have warning on resume from
suspend (see below, it could be mac80211 issue though). But network
connection was established after the warning and in general device
works stable for 2 days now.

Tested-by: Stanislaw Gruszka <sgruszka@redhat.com>

[16158.826873] rtw_pci 0000:02:00.0: start vif 00:e0:4c:09:94:0f on port 0
[16158.827693] ------------[ cut here ]------------
[16158.827694] wlan0: invalid CW_min/CW_max: 0/0
[16158.827722] WARNING: CPU: 0 PID: 8407 at net/mac80211/driver-ops.c:175 drv_conf_tx+0x188/0x190 [mac80211]
[16158.827723] Modules linked in: rtwpci rtw88 mac80211 cfg80211 tun ccm fuse bnep sunrpc arc4 snd_soc_skl snd_soc_core snd_soc_acpi_intel_match snd_hda_codec_hdmi snd_soc_acpi intel_rapl snd_soc_skl_ipc x86_pkg_temp_thermal snd_hda_codec_realtek mei_wdt snd_hda_codec_generic intel_powerclamp snd_soc_sst_ipc iTCO_wdt iTCO_vendor_support snd_soc_sst_dsp coretemp snd_hda_ext_core wmi_bmof intel_cstate uvcvideo intel_uncore btusb intel_wmi_thunderbolt videobuf2_vmalloc intel_rapl_perf snd_hda_intel btrtl videobuf2_memops btbcm btintel snd_hda_codec videobuf2_v4l2 bluetooth snd_hwdep videobuf2_common joydev snd_hda_core videodev media snd_seq snd_seq_device ecdh_generic snd_pcm mei_me mei ucsi_acpi idma64 typec_ucsi i2c_i801 typec intel_lpss_pci snd_timer intel_lpss intel_pch_thermal processor_thermal_device intel_soc_dts_iosf wmi thinkpad_acpi ledtrig_audio snd soundcore rfkill int3403_thermal int340x_thermal_zone acpi_pad int3400_thermal acpi_thermal_rel pcc_cpufreq uas usb_sto
 rage crc32c_intel
[16158.827744]  i915 nvme i2c_algo_bit drm_kms_helper serio_raw e1000e nvme_core drm video ipv6 [last unloaded: cfg80211]
[16158.827748] CPU: 0 PID: 8407 Comm: kworker/u16:34 Tainted: G        W         5.0.0-rc7+ #11
[16158.827749] Hardware name: LENOVO 20KGS23S0P/20KGS23S0P, BIOS N23ET55W (1.30 ) 08/31/2018
[16158.827752] Workqueue: events_unbound async_run_entry_fn
[16158.827762] RIP: 0010:drv_conf_tx+0x188/0x190 [mac80211]
[16158.827763] Code: ff ff ff e9 ea fe ff ff 41 0f b7 4e 04 0f b7 d0 48 8d b3 60 04 00 00 48 c7 c7 10 a6 e7 c0 c6 05 63 3e 0b 00 01 e8 92 30 2c f9 <0f> 0b e9 c1 fe ff ff 90 0f 1f 44 00 00 41 54 49 89 fc 55 53 48 89
[16158.827763] RSP: 0018:ffff8e4c8a643d48 EFLAGS: 00010296
[16158.827764] RAX: 0000000000000021 RBX: ffff8e4c8a1ce880 RCX: 0000000000000006
[16158.827765] RDX: 0000000000000007 RSI: 0000000000000096 RDI: ffff8e4c8e6168c0
[16158.827765] RBP: 00000000ffffffea R08: 0000000000000a15 R09: 0000000000000003
[16158.827766] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8e4c765e87c0
[16158.827766] R13: 0000000000000000 R14: ffff8e4c8a1cee10 R15: ffff8e4c765e8d78
[16158.827767] FS:  0000000000000000(0000) GS:ffff8e4c8e600000(0000) knlGS:0000000000000000
[16158.827768] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[16158.827768] CR2: 00007fed80de2e38 CR3: 000000027320e002 CR4: 00000000003606f0
[16158.827769] Call Trace:
[16158.827782]  ieee80211_reconfig+0x58f/0x1420 [mac80211]
[16158.827784]  ? enqueue_entity+0xf6/0x660
[16158.827798]  wiphy_resume+0x7f/0x120 [cfg80211]
[16158.827805]  ? wiphy_suspend+0x270/0x270 [cfg80211]
[16158.827807]  dpm_run_callback+0x59/0x150
[16158.827809]  device_resume+0xac/0x1f0
[16158.827810]  async_resume+0x19/0x30
[16158.827811]  async_run_entry_fn+0x39/0x160
[16158.827813]  process_one_work+0x1a1/0x3a0
[16158.827814]  worker_thread+0x30/0x380
[16158.827815]  ? pwq_unbound_release_workfn+0xd0/0xd0
[16158.827816]  kthread+0x112/0x130
[16158.827818]  ? kthread_create_on_node+0x40/0x40
[16158.827820]  ret_from_fork+0x35/0x40
[16158.827821] ---[ end trace cc6c13e7f9e63472 ]---

Stanislaw
Brian Norris March 26, 2019, 3:43 p.m. UTC | #7
On Tue, Mar 26, 2019 at 12:54 AM Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> I also tested on RTL8822CE we generously got from Tony. I replaced wifi
> card on my laptop by the 8822CE device. I have warning on resume from
> suspend (see below, it could be mac80211 issue though). But network
> connection was established after the warning and in general device
> works stable for 2 days now.
>
> Tested-by: Stanislaw Gruszka <sgruszka@redhat.com>
>
> [16158.826873] rtw_pci 0000:02:00.0: start vif 00:e0:4c:09:94:0f on port 0
> [16158.827693] ------------[ cut here ]------------
> [16158.827694] wlan0: invalid CW_min/CW_max: 0/0

I didn't test system suspend/resume with this driver yet (oops), but
FWIW I've seen reports of this warning on every other mac80211 driver
I've supported. I don't think we've ever totally resolved them and I
haven't looked closely into the reason for the WARNING.

Brian
Tony Chuang March 27, 2019, 4:59 a.m. UTC | #8
> 
> On Tue, Mar 26, 2019 at 12:54 AM Stanislaw Gruszka <sgruszka@redhat.com>
> wrote:
> > I also tested on RTL8822CE we generously got from Tony. I replaced wifi
> > card on my laptop by the 8822CE device. I have warning on resume from
> > suspend (see below, it could be mac80211 issue though). But network
> > connection was established after the warning and in general device
> > works stable for 2 days now.
> >
> > Tested-by: Stanislaw Gruszka <sgruszka@redhat.com>
> >
> > [16158.826873] rtw_pci 0000:02:00.0: start vif 00:e0:4c:09:94:0f on port 0
> > [16158.827693] ------------[ cut here ]------------
> > [16158.827694] wlan0: invalid CW_min/CW_max: 0/0
> 
> I didn't test system suspend/resume with this driver yet (oops), but
> FWIW I've seen reports of this warning on every other mac80211 driver
> I've supported. I don't think we've ever totally resolved them and I
> haven't looked closely into the reason for the WARNING.
> 
> Brian
> 

And we haven't submit patches related to suspend yet.
Like something in CONFIG_PM.
Should be added later.

Yan-Hsuan
Stanislaw Gruszka March 27, 2019, 10:26 a.m. UTC | #9
On Wed, Mar 27, 2019 at 04:59:44AM +0000, Tony Chuang wrote:
> > > I also tested on RTL8822CE we generously got from Tony. I replaced wifi
> > > card on my laptop by the 8822CE device. I have warning on resume from
> > > suspend (see below, it could be mac80211 issue though). But network
> > > connection was established after the warning and in general device
> > > works stable for 2 days now.
> > >
> > > Tested-by: Stanislaw Gruszka <sgruszka@redhat.com>
> > >
> > > [16158.826873] rtw_pci 0000:02:00.0: start vif 00:e0:4c:09:94:0f on port 0
> > > [16158.827693] ------------[ cut here ]------------
> > > [16158.827694] wlan0: invalid CW_min/CW_max: 0/0
> > 
> > I didn't test system suspend/resume with this driver yet (oops), but
> > FWIW I've seen reports of this warning on every other mac80211 driver
> > I've supported. I don't think we've ever totally resolved them and I
> > haven't looked closely into the reason for the WARNING.

It looks as mac80211 issue for me as well.

> And we haven't submit patches related to suspend yet.
> Like something in CONFIG_PM.
> Should be added later.

Suspend/resume works for me anyway :-)

Stanislaw
Tony Chuang April 8, 2019, 2:14 a.m. UTC | #10
Hi Kalle

> From: Stanislaw Gruszka [mailto:sgruszka@redhat.com]
> Sent: Wednesday, March 27, 2019 6:26 PM
> To: Tony Chuang
> Cc: Brian Norris; Kalle Valo; Johannes Berg; linux-wireless; Greg Kroah-Hartman;
> Pkshih; Andy Huang; Larry Finger
> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek 802.11ac
> wireless network chips
> 

It's just a gentle reply to ask if rtw88 is getting merged.
Are you still reviewing or is there anything I can help.
Thanks!

Yan-Hsuan
Kalle Valo April 8, 2019, 11:33 a.m. UTC | #11
Tony Chuang <yhchuang@realtek.com> writes:

> Hi Kalle
>
>> From: Stanislaw Gruszka [mailto:sgruszka@redhat.com]
>> Sent: Wednesday, March 27, 2019 6:26 PM
>> To: Tony Chuang
>> Cc: Brian Norris; Kalle Valo; Johannes Berg; linux-wireless; Greg Kroah-Hartman;
>> Pkshih; Andy Huang; Larry Finger
>> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek 802.11ac
>> wireless network chips
>> 
>
> It's just a gentle reply to ask if rtw88 is getting merged.
> Are you still reviewing or is there anything I can help.

I just have been busy with other stuff, sorry. I'll try find time for
this soon.
Tony Chuang April 9, 2019, 10:12 a.m. UTC | #12
> From: Kalle Valo [mailto:kvalo@codeaurora.org]
> Sent: Monday, April 08, 2019 7:33 PM
> To: Tony Chuang
> Cc: Brian Norris; Johannes Berg; linux-wireless; Greg Kroah-Hartman; Pkshih;
> Andy Huang; Larry Finger; Stanislaw Gruszka
> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek 802.11ac
> wireless network chips
> 
> Tony Chuang <yhchuang@realtek.com> writes:
> 
> > Hi Kalle
> >
> >> From: Stanislaw Gruszka [mailto:sgruszka@redhat.com]
> >> Sent: Wednesday, March 27, 2019 6:26 PM
> >> To: Tony Chuang
> >> Cc: Brian Norris; Kalle Valo; Johannes Berg; linux-wireless; Greg
> Kroah-Hartman;
> >> Pkshih; Andy Huang; Larry Finger
> >> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek 802.11ac
> >> wireless network chips
> >>
> >
> > It's just a gentle reply to ask if rtw88 is getting merged.
> > Are you still reviewing or is there anything I can help.
> 
> I just have been busy with other stuff, sorry. I'll try find time for
> this soon.
> 

It's OK. If you need any help just let me know. :)

BTW, I want to change the license from GPL to Dual BSD/GPL.
Would you want to change them in the initial patch set, or I send a separate
one after it got merged?

Yan-Hsuan
Kalle Valo April 18, 2019, 1:55 p.m. UTC | #13
Tony Chuang <yhchuang@realtek.com> writes:

>> From: Kalle Valo [mailto:kvalo@codeaurora.org]
>> Sent: Monday, April 08, 2019 7:33 PM
>> To: Tony Chuang
>> Cc: Brian Norris; Johannes Berg; linux-wireless; Greg Kroah-Hartman; Pkshih;
>> Andy Huang; Larry Finger; Stanislaw Gruszka
>> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek 802.11ac
>> wireless network chips
>> 
>> Tony Chuang <yhchuang@realtek.com> writes:
>> 
>> > Hi Kalle
>> >
>> >> From: Stanislaw Gruszka [mailto:sgruszka@redhat.com]
>> >> Sent: Wednesday, March 27, 2019 6:26 PM
>> >> To: Tony Chuang
>> >> Cc: Brian Norris; Kalle Valo; Johannes Berg; linux-wireless; Greg
>> Kroah-Hartman;
>> >> Pkshih; Andy Huang; Larry Finger
>> >> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek 802.11ac
>> >> wireless network chips
>> >>
>> >
>> > It's just a gentle reply to ask if rtw88 is getting merged.
>> > Are you still reviewing or is there anything I can help.
>> 
>> I just have been busy with other stuff, sorry. I'll try find time for
>> this soon.
>> 
>
> It's OK. If you need any help just let me know. :)

Sorry, still haven't been able to review the driver. But something what
I found strange was "default y" in Kconfig, is that really necessary?

> BTW, I want to change the license from GPL to Dual BSD/GPL.
> Would you want to change them in the initial patch set, or I send a separate
> one after it got merged?

Please submit a new version with the new license. But don't any other
changes than change the license and possibly remove the default line in
Kconfig.
Tony Chuang April 19, 2019, 8:23 a.m. UTC | #14
> -----Original Message-----
> From: Kalle Valo [mailto:kvalo@codeaurora.org]
> Sent: Thursday, April 18, 2019 9:56 PM
> To: Tony Chuang
> Cc: Brian Norris; Johannes Berg; linux-wireless; Greg Kroah-Hartman; Pkshih;
> Andy Huang; Larry Finger; Stanislaw Gruszka
> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek 802.11ac
> wireless network chips
> 
> Tony Chuang <yhchuang@realtek.com> writes:
> 
> >> From: Kalle Valo [mailto:kvalo@codeaurora.org]
> >> Sent: Monday, April 08, 2019 7:33 PM
> >> To: Tony Chuang
> >> Cc: Brian Norris; Johannes Berg; linux-wireless; Greg Kroah-Hartman; Pkshih;
> >> Andy Huang; Larry Finger; Stanislaw Gruszka
> >> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek 802.11ac
> >> wireless network chips
> >>
> >> Tony Chuang <yhchuang@realtek.com> writes:
> >>
> >> > Hi Kalle
> >> >
> >> >> From: Stanislaw Gruszka [mailto:sgruszka@redhat.com]
> >> >> Sent: Wednesday, March 27, 2019 6:26 PM
> >> >> To: Tony Chuang
> >> >> Cc: Brian Norris; Kalle Valo; Johannes Berg; linux-wireless; Greg
> >> Kroah-Hartman;
> >> >> Pkshih; Andy Huang; Larry Finger
> >> >> Subject: Re: [PATCH v8 00/14] rtw88: mac80211 driver for Realtek
> 802.11ac
> >> >> wireless network chips
> >> >>
> >> >
> >> > It's just a gentle reply to ask if rtw88 is getting merged.
> >> > Are you still reviewing or is there anything I can help.
> >>
> >> I just have been busy with other stuff, sorry. I'll try find time for
> >> this soon.
> >>
> >
> > It's OK. If you need any help just let me know. :)
> 
> Sorry, still haven't been able to review the driver. But something what
> I found strange was "default y" in Kconfig, is that really necessary?
> 
> > BTW, I want to change the license from GPL to Dual BSD/GPL.
> > Would you want to change them in the initial patch set, or I send a separate
> > one after it got merged?
> 
> Please submit a new version with the new license. But don't any other
> changes than change the license and possibly remove the default line in
> Kconfig.
> 

Hi Kalle,

I have sent PATCH v9 with license change and remove default y.
But for somehow reason the patches did not reach linux-wireless.
So I can not see them appear on the patchwork.
I do not know if there is anything wrong, should I resend?

I am sure I've CCed linux-wireless, just checked by Ping-Ke.

Yan-Hsuan
Brian Norris April 19, 2019, 9:01 p.m. UTC | #15
On Fri, Apr 19, 2019 at 1:23 AM Tony Chuang <yhchuang@realtek.com> wrote:
> > -----Original Message-----
> > From: Kalle Valo [mailto:kvalo@codeaurora.org]
> > Please submit a new version with the new license. But don't any other
> > changes than change the license and possibly remove the default line in
> > Kconfig.
> >
>
> Hi Kalle,
>
> I have sent PATCH v9 with license change and remove default y.
> But for somehow reason the patches did not reach linux-wireless.
> So I can not see them appear on the patchwork.
> I do not know if there is anything wrong, should I resend?
>
> I am sure I've CCed linux-wireless, just checked by Ping-Ke.

Checking with people who were CC'd is not a good choice -- that
circumvents the mailing list.

I didn't see it on Patchwork at first either, but now it's mostly there:

https://patchwork.kernel.org/cover/10909117/

Also on the kernel.org archive:

https://lkml.kernel.org/linux-wireless/1555653004-1795-1-git-send-email-yhchuang@realtek.com/

Maybe it was just delayed. Patch 14 is also still missing though.

Brian