rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
Subsystems (2)
v9 cover rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
From: Yan-Hsuan Chuang <[email protected]>
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 <[email protected]>
Tzu-En Huang <[email protected]>
Yan-Hsuan Chuang <[email protected]>
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
v9
- modify license to Dual BSD/GPL
- remove "default y" in Kconfig
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 | 54 + 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, 47514 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
Signature · 1 line
2.7.4
PATCH v9 1/14 rtw88: main files
From: Yan-Hsuan Chuang <[email protected]>
main files for Realtek 802.11ac wireless network chips
--- 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/reg.h | 421 +++++++++ drivers/net/wireless/realtek/rtw88/util.c | 72 ++ drivers/net/wireless/realtek/rtw88/util.h | 34 + 6 files changed, 3323 insertions(+) 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/reg.h create mode 100644 drivers/net/wireless/realtek/rtw88/util.c create mode 100644 drivers/net/wireless/realtek/rtw88/util.h
drivers/net/wireless/realtek/rtw88/mac80211.c new file +481 -0
@@ -0,0 +1,481 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include "main.h" +#include "sec.h" +#include "tx.h" +#include "fw.h" +#include "mac.h" +#include "ps.h" +#include "reg.h" +#include "debug.h" + +static void rtw_ops_tx (struct ieee80211_hw *hw, +struct ieee80211_tx_control *control, +struct sk_buff *skb) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_tx_pkt_info pkt_info = {0 }; + +if (!rtw_flag_check (rtwdev,RTW_FLAG_RUNNING )) + goto out; + +rtw_tx_pkt_info_update (rtwdev, &pkt_info, control, skb); +if (rtw_hci_tx (rtwdev, &pkt_info, skb)) + goto out; + +return ; + +out: +ieee80211_free_txskb (hw, skb); +} + +static int rtw_ops_start (struct ieee80211_hw *hw) +{ +struct rtw_dev *rtwdev = hw->priv; +int ret; + +mutex_lock (&rtwdev->mutex); + ret =rtw_core_start (rtwdev); +mutex_unlock (&rtwdev->mutex); + +return ret; +} + +static void rtw_ops_stop (struct ieee80211_hw *hw) +{ +struct rtw_dev *rtwdev = hw->priv; + +mutex_lock (&rtwdev->mutex); +rtw_core_stop (rtwdev); +mutex_unlock (&rtwdev->mutex); +} + +static int rtw_ops_config (struct ieee80211_hw *hw,u32 changed) +{ +struct rtw_dev *rtwdev = hw->priv; +int ret =0 ; + +mutex_lock (&rtwdev->mutex); + +if (changed &IEEE80211_CONF_CHANGE_IDLE ) { +if (hw->conf.flags &IEEE80211_CONF_IDLE ) { +rtw_enter_ips (rtwdev); + }else { + ret =rtw_leave_ips (rtwdev); +if (ret) { +rtw_err (rtwdev,"failed to leave idle state\n" ); + goto out; + } + } + } + +if (changed &IEEE80211_CONF_CHANGE_CHANNEL ) +rtw_set_channel (rtwdev); + +out: +mutex_unlock (&rtwdev->mutex); +return ret; +} + +static const struct rtw_vif_port rtw_vif_port[] = { + [0 ] = { + .mac_addr = {.addr =0x0610 }, + .bssid = {.addr =0x0618 }, + .net_type = {.addr =0x0100 , .mask =0x30000 }, + .aid = {.addr =0x06a8 , .mask =0x7ff }, + }, + [1 ] = { + .mac_addr = {.addr =0x0700 }, + .bssid = {.addr =0x0708 }, + .net_type = {.addr =0x0100 , .mask =0xc0000 }, + .aid = {.addr =0x0710 , .mask =0x7ff }, + }, + [2 ] = { + .mac_addr = {.addr =0x1620 }, + .bssid = {.addr =0x1628 }, + .net_type = {.addr =0x1100 , .mask =0x3 }, + .aid = {.addr =0x1600 , .mask =0x7ff }, + }, + [3 ] = { + .mac_addr = {.addr =0x1630 }, + .bssid = {.addr =0x1638 }, + .net_type = {.addr =0x1100 , .mask =0xc }, + .aid = {.addr =0x1604 , .mask =0x7ff }, + }, + [4 ] = { + .mac_addr = {.addr =0x1640 }, + .bssid = {.addr =0x1648 }, + .net_type = {.addr =0x1100 , .mask =0x30 }, + .aid = {.addr =0x1608 , .mask =0x7ff }, + }, +}; + +static int rtw_ops_add_interface (struct ieee80211_hw *hw, +struct ieee80211_vif *vif) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_vif *rtwvif = (struct rtw_vif *)vif->drv_priv; +enum rtw_net_type net_type; +u32 config =0 ; +u8 port =0 ; + + rtwvif->port = port; + rtwvif->vif = vif; + rtwvif->stats.tx_unicast =0 ; + rtwvif->stats.rx_unicast =0 ; + rtwvif->stats.tx_cnt =0 ; + rtwvif->stats.rx_cnt =0 ; + rtwvif->in_lps = false; + rtwvif->conf = &rtw_vif_port[port]; + +mutex_lock (&rtwdev->mutex); + +switch (vif->type) { +case NL80211_IFTYPE_AP : +case NL80211_IFTYPE_MESH_POINT : + net_type =RTW_NET_AP_MODE ; +break ; +case NL80211_IFTYPE_ADHOC : + net_type =RTW_NET_AD_HOC ; +break ; +case NL80211_IFTYPE_STATION : +default : + net_type =RTW_NET_NO_LINK ; +break ; + } + +ether_addr_copy (rtwvif->mac_addr, vif->addr); + config |=PORT_SET_MAC_ADDR ; + rtwvif->net_type = net_type; + config |=PORT_SET_NET_TYPE ; +rtw_vif_port_config (rtwdev, rtwvif, config); + +mutex_unlock (&rtwdev->mutex); + +rtw_info (rtwdev,"start vif %pM on port %d\n" , vif->addr, rtwvif->port); +return 0 ; +} + +static void rtw_ops_remove_interface (struct ieee80211_hw *hw, +struct ieee80211_vif *vif) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_vif *rtwvif = (struct rtw_vif *)vif->drv_priv; +u32 config =0 ; + +rtw_info (rtwdev,"stop vif %pM on port %d\n" , vif->addr, rtwvif->port); + +mutex_lock (&rtwdev->mutex); + +eth_zero_addr (rtwvif->mac_addr); + config |=PORT_SET_MAC_ADDR ; + rtwvif->net_type =RTW_NET_NO_LINK ; + config |=PORT_SET_NET_TYPE ; +rtw_vif_port_config (rtwdev, rtwvif, config); + +mutex_unlock (&rtwdev->mutex); +} + +static void rtw_ops_configure_filter (struct ieee80211_hw *hw, +unsigned int changed_flags, +unsigned int *new_flags, +u64 multicast) +{ +struct rtw_dev *rtwdev = hw->priv; + + *new_flags &=FIF_ALLMULTI |FIF_OTHER_BSS |FIF_FCSFAIL | +FIF_BCN_PRBRESP_PROMISC ; + +mutex_lock (&rtwdev->mutex); + +if (changed_flags &FIF_ALLMULTI ) { +if (*new_flags &FIF_ALLMULTI ) + rtwdev->hal.rcr |=BIT_AM |BIT_AB ; +else + rtwdev->hal.rcr &= ~(BIT_AM |BIT_AB ); + } +if (changed_flags &FIF_FCSFAIL ) { +if (*new_flags &FIF_FCSFAIL ) + rtwdev->hal.rcr |=BIT_ACRC32 ; +else + rtwdev->hal.rcr &= ~(BIT_ACRC32 ); + } +if (changed_flags &FIF_OTHER_BSS ) { +if (*new_flags &FIF_OTHER_BSS ) + rtwdev->hal.rcr |=BIT_AAP ; +else + rtwdev->hal.rcr &= ~(BIT_AAP ); + } +if (changed_flags &FIF_BCN_PRBRESP_PROMISC ) { +if (*new_flags &FIF_BCN_PRBRESP_PROMISC ) + rtwdev->hal.rcr &= ~(BIT_CBSSID_BCN |BIT_CBSSID_DATA ); +else + rtwdev->hal.rcr |=BIT_CBSSID_BCN ; + } + +rtw_dbg (rtwdev,RTW_DBG_RX , +"config rx filter, changed=0x%08x, new=0x%08x, rcr=0x%08x\n" , + changed_flags, *new_flags, rtwdev->hal.rcr); + +rtw_write32 (rtwdev,REG_RCR , rtwdev->hal.rcr); + +mutex_unlock (&rtwdev->mutex); +} + +static void rtw_ops_bss_info_changed (struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +struct ieee80211_bss_conf *conf, +u32 changed) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_vif *rtwvif = (struct rtw_vif *)vif->drv_priv; +u32 config =0 ; + +mutex_lock (&rtwdev->mutex); + +if (changed &BSS_CHANGED_ASSOC ) { +struct rtw_chip_info *chip = rtwdev->chip; +enum rtw_net_type net_type; + +if (conf->assoc) { + net_type =RTW_NET_MGD_LINKED ; + chip->ops->do_iqk (rtwdev); + + rtwvif->aid = conf->aid; +rtw_add_rsvd_page (rtwdev,RSVD_PS_POLL , true); +rtw_add_rsvd_page (rtwdev,RSVD_QOS_NULL , true); +rtw_add_rsvd_page (rtwdev,RSVD_NULL , true); +rtw_fw_download_rsvd_page (rtwdev, vif); +rtw_send_rsvd_page_h2c (rtwdev); + }else { + net_type =RTW_NET_NO_LINK ; + rtwvif->aid =0 ; +rtw_reset_rsvd_page (rtwdev); + } + + rtwvif->net_type = net_type; + config |=PORT_SET_NET_TYPE ; + config |=PORT_SET_AID ; + } + +if (changed &BSS_CHANGED_BSSID ) { +ether_addr_copy (rtwvif->bssid, conf->bssid); + config |=PORT_SET_BSSID ; + } + +if (changed &BSS_CHANGED_BEACON ) +rtw_fw_download_rsvd_page (rtwdev, vif); + +rtw_vif_port_config (rtwdev, rtwvif, config); + +mutex_unlock (&rtwdev->mutex); +} + +static u8 rtw_acquire_macid (struct rtw_dev *rtwdev) +{ +unsigned long mac_id; + + mac_id =find_first_zero_bit (rtwdev->mac_id_map,RTW_MAX_MAC_ID_NUM ); +if (mac_id <RTW_MAX_MAC_ID_NUM ) +set_bit (mac_id, rtwdev->mac_id_map); + +return mac_id; +} + +static void rtw_release_macid (struct rtw_dev *rtwdev,u8 mac_id) +{ +clear_bit (mac_id, rtwdev->mac_id_map); +} + +static int rtw_ops_sta_add (struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +struct ieee80211_sta *sta) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv; +int ret =0 ; + +mutex_lock (&rtwdev->mutex); + + si->mac_id =rtw_acquire_macid (rtwdev); +if (si->mac_id >=RTW_MAX_MAC_ID_NUM ) { + ret = -ENOSPC ; + goto out; + } + + si->sta = sta; + si->vif = vif; + si->init_ra_lv =1 ; +ewma_rssi_init (&si->avg_rssi); + +rtw_update_sta_info (rtwdev, si); +rtw_fw_media_status_report (rtwdev, si->mac_id, true); + + rtwdev->sta_cnt++; + +rtw_info (rtwdev,"sta %pM joined with macid %d\n" , + sta->addr, si->mac_id); + +out: +mutex_unlock (&rtwdev->mutex); +return ret; +} + +static int rtw_ops_sta_remove (struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +struct ieee80211_sta *sta) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv; + +mutex_lock (&rtwdev->mutex); + +rtw_release_macid (rtwdev, si->mac_id); +rtw_fw_media_status_report (rtwdev, si->mac_id, false); + + rtwdev->sta_cnt--; + +rtw_info (rtwdev,"sta %pM with macid %d left\n" , + sta->addr, si->mac_id); + +mutex_unlock (&rtwdev->mutex); +return 0 ; +} + +static int rtw_ops_set_key (struct ieee80211_hw *hw,enum set_key_cmd cmd, +struct ieee80211_vif *vif,struct ieee80211_sta *sta, +struct ieee80211_key_conf *key) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_sec_desc *sec = &rtwdev->sec; +u8 hw_key_type; +u8 hw_key_idx; +int ret =0 ; + +switch (key->cipher) { +case WLAN_CIPHER_SUITE_WEP40 : + hw_key_type =RTW_CAM_WEP40 ; +break ; +case WLAN_CIPHER_SUITE_WEP104 : + hw_key_type =RTW_CAM_WEP104 ; +break ; +case WLAN_CIPHER_SUITE_TKIP : + hw_key_type =RTW_CAM_TKIP ; + key->flags |=IEEE80211_KEY_FLAG_GENERATE_MMIC ; +break ; +case WLAN_CIPHER_SUITE_CCMP : + hw_key_type =RTW_CAM_AES ; + key->flags |=IEEE80211_KEY_FLAG_SW_MGMT_TX ; +break ; +case WLAN_CIPHER_SUITE_AES_CMAC : +case WLAN_CIPHER_SUITE_BIP_CMAC_256 : +case WLAN_CIPHER_SUITE_BIP_GMAC_128 : +case WLAN_CIPHER_SUITE_BIP_GMAC_256 : +/* suppress error messages */ +return -EOPNOTSUPP ; +default : +return -ENOTSUPP ; + } + +mutex_lock (&rtwdev->mutex); + +if (key->flags &IEEE80211_KEY_FLAG_PAIRWISE ) { + hw_key_idx =rtw_sec_get_free_cam (sec); + }else { +/* multiple interfaces? */ + hw_key_idx = key->keyidx; + } + +if (hw_key_idx > sec->total_cam_num) { + ret = -ENOSPC ; + goto out; + } + +switch (cmd) { +case SET_KEY : +/* need sw generated IV */ + key->flags |=IEEE80211_KEY_FLAG_GENERATE_IV ; + key->hw_key_idx = hw_key_idx; +rtw_sec_write_cam (rtwdev, sec, sta, key, + hw_key_type, hw_key_idx); +break ; +case DISABLE_KEY : +rtw_sec_clear_cam (rtwdev, sec, key->hw_key_idx); +break ; + } + +out: +mutex_unlock (&rtwdev->mutex); + +return ret; +} + +static int rtw_ops_ampdu_action (struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +struct ieee80211_ampdu_params *params) +{ +struct ieee80211_sta *sta = params->sta; +u16 tid = params->tid; + +switch (params->action) { +case IEEE80211_AMPDU_TX_START : +ieee80211_start_tx_ba_cb_irqsafe (vif, sta->addr, tid); +break ; +case IEEE80211_AMPDU_TX_STOP_CONT : +case IEEE80211_AMPDU_TX_STOP_FLUSH : +case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT : +ieee80211_stop_tx_ba_cb_irqsafe (vif, sta->addr, tid); +break ; +case IEEE80211_AMPDU_TX_OPERATIONAL : +case IEEE80211_AMPDU_RX_START : +case IEEE80211_AMPDU_RX_STOP : +break ; +default : +WARN_ON (1 ); +return -ENOTSUPP ; + } + +return 0 ; +} + +static void rtw_ops_sw_scan_start (struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +const u8 *mac_addr) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_vif *rtwvif = (struct rtw_vif *)vif->drv_priv; + +rtw_leave_lps (rtwdev, rtwvif); + +rtw_flag_set (rtwdev,RTW_FLAG_DIG_DISABLE ); +rtw_flag_set (rtwdev,RTW_FLAG_SCANNING ); +} + +static void rtw_ops_sw_scan_complete (struct ieee80211_hw *hw, +struct ieee80211_vif *vif) +{ +struct rtw_dev *rtwdev = hw->priv; + +rtw_flag_clear (rtwdev,RTW_FLAG_SCANNING ); +rtw_flag_clear (rtwdev,RTW_FLAG_DIG_DISABLE ); +} + +const struct ieee80211_ops rtw_ops = { + .tx = rtw_ops_tx, + .start = rtw_ops_start, + .stop = rtw_ops_stop, + .config = rtw_ops_config, + .add_interface = rtw_ops_add_interface, + .remove_interface = rtw_ops_remove_interface, + .configure_filter = rtw_ops_configure_filter, + .bss_info_changed = rtw_ops_bss_info_changed, + .sta_add = rtw_ops_sta_add, + .sta_remove = rtw_ops_sta_remove, + .set_key = rtw_ops_set_key, + .ampdu_action = rtw_ops_ampdu_action, + .sw_scan_start = rtw_ops_sw_scan_start, + .sw_scan_complete = rtw_ops_sw_scan_complete, +}; +EXPORT_SYMBOL (rtw_ops);
drivers/net/wireless/realtek/rtw88/main.c new file +1211 -0
1,211 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/main.h new file +1104 -0
1,104 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/reg.h new file +421 -0
204 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/util.c new file +72 -0
72 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/util.h new file +34 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
Re: [PATCH v9 01/14] rtw88: main files
Quoted 6 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
main files for Realtek 802.11ac wireless network chips
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
Quoted 4 lines
drivers/net/wireless/realtek/rtw88/main.h new file +4
-0+static inline bool rtw_flag_check (struct rtw_dev *rtwdev,enum rtw_flags flag) +{ +return test_bit (flag, rtwdev->flags); +}
drivers/net/wireless/realtek/rtw88/main.h line 1082
Quoted 10 lines
drivers/net/wireless/realtek/rtw88/main.h new file +10
-0+ +static inline void rtw_flag_clear (struct rtw_dev *rtwdev,enum rtw_flags flag) +{ +clear_bit (flag, rtwdev->flags); +} + +static inline void rtw_flag_set (struct rtw_dev *rtwdev,enum rtw_flags flag) +{ +set_bit (flag, rtwdev->flags); +}
In upstream we don't usually like these kind of abstractions, they just hide what the code does.
Signature · 1 line
Kalle Valo
Re: [PATCH v9 01/14] rtw88: main files
In reply to [email protected]Quoted 6 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
main files for Realtek 802.11ac wireless network chips
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
drivers/net/wireless/realtek/rtw88/main.c line 23
Quoted 8 lines
drivers/net/wireless/realtek/rtw88/main.c new file +8
-0+static bool rtw_fw_support_lps; +unsigned int rtw_debug_mask; +EXPORT_SYMBOL (rtw_debug_mask); + +module_param_named (support_lps, rtw_fw_support_lps, bool,0644 ); +module_param_named (debug_mask, rtw_debug_mask, uint,0644 ); + +MODULE_PARM_DESC (support_lps,"Set Y to enable LPS support" );
Not everyone (myself included) do not know what LPS means, please spell it out in the description.
Signature · 1 line
Kalle Valo
Re: [PATCH v9 01/14] rtw88: main files
In reply to [email protected]Quoted 6 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
main files for Realtek 802.11ac wireless network chips
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
Quoted 33 lines
drivers/net/wireless/realtek/rtw88/mac80211.c new file +33
-0+static int rtw_ops_add_interface (struct ieee80211_hw *hw, +struct ieee80211_vif *vif) +{ +struct rtw_dev *rtwdev = hw->priv; +struct rtw_vif *rtwvif = (struct rtw_vif *)vif->drv_priv; +enum rtw_net_type net_type; +u32 config =0 ; +u8 port =0 ; + + rtwvif->port = port; + rtwvif->vif = vif; + rtwvif->stats.tx_unicast =0 ; + rtwvif->stats.rx_unicast =0 ; + rtwvif->stats.tx_cnt =0 ; + rtwvif->stats.rx_cnt =0 ; + rtwvif->in_lps = false; + rtwvif->conf = &rtw_vif_port[port]; + +mutex_lock (&rtwdev->mutex); + +switch (vif->type) { +case NL80211_IFTYPE_AP : +case NL80211_IFTYPE_MESH_POINT : + net_type =RTW_NET_AP_MODE ; +break ; +case NL80211_IFTYPE_ADHOC : + net_type =RTW_NET_AD_HOC ; +break ; +case NL80211_IFTYPE_STATION : +default : + net_type =RTW_NET_NO_LINK ; +break ; + }
drivers/net/wireless/realtek/rtw88/mac80211.c line 157
Quoted 10 lines
drivers/net/wireless/realtek/rtw88/mac80211.c new file +10
-0+ +ether_addr_copy (rtwvif->mac_addr, vif->addr); + config |=PORT_SET_MAC_ADDR ; + rtwvif->net_type = net_type; + config |=PORT_SET_NET_TYPE ; +rtw_vif_port_config (rtwdev, rtwvif, config); + +mutex_unlock (&rtwdev->mutex); + +rtw_info (rtwdev,"start vif %pM on port %d\n" , vif->addr, rtwvif->port);
I think this somewhat spammy. And looking at other uses of rtw_info():
mac80211.c:157: rtw_info(rtwdev, "start vif %pM on port %d\n", vif->addr, rtwvif->port);
mac80211.c:168: rtw_info(rtwdev, "stop vif %pM on port %d\n", vif->addr, rtwvif->port);
mac80211.c:318: rtw_info(rtwdev, "sta %pM joined with macid %d\n",
mac80211.c:340: rtw_info(rtwdev, "sta %pM with macid %d left\n",
rtw8822b.c:936: rtw_info(rtwdev, "unsupport tx path, set to default path ab\n");
rtw8822b.c:940: rtw_info(rtwdev, "unsupport rx path, set to default path ab\n");
I would just convert the last two to warning level, assuming those cases do not happen normally. And the rest would be better as debug messages to keep the dmesg clean.
Signature · 1 line
Kalle Valo
Re: [PATCH v9 01/14] rtw88: main files
In reply to [email protected]Quoted 6 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
main files for Realtek 802.11ac wireless network chips
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
Quoted 4 lines
drivers/net/wireless/realtek/rtw88/util.h new file +4
-0+static inline u8 *get_hdr_bssid (struct ieee80211_hdr *hdr) +{ +__le16 fc = hdr->frame_control; +u8 *bssid;
drivers/net/wireless/realtek/rtw88/util.h line 32
Quoted 10 lines
drivers/net/wireless/realtek/rtw88/util.h new file +10
-0+ +if (ieee80211_has_tods (fc)) + bssid = hdr->addr1; +else if (ieee80211_has_fromds (fc)) + bssid = hdr->addr2; +else + bssid = hdr->addr3; + +return bssid; +}
I wonder should something like this be in include/linux/ieee80211.h?
Signature · 1 line
Kalle Valo
PATCH v9 2/14 rtw88: core files
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
core files for Realtek 802.11ac wireless network chips
--- drivers/net/wireless/realtek/rtw88/ps.c | 166 +++++++++++++ drivers/net/wireless/realtek/rtw88/ps.h | 20 ++ drivers/net/wireless/realtek/rtw88/regd.c | 391 ++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/regd.h | 67 +++++ drivers/net/wireless/realtek/rtw88/sec.c | 120 +++++++++ drivers/net/wireless/realtek/rtw88/sec.h | 39 +++ 6 files changed, 803 insertions(+) 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/regd.c create mode 100644 drivers/net/wireless/realtek/rtw88/regd.h create mode 100644 drivers/net/wireless/realtek/rtw88/sec.c create mode 100644 drivers/net/wireless/realtek/rtw88/sec.h
drivers/net/wireless/realtek/rtw88/ps.c new file +166 -0
@@ -0,0 +1,166 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include "main.h" +#include "fw.h" +#include "ps.h" +#include "mac.h" +#include "debug.h" + +static int rtw_ips_pwr_up (struct rtw_dev *rtwdev) +{ +int ret; + + ret =rtw_core_start (rtwdev); +if (ret) +rtw_err (rtwdev,"leave idle state failed\n" ); + +rtw_set_channel (rtwdev); +rtw_flag_clear (rtwdev,RTW_FLAG_INACTIVE_PS ); + +return ret; +} + +int rtw_enter_ips (struct rtw_dev *rtwdev) +{ +rtw_flag_set (rtwdev,RTW_FLAG_INACTIVE_PS ); + +rtw_core_stop (rtwdev); + +return 0 ; +} + +static void rtw_restore_port_cfg_iter (void *data,u8 *mac, +struct ieee80211_vif *vif) +{ +struct rtw_dev *rtwdev = data; +struct rtw_vif *rtwvif = (struct rtw_vif *)vif->drv_priv; +u32 config = ~0 ; + +rtw_vif_port_config (rtwdev, rtwvif, config); +} + +int rtw_leave_ips (struct rtw_dev *rtwdev) +{ +int ret; + + ret =rtw_ips_pwr_up (rtwdev); +if (ret) { +rtw_err (rtwdev,"failed to leave ips state\n" ); +return ret; + } + +rtw_iterate_vifs_atomic (rtwdev, rtw_restore_port_cfg_iter, rtwdev); + +return 0 ; +} + +static void rtw_leave_lps_core (struct rtw_dev *rtwdev) +{ +struct rtw_lps_conf *conf = &rtwdev->lps_conf; + + conf->state =RTW_ALL_ON ; + conf->awake_interval =1 ; + conf->rlbm =0 ; + conf->smart_ps =0 ; + +rtw_fw_set_pwr_mode (rtwdev); +rtw_flag_clear (rtwdev,RTW_FLAG_LEISURE_PS ); +} + +static void rtw_enter_lps_core (struct rtw_dev *rtwdev) +{ +struct rtw_lps_conf *conf = &rtwdev->lps_conf; + + conf->state =RTW_RF_OFF ; + conf->awake_interval =1 ; + conf->rlbm =1 ; + conf->smart_ps =2 ; + +rtw_fw_set_pwr_mode (rtwdev); +rtw_flag_set (rtwdev,RTW_FLAG_LEISURE_PS ); +} + +void rtw_lps_work (struct work_struct *work) +{ + struct rtw_dev *rtwdev = container_of(work, struct rtw_dev, + lps_work.work); +struct rtw_lps_conf *conf = &rtwdev->lps_conf; +struct rtw_vif *rtwvif = conf->rtwvif; + +if (WARN_ON (!rtwvif)) +return ; + +if (conf->mode ==RTW_MODE_LPS ) +rtw_enter_lps_core (rtwdev); +else +rtw_leave_lps_core (rtwdev); +} + +void rtw_enter_lps_irqsafe (struct rtw_dev *rtwdev,struct rtw_vif *rtwvif) +{ +struct rtw_lps_conf *conf = &rtwdev->lps_conf; + +if (rtwvif->in_lps) +return ; + + conf->mode =RTW_MODE_LPS ; + conf->rtwvif = rtwvif; + rtwvif->in_lps = true; + +ieee80211_queue_delayed_work (rtwdev->hw, &rtwdev->lps_work,0 ); +} + +void rtw_leave_lps_irqsafe (struct rtw_dev *rtwdev,struct rtw_vif *rtwvif) +{ +struct rtw_lps_conf *conf = &rtwdev->lps_conf; + +if (!rtwvif->in_lps) +return ; + + conf->mode =RTW_MODE_ACTIVE ; + conf->rtwvif = rtwvif; + rtwvif->in_lps = false; + +ieee80211_queue_delayed_work (rtwdev->hw, &rtwdev->lps_work,0 ); +} + +bool rtw_in_lps (struct rtw_dev *rtwdev) +{ +return rtw_flag_check (rtwdev,RTW_FLAG_LEISURE_PS ); +} + +void rtw_enter_lps (struct rtw_dev *rtwdev,struct rtw_vif *rtwvif) +{ +struct rtw_lps_conf *conf = &rtwdev->lps_conf; + +if (WARN_ON (!rtwvif)) +return ; + +if (rtwvif->in_lps) +return ; + + conf->mode =RTW_MODE_LPS ; + conf->rtwvif = rtwvif; + rtwvif->in_lps = true; + +rtw_enter_lps_core (rtwdev); +} + +void rtw_leave_lps (struct rtw_dev *rtwdev,struct rtw_vif *rtwvif) +{ +struct rtw_lps_conf *conf = &rtwdev->lps_conf; + +if (WARN_ON (!rtwvif)) +return ; + +if (!rtwvif->in_lps) +return ; + + conf->mode =RTW_MODE_ACTIVE ; + conf->rtwvif = rtwvif; + rtwvif->in_lps = false; + +rtw_leave_lps_core (rtwdev); +}
drivers/net/wireless/realtek/rtw88/ps.h new file +20 -0
@@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#ifndef __RTW_PS_H_ +#define __RTW_PS_H_ + +#define RTW_LPS_THRESHOLD 2 + +int rtw_enter_ips (struct rtw_dev *rtwdev); +int rtw_leave_ips (struct rtw_dev *rtwdev); + +void rtw_lps_work (struct work_struct *work); +void rtw_enter_lps_irqsafe (struct rtw_dev *rtwdev,struct rtw_vif *rtwvif); +void rtw_leave_lps_irqsafe (struct rtw_dev *rtwdev,struct rtw_vif *rtwvif); +void rtw_enter_lps (struct rtw_dev *rtwdev,struct rtw_vif *rtwvif); +void rtw_leave_lps (struct rtw_dev *rtwdev,struct rtw_vif *rtwvif); +bool rtw_in_lps (struct rtw_dev *rtwdev); + +#endif
drivers/net/wireless/realtek/rtw88/regd.c new file +391 -0
391 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/regd.h new file +67 -0
67 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/sec.c new file +120 -0
120 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/sec.h new file +39 -0
@@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#ifndef __RTW_SEC_H_ +#define __RTW_SEC_H_ + +#define RTW_SEC_CMD_REG 0x670 +#define RTW_SEC_WRITE_REG 0x674 +#define RTW_SEC_READ_REG 0x678 +#define RTW_SEC_CONFIG 0x680 + +#define RTW_SEC_CAM_ENTRY_SHIFT 3 +#define RTW_SEC_DEFAULT_KEY_NUM 4 +#define RTW_SEC_CMD_WRITE_ENABLE BIT(16) +#define RTW_SEC_CMD_CLEAR BIT(30) +#define RTW_SEC_CMD_POLLING BIT(31) + +#define RTW_SEC_TX_UNI_USE_DK BIT(0) +#define RTW_SEC_RX_UNI_USE_DK BIT(1) +#define RTW_SEC_TX_DEC_EN BIT(2) +#define RTW_SEC_RX_DEC_EN BIT(3) +#define RTW_SEC_TX_BC_USE_DK BIT(6) +#define RTW_SEC_RX_BC_USE_DK BIT(7) + +#define RTW_SEC_ENGINE_EN BIT(9) + +int rtw_sec_get_free_cam (struct rtw_sec_desc *sec); +void rtw_sec_write_cam (struct rtw_dev *rtwdev, +struct rtw_sec_desc *sec, +struct ieee80211_sta *sta, +struct ieee80211_key_conf *key, +u8 hw_key_type,u8 hw_key_idx); +void rtw_sec_clear_cam (struct rtw_dev *rtwdev, +struct rtw_sec_desc *sec, +u8 hw_key_idx); +void rtw_sec_enable_sec_engine (struct rtw_dev *rtwdev); + +#endif
Signature · 1 line
2.7.4
PATCH v9 3/14 rtw88: hci files
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
hci files for Realtek 802.11ac wireless network chips
For now there is only PCI bus supported by rtwlan, in the future it will also have USB/SDIO
--- drivers/net/wireless/realtek/rtw88/hci.h | 211 ++++++ drivers/net/wireless/realtek/rtw88/pci.c | 1211 ++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/pci.h | 237 ++++++ 3 files changed, 1659 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/hci.h create mode 100644 drivers/net/wireless/realtek/rtw88/pci.c create mode 100644 drivers/net/wireless/realtek/rtw88/pci.h
drivers/net/wireless/realtek/rtw88/hci.h new file +211 -0
@@ -0,0 +1,211 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#ifndef __RTW_HCI_H__ +#define __RTW_HCI_H__ + +/* ops for PCI, USB and SDIO */ +struct rtw_hci_ops { +int (*tx)(struct rtw_dev *rtwdev, +struct rtw_tx_pkt_info *pkt_info, +struct sk_buff *skb); +int (*setup)(struct rtw_dev *rtwdev); +int (*start)(struct rtw_dev *rtwdev); +void (*stop)(struct rtw_dev *rtwdev); + +int (*write_data_rsvd_page)(struct rtw_dev *rtwdev,u8 *buf,u32 size); +int (*write_data_h2c)(struct rtw_dev *rtwdev,u8 *buf,u32 size); + +u8 (*read8)(struct rtw_dev *rtwdev,u32 addr); +u16 (*read16)(struct rtw_dev *rtwdev,u32 addr); +u32 (*read32)(struct rtw_dev *rtwdev,u32 addr); +void (*write8)(struct rtw_dev *rtwdev,u32 addr,u8 val); +void (*write16)(struct rtw_dev *rtwdev,u32 addr,u16 val); +void (*write32)(struct rtw_dev *rtwdev,u32 addr,u32 val); +}; + +static inline int rtw_hci_tx (struct rtw_dev *rtwdev, +struct rtw_tx_pkt_info *pkt_info, +struct sk_buff *skb) +{ +return rtwdev->hci.ops->tx (rtwdev, pkt_info, skb); +} + +static inline int rtw_hci_setup (struct rtw_dev *rtwdev) +{ +return rtwdev->hci.ops->setup (rtwdev); +} + +static inline int rtw_hci_start (struct rtw_dev *rtwdev) +{ +return rtwdev->hci.ops->start (rtwdev); +} + +static inline void rtw_hci_stop (struct rtw_dev *rtwdev) +{ + rtwdev->hci.ops->stop (rtwdev); +} + +static inline int +rtw_hci_write_data_rsvd_page (struct rtw_dev *rtwdev,u8 *buf,u32 size) +{ +return rtwdev->hci.ops->write_data_rsvd_page (rtwdev, buf, size); +} + +static inline int +rtw_hci_write_data_h2c (struct rtw_dev *rtwdev,u8 *buf,u32 size) +{ +return rtwdev->hci.ops->write_data_h2c (rtwdev, buf, size); +} + +static inline u8 rtw_read8 (struct rtw_dev *rtwdev,u32 addr) +{ +return rtwdev->hci.ops->read8 (rtwdev, addr); +} + +static inline u16 rtw_read16 (struct rtw_dev *rtwdev,u32 addr) +{ +return rtwdev->hci.ops->read16 (rtwdev, addr); +} + +static inline u32 rtw_read32 (struct rtw_dev *rtwdev,u32 addr) +{ +return rtwdev->hci.ops->read32 (rtwdev, addr); +} + +static inline void rtw_write8 (struct rtw_dev *rtwdev,u32 addr,u8 val) +{ + rtwdev->hci.ops->write8 (rtwdev, addr, val); +} + +static inline void rtw_write16 (struct rtw_dev *rtwdev,u32 addr,u16 val) +{ + rtwdev->hci.ops->write16 (rtwdev, addr, val); +} + +static inline void rtw_write32 (struct rtw_dev *rtwdev,u32 addr,u32 val) +{ + rtwdev->hci.ops->write32 (rtwdev, addr, val); +} + +static inline void rtw_write8_set (struct rtw_dev *rtwdev,u32 addr,u8 bit) +{ +u8 val; + + val =rtw_read8 (rtwdev, addr); +rtw_write8 (rtwdev, addr, val | bit); +} + +static inline void rtw_writ16_set (struct rtw_dev *rtwdev,u32 addr,u16 bit) +{ +u16 val; + + val =rtw_read16 (rtwdev, addr); +rtw_write16 (rtwdev, addr, val | bit); +} + +static inline void rtw_write32_set (struct rtw_dev *rtwdev,u32 addr,u32 bit) +{ +u32 val; + + val =rtw_read32 (rtwdev, addr); +rtw_write32 (rtwdev, addr, val | bit); +} + +static inline void rtw_write8_clr (struct rtw_dev *rtwdev,u32 addr,u8 bit) +{ +u8 val; + + val =rtw_read8 (rtwdev, addr); +rtw_write8 (rtwdev, addr, val & ~bit); +} + +static inline void rtw_write16_clr (struct rtw_dev *rtwdev,u32 addr,u16 bit) +{ +u16 val; + + val =rtw_read16 (rtwdev, addr); +rtw_write16 (rtwdev, addr, val & ~bit); +} + +static inline void rtw_write32_clr (struct rtw_dev *rtwdev,u32 addr,u32 bit) +{ +u32 val; + + val =rtw_read32 (rtwdev, addr); +rtw_write32 (rtwdev, addr, val & ~bit); +} + +static inline u32 +rtw_read_rf (struct rtw_dev *rtwdev,enum rtw_rf_path rf_path, +u32 addr,u32 mask) +{ +unsigned long flags; +u32 val; + +spin_lock_irqsave (&rtwdev->rf_lock, flags); + val = rtwdev->chip->ops->read_rf (rtwdev, rf_path, addr, mask); +spin_unlock_irqrestore (&rtwdev->rf_lock, flags); + +return val; +} + +static inline void +rtw_write_rf (struct rtw_dev *rtwdev,enum rtw_rf_path rf_path, +u32 addr,u32 mask,u32 data) +{ +unsigned long flags; + +spin_lock_irqsave (&rtwdev->rf_lock, flags); + rtwdev->chip->ops->write_rf (rtwdev, rf_path, addr, mask, data); +spin_unlock_irqrestore (&rtwdev->rf_lock, flags); +} + +static inline u32 +rtw_read32_mask (struct rtw_dev *rtwdev,u32 addr,u32 mask) +{ +u32 shift =__ffs (mask); +u32 orig; +u32 ret; + + orig =rtw_read32 (rtwdev, addr); + ret = (orig & mask) >> shift; + +return ret; +} + +static inline void +rtw_write32_mask (struct rtw_dev *rtwdev,u32 addr,u32 mask,u32 data) +{ +u32 shift =__ffs (mask); +u32 orig; +u32 set; + +WARN (addr &0x3 ,"should be 4-byte aligned, addr = 0x%08x\n" , addr); + + orig =rtw_read32 (rtwdev, addr); + set = (orig & ~mask) | ((data << shift) & mask); +rtw_write32 (rtwdev, addr, set); +} + +static inline void +rtw_write8_mask (struct rtw_dev *rtwdev,u32 addr,u32 mask,u8 data) +{ +u32 shift; +u8 orig, set; + + mask &=0xff ; + shift =__ffs (mask); + + orig =rtw_read8 (rtwdev, addr); + set = (orig & ~mask) | ((data << shift) & mask); +rtw_write8 (rtwdev, addr, set); +} + +static inline enum rtw_hci_type rtw_hci_type (struct rtw_dev *rtwdev) +{ +return rtwdev->hci.type; +} + +#endif
drivers/net/wireless/realtek/rtw88/pci.c new file +1211 -0
1,211 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/pci.h new file +237 -0
237 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v9 4/14 rtw88: trx files
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
trx files for Realtek 802.11ac wireless network chips
--- drivers/net/wireless/realtek/rtw88/rx.c | 151 +++++++++++++ drivers/net/wireless/realtek/rtw88/rx.h | 41 ++++ drivers/net/wireless/realtek/rtw88/tx.c | 367 ++++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/tx.h | 89 ++++++++ 4 files changed, 648 insertions(+) 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/tx.c create mode 100644 drivers/net/wireless/realtek/rtw88/tx.h
drivers/net/wireless/realtek/rtw88/rx.c new file +151 -0
@@ -0,0 +1,151 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include "main.h" +#include "rx.h" +#include "ps.h" + +void rtw_rx_stats (struct rtw_dev *rtwdev,struct ieee80211_vif *vif, +struct sk_buff *skb) +{ +struct ieee80211_hdr *hdr; +struct rtw_vif *rtwvif; + + hdr = (struct ieee80211_hdr *)skb->data; + +if (!ieee80211_is_data (hdr->frame_control)) +return ; + +if (!is_broadcast_ether_addr (hdr->addr1) && + !is_multicast_ether_addr (hdr->addr1)) { + rtwdev->stats.rx_unicast += skb->len; + rtwdev->stats.rx_cnt++; +if (vif) { + rtwvif = (struct rtw_vif *)vif->drv_priv; + rtwvif->stats.rx_unicast += skb->len; + rtwvif->stats.rx_cnt++; +if (rtwvif->stats.rx_cnt >RTW_LPS_THRESHOLD ) +rtw_leave_lps_irqsafe (rtwdev, rtwvif); + } + } +} +EXPORT_SYMBOL (rtw_rx_stats); + +struct rtw_rx_addr_match_data { +struct rtw_dev *rtwdev; +struct ieee80211_hdr *hdr; +struct rtw_rx_pkt_stat *pkt_stat; +u8 *bssid; +}; + +static void rtw_rx_addr_match_iter (void *data,u8 *mac, +struct ieee80211_vif *vif) +{ +struct rtw_rx_addr_match_data *iter_data = data; +struct ieee80211_sta *sta; +struct ieee80211_hdr *hdr = iter_data->hdr; +struct rtw_dev *rtwdev = iter_data->rtwdev; +struct rtw_sta_info *si; +struct rtw_rx_pkt_stat *pkt_stat = iter_data->pkt_stat; +u8 *bssid = iter_data->bssid; + +if (ether_addr_equal (vif->bss_conf.bssid, bssid) && + (ether_addr_equal (vif->addr, hdr->addr1) || +ieee80211_is_beacon (hdr->frame_control))) + sta =ieee80211_find_sta_by_ifaddr (rtwdev->hw, hdr->addr2, + vif->addr); +else +return ; + +if (!sta) +return ; + + si = (struct rtw_sta_info *)sta->drv_priv; +ewma_rssi_add (&si->avg_rssi, pkt_stat->rssi); +} + +static void rtw_rx_addr_match (struct rtw_dev *rtwdev, +struct rtw_rx_pkt_stat *pkt_stat, +struct ieee80211_hdr *hdr) +{ +struct rtw_rx_addr_match_data data = {}; + +if (pkt_stat->crc_err || pkt_stat->icv_err || !pkt_stat->phy_status || +ieee80211_is_ctl (hdr->frame_control)) +return ; + + data.rtwdev = rtwdev; + data.hdr = hdr; + data.pkt_stat = pkt_stat; + data.bssid =get_hdr_bssid (hdr); + +rtw_iterate_vifs_atomic (rtwdev, rtw_rx_addr_match_iter, &data); +} + +void rtw_rx_fill_rx_status (struct rtw_dev *rtwdev, +struct rtw_rx_pkt_stat *pkt_stat, +struct ieee80211_hdr *hdr, +struct ieee80211_rx_status *rx_status, +u8 *phy_status) +{ +struct ieee80211_hw *hw = rtwdev->hw; + +memset (rx_status,0 ,sizeof (*rx_status)); + rx_status->freq = hw->conf.chandef.chan->center_freq; + rx_status->band = hw->conf.chandef.chan->band; +if (pkt_stat->crc_err) + rx_status->flag |=RX_FLAG_FAILED_FCS_CRC ; +if (pkt_stat->decrypted) + rx_status->flag |=RX_FLAG_DECRYPTED ; + +if (pkt_stat->rate >=DESC_RATEVHT1SS_MCS0 ) + rx_status->encoding =RX_ENC_VHT ; +else if (pkt_stat->rate >=DESC_RATEMCS0 ) + rx_status->encoding =RX_ENC_HT ; + +if (pkt_stat->rate >=DESC_RATEVHT1SS_MCS0 && + pkt_stat->rate <=DESC_RATEVHT1SS_MCS9 ) { + rx_status->nss =1 ; + rx_status->rate_idx = pkt_stat->rate -DESC_RATEVHT1SS_MCS0 ; + }else if (pkt_stat->rate >=DESC_RATEVHT2SS_MCS0 && + pkt_stat->rate <=DESC_RATEVHT2SS_MCS9 ) { + rx_status->nss =2 ; + rx_status->rate_idx = pkt_stat->rate -DESC_RATEVHT2SS_MCS0 ; + }else if (pkt_stat->rate >=DESC_RATEVHT3SS_MCS0 && + pkt_stat->rate <=DESC_RATEVHT3SS_MCS9 ) { + rx_status->nss =3 ; + rx_status->rate_idx = pkt_stat->rate -DESC_RATEVHT3SS_MCS0 ; + }else if (pkt_stat->rate >=DESC_RATEVHT4SS_MCS0 && + pkt_stat->rate <=DESC_RATEVHT4SS_MCS9 ) { + rx_status->nss =4 ; + rx_status->rate_idx = pkt_stat->rate -DESC_RATEVHT4SS_MCS0 ; + }else if (pkt_stat->rate >=DESC_RATEMCS0 && + pkt_stat->rate <=DESC_RATEMCS15 ) { + rx_status->rate_idx = pkt_stat->rate -DESC_RATEMCS0 ; + }else if (rx_status->band ==NL80211_BAND_5GHZ && + pkt_stat->rate >=DESC_RATE6M && + pkt_stat->rate <=DESC_RATE54M ) { + rx_status->rate_idx = pkt_stat->rate -DESC_RATE6M ; + }else if (rx_status->band ==NL80211_BAND_2GHZ && + pkt_stat->rate >=DESC_RATE1M && + pkt_stat->rate <=DESC_RATE54M ) { + rx_status->rate_idx = pkt_stat->rate -DESC_RATE1M ; + }else { + rx_status->rate_idx =0 ; + } + + rx_status->flag |=RX_FLAG_MACTIME_START ; + rx_status->mactime = pkt_stat->tsf_low; + +if (pkt_stat->bw ==RTW_CHANNEL_WIDTH_80 ) + rx_status->bw =RATE_INFO_BW_80 ; +else if (pkt_stat->bw ==RTW_CHANNEL_WIDTH_40 ) + rx_status->bw =RATE_INFO_BW_40 ; +else + rx_status->bw =RATE_INFO_BW_20 ; + + rx_status->signal = pkt_stat->signal_power; + +rtw_rx_addr_match (rtwdev, pkt_stat, hdr); +}
drivers/net/wireless/realtek/rtw88/rx.h new file +41 -0
41 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/tx.c new file +367 -0
367 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/tx.h new file +89 -0
89 lines not on this page · raw message
Signature · 1 line
2.7.4
Re: [PATCH v9 04/14] rtw88: trx files
Quoted 6 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
trx files for Realtek 802.11ac wireless network chips
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
Quoted 24 lines
drivers/net/wireless/realtek/rtw88/rx.h new file +21
-0@@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#ifndef __RTW_RX_H_ +#define __RTW_RX_H_ + +#define GET_RX_DESC_PHYST (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(26)) +#define GET_RX_DESC_ICV_ERR (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(15)) +#define GET_RX_DESC_CRC32 (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(14)) +#define GET_RX_DESC_SWDEC (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(27)) +#define GET_RX_DESC_C2H (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x02), BIT(28)) +#define GET_RX_DESC_PKT_LEN (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(13, 0)) +#define GET_RX_DESC_DRV_INFO_SIZE (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(19, 16))
drivers/net/wireless/realtek/rtw88/rx.h line 31
Quoted 10 lines
drivers/net/wireless/realtek/rtw88/rx.h new file +10
-0+#define GET_RX_DESC_SHIFT (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(25, 24)) +#define GET_RX_DESC_RX_RATE (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x03), GENMASK(6, 0)) +#define GET_RX_DESC_MACID (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x01), GENMASK(6, 0)) +#define GET_RX_DESC_PPDU_CNT (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x02), GENMASK(30, 29)) +#define GET_RX_DESC_TSFL (rxdesc) \ + le32_get_bits(*((__le32 *)(rxdesc) + 0x05), GENMASK(31, 0))
I'm not really fond of these "byte macros" or whatever they should be called, you use these a lot in rtw88 but I have seen the same usage also other drivers. The upstream way of doing this is to create a struct, which also acts as a documentation, and you can pass it around different functions. And the GENMASK()s are defined close the struct.
Also you could change these defines to static inline functions, which take the struct as a pointer, and that you get type checking from the compiler. And that way you would get rid of that ugly casting as well.
Signature · 1 line
Kalle Valo
Re: [PATCH v9 04/14] rtw88: trx files
Quoted 9 lines · Kalle Valo
I'm not really fond of these "byte macros" or whatever they should be called, you use these a lot in rtw88 but I have seen the same usage also other drivers. The upstream way of doing this is to create a struct, which also acts as a documentation, and you can pass it around different functions. And the GENMASK()s are defined close the struct.
Also you could change these defines to static inline functions, which take the struct as a pointer, and that you get type checking from the compiler. And that way you would get rid of that ugly casting as well.
Kalle,
I have never been a fan of those complicated macros dating back to the day that I had to make them endian correct. Without Sparse, I never would have made it.
I understand your comment about making them be static inline functions, but I am intrigued be the struct method. Is there something other than bit field constructions that could accomplish this? If not, then this method would be very difficult to implement. My basis is an E-mail by Linus that said it was almost impossible to get this type of construct to be endian correct. If he thinks it is difficult, then I know not to tackle it. :)
Larry
Re: [PATCH v9 04/14] rtw88: trx files
Quoted 13 lines · Larry Finger
Quoted 9 lines · Kalle Valo
I'm not really fond of these "byte macros" or whatever they should be called, you use these a lot in rtw88 but I have seen the same usage also other drivers. The upstream way of doing this is to create a struct, which also acts as a documentation, and you can pass it around different functions. And the GENMASK()s are defined close the struct.
Also you could change these defines to static inline functions, which take the struct as a pointer, and that you get type checking from the compiler. And that way you would get rid of that ugly casting as well.
Kalle,
Quoted 7 lines
I have never been a fan of those complicated macros dating back to the day that I had to make them endian correct. Without Sparse, I never would have made it.
I understand your comment about making them be static inline functions, but I am intrigued be the struct method. Is there something other than bit field constructions that could accomplish this?
My comment was about handling firmware commands and events as a byte array, not about bitfields. So that instead of accessing 'index + 1' and 'index + 4' you should create a proper struct for the command and access it using 'cmd->foo' and 'cmd->bar'. Sure, bitfields you still need to access using FIELD_GET() or similar but having a struct for commands is a lot cleaner approach. And most upstream drivers do this: ath10k, ath6kl, iwlwifi, p54 and whatnot.
Sorry, no time now to explain further now but, if needed, I can provide a better example tomorrow.
Quoted 4 lines
If not, then this method would be very difficult to implement. My basis is an E-mail by Linus that said it was almost impossible to get this type of construct to be endian correct. If he thinks it is difficult, then I know not to tackle it. :)
Could you please point Linus' email about this? I would like to understand more, I didn't understand your comment.
Signature · 1 line
Kalle Valo
Re: [PATCH v9 04/14] rtw88: trx files
Quoted 34 lines · Kalle Valo
Quoted 13 lines · Larry Finger
Quoted 9 lines · Kalle Valo
I'm not really fond of these "byte macros" or whatever they should be called, you use these a lot in rtw88 but I have seen the same usage also other drivers. The upstream way of doing this is to create a struct, which also acts as a documentation, and you can pass it around different functions. And the GENMASK()s are defined close the struct.
Also you could change these defines to static inline functions, which take the struct as a pointer, and that you get type checking from the compiler. And that way you would get rid of that ugly casting as well.
Kalle,
Quoted 7 lines
I have never been a fan of those complicated macros dating back to the day that I had to make them endian correct. Without Sparse, I never would have made it.
I understand your comment about making them be static inline functions, but I am intrigued be the struct method. Is there something other than bit field constructions that could accomplish this?
My comment was about handling firmware commands and events as a byte array, not about bitfields. So that instead of accessing 'index + 1' and 'index + 4' you should create a proper struct for the command and access it using '
cmd->foo' and 'cmd->bar'. Sure, bitfields you still need to access usingFIELD_GET()or similar but having a struct for commands is a lot cleaner approach. And most upstream drivers do this: ath10k, ath6kl, iwlwifi, p54 and whatnot.Sorry, no time now to explain further now but, if needed, I can provide a better example tomorrow.
Quoted 8 lines
Quoted 4 lines
If not, then this method would be very difficult to implement. My basis is an E-mail by Linus that said it was almost impossible to get this type of construct to be endian correct. If he thinks it is difficult, then I know not to tackle it. :)
Could you please point Linus' email about this? I would like to understand more, I didn't understand your comment.
Do not worry about giving a further answer. I'll read those other drivers and figure out what they are doing.
The email exchange I saw was at https://yarchive.net/comp/linux/bitfields.html.
Larry
Re: [PATCH v9 04/14] rtw88: trx files
In reply to Kalle ValoQuoted 7 lines · Kalle Valo
My comment was about handling firmware commands and events as a byte array, not about bitfields. So that instead of accessing 'index + 1' and 'index + 4' you should create a proper struct for the command and access it using '
cmd->foo' and 'cmd->bar'. Sure, bitfields you still need to access usingFIELD_GET()or similar but having a struct for commands is a lot cleaner approach. And most upstream drivers do this: ath10k, ath6kl, iwlwifi, p54 and whatnot.
I think I pushed Tony away from the bitfields (he was using a struct plus some ugly bitfields / #ifdefs pre-v8), and he ended up with this (in v8). I noted on the v8 cover letter that one can still use a struct, but just avoid using bitfields -- so you would still have 'u8' and '__le32' fields (or similar), and do the right le32_to_cpu() accessors (sparse will help you) plus FIELD_GET() (for any necessary bitfields).
Brian
PATCH v9 5/14 rtw88: mac files
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
mac files for Realtek 802.11ac wireless network chips
--- drivers/net/wireless/realtek/rtw88/mac.c | 965 +++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/mac.h | 35 ++ 2 files changed, 1000 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/mac.c create mode 100644 drivers/net/wireless/realtek/rtw88/mac.h
drivers/net/wireless/realtek/rtw88/mac.c new file +965 -0
@@ -0,0 +1,965 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include "main.h" +#include "mac.h" +#include "reg.h" +#include "fw.h" +#include "debug.h" + +void rtw_set_channel_mac (struct rtw_dev *rtwdev,u8 channel,u8 bw, +u8 primary_ch_idx) +{ +u8 txsc40 =0 , txsc20 =0 ; +u32 value32; +u8 value8; + + txsc20 = primary_ch_idx; +if (txsc20 ==1 || txsc20 ==3 ) + txsc40 =9 ; +else + txsc40 =10 ; +rtw_write8 (rtwdev,REG_DATA_SC , +BIT_TXSC_20M (txsc20) |BIT_TXSC_40M (txsc40)); + + value32 =rtw_read32 (rtwdev,REG_WMAC_TRXPTCL_CTL ); + value32 &= ~BIT_RFMOD ; +switch (bw) { +case RTW_CHANNEL_WIDTH_80 : + value32 |=BIT_RFMOD_80M ; +break ; +case RTW_CHANNEL_WIDTH_40 : + value32 |=BIT_RFMOD_40M ; +break ; +case RTW_CHANNEL_WIDTH_20 : +default : +break ; + } +rtw_write32 (rtwdev,REG_WMAC_TRXPTCL_CTL , value32); + + value32 =rtw_read32 (rtwdev,REG_AFE_CTRL1 ) & ~(BIT_MAC_CLK_SEL ); + value32 |= (MAC_CLK_HW_DEF_80M <<BIT_SHIFT_MAC_CLK_SEL ); +rtw_write32 (rtwdev,REG_AFE_CTRL1 , value32); + +rtw_write8 (rtwdev,REG_USTIME_TSF ,MAC_CLK_SPEED ); +rtw_write8 (rtwdev,REG_USTIME_EDCA ,MAC_CLK_SPEED ); + + value8 =rtw_read8 (rtwdev,REG_CCK_CHECK ); + value8 = value8 & ~BIT_CHECK_CCK_EN ; +if (channel >35 ) + value8 |=BIT_CHECK_CCK_EN ; +rtw_write8 (rtwdev,REG_CCK_CHECK , value8); +} + +static int rtw_mac_pre_system_cfg (struct rtw_dev *rtwdev) +{ +u32 value32; +u8 value8; + +rtw_write8 (rtwdev,REG_RSV_CTRL ,0 ); + +switch (rtw_hci_type (rtwdev)) { +case RTW_HCI_TYPE_PCIE : +rtw_write32_set (rtwdev,REG_HCI_OPT_CTRL ,BIT_BT_DIG_CLK_EN ); +break ; +case RTW_HCI_TYPE_USB : +break ; +default : +return -EINVAL ; + } + +/* config PIN Mux */ + value32 =rtw_read32 (rtwdev,REG_PAD_CTRL1 ); + value32 |=BIT_PAPE_WLBT_SEL |BIT_LNAON_WLBT_SEL ; +rtw_write32 (rtwdev,REG_PAD_CTRL1 , value32); + + value32 =rtw_read32 (rtwdev,REG_LED_CFG ); + value32 &= ~(BIT_PAPE_SEL_EN |BIT_LNAON_SEL_EN ); +rtw_write32 (rtwdev,REG_LED_CFG , value32); + + value32 =rtw_read32 (rtwdev,REG_GPIO_MUXCFG ); + value32 |=BIT_WLRFE_4_5_EN ; +rtw_write32 (rtwdev,REG_GPIO_MUXCFG , value32); + +/* disable BB/RF */ + value8 =rtw_read8 (rtwdev,REG_SYS_FUNC_EN ); + value8 &= ~(BIT_FEN_BB_RSTB |BIT_FEN_BB_GLB_RST ); +rtw_write8 (rtwdev,REG_SYS_FUNC_EN , value8); + + value8 =rtw_read8 (rtwdev,REG_RF_CTRL ); + value8 &= ~(BIT_RF_SDM_RSTB |BIT_RF_RSTB |BIT_RF_EN ); +rtw_write8 (rtwdev,REG_RF_CTRL , value8); + + value32 =rtw_read32 (rtwdev,REG_WLRF1 ); + value32 &= ~BIT_WLRF1_BBRF_EN ; +rtw_write32 (rtwdev,REG_WLRF1 , value32); + +return 0 ; +} + +static int rtw_pwr_cmd_polling (struct rtw_dev *rtwdev, +struct rtw_pwr_seq_cmd *cmd) +{ +u8 value; +u8 flag =0 ; +u32 offset; +u32 cnt =RTW_PWR_POLLING_CNT ; + +if (cmd->base ==RTW_PWR_ADDR_SDIO ) + offset = cmd->offset |SDIO_LOCAL_OFFSET ; +else + offset = cmd->offset; + +do { + cnt--; + value =rtw_read8 (rtwdev, offset); + value &= cmd->mask; +if (value == (cmd->value & cmd->mask)) +return 0 ; +if (cnt ==0 ) { +if (rtw_hci_type (rtwdev) ==RTW_HCI_TYPE_PCIE && + flag ==0 ) { + value =rtw_read8 (rtwdev,REG_SYS_PW_CTRL ); + value |=BIT (3 ); +rtw_write8 (rtwdev,REG_SYS_PW_CTRL , value); + value &= ~BIT (3 ); +rtw_write8 (rtwdev,REG_SYS_PW_CTRL , value); + cnt =RTW_PWR_POLLING_CNT ; + flag =1 ; + }else { +return -EBUSY ; + } + }else { +udelay (50 ); + } + }while (1 ); +} + +static int rtw_sub_pwr_seq_parser (struct rtw_dev *rtwdev,u8 intf_mask, +u8 cut_mask,struct rtw_pwr_seq_cmd *cmd) +{ +struct rtw_pwr_seq_cmd *cur_cmd; +u32 offset; +u8 value; + +for (cur_cmd = cmd; cur_cmd->cmd !=RTW_PWR_CMD_END ; cur_cmd++) { +if (!(cur_cmd->intf_mask & intf_mask) || + !(cur_cmd->cut_mask & cut_mask)) +continue ; + +switch (cur_cmd->cmd) { +case RTW_PWR_CMD_WRITE : + offset = cur_cmd->offset; + +if (cur_cmd->base ==RTW_PWR_ADDR_SDIO ) + offset |=SDIO_LOCAL_OFFSET ; + + value =rtw_read8 (rtwdev, offset); + value &= ~cur_cmd->mask; + value |= (cur_cmd->value & cur_cmd->mask); +rtw_write8 (rtwdev, offset, value); +break ; +case RTW_PWR_CMD_POLLING : +if (rtw_pwr_cmd_polling (rtwdev, cur_cmd)) +return -EBUSY ; +break ; +case RTW_PWR_CMD_DELAY : +if (cur_cmd->value ==RTW_PWR_DELAY_US ) +udelay (cur_cmd->offset); +else +mdelay (cur_cmd->offset); +break ; +case RTW_PWR_CMD_READ : +break ; +default : +return -EINVAL ; + } + } + +return 0 ; +} + +static int rtw_pwr_seq_parser (struct rtw_dev *rtwdev, +struct rtw_pwr_seq_cmd **cmd_seq) +{ +u8 cut_mask; +u8 intf_mask; +u8 cut; +u32 idx =0 ; +struct rtw_pwr_seq_cmd *cmd; +int ret; + + cut = rtwdev->hal.cut_version; + cut_mask =cut_version_to_mask (cut); +switch (rtw_hci_type (rtwdev)) { +case RTW_HCI_TYPE_PCIE : + intf_mask =BIT (2 ); +break ; +case RTW_HCI_TYPE_USB : + intf_mask =BIT (1 ); +break ; +default : +return -EINVAL ; + } + +do { + cmd = cmd_seq[idx]; +if (!cmd) +break ; + + ret =rtw_sub_pwr_seq_parser (rtwdev, intf_mask, cut_mask, cmd); +if (ret) +return -EBUSY ; + + idx++; + }while (1 ); + +return 0 ; +} + +static int rtw_mac_power_switch (struct rtw_dev *rtwdev,bool pwr_on) +{ +struct rtw_chip_info *chip = rtwdev->chip; +struct rtw_pwr_seq_cmd **pwr_seq; +u8 rpwm; +bool cur_pwr; + + rpwm =rtw_read8 (rtwdev, rtwdev->hci.rpwm_addr); + +/* Check FW still exist or not */ +if (rtw_read16 (rtwdev,REG_MCUFW_CTRL ) ==0xC078 ) { + rpwm = (rpwm ^BIT_RPWM_TOGGLE ) &BIT_RPWM_TOGGLE ; +rtw_write8 (rtwdev, rtwdev->hci.rpwm_addr, rpwm); + } + +if (rtw_read8 (rtwdev,REG_CR ) ==0xea ) + cur_pwr = false; +else if (rtw_hci_type (rtwdev) ==RTW_HCI_TYPE_USB && + (rtw_read8 (rtwdev,REG_SYS_STATUS1 +1 ) &BIT (0 ))) + cur_pwr = false; +else + cur_pwr = true; + +if (pwr_on && cur_pwr) +return -EALREADY ; + + pwr_seq = pwr_on ? chip->pwr_on_seq : chip->pwr_off_seq; +if (rtw_pwr_seq_parser (rtwdev, pwr_seq)) +return -EINVAL ; + +return 0 ; +} + +static int rtw_mac_init_system_cfg (struct rtw_dev *rtwdev) +{ +u8 sys_func_en = rtwdev->chip->sys_func_en; +u8 value8; +u32 value, tmp; + + value =rtw_read32 (rtwdev,REG_CPU_DMEM_CON ); + value |=BIT_WL_PLATFORM_RST |BIT_DDMA_EN ; +rtw_write32 (rtwdev,REG_CPU_DMEM_CON , value); + +rtw_write8 (rtwdev,REG_SYS_FUNC_EN +1 , sys_func_en); + value8 = (rtw_read8 (rtwdev,REG_CR_EXT +3 ) &0xF0 ) |0x0C ; +rtw_write8 (rtwdev,REG_CR_EXT +3 , value8); + +/* disable boot-from-flash for driver's DL FW */ + tmp =rtw_read32 (rtwdev,REG_MCUFW_CTRL ); +if (tmp &BIT_BOOT_FSPI_EN ) { +rtw_write32 (rtwdev,REG_MCUFW_CTRL , tmp & (~BIT_BOOT_FSPI_EN )); + value =rtw_read32 (rtwdev,REG_GPIO_MUXCFG ) & (~BIT_FSPI_EN ); +rtw_write32 (rtwdev,REG_GPIO_MUXCFG , value); + } + +return 0 ; +} + +int rtw_mac_power_on (struct rtw_dev *rtwdev) +{ +int ret =0 ; + + ret =rtw_mac_pre_system_cfg (rtwdev); +if (ret) + goto err; + + ret =rtw_mac_power_switch (rtwdev, true); +if (ret) + goto err; + + ret =rtw_mac_init_system_cfg (rtwdev); +if (ret) + goto err; + +return 0 ; + +err: +rtw_err (rtwdev,"mac power on failed" ); +return ret; +} + +void rtw_mac_power_off (struct rtw_dev *rtwdev) +{ +rtw_mac_power_switch (rtwdev, false); +} + +static bool check_firmware_size (const u8 *data,u32 size) +{ +u32 dmem_size; +u32 imem_size; +u32 emem_size; +u32 real_size; + + dmem_size =le32_to_cpu (*((__le32 *)(data +FW_HDR_DMEM_SIZE ))); + imem_size =le32_to_cpu (*((__le32 *)(data +FW_HDR_IMEM_SIZE ))); + emem_size = ((*(data +FW_HDR_MEM_USAGE )) &BIT (4 )) ? +le32_to_cpu (*((__le32 *)(data +FW_HDR_EMEM_SIZE ))) :0 ; + + dmem_size +=FW_HDR_CHKSUM_SIZE ; + imem_size +=FW_HDR_CHKSUM_SIZE ; + emem_size += emem_size ?FW_HDR_CHKSUM_SIZE :0 ; + real_size =FW_HDR_SIZE + dmem_size + imem_size + emem_size; +if (real_size != size) +return false; + +return true; +} + +static void wlan_cpu_enable (struct rtw_dev *rtwdev,bool enable) +{ +if (enable) { +/* cpu io interface enable */ +rtw_write8_set (rtwdev,REG_RSV_CTRL +1 ,BIT_WLMCU_IOIF ); + +/* cpu enable */ +rtw_write8_set (rtwdev,REG_SYS_FUNC_EN +1 ,BIT_FEN_CPUEN ); + }else { +/* cpu io interface disable */ +rtw_write8_clr (rtwdev,REG_SYS_FUNC_EN +1 ,BIT_FEN_CPUEN ); + +/* cpu disable */ +rtw_write8_clr (rtwdev,REG_RSV_CTRL +1 ,BIT_WLMCU_IOIF ); + } +} + +#define DLFW_RESTORE_REG_NUM 6 + +static void download_firmware_reg_backup (struct rtw_dev *rtwdev, +struct rtw_backup_info *bckp) +{ +u8 tmp; +u8 bckp_idx =0 ; + +/* set HIQ to hi priority */ + bckp[bckp_idx].len =1 ; + bckp[bckp_idx].reg =REG_TXDMA_PQ_MAP +1 ; + bckp[bckp_idx].val =rtw_read8 (rtwdev,REG_TXDMA_PQ_MAP +1 ); + bckp_idx++; + tmp =RTW_DMA_MAPPING_HIGH <<6 ; +rtw_write8 (rtwdev,REG_TXDMA_PQ_MAP +1 , tmp); + +/* DLFW only use HIQ, map HIQ to hi priority */ + bckp[bckp_idx].len =1 ; + bckp[bckp_idx].reg =REG_CR ; + bckp[bckp_idx].val =rtw_read8 (rtwdev,REG_CR ); + bckp_idx++; + bckp[bckp_idx].len =4 ; + bckp[bckp_idx].reg =REG_H2CQ_CSR ; + bckp[bckp_idx].val =BIT_H2CQ_FULL ; + bckp_idx++; + tmp =BIT_HCI_TXDMA_EN |BIT_TXDMA_EN ; +rtw_write8 (rtwdev,REG_CR , tmp); +rtw_write32 (rtwdev,REG_H2CQ_CSR ,BIT_H2CQ_FULL ); + +/* Config hi priority queue and public priority queue page number */ + bckp[bckp_idx].len =2 ; + bckp[bckp_idx].reg =REG_FIFOPAGE_INFO_1 ; + bckp[bckp_idx].val =rtw_read16 (rtwdev,REG_FIFOPAGE_INFO_1 ); + bckp_idx++; + bckp[bckp_idx].len =4 ; + bckp[bckp_idx].reg =REG_RQPN_CTRL_2 ; + bckp[bckp_idx].val =rtw_read32 (rtwdev,REG_RQPN_CTRL_2 ) |BIT_LD_RQPN ; + bckp_idx++; +rtw_write16 (rtwdev,REG_FIFOPAGE_INFO_1 ,0x200 ); +rtw_write32 (rtwdev,REG_RQPN_CTRL_2 , bckp[bckp_idx -1 ].val); + +/* Disable beacon related functions */ + tmp =rtw_read8 (rtwdev,REG_BCN_CTRL ); + bckp[bckp_idx].len =1 ; + bckp[bckp_idx].reg =REG_BCN_CTRL ; + bckp[bckp_idx].val = tmp; + bckp_idx++; + tmp = (u8)((tmp & (~BIT_EN_BCN_FUNCTION )) |BIT_DIS_TSF_UDT ); +rtw_write8 (rtwdev,REG_BCN_CTRL , tmp); + +WARN (bckp_idx !=DLFW_RESTORE_REG_NUM ,"wrong backup number\n" ); +} + +static void download_firmware_reset_platform (struct rtw_dev *rtwdev) +{ +rtw_write8_clr (rtwdev,REG_CPU_DMEM_CON +2 ,BIT_WL_PLATFORM_RST >>16 ); +rtw_write8_clr (rtwdev,REG_SYS_CLK_CTRL +1 ,BIT_CPU_CLK_EN >>8 ); +rtw_write8_set (rtwdev,REG_CPU_DMEM_CON +2 ,BIT_WL_PLATFORM_RST >>16 ); +rtw_write8_set (rtwdev,REG_SYS_CLK_CTRL +1 ,BIT_CPU_CLK_EN >>8 ); +} + +static void download_firmware_reg_restore (struct rtw_dev *rtwdev, +struct rtw_backup_info *bckp, +u8 bckp_num) +{ +rtw_restore_reg (rtwdev, bckp, bckp_num); +} + +#define TX_DESC_SIZE 48 + +static int send_firmware_pkt_rsvd_page (struct rtw_dev *rtwdev,u16 pg_addr, +const u8 *data,u32 size) +{ +u8 *buf; +int ret; + + buf =kmemdup (data, size,GFP_KERNEL ); +if (!buf) +return -ENOMEM ; + + ret =rtw_fw_write_data_rsvd_page (rtwdev, pg_addr, buf, size); +kfree (buf); +return ret; +} + +static int +send_firmware_pkt (struct rtw_dev *rtwdev,u16 pg_addr,const u8 *data,u32 size) +{ +int ret; + +if (rtw_hci_type (rtwdev) ==RTW_HCI_TYPE_USB && + !((size +TX_DESC_SIZE ) & (512 -1 ))) + size +=1 ; + + ret =send_firmware_pkt_rsvd_page (rtwdev, pg_addr, data, size); +if (ret) +rtw_err (rtwdev,"failed to download rsvd page\n" ); + +return ret; +} + +static int +iddma_enable (struct rtw_dev *rtwdev,u32 src,u32 dst,u32 ctrl) +{ +rtw_write32 (rtwdev,REG_DDMA_CH0SA , src); +rtw_write32 (rtwdev,REG_DDMA_CH0DA , dst); +rtw_write32 (rtwdev,REG_DDMA_CH0CTRL , ctrl); + +if (!check_hw_ready (rtwdev,REG_DDMA_CH0CTRL ,BIT_DDMACH0_OWN ,0 )) +return -EBUSY ; + +return 0 ; +} + +static int iddma_download_firmware (struct rtw_dev *rtwdev,u32 src,u32 dst, +u32 len,u8 first) +{ +u32 ch0_ctrl =BIT_DDMACH0_CHKSUM_EN |BIT_DDMACH0_OWN ; + +if (!check_hw_ready (rtwdev,REG_DDMA_CH0CTRL ,BIT_DDMACH0_OWN ,0 )) +return -EBUSY ; + + ch0_ctrl |= len &BIT_MASK_DDMACH0_DLEN ; +if (!first) + ch0_ctrl |=BIT_DDMACH0_CHKSUM_CONT ; + +if (iddma_enable (rtwdev, src, dst, ch0_ctrl)) +return -EBUSY ; + +return 0 ; +} + +static bool +check_fw_checksum (struct rtw_dev *rtwdev,u32 addr) +{ +u8 fw_ctrl; + + fw_ctrl =rtw_read8 (rtwdev,REG_MCUFW_CTRL ); + +if (rtw_read32 (rtwdev,REG_DDMA_CH0CTRL ) &BIT_DDMACH0_CHKSUM_STS ) { +if (addr <OCPBASE_DMEM_88XX ) { + fw_ctrl |=BIT_IMEM_DW_OK ; + fw_ctrl &= ~BIT_IMEM_CHKSUM_OK ; +rtw_write8 (rtwdev,REG_MCUFW_CTRL , fw_ctrl); + }else { + fw_ctrl |=BIT_DMEM_DW_OK ; + fw_ctrl &= ~BIT_DMEM_CHKSUM_OK ; +rtw_write8 (rtwdev,REG_MCUFW_CTRL , fw_ctrl); + } + +rtw_err (rtwdev,"invalid fw checksum\n" ); + +return false; + } + +if (addr <OCPBASE_DMEM_88XX ) { + fw_ctrl |= (BIT_IMEM_DW_OK |BIT_IMEM_CHKSUM_OK ); +rtw_write8 (rtwdev,REG_MCUFW_CTRL , fw_ctrl); + }else { + fw_ctrl |= (BIT_DMEM_DW_OK |BIT_DMEM_CHKSUM_OK ); +rtw_write8 (rtwdev,REG_MCUFW_CTRL , fw_ctrl); + } + +return true; +} + +static int +download_firmware_to_mem (struct rtw_dev *rtwdev,const u8 *data, +u32 src,u32 dst,u32 size) +{ +struct rtw_chip_info *chip = rtwdev->chip; +u32 desc_size = chip->tx_pkt_desc_sz; +u8 first_part; +u32 mem_offset; +u32 residue_size; +u32 pkt_size; +u32 max_size =0x1000 ; +u32 val; +int ret; + + mem_offset =0 ; + first_part =1 ; + residue_size = size; + + val =rtw_read32 (rtwdev,REG_DDMA_CH0CTRL ); + val |=BIT_DDMACH0_RESET_CHKSUM_STS ; +rtw_write32 (rtwdev,REG_DDMA_CH0CTRL , val); + +while (residue_size) { +if (residue_size >= max_size) + pkt_size = max_size; +else + pkt_size = residue_size; + + ret =send_firmware_pkt (rtwdev, (u16)(src >>7 ), + data + mem_offset, pkt_size); +if (ret) +return ret; + + ret =iddma_download_firmware (rtwdev,OCPBASE_TXBUF_88XX + + src + desc_size, + dst + mem_offset, pkt_size, + first_part); +if (ret) +return ret; + + first_part =0 ; + mem_offset += pkt_size; + residue_size -= pkt_size; + } + +if (!check_fw_checksum (rtwdev, dst)) +return -EINVAL ; + +return 0 ; +} + +static void update_firmware_info (struct rtw_dev *rtwdev, +struct rtw_fw_state *fw) +{ +const u8 *data = fw->firmware->data; + + fw->h2c_version = +le16_to_cpu (*((__le16 *)(data +FW_HDR_H2C_FMT_VER ))); + fw->version = +le16_to_cpu (*((__le16 *)(data +FW_HDR_VERSION ))); + fw->sub_version = *(data +FW_HDR_SUBVERSION ); + fw->sub_index = *(data +FW_HDR_SUBINDEX ); + +rtw_dbg (rtwdev,RTW_DBG_FW ,"fw h2c version: %x\n" , fw->h2c_version); +rtw_dbg (rtwdev,RTW_DBG_FW ,"fw version: %x\n" , fw->version); +rtw_dbg (rtwdev,RTW_DBG_FW ,"fw sub version: %x\n" , fw->sub_version); +rtw_dbg (rtwdev,RTW_DBG_FW ,"fw sub index: %x\n" , fw->sub_index); +} + +static int +start_download_firmware (struct rtw_dev *rtwdev,const u8 *data,u32 size) +{ +const u8 *cur_fw; +u16 val; +u32 imem_size; +u32 dmem_size; +u32 emem_size; +u32 addr; +int ret; + + dmem_size =le32_to_cpu (*((__le32 *)(data +FW_HDR_DMEM_SIZE ))); + imem_size =le32_to_cpu (*((__le32 *)(data +FW_HDR_IMEM_SIZE ))); + emem_size = ((*(data +FW_HDR_MEM_USAGE )) &BIT (4 )) ? +le32_to_cpu (*((__le32 *)(data +FW_HDR_EMEM_SIZE ))) :0 ; + dmem_size +=FW_HDR_CHKSUM_SIZE ; + imem_size +=FW_HDR_CHKSUM_SIZE ; + emem_size += emem_size ?FW_HDR_CHKSUM_SIZE :0 ; + + val = (u16)(rtw_read16 (rtwdev,REG_MCUFW_CTRL ) &0x3800 ); + val |=BIT_MCUFWDL_EN ; +rtw_write16 (rtwdev,REG_MCUFW_CTRL , val); + + cur_fw = data +FW_HDR_SIZE ; + addr =le32_to_cpu (*((__le32 *)(data +FW_HDR_DMEM_ADDR ))); + addr &= ~BIT (31 ); + ret =download_firmware_to_mem (rtwdev, cur_fw,0 , addr, dmem_size); +if (ret) +return ret; + + cur_fw = data +FW_HDR_SIZE + dmem_size; + addr =le32_to_cpu (*((__le32 *)(data +FW_HDR_IMEM_ADDR ))); + addr &= ~BIT (31 ); + ret =download_firmware_to_mem (rtwdev, cur_fw,0 , addr, imem_size); +if (ret) +return ret; + +if (emem_size) { + cur_fw = data +FW_HDR_SIZE + dmem_size + imem_size; + addr =le32_to_cpu (*((__le32 *)(data +FW_HDR_EMEM_ADDR ))); + addr &= ~BIT (31 ); + ret =download_firmware_to_mem (rtwdev, cur_fw,0 , addr, + emem_size); +if (ret) +return ret; + } + +return 0 ; +} + +static int download_firmware_validate (struct rtw_dev *rtwdev) +{ +u32 fw_key; + +if (!check_hw_ready (rtwdev,REG_MCUFW_CTRL ,FW_READY_MASK ,FW_READY )) { + fw_key =rtw_read32 (rtwdev,REG_FW_DBG7 ) &FW_KEY_MASK ; +if (fw_key ==ILLEGAL_KEY_GROUP ) +rtw_err (rtwdev,"invalid fw key\n" ); +return -EINVAL ; + } + +return 0 ; +} + +static void download_firmware_end_flow (struct rtw_dev *rtwdev) +{ +u16 fw_ctrl; + +rtw_write32 (rtwdev,REG_TXDMA_STATUS ,BTI_PAGE_OVF ); + +/* Check IMEM & DMEM checksum is OK or not */ + fw_ctrl =rtw_read16 (rtwdev,REG_MCUFW_CTRL ); +if ((fw_ctrl &BIT_CHECK_SUM_OK ) !=BIT_CHECK_SUM_OK ) +return ; + + fw_ctrl = (fw_ctrl |BIT_FW_DW_RDY ) & ~BIT_MCUFWDL_EN ; +rtw_write16 (rtwdev,REG_MCUFW_CTRL , fw_ctrl); +} + +int rtw_download_firmware (struct rtw_dev *rtwdev,struct rtw_fw_state *fw) +{ +struct rtw_backup_info bckp[DLFW_RESTORE_REG_NUM ]; +const u8 *data = fw->firmware->data; +u32 size = fw->firmware->size; +u32 ltecoex_bckp; +int ret; + +if (!check_firmware_size (data, size)) +return -EINVAL ; + +if (!ltecoex_read_reg (rtwdev,0x38 , <ecoex_bckp)) +return -EBUSY ; + +wlan_cpu_enable (rtwdev, false); + +download_firmware_reg_backup (rtwdev, bckp); +download_firmware_reset_platform (rtwdev); + + ret =start_download_firmware (rtwdev, data, size); +if (ret) + goto dlfw_fail; + +download_firmware_reg_restore (rtwdev, bckp,DLFW_RESTORE_REG_NUM ); + +download_firmware_end_flow (rtwdev); + +wlan_cpu_enable (rtwdev, true); + +if (!ltecoex_reg_write (rtwdev,0x38 , ltecoex_bckp)) +return -EBUSY ; + + ret =download_firmware_validate (rtwdev); +if (ret) + goto dlfw_fail; + +update_firmware_info (rtwdev, fw); + +/* reset desc and index */ +rtw_hci_setup (rtwdev); + + rtwdev->h2c.last_box_num =0 ; + rtwdev->h2c.seq =0 ; + +rtw_fw_send_general_info (rtwdev); +rtw_fw_send_phydm_info (rtwdev); + +rtw_flag_set (rtwdev,RTW_FLAG_FW_RUNNING ); + +return 0 ; + +dlfw_fail: +/* Disable FWDL_EN */ +rtw_write8_clr (rtwdev,REG_MCUFW_CTRL ,BIT_MCUFWDL_EN ); +rtw_write8_set (rtwdev,REG_SYS_FUNC_EN +1 ,BIT_FEN_CPUEN ); + +return ret; +} + +static int txdma_queue_mapping (struct rtw_dev *rtwdev) +{ +struct rtw_chip_info *chip = rtwdev->chip; +struct rtw_rqpn *rqpn =NULL ; +u16 txdma_pq_map =0 ; + +switch (rtw_hci_type (rtwdev)) { +case RTW_HCI_TYPE_PCIE : + rqpn = &chip->rqpn_table[1 ]; +break ; +case RTW_HCI_TYPE_USB : +if (rtwdev->hci.bulkout_num ==2 ) + rqpn = &chip->rqpn_table[2 ]; +else if (rtwdev->hci.bulkout_num ==3 ) + rqpn = &chip->rqpn_table[3 ]; +else if (rtwdev->hci.bulkout_num ==4 ) + rqpn = &chip->rqpn_table[4 ]; +else +return -EINVAL ; +break ; +default : +return -EINVAL ; + } + + txdma_pq_map |=BIT_TXDMA_HIQ_MAP (rqpn->dma_map_hi); + txdma_pq_map |=BIT_TXDMA_MGQ_MAP (rqpn->dma_map_mg); + txdma_pq_map |=BIT_TXDMA_BKQ_MAP (rqpn->dma_map_bk); + txdma_pq_map |=BIT_TXDMA_BEQ_MAP (rqpn->dma_map_be); + txdma_pq_map |=BIT_TXDMA_VIQ_MAP (rqpn->dma_map_vi); + txdma_pq_map |=BIT_TXDMA_VOQ_MAP (rqpn->dma_map_vo); +rtw_write16 (rtwdev,REG_TXDMA_PQ_MAP , txdma_pq_map); + +rtw_write8 (rtwdev,REG_CR ,0 ); +rtw_write8 (rtwdev,REG_CR ,MAC_TRX_ENABLE ); +rtw_write32 (rtwdev,REG_H2CQ_CSR ,BIT_H2CQ_FULL ); + +return 0 ; +} + +static int set_trx_fifo_info (struct rtw_dev *rtwdev) +{ +struct rtw_fifo_conf *fifo = &rtwdev->fifo; +struct rtw_chip_info *chip = rtwdev->chip; +u16 cur_pg_addr; +u8 csi_buf_pg_num = chip->csi_buf_pg_num; + +/* config rsvd page num */ + fifo->rsvd_drv_pg_num =8 ; + fifo->txff_pg_num = chip->txff_size >>7 ; + fifo->rsvd_pg_num = fifo->rsvd_drv_pg_num + +RSVD_PG_H2C_EXTRAINFO_NUM + +RSVD_PG_H2C_STATICINFO_NUM + +RSVD_PG_H2CQ_NUM + +RSVD_PG_CPU_INSTRUCTION_NUM + +RSVD_PG_FW_TXBUF_NUM + + csi_buf_pg_num; + +if (fifo->rsvd_pg_num > fifo->txff_pg_num) +return -ENOMEM ; + + fifo->acq_pg_num = fifo->txff_pg_num - fifo->rsvd_pg_num; + fifo->rsvd_boundary = fifo->txff_pg_num - fifo->rsvd_pg_num; + + cur_pg_addr = fifo->txff_pg_num; + cur_pg_addr -= csi_buf_pg_num; + fifo->rsvd_csibuf_addr = cur_pg_addr; + cur_pg_addr -=RSVD_PG_FW_TXBUF_NUM ; + fifo->rsvd_fw_txbuf_addr = cur_pg_addr; + cur_pg_addr -=RSVD_PG_CPU_INSTRUCTION_NUM ; + fifo->rsvd_cpu_instr_addr = cur_pg_addr; + cur_pg_addr -=RSVD_PG_H2CQ_NUM ; + fifo->rsvd_h2cq_addr = cur_pg_addr; + cur_pg_addr -=RSVD_PG_H2C_STATICINFO_NUM ; + fifo->rsvd_h2c_sta_info_addr = cur_pg_addr; + cur_pg_addr -=RSVD_PG_H2C_EXTRAINFO_NUM ; + fifo->rsvd_h2c_info_addr = cur_pg_addr; + cur_pg_addr -= fifo->rsvd_drv_pg_num; + fifo->rsvd_drv_addr = cur_pg_addr; + +if (fifo->rsvd_boundary != fifo->rsvd_drv_addr) { +rtw_err (rtwdev,"wrong rsvd driver address\n" ); +return -EINVAL ; + } + +return 0 ; +} + +static int priority_queue_cfg (struct rtw_dev *rtwdev) +{ +struct rtw_fifo_conf *fifo = &rtwdev->fifo; +struct rtw_chip_info *chip = rtwdev->chip; +struct rtw_page_table *pg_tbl =NULL ; +u16 pubq_num; +int ret; + + ret =set_trx_fifo_info (rtwdev); +if (ret) +return ret; + +switch (rtw_hci_type (rtwdev)) { +case RTW_HCI_TYPE_PCIE : + pg_tbl = &chip->page_table[1 ]; +break ; +case RTW_HCI_TYPE_USB : +if (rtwdev->hci.bulkout_num ==2 ) + pg_tbl = &chip->page_table[2 ]; +else if (rtwdev->hci.bulkout_num ==3 ) + pg_tbl = &chip->page_table[3 ]; +else if (rtwdev->hci.bulkout_num ==4 ) + pg_tbl = &chip->page_table[4 ]; +else +return -EINVAL ; +break ; +default : +return -EINVAL ; + } + + pubq_num = fifo->acq_pg_num - pg_tbl->hq_num - pg_tbl->lq_num - + pg_tbl->nq_num - pg_tbl->exq_num - pg_tbl->gapq_num; +rtw_write16 (rtwdev,REG_FIFOPAGE_INFO_1 , pg_tbl->hq_num); +rtw_write16 (rtwdev,REG_FIFOPAGE_INFO_2 , pg_tbl->lq_num); +rtw_write16 (rtwdev,REG_FIFOPAGE_INFO_3 , pg_tbl->nq_num); +rtw_write16 (rtwdev,REG_FIFOPAGE_INFO_4 , pg_tbl->exq_num); +rtw_write16 (rtwdev,REG_FIFOPAGE_INFO_5 , pubq_num); +rtw_write32_set (rtwdev,REG_RQPN_CTRL_2 ,BIT_LD_RQPN ); + +rtw_write16 (rtwdev,REG_FIFOPAGE_CTRL_2 , fifo->rsvd_boundary); +rtw_write8_set (rtwdev,REG_FWHW_TXQ_CTRL +2 ,BIT_EN_WR_FREE_TAIL >>16 ); + +rtw_write16 (rtwdev,REG_BCNQ_BDNY_V1 , fifo->rsvd_boundary); +rtw_write16 (rtwdev,REG_FIFOPAGE_CTRL_2 +2 , fifo->rsvd_boundary); +rtw_write16 (rtwdev,REG_BCNQ1_BDNY_V1 , fifo->rsvd_boundary); +rtw_write32 (rtwdev,REG_RXFF_BNDY , chip->rxff_size -C2H_PKT_BUF -1 ); +rtw_write8_set (rtwdev,REG_AUTO_LLT_V1 ,BIT_AUTO_INIT_LLT_V1 ); + +if (!check_hw_ready (rtwdev,REG_AUTO_LLT_V1 ,BIT_AUTO_INIT_LLT_V1 ,0 )) +return -EBUSY ; + +rtw_write8 (rtwdev,REG_CR +3 ,0 ); + +return 0 ; +} + +static int init_h2c (struct rtw_dev *rtwdev) +{ +struct rtw_fifo_conf *fifo = &rtwdev->fifo; +u8 value8; +u32 value32; +u32 h2cq_addr; +u32 h2cq_size; +u32 h2cq_free; +u32 wp, rp; + + h2cq_addr = fifo->rsvd_h2cq_addr <<TX_PAGE_SIZE_SHIFT ; + h2cq_size =RSVD_PG_H2CQ_NUM <<TX_PAGE_SIZE_SHIFT ; + + value32 =rtw_read32 (rtwdev,REG_H2C_HEAD ); + value32 = (value32 &0xFFFC0000 ) | h2cq_addr; +rtw_write32 (rtwdev,REG_H2C_HEAD , value32); + + value32 =rtw_read32 (rtwdev,REG_H2C_READ_ADDR ); + value32 = (value32 &0xFFFC0000 ) | h2cq_addr; +rtw_write32 (rtwdev,REG_H2C_READ_ADDR , value32); + + value32 =rtw_read32 (rtwdev,REG_H2C_TAIL ); + value32 &=0xFFFC0000 ; + value32 |= (h2cq_addr + h2cq_size); +rtw_write32 (rtwdev,REG_H2C_TAIL , value32); + + value8 =rtw_read8 (rtwdev,REG_H2C_INFO ); + value8 = (u8)((value8 &0xFC ) |0x01 ); +rtw_write8 (rtwdev,REG_H2C_INFO , value8); + + value8 =rtw_read8 (rtwdev,REG_H2C_INFO ); + value8 = (u8)((value8 &0xFB ) |0x04 ); +rtw_write8 (rtwdev,REG_H2C_INFO , value8); + + value8 =rtw_read8 (rtwdev,REG_TXDMA_OFFSET_CHK +1 ); + value8 = (u8)((value8 &0x7f ) |0x80 ); +rtw_write8 (rtwdev,REG_TXDMA_OFFSET_CHK +1 , value8); + + wp =rtw_read32 (rtwdev,REG_H2C_PKT_WRITEADDR ) &0x3FFFF ; + rp =rtw_read32 (rtwdev,REG_H2C_PKT_READADDR ) &0x3FFFF ; + h2cq_free = wp >= rp ? h2cq_size - (wp - rp) : rp - wp; + +if (h2cq_size != h2cq_free) { +rtw_err (rtwdev,"H2C queue mismatch\n" ); +return -EINVAL ; + } + +return 0 ; +} + +static int rtw_init_trx_cfg (struct rtw_dev *rtwdev) +{ +int ret; + + ret =txdma_queue_mapping (rtwdev); +if (ret) +return ret; + + ret =priority_queue_cfg (rtwdev); +if (ret) +return ret; + + ret =init_h2c (rtwdev); +if (ret) +return ret; + +return 0 ; +} + +static int rtw_drv_info_cfg (struct rtw_dev *rtwdev) +{ +u8 value8; + +rtw_write8 (rtwdev,REG_RX_DRVINFO_SZ ,PHY_STATUS_SIZE ); + value8 =rtw_read8 (rtwdev,REG_TRXFF_BNDY +1 ); + value8 &=0xF0 ; +/* For rxdesc len = 0 issue */ + value8 |=0xF ; +rtw_write8 (rtwdev,REG_TRXFF_BNDY +1 , value8); +rtw_write32_set (rtwdev,REG_RCR ,BIT_APP_PHYSTS ); +rtw_write32_clr (rtwdev,REG_WMAC_OPTION_FUNCTION +4 ,BIT (8 ) |BIT (9 )); + +return 0 ; +} + +int rtw_mac_init (struct rtw_dev *rtwdev) +{ +struct rtw_chip_info *chip = rtwdev->chip; +int ret; + + ret =rtw_init_trx_cfg (rtwdev); +if (ret) +return ret; + + ret = chip->ops->mac_init (rtwdev); +if (ret) +return ret; + + ret =rtw_drv_info_cfg (rtwdev); +if (ret) +return ret; + +return 0 ; +}
drivers/net/wireless/realtek/rtw88/mac.h new file +35 -0
@@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#ifndef __RTW_MAC_H__ +#define __RTW_MAC_H__ + +#define RTW_HW_PORT_NUM 5 +#define cut_version_to_mask (cut) (0x1 << ((cut) + 1)) +#define SDIO_LOCAL_OFFSET 0x10250000 +#define DDMA_POLLING_COUNT 1000 +#define C2H_PKT_BUF 256 +#define PHY_STATUS_SIZE 4 +#define ILLEGAL_KEY_GROUP 0xFAAAAA00 + +/* HW memory address */ +#define OCPBASE_TXBUF_88XX 0x18780000 +#define OCPBASE_DMEM_88XX 0x00200000 +#define OCPBASE_EMEM_88XX 0x00100000 + +#define RSVD_PG_DRV_NUM 16 +#define RSVD_PG_H2C_EXTRAINFO_NUM 24 +#define RSVD_PG_H2C_STATICINFO_NUM 8 +#define RSVD_PG_H2CQ_NUM 8 +#define RSVD_PG_CPU_INSTRUCTION_NUM 0 +#define RSVD_PG_FW_TXBUF_NUM 4 + +void rtw_set_channel_mac (struct rtw_dev *rtwdev,u8 channel,u8 bw, +u8 primary_ch_idx); +int rtw_mac_power_on (struct rtw_dev *rtwdev); +void rtw_mac_power_off (struct rtw_dev *rtwdev); +int rtw_download_firmware (struct rtw_dev *rtwdev,struct rtw_fw_state *fw); +int rtw_mac_init (struct rtw_dev *rtwdev); + +#endif
Signature · 1 line
2.7.4
Re: [PATCH v9 05/14] rtw88: mac files
Quoted 6 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
mac files for Realtek 802.11ac wireless network chips
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
Quoted 26 lines
drivers/net/wireless/realtek/rtw88/mac.c new file +26
-0+static int rtw_pwr_cmd_polling (struct rtw_dev *rtwdev, +struct rtw_pwr_seq_cmd *cmd) +{ +u8 value; +u8 flag =0 ; +u32 offset; +u32 cnt =RTW_PWR_POLLING_CNT ; + +if (cmd->base ==RTW_PWR_ADDR_SDIO ) + offset = cmd->offset |SDIO_LOCAL_OFFSET ; +else + offset = cmd->offset; + + do { + cnt--; + value = rtw_read8(rtwdev, offset); + value &= cmd->mask; + if (value == (cmd->value & cmd->mask)) + return 0; + if (cnt == 0) { + if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_PCIE && + flag == 0) { + value = rtw_read8(rtwdev, REG_SYS_PW_CTRL); + value |= BIT(3); + rtw_write8(rtwdev, REG_SYS_PW_CTRL, value); + value &= ~BIT(3);
drivers/net/wireless/realtek/rtw88/mac.c line 136
Quoted 10 lines
drivers/net/wireless/realtek/rtw88/mac.c new file +10
-0+rtw_write8 (rtwdev,REG_SYS_PW_CTRL , value); + cnt =RTW_PWR_POLLING_CNT ; + flag =1 ; + }else { +return -EBUSY ; + } + }else { +udelay (50 ); + } + }while (1 );
Never ending loops in kernel are dangerous. I would add some kind of fail safe to "while (1)", for example max number of loops or some time based limit.
Signature · 1 line
Kalle Valo
PATCH v9 6/14 rtw88: fw and efuse files
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
fw and efuse files for Realtek 802.11ac wireless network chips
--- 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 ++++++++++ 4 files changed, 1041 insertions(+) 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
drivers/net/wireless/realtek/rtw88/efuse.c new file +160 -0
@@ -0,0 +1,160 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include "main.h" +#include "efuse.h" +#include "reg.h" +#include "debug.h" + +#define RTW_EFUSE_BANK_WIFI 0x0 + +static void switch_efuse_bank (struct rtw_dev *rtwdev) +{ +rtw_write32_mask (rtwdev,REG_LDO_EFUSE_CTRL ,BIT_MASK_EFUSE_BANK_SEL , +RTW_EFUSE_BANK_WIFI ); +} + +#define invalid_efuse_header (hdr1, hdr2) \ + ((hdr1) == 0xff || (((hdr1) & 0x1f) == 0xf && (hdr2) == 0xff)) +#define invalid_efuse_content (word_en, i) \ + (((word_en) & BIT(i)) != 0x0) +#define get_efuse_blk_idx_2_byte (hdr1, hdr2) \ + ((((hdr2) & 0xf0) >> 1) | (((hdr1) >> 5) & 0x07)) +#define get_efuse_blk_idx_1_byte (hdr1) \ + (((hdr1) & 0xf0) >> 4) +#define block_idx_to_logical_idx (blk_idx, i) \ + (((blk_idx) << 3) + ((i) << 1)) + +/* efuse header format +* +* | 7 5 4 0 | 7 4 3 0 | 15 8 7 0 | +* block[2:0] 0 1111 block[6:3] word_en[3:0] byte0 byte1 +* | header 1 (optional) | header 2 | word N | +* +* word_en: 4 bits each word. 0 -> write; 1 -> not write +* N: 1~4, depends on word_en +*/ +static int rtw_dump_logical_efuse_map (struct rtw_dev *rtwdev,u8 *phy_map, +u8 *log_map) +{ +u32 physical_size = rtwdev->efuse.physical_size; +u32 protect_size = rtwdev->efuse.protect_size; +u32 logical_size = rtwdev->efuse.logical_size; +u32 phy_idx, log_idx; +u8 hdr1, hdr2; +u8 blk_idx; +u8 word_en; +int i; + +for (phy_idx =0 ; phy_idx < physical_size - protect_size;) { + hdr1 = phy_map[phy_idx]; + hdr2 = phy_map[phy_idx +1 ]; +if (invalid_efuse_header (hdr1, hdr2)) +break ; + +if ((hdr1 &0x1f ) ==0xf ) { +/* 2-byte header format */ + blk_idx =get_efuse_blk_idx_2_byte (hdr1, hdr2); + word_en = hdr2 &0xf ; + phy_idx +=2 ; + }else { +/* 1-byte header format */ + blk_idx =get_efuse_blk_idx_1_byte (hdr1); + word_en = hdr1 &0xf ; + phy_idx +=1 ; + } + +for (i =0 ; i <4 ; i++) { +if (invalid_efuse_content (word_en, i)) +continue ; + + log_idx =block_idx_to_logical_idx (blk_idx, i); +if (phy_idx +1 > physical_size - protect_size || + log_idx +1 > logical_size) +return -EINVAL ; + + log_map[log_idx] = phy_map[phy_idx]; + log_map[log_idx +1 ] = phy_map[phy_idx +1 ]; + phy_idx +=2 ; + } + } +return 0 ; +} + +static int rtw_dump_physical_efuse_map (struct rtw_dev *rtwdev,u8 *map) +{ +struct rtw_chip_info *chip = rtwdev->chip; +u32 size = rtwdev->efuse.physical_size; +u32 efuse_ctl; +u32 addr; +u32 cnt; + +switch_efuse_bank (rtwdev); + +/* disable 2.5V LDO */ + chip->ops->cfg_ldo25 (rtwdev, false); + + efuse_ctl =rtw_read32 (rtwdev,REG_EFUSE_CTRL ); + +for (addr =0 ; addr < size; addr++) { + efuse_ctl &= ~(BIT_MASK_EF_DATA |BITS_EF_ADDR ); + efuse_ctl |= (addr &BIT_MASK_EF_ADDR ) <<BIT_SHIFT_EF_ADDR ; +rtw_write32 (rtwdev,REG_EFUSE_CTRL , efuse_ctl & (~BIT_EF_FLAG )); + + cnt =1000000 ; +do { +udelay (1 ); + efuse_ctl =rtw_read32 (rtwdev,REG_EFUSE_CTRL ); +if (--cnt ==0 ) +return -EBUSY ; + }while (!(efuse_ctl &BIT_EF_FLAG )); + + *(map + addr) = (u8)(efuse_ctl &BIT_MASK_EF_DATA ); + } + +return 0 ; +} + +int rtw_parse_efuse_map (struct rtw_dev *rtwdev) +{ +struct rtw_chip_info *chip = rtwdev->chip; +struct rtw_efuse *efuse = &rtwdev->efuse; +u32 phy_size = efuse->physical_size; +u32 log_size = efuse->logical_size; +u8 *phy_map =NULL ; +u8 *log_map =NULL ; +int ret =0 ; + + phy_map =kmalloc (phy_size,GFP_KERNEL ); + log_map =kmalloc (log_size,GFP_KERNEL ); +if (!phy_map || !log_map) { + ret = -ENOMEM ; + goto out_free; + } + + ret =rtw_dump_physical_efuse_map (rtwdev, phy_map); +if (ret) { +rtw_err (rtwdev,"failed to dump efuse physical map\n" ); + goto out_free; + } + +memset (log_map,0xff , log_size); + ret =rtw_dump_logical_efuse_map (rtwdev, phy_map, log_map); +if (ret) { +rtw_err (rtwdev,"failed to dump efuse logical map\n" ); + goto out_free; + } + + ret = chip->ops->read_efuse (rtwdev, log_map); +if (ret) { +rtw_err (rtwdev,"failed to read efuse map\n" ); + goto out_free; + } + +out_free: +kfree (log_map); +kfree (phy_map); + +return ret; +}
drivers/net/wireless/realtek/rtw88/efuse.h new file +26 -0
@@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#ifndef __RTW_EFUSE_H__ +#define __RTW_EFUSE_H__ + +#define EFUSE_HW_CAP_IGNORE 0 +#define EFUSE_HW_CAP_PTCL_VHT 3 +#define EFUSE_HW_CAP_SUPP_BW80 7 +#define EFUSE_HW_CAP_SUPP_BW40 6 + +#define GET_EFUSE_HW_CAP_HCI (hw_cap) \ + le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(3, 0)) +#define GET_EFUSE_HW_CAP_BW (hw_cap) \ + le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(18, 16)) +#define GET_EFUSE_HW_CAP_NSS (hw_cap) \ + le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(20, 19)) +#define GET_EFUSE_HW_CAP_ANT_NUM (hw_cap) \ + le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(23, 21)) +#define GET_EFUSE_HW_CAP_PTCL (hw_cap) \ + le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(27, 26)) + +int rtw_parse_efuse_map (struct rtw_dev *rtwdev); + +#endif
drivers/net/wireless/realtek/rtw88/fw.c new file +633 -0
633 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/fw.h new file +222 -0
222 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v9 7/14 rtw88: phy files
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
phy files for Realtek 802.11ac wireless network chips
--- drivers/net/wireless/realtek/rtw88/phy.c | 1724 ++++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/phy.h | 134 +++ 2 files changed, 1858 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/phy.c create mode 100644 drivers/net/wireless/realtek/rtw88/phy.h
drivers/net/wireless/realtek/rtw88/phy.c new file +1724 -0
@@ -0,0 +1,1724 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include <linux/bcd.h> + +#include "main.h" +#include "reg.h" +#include "fw.h" +#include "phy.h" +#include "debug.h" + +struct phy_cfg_pair { +u32 addr; +u32 data; +}; + +union phy_table_tile { +struct rtw_phy_cond cond; +struct phy_cfg_pair cfg; +}; + +struct phy_pg_cfg_pair { +u32 band; +u32 rf_path; +u32 tx_num; +u32 addr; +u32 bitmask; +u32 data; +}; + +struct txpwr_lmt_cfg_pair { +u8 regd; +u8 band; +u8 bw; +u8 rs; +u8 ch; +s8 txpwr_lmt; +}; + +static const u32 db_invert_table[12 ][8 ] = { + {10 ,13 ,16 ,20 , +25 ,32 ,40 ,50 }, + {64 ,80 ,101 ,128 , +160 ,201 ,256 ,318 }, + {401 ,505 ,635 ,800 , +1007 ,1268 ,1596 ,2010 }, + {316 ,398 ,501 ,631 , +794 ,1000 ,1259 ,1585 }, + {1995 ,2512 ,3162 ,3981 , +5012 ,6310 ,7943 ,10000 }, + {12589 ,15849 ,19953 ,25119 , +31623 ,39811 ,50119 ,63098 }, + {79433 ,100000 ,125893 ,158489 , +199526 ,251189 ,316228 ,398107 }, + {501187 ,630957 ,794328 ,1000000 , +1258925 ,1584893 ,1995262 ,2511886 }, + {3162278 ,3981072 ,5011872 ,6309573 , +7943282 ,1000000 ,12589254 ,15848932 }, + {19952623 ,25118864 ,31622777 ,39810717 , +50118723 ,63095734 ,79432823 ,100000000 }, + {125892541 ,158489319 ,199526232 ,251188643 , +316227766 ,398107171 ,501187234 ,630957345 }, + {794328235 ,1000000000 ,1258925412 ,1584893192 , +1995262315 ,2511886432U ,3162277660U ,3981071706U } +}; + +enum rtw_phy_band_type { +PHY_BAND_2G =0 , +PHY_BAND_5G =1 , +}; + +void rtw_phy_init (struct rtw_dev *rtwdev) +{ +struct rtw_chip_info *chip = rtwdev->chip; +struct rtw_dm_info *dm_info = &rtwdev->dm_info; +u32 addr, mask; + + dm_info->fa_history[3 ] =0 ; + dm_info->fa_history[2 ] =0 ; + dm_info->fa_history[1 ] =0 ; + dm_info->fa_history[0 ] =0 ; + dm_info->igi_bitmap =0 ; + dm_info->igi_history[3 ] =0 ; + dm_info->igi_history[2 ] =0 ; + dm_info->igi_history[1 ] =0 ; + + addr = chip->dig[0 ].addr; + mask = chip->dig[0 ].mask; + dm_info->igi_history[0 ] =rtw_read32_mask (rtwdev, addr, mask); +} + +void rtw_phy_dig_write (struct rtw_dev *rtwdev,u8 igi) +{ +struct rtw_chip_info *chip = rtwdev->chip; +struct rtw_hal *hal = &rtwdev->hal; +u32 addr, mask; +u8 path; + +for (path =0 ; path < hal->rf_path_num; path++) { + addr = chip->dig[path].addr; + mask = chip->dig[path].mask; +rtw_write32_mask (rtwdev, addr, mask, igi); + } +} + +static void rtw_phy_stat_false_alarm (struct rtw_dev *rtwdev) +{ +struct rtw_chip_info *chip = rtwdev->chip; + + chip->ops->false_alarm_statistics (rtwdev); +} + +#define RA_FLOOR_TABLE_SIZE 7 +#define RA_FLOOR_UP_GAP 3 + +static u8 rtw_phy_get_rssi_level (u8 old_level,u8 rssi) +{ +u8 table[RA_FLOOR_TABLE_SIZE ] = {20 ,34 ,38 ,42 ,46 ,50 ,100 }; +u8 new_level =0 ; +int i; + +for (i =0 ; i <RA_FLOOR_TABLE_SIZE ; i++) +if (i >= old_level) + table[i] +=RA_FLOOR_UP_GAP ; + +for (i =0 ; i <RA_FLOOR_TABLE_SIZE ; i++) { +if (rssi < table[i]) { + new_level = i; +break ; + } + } + +return new_level; +} + +struct rtw_phy_stat_iter_data { +struct rtw_dev *rtwdev; +u8 min_rssi; +}; + +static void rtw_phy_stat_rssi_iter (void *data,struct ieee80211_sta *sta) +{ +struct rtw_phy_stat_iter_data *iter_data = data; +struct rtw_dev *rtwdev = iter_data->rtwdev; +struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv; +u8 rssi, rssi_level; + + rssi =ewma_rssi_read (&si->avg_rssi); + rssi_level =rtw_phy_get_rssi_level (si->rssi_level, rssi); + +rtw_fw_send_rssi_info (rtwdev, si); + + iter_data->min_rssi =min_t (u8, rssi, iter_data->min_rssi); +} + +static void rtw_phy_stat_rssi (struct rtw_dev *rtwdev) +{ +struct rtw_dm_info *dm_info = &rtwdev->dm_info; +struct rtw_phy_stat_iter_data data = {}; + + data.rtwdev = rtwdev; + data.min_rssi =U8_MAX ; +rtw_iterate_stas_atomic (rtwdev, rtw_phy_stat_rssi_iter, &data); + + dm_info->pre_min_rssi = dm_info->min_rssi; + dm_info->min_rssi = data.min_rssi; +} + +static void rtw_phy_statistics (struct rtw_dev *rtwdev) +{ +rtw_phy_stat_rssi (rtwdev); +rtw_phy_stat_false_alarm (rtwdev); +} + +#define DIG_PERF_FA_TH_LOW 250 +#define DIG_PERF_FA_TH_HIGH 500 +#define DIG_PERF_FA_TH_EXTRA_HIGH 750 +#define DIG_PERF_MAX 0x5a +#define DIG_PERF_MID 0x40 +#define DIG_CVRG_FA_TH_LOW 2000 +#define DIG_CVRG_FA_TH_HIGH 4000 +#define DIG_CVRG_FA_TH_EXTRA_HIGH 5000 +#define DIG_CVRG_MAX 0x2a +#define DIG_CVRG_MID 0x26 +#define DIG_CVRG_MIN 0x1c +#define DIG_RSSI_GAIN_OFFSET 15 + +static bool +rtw_phy_dig_check_damping (struct rtw_dm_info *dm_info) +{ +u16 fa_lo =DIG_PERF_FA_TH_LOW ; +u16 fa_hi =DIG_PERF_FA_TH_HIGH ; +u16 *fa_history; +u8 *igi_history; +u8 damping_rssi; +u8 min_rssi; +u8 diff; +u8 igi_bitmap; +bool damping = false; + + min_rssi = dm_info->min_rssi; +if (dm_info->damping) { + damping_rssi = dm_info->damping_rssi; + diff = min_rssi > damping_rssi ? min_rssi - damping_rssi : + damping_rssi - min_rssi; +if (diff >3 || dm_info->damping_cnt++ >20 ) { + dm_info->damping = false; +return false; + } + +return true; + } + + igi_history = dm_info->igi_history; + fa_history = dm_info->fa_history; + igi_bitmap = dm_info->igi_bitmap &0xf ; +switch (igi_bitmap) { +case 5 : +/* down -> up -> down -> up */ +if (igi_history[0 ] > igi_history[1 ] && + igi_history[2 ] > igi_history[3 ] && + igi_history[0 ] - igi_history[1 ] >=2 && + igi_history[2 ] - igi_history[3 ] >=2 && + fa_history[0 ] > fa_hi && fa_history[1 ] < fa_lo && + fa_history[2 ] > fa_hi && fa_history[3 ] < fa_lo) + damping = true; +break ; +case 9 : +/* up -> down -> down -> up */ +if (igi_history[0 ] > igi_history[1 ] && + igi_history[3 ] > igi_history[2 ] && + igi_history[0 ] - igi_history[1 ] >=4 && + igi_history[3 ] - igi_history[2 ] >=2 && + fa_history[0 ] > fa_hi && fa_history[1 ] < fa_lo && + fa_history[2 ] < fa_lo && fa_history[3 ] > fa_hi) + damping = true; +break ; +default : +return false; + } + +if (damping) { + dm_info->damping = true; + dm_info->damping_cnt =0 ; + dm_info->damping_rssi = min_rssi; + } + +return damping; +} + +static void rtw_phy_dig_get_boundary (struct rtw_dm_info *dm_info, +u8 *upper,u8 *lower,bool linked) +{ +u8 dig_max, dig_min, dig_mid; +u8 min_rssi; + +if (linked) { + dig_max =DIG_PERF_MAX ; + dig_mid =DIG_PERF_MID ; +/* 22B=0x1c, 22C=0x20 */ + dig_min =0x1c ; + min_rssi =max_t (u8, dm_info->min_rssi, dig_min); + }else { + dig_max =DIG_CVRG_MAX ; + dig_mid =DIG_CVRG_MID ; + dig_min =DIG_CVRG_MIN ; + min_rssi = dig_min; + } + +/* DIG MAX should be bounded by minimum RSSI with offset +15 */ + dig_max =min_t (u8, dig_max, min_rssi +DIG_RSSI_GAIN_OFFSET ); + + *lower =clamp_t (u8, min_rssi, dig_min, dig_mid); + *upper =clamp_t (u8, *lower +DIG_RSSI_GAIN_OFFSET , dig_min, dig_max); +} + +static void rtw_phy_dig_get_threshold (struct rtw_dm_info *dm_info, +u16 *fa_th,u8 *step,bool linked) +{ +u8 min_rssi, pre_min_rssi; + + min_rssi = dm_info->min_rssi; + pre_min_rssi = dm_info->pre_min_rssi; + step[0 ] =4 ; + step[1 ] =3 ; + step[2 ] =2 ; + +if (linked) { + fa_th[0 ] =DIG_PERF_FA_TH_EXTRA_HIGH ; + fa_th[1 ] =DIG_PERF_FA_TH_HIGH ; + fa_th[2 ] =DIG_PERF_FA_TH_LOW ; +if (pre_min_rssi > min_rssi) { + step[0 ] =6 ; + step[1 ] =4 ; + step[2 ] =2 ; + } + }else { + fa_th[0 ] =DIG_CVRG_FA_TH_EXTRA_HIGH ; + fa_th[1 ] =DIG_CVRG_FA_TH_HIGH ; + fa_th[2 ] =DIG_CVRG_FA_TH_LOW ; + } +} + +static void rtw_phy_dig_recorder (struct rtw_dm_info *dm_info,u8 igi,u16 fa) +{ +u8 *igi_history; +u16 *fa_history; +u8 igi_bitmap; +bool up; + + igi_bitmap = dm_info->igi_bitmap <<1 &0xfe ; + igi_history = dm_info->igi_history; + fa_history = dm_info->fa_history; + + up = igi > igi_history[0 ]; + igi_bitmap |= up; + + igi_history[3 ] = igi_history[2 ]; + igi_history[2 ] = igi_history[1 ]; + igi_history[1 ] = igi_history[0 ]; + igi_history[0 ] = igi; + + fa_history[3 ] = fa_history[2 ]; + fa_history[2 ] = fa_history[1 ]; + fa_history[1 ] = fa_history[0 ]; + fa_history[0 ] = fa; + + dm_info->igi_bitmap = igi_bitmap; +} + +static void rtw_phy_dig (struct rtw_dev *rtwdev) +{ +struct rtw_dm_info *dm_info = &rtwdev->dm_info; +u8 upper_bound, lower_bound; +u8 pre_igi, cur_igi; +u16 fa_th[3 ], fa_cnt; +u8 level; +u8 step[3 ]; +bool linked; + +if (rtw_flag_check (rtwdev,RTW_FLAG_DIG_DISABLE )) +return ; + +if (rtw_phy_dig_check_damping (dm_info)) +return ; + + linked = !!rtwdev->sta_cnt; + + fa_cnt = dm_info->total_fa_cnt; + pre_igi = dm_info->igi_history[0 ]; + +rtw_phy_dig_get_threshold (dm_info, fa_th, step, linked); + +/* test the false alarm count from the highest threshold level first, +* and increase it by corresponding step size +* +* note that the step size is offset by -2, compensate it afterall +*/ + cur_igi = pre_igi; +for (level =0 ; level <3 ; level++) { +if (fa_cnt > fa_th[level]) { + cur_igi += step[level]; +break ; + } + } + cur_igi -=2 ; + +/* calculate the upper/lower bound by the minimum rssi we have among +* the peers connected with us, meanwhile make sure the igi value does +* not beyond the hardware limitation +*/ +rtw_phy_dig_get_boundary (dm_info, &upper_bound, &lower_bound, linked); + cur_igi =clamp_t (u8, cur_igi, lower_bound, upper_bound); + +/* record current igi value and false alarm statistics for further +* damping checks, and record the trend of igi values +*/ +rtw_phy_dig_recorder (dm_info, cur_igi, fa_cnt); + +if (cur_igi != pre_igi) +rtw_phy_dig_write (rtwdev, cur_igi); +} + +static void rtw_phy_ra_info_update_iter (void *data,struct ieee80211_sta *sta) +{ +struct rtw_dev *rtwdev = data; +struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv; + +rtw_update_sta_info (rtwdev, si); +} + +static void rtw_phy_ra_info_update (struct rtw_dev *rtwdev) +{ +if (rtwdev->watch_dog_cnt &0x3 ) +return ; + +rtw_iterate_stas_atomic (rtwdev, rtw_phy_ra_info_update_iter, rtwdev); +} + +void rtw_phy_dynamic_mechanism (struct rtw_dev *rtwdev) +{ +/* for further calculation */ +rtw_phy_statistics (rtwdev); +rtw_phy_dig (rtwdev); +rtw_phy_ra_info_update (rtwdev); +} + +#define FRAC_BITS 3 + +static u8 rtw_phy_power_2_db (s8 power) +{ +if (power <=-100 || power >=20 ) +return 0 ; +else if (power >=0 ) +return 100 ; +else +return 100 + power; +} + +static u64 rtw_phy_db_2_linear (u8 power_db) +{ +u8 i, j; +u64 linear; + +/* 1dB ~ 96dB */ + i = (power_db -1 ) >>3 ; + j = (power_db -1 ) - (i <<3 ); + + linear = db_invert_table[i][j]; + linear = i >2 ? linear <<FRAC_BITS : linear; + +return linear; +} + +static u8 rtw_phy_linear_2_db (u64 linear) +{ +u8 i; +u8 j; +u32 dB; + +if (linear >= db_invert_table[11 ][7 ]) +return 96 ;/* maximum 96 dB */ + +for (i =0 ; i <12 ; i++) { +if (i <=2 && (linear <<FRAC_BITS ) <= db_invert_table[i][7 ]) +break ; +else if (i >2 && linear <= db_invert_table[i][7 ]) +break ; + } + +for (j =0 ; j <8 ; j++) { +if (i <=2 && (linear <<FRAC_BITS ) <= db_invert_table[i][j]) +break ; +else if (i >2 && linear <= db_invert_table[i][j]) +break ; + } + +if (j ==0 && i ==0 ) + goto end; + +if (j ==0 ) { +if (i !=3 ) { +if (db_invert_table[i][0 ] - linear > + linear - db_invert_table[i -1 ][7 ]) { + i = i -1 ; + j =7 ; + } + }else { +if (db_invert_table[3 ][0 ] - linear > + linear - db_invert_table[2 ][7 ]) { + i =2 ; + j =7 ; + } + } + }else { +if (db_invert_table[i][j] - linear > + linear - db_invert_table[i][j -1 ]) { + j = j -1 ; + } + } +end: + dB = (i <<3 ) + j +1 ; + +return dB; +} + +u8 rtw_phy_rf_power_2_rssi (s8 *rf_power,u8 path_num) +{ +s8 power; +u8 power_db; +u64 linear; +u64 sum =0 ; +u8 path; + +for (path =0 ; path < path_num; path++) { + power = rf_power[path]; + power_db =rtw_phy_power_2_db (power); + linear =rtw_phy_db_2_linear (power_db); + sum += linear; + } + + sum = (sum + (1 << (FRAC_BITS -1 ))) >>FRAC_BITS ; +switch (path_num) { +case 2 : + sum >>=1 ; +break ; +case 3 : + sum = ((sum) + ((sum) <<1 ) + ((sum) <<3 )) >>5 ; +break ; +case 4 : + sum >>=2 ; +break ; +default : +break ; + } + +return rtw_phy_linear_2_db (sum); +} + +u32 rtw_phy_read_rf (struct rtw_dev *rtwdev,enum rtw_rf_path rf_path, +u32 addr,u32 mask) +{ +struct rtw_hal *hal = &rtwdev->hal; +struct rtw_chip_info *chip = rtwdev->chip; +const u32 *base_addr = chip->rf_base_addr; +u32 val, direct_addr; + +if (rf_path >= hal->rf_path_num) { +rtw_err (rtwdev,"unsupported rf path (%d)\n" , rf_path); +return INV_RF_DATA ; + } + + addr &=0xff ; + direct_addr = base_addr[rf_path] + (addr <<2 ); + mask &=RFREG_MASK ; + + val =rtw_read32_mask (rtwdev, direct_addr, mask); + +return val; +} + +bool rtw_phy_write_rf_reg_sipi (struct rtw_dev *rtwdev,enum rtw_rf_path rf_path, +u32 addr,u32 mask,u32 data) +{ +struct rtw_hal *hal = &rtwdev->hal; +struct rtw_chip_info *chip = rtwdev->chip; +u32 *sipi_addr = chip->rf_sipi_addr; +u32 data_and_addr; +u32 old_data =0 ; +u32 shift; + +if (rf_path >= hal->rf_path_num) { +rtw_err (rtwdev,"unsupported rf path (%d)\n" , rf_path); +return false; + } + + addr &=0xff ; + mask &=RFREG_MASK ; + +if (mask !=RFREG_MASK ) { + old_data =rtw_phy_read_rf (rtwdev, rf_path, addr,RFREG_MASK ); + +if (old_data ==INV_RF_DATA ) { +rtw_err (rtwdev,"Write fail, rf is disabled\n" ); +return false; + } + + shift =__ffs (mask); + data = ((old_data) & (~mask)) | (data << shift); + } + + data_and_addr = ((addr <<20 ) | (data &0x000fffff )) &0x0fffffff ; + +rtw_write32 (rtwdev, sipi_addr[rf_path], data_and_addr); + +udelay (13 ); + +return true; +} + +bool rtw_phy_write_rf_reg (struct rtw_dev *rtwdev,enum rtw_rf_path rf_path, +u32 addr,u32 mask,u32 data) +{ +struct rtw_hal *hal = &rtwdev->hal; +struct rtw_chip_info *chip = rtwdev->chip; +const u32 *base_addr = chip->rf_base_addr; +u32 direct_addr; + +if (rf_path >= hal->rf_path_num) { +rtw_err (rtwdev,"unsupported rf path (%d)\n" , rf_path); +return false; + } + + addr &=0xff ; + direct_addr = base_addr[rf_path] + (addr <<2 ); + mask &=RFREG_MASK ; + +rtw_write32_mask (rtwdev,REG_RSV_CTRL ,BITS_RFC_DIRECT ,DISABLE_PI ); +rtw_write32_mask (rtwdev,REG_WLRF1 ,BITS_RFC_DIRECT ,DISABLE_PI ); +rtw_write32_mask (rtwdev, direct_addr, mask, data); + +udelay (1 ); + +rtw_write32_mask (rtwdev,REG_RSV_CTRL ,BITS_RFC_DIRECT ,ENABLE_PI ); +rtw_write32_mask (rtwdev,REG_WLRF1 ,BITS_RFC_DIRECT ,ENABLE_PI ); + +return true; +} + +bool rtw_phy_write_rf_reg_mix (struct rtw_dev *rtwdev,enum rtw_rf_path rf_path, +u32 addr,u32 mask,u32 data) +{ +if (addr !=0x00 ) +return rtw_phy_write_rf_reg (rtwdev, rf_path, addr, mask, data); + +return rtw_phy_write_rf_reg_sipi (rtwdev, rf_path, addr, mask, data); +} + +void rtw_phy_setup_phy_cond (struct rtw_dev *rtwdev,u32 pkg) +{ +struct rtw_hal *hal = &rtwdev->hal; +struct rtw_efuse *efuse = &rtwdev->efuse; +struct rtw_phy_cond cond = {0 }; + + cond.cut = hal->cut_version ? hal->cut_version :15 ; + cond.pkg = pkg ? pkg :15 ; + cond.plat =0x04 ; + cond.rfe = efuse->rfe_option; + +switch (rtw_hci_type (rtwdev)) { +case RTW_HCI_TYPE_USB : + cond.intf =INTF_USB ; +break ; +case RTW_HCI_TYPE_SDIO : + cond.intf =INTF_SDIO ; +break ; +case RTW_HCI_TYPE_PCIE : +default : + cond.intf =INTF_PCIE ; +break ; + } + + hal->phy_cond = cond; + +rtw_dbg (rtwdev,RTW_DBG_PHY ,"phy cond=0x%08x\n" , *((u32 *)&hal->phy_cond)); +} + +static bool check_positive (struct rtw_dev *rtwdev,struct rtw_phy_cond cond) +{ +struct rtw_hal *hal = &rtwdev->hal; +struct rtw_phy_cond drv_cond = hal->phy_cond; + +if (cond.cut && cond.cut != drv_cond.cut) +return false; + +if (cond.pkg && cond.pkg != drv_cond.pkg) +return false; + +if (cond.intf && cond.intf != drv_cond.intf) +return false; + +if (cond.rfe != drv_cond.rfe) +return false; + +return true; +} + +void rtw_parse_tbl_phy_cond (struct rtw_dev *rtwdev,const struct rtw_table *tbl) +{ +const union phy_table_tile *p = tbl->data; +const union phy_table_tile *end = p + tbl->size /2 ; +struct rtw_phy_cond pos_cond = {0 }; +bool is_matched = true, is_skipped = false; + +BUILD_BUG_ON (sizeof (union phy_table_tile ) !=sizeof (struct phy_cfg_pair )); + +for (; p < end; p++) { +if (p->cond.pos) { +switch (p->cond.branch) { +case BRANCH_ENDIF : + is_matched = true; + is_skipped = false; +break ; +case BRANCH_ELSE : + is_matched = is_skipped ? false : true; +break ; +case BRANCH_IF : +case BRANCH_ELIF : +default : + pos_cond = p->cond; +break ; + } + }else if (p->cond.neg) { +if (!is_skipped) { +if (check_positive (rtwdev, pos_cond)) { + is_matched = true; + is_skipped = true; + }else { + is_matched = false; + is_skipped = false; + } + }else { + is_matched = false; + } + }else if (is_matched) { + (*tbl->do_cfg)(rtwdev, tbl, p->cfg.addr, p->cfg.data); + } + } +} + +void rtw_parse_tbl_bb_pg (struct rtw_dev *rtwdev,const struct rtw_table *tbl) +{ +const struct phy_pg_cfg_pair *p = tbl->data; +const struct phy_pg_cfg_pair *end = p + tbl->size /6 ; + +BUILD_BUG_ON (sizeof (struct phy_pg_cfg_pair ) !=sizeof (u32) *6 ); + +for (; p < end; p++) { +if (p->addr ==0xfe || p->addr ==0xffe ) { +msleep (50 ); +continue ; + } +phy_store_tx_power_by_rate (rtwdev, p->band, p->rf_path, + p->tx_num, p->addr, p->bitmask, + p->data); + } +} + +void rtw_parse_tbl_txpwr_lmt (struct rtw_dev *rtwdev, +const struct rtw_table *tbl) +{ +const struct txpwr_lmt_cfg_pair *p = tbl->data; +const struct txpwr_lmt_cfg_pair *end = p + tbl->size /6 ; + +BUILD_BUG_ON (sizeof (struct txpwr_lmt_cfg_pair ) !=sizeof (u8) *6 ); + +for (; p < end; p++) { +phy_set_tx_power_limit (rtwdev, p->regd, p->band, + p->bw, p->rs, + p->ch, p->txpwr_lmt); + } +} + +void rtw_phy_cfg_mac (struct rtw_dev *rtwdev,const struct rtw_table *tbl, +u32 addr,u32 data) +{ +rtw_write8 (rtwdev, addr, data); +} + +void rtw_phy_cfg_agc (struct rtw_dev *rtwdev,const struct rtw_table *tbl, +u32 addr,u32 data) +{ +rtw_write32 (rtwdev, addr, data); +} + +void rtw_phy_cfg_bb (struct rtw_dev *rtwdev,const struct rtw_table *tbl, +u32 addr,u32 data) +{ +if (addr ==0xfe ) +msleep (50 ); +else if (addr ==0xfd ) +mdelay (5 ); +else if (addr ==0xfc ) +mdelay (1 ); +else if (addr ==0xfb ) +usleep_range (50 ,60 ); +else if (addr ==0xfa ) +udelay (5 ); +else if (addr ==0xf9 ) +udelay (1 ); +else +rtw_write32 (rtwdev, addr, data); +} + +void rtw_phy_cfg_rf (struct rtw_dev *rtwdev,const struct rtw_table *tbl, +u32 addr,u32 data) +{ +if (addr ==0xffe ) { +msleep (50 ); + }else if (addr ==0xfe ) { +usleep_range (100 ,110 ); + }else { +rtw_write_rf (rtwdev, tbl->rf_path, addr,RFREG_MASK , data); +udelay (1 ); + } +} + +static void rtw_load_rfk_table (struct rtw_dev *rtwdev) +{ +struct rtw_chip_info *chip = rtwdev->chip; + +if (!chip->rfk_init_tbl) +return ; + +rtw_load_table (rtwdev, chip->rfk_init_tbl); +} + +void rtw_phy_load_tables (struct rtw_dev *rtwdev) +{ +struct rtw_chip_info *chip = rtwdev->chip; +u8 rf_path; + +rtw_load_table (rtwdev, chip->mac_tbl); +rtw_load_table (rtwdev, chip->bb_tbl); +rtw_load_table (rtwdev, chip->agc_tbl); +rtw_load_rfk_table (rtwdev); + +for (rf_path =0 ; rf_path < rtwdev->hal.rf_path_num; rf_path++) { +const struct rtw_table *tbl; + + tbl = chip->rf_tbl[rf_path]; +rtw_load_table (rtwdev, tbl); + } +} + +#define bcd_to_dec_pwr_by_rate (val, i) bcd2bin(val >> (i * 8)) + +#define RTW_MAX_POWER_INDEX 0x3F + +u8 rtw_cck_rates[] = {DESC_RATE1M ,DESC_RATE2M ,DESC_RATE5_5M ,DESC_RATE11M }; +u8 rtw_ofdm_rates[] = { +DESC_RATE6M ,DESC_RATE9M ,DESC_RATE12M , +DESC_RATE18M ,DESC_RATE24M ,DESC_RATE36M , +DESC_RATE48M ,DESC_RATE54M +}; +u8 rtw_ht_1s_rates[] = { +DESC_RATEMCS0 ,DESC_RATEMCS1 ,DESC_RATEMCS2 , +DESC_RATEMCS3 ,DESC_RATEMCS4 ,DESC_RATEMCS5 , +DESC_RATEMCS6 ,DESC_RATEMCS7 +}; +u8 rtw_ht_2s_rates[] = { +DESC_RATEMCS8 ,DESC_RATEMCS9 ,DESC_RATEMCS10 , +DESC_RATEMCS11 ,DESC_RATEMCS12 ,DESC_RATEMCS13 , +DESC_RATEMCS14 ,DESC_RATEMCS15 +}; +u8 rtw_vht_1s_rates[] = { +DESC_RATEVHT1SS_MCS0 ,DESC_RATEVHT1SS_MCS1 , +DESC_RATEVHT1SS_MCS2 ,DESC_RATEVHT1SS_MCS3 , +DESC_RATEVHT1SS_MCS4 ,DESC_RATEVHT1SS_MCS5 , +DESC_RATEVHT1SS_MCS6 ,DESC_RATEVHT1SS_MCS7 , +DESC_RATEVHT1SS_MCS8 ,DESC_RATEVHT1SS_MCS9 +}; +u8 rtw_vht_2s_rates[] = { +DESC_RATEVHT2SS_MCS0 ,DESC_RATEVHT2SS_MCS1 , +DESC_RATEVHT2SS_MCS2 ,DESC_RATEVHT2SS_MCS3 , +DESC_RATEVHT2SS_MCS4 ,DESC_RATEVHT2SS_MCS5 , +DESC_RATEVHT2SS_MCS6 ,DESC_RATEVHT2SS_MCS7 , +DESC_RATEVHT2SS_MCS8 ,DESC_RATEVHT2SS_MCS9 +}; +u8 rtw_cck_size =ARRAY_SIZE (rtw_cck_rates); +u8 rtw_ofdm_size =ARRAY_SIZE (rtw_ofdm_rates); +u8 rtw_ht_1s_size =ARRAY_SIZE (rtw_ht_1s_rates); +u8 rtw_ht_2s_size =ARRAY_SIZE (rtw_ht_2s_rates); +u8 rtw_vht_1s_size =ARRAY_SIZE (rtw_vht_1s_rates); +u8 rtw_vht_2s_size =ARRAY_SIZE (rtw_vht_2s_rates); +u8 *rtw_rate_section[RTW_RATE_SECTION_MAX ] = { + rtw_cck_rates, rtw_ofdm_rates, + rtw_ht_1s_rates, rtw_ht_2s_rates, + rtw_vht_1s_rates, rtw_vht_2s_rates +}; +u8 rtw_rate_size[RTW_RATE_SECTION_MAX ] = { +ARRAY_SIZE (rtw_cck_rates), +ARRAY_SIZE (rtw_ofdm_rates), +ARRAY_SIZE (rtw_ht_1s_rates), +ARRAY_SIZE (rtw_ht_2s_rates), +ARRAY_SIZE (rtw_vht_1s_rates), +ARRAY_SIZE (rtw_vht_2s_rates) +}; + +static const u8 rtw_channel_idx_5g[RTW_MAX_CHANNEL_NUM_5G ] = { +36 ,38 ,40 ,42 ,44 ,46 ,48 ,/* Band 1 */ +52 ,54 ,56 ,58 ,60 ,62 ,64 ,/* Band 2 */ +100 ,102 ,104 ,106 ,108 ,110 ,112 ,/* Band 3 */ +116 ,118 ,120 ,122 ,124 ,126 ,128 ,/* Band 3 */ +132 ,134 ,136 ,138 ,140 ,142 ,144 ,/* Band 3 */ +149 ,151 ,153 ,155 ,157 ,159 ,161 ,/* Band 4 */ +165 ,167 ,169 ,171 ,173 ,175 ,177 };/* Band 4 */ + +static int rtw_channel_to_idx (u8 band,u8 channel) +{ +int ch_idx; +u8 n_channel; + +if (band ==PHY_BAND_2G ) { + ch_idx = channel -1 ; + n_channel =RTW_MAX_CHANNEL_NUM_2G ; + }else if (band ==PHY_BAND_5G ) { + n_channel =RTW_MAX_CHANNEL_NUM_5G ; +for (ch_idx =0 ; ch_idx < n_channel; ch_idx++) +if (rtw_channel_idx_5g[ch_idx] == channel) +break ; + }else { +return -1 ; + } + +if (ch_idx >= n_channel) +return -1 ; + +return ch_idx; +} + +static u8 rtw_get_channel_group (u8 channel) +{ +switch (channel) { +default : +WARN_ON (1 ); +case 1 : +case 2 : +case 36 : +case 38 : +case 40 : +case 42 : +return 0 ; +case 3 : +case 4 : +case 5 : +case 44 : +case 46 : +case 48 : +case 50 : +return 1 ; +case 6 : +case 7 : +case 8 : +case 52 : +case 54 : +case 56 : +case 58 : +return 2 ; +case 9 : +case 10 : +case 11 : +case 60 : +case 62 : +case 64 : +return 3 ; +case 12 : +case 13 : +case 100 : +case 102 : +case 104 : +case 106 : +return 4 ; +case 14 : +case 108 : +case 110 : +case 112 : +case 114 : +return 5 ; +case 116 : +case 118 : +case 120 : +case 122 : +return 6 ; +case 124 : +case 126 : +case 128 : +case 130 : +return 7 ; +case 132 : +case 134 : +case 136 : +case 138 : +return 8 ; +case 140 : +case 142 : +case 144 : +return 9 ; +case 149 : +case 151 : +case 153 : +case 155 : +return 10 ; +case 157 : +case 159 : +case 161 : +return 11 ; +case 165 : +case 167 : +case 169 : +case 171 : +return 12 ; +case 173 : +case 175 : +case 177 : +return 13 ; + } +} + +static u8 phy_get_2g_tx_power_index (struct rtw_dev *rtwdev, +struct rtw_2g_txpwr_idx *pwr_idx_2g, +enum rtw_bandwidth bandwidth, +u8 rate,u8 group) +{ +struct rtw_chip_info *chip = rtwdev->chip; +u8 tx_power; +bool mcs_rate; +bool above_2ss; +u8 factor = chip->txgi_factor; + +if (rate <=DESC_RATE11M ) + tx_power = pwr_idx_2g->cck_base[group]; +else + tx_power = pwr_idx_2g->bw40_base[group]; + +if (rate >=DESC_RATE6M && rate <=DESC_RATE54M ) + tx_power += pwr_idx_2g->ht_1s_diff.ofdm * factor; + + mcs_rate = (rate >=DESC_RATEMCS0 && rate <=DESC_RATEMCS15 ) || + (rate >=DESC_RATEVHT1SS_MCS0 && + rate <=DESC_RATEVHT2SS_MCS9 ); + above_2ss = (rate >=DESC_RATEMCS8 && rate <=DESC_RATEMCS15 ) || + (rate >=DESC_RATEVHT2SS_MCS0 ); + +if (!mcs_rate) +return tx_power; + +switch (bandwidth) { +default : +WARN_ON (1 ); +case RTW_CHANNEL_WIDTH_20 : + tx_power += pwr_idx_2g->ht_1s_diff.bw20 * factor; +if (above_2ss) + tx_power += pwr_idx_2g->ht_2s_diff.bw20 * factor; +break ; +case RTW_CHANNEL_WIDTH_40 : +/* bw40 is the base power */ +if (above_2ss) + tx_power += pwr_idx_2g->ht_2s_diff.bw40 * factor; +break ; + } + +return tx_power; +} + +static u8 phy_get_5g_tx_power_index (struct rtw_dev *rtwdev, +struct rtw_5g_txpwr_idx *pwr_idx_5g, +enum rtw_bandwidth bandwidth, +u8 rate,u8 group) +{ +struct rtw_chip_info *chip = rtwdev->chip; +u8 tx_power; +u8 upper, lower; +bool mcs_rate; +bool above_2ss; +u8 factor = chip->txgi_factor; + + tx_power = pwr_idx_5g->bw40_base[group]; + + mcs_rate = (rate >=DESC_RATEMCS0 && rate <=DESC_RATEMCS15 ) || + (rate >=DESC_RATEVHT1SS_MCS0 && + rate <=DESC_RATEVHT2SS_MCS9 ); + above_2ss = (rate >=DESC_RATEMCS8 && rate <=DESC_RATEMCS15 ) || + (rate >=DESC_RATEVHT2SS_MCS0 ); + +if (!mcs_rate) { + tx_power += pwr_idx_5g->ht_1s_diff.ofdm * factor; +return tx_power; + } + +switch (bandwidth) { +default : +WARN_ON (1 ); +case RTW_CHANNEL_WIDTH_20 : + tx_power += pwr_idx_5g->ht_1s_diff.bw20 * factor; +if (above_2ss) + tx_power += pwr_idx_5g->ht_2s_diff.bw20 * factor; +break ; +case RTW_CHANNEL_WIDTH_40 : +/* bw40 is the base power */ +if (above_2ss) + tx_power += pwr_idx_5g->ht_2s_diff.bw40 * factor; +break ; +case RTW_CHANNEL_WIDTH_80 : +/* the base idx of bw80 is the average of bw40+/bw40- */ + lower = pwr_idx_5g->bw40_base[group]; + upper = pwr_idx_5g->bw40_base[group +1 ]; + + tx_power = (lower + upper) /2 ; + tx_power += pwr_idx_5g->vht_1s_diff.bw80 * factor; +if (above_2ss) + tx_power += pwr_idx_5g->vht_2s_diff.bw80 * factor; +break ; + } + +return tx_power; +} + +/* set tx power level by path for each rates, note that the order of the rates +* are *very* important, bacause 8822B/8821C combines every four bytes of tx +* power index into a four-byte power index register, and calls set_tx_agc to +* write these values into hardware +*/ +static +void phy_set_tx_power_level_by_path (struct rtw_dev *rtwdev,u8 ch,u8 path) +{ +struct rtw_hal *hal = &rtwdev->hal; +u8 rs; + +/* do not need cck rates if we are not in 2.4G */ +if (hal->current_band_type ==RTW_BAND_2G ) + rs =RTW_RATE_SECTION_CCK ; +else + rs =RTW_RATE_SECTION_OFDM ; + +for (; rs <RTW_RATE_SECTION_MAX ; rs++) +phy_set_tx_power_index_by_rs (rtwdev, ch, path, rs); +} + +void rtw_phy_set_tx_power_level (struct rtw_dev *rtwdev,u8 channel) +{ +struct rtw_chip_info *chip = rtwdev->chip; +struct rtw_hal *hal = &rtwdev->hal; +u8 path; + +mutex_lock (&hal->tx_power_mutex); + +for (path =0 ; path < hal->rf_path_num; path++) +phy_set_tx_power_level_by_path (rtwdev, channel, path); + + chip->ops->set_tx_power_index (rtwdev); +mutex_unlock (&hal->tx_power_mutex); +} + +s8 phy_get_tx_power_limit (struct rtw_dev *rtwdev,u8 band, +enum rtw_bandwidth bandwidth,u8 rf_path, +u8 rate,u8 channel,u8 regd); + +static +u8 phy_get_tx_power_index (void *adapter,u8 rf_path,u8 rate, +enum rtw_bandwidth bandwidth,u8 channel,u8 regd) +{ +struct rtw_dev *rtwdev = adapter; +struct rtw_hal *hal = &rtwdev->hal; +struct rtw_txpwr_idx *pwr_idx; +u8 tx_power; +u8 group; +u8 band; +s8 offset, limit; + + pwr_idx = &rtwdev->efuse.txpwr_idx_table[rf_path]; + group =rtw_get_channel_group (channel); + +/* base power index for 2.4G/5G */ +if (channel <=14 ) { + band =PHY_BAND_2G ; + tx_power =phy_get_2g_tx_power_index (rtwdev, + &pwr_idx->pwr_idx_2g, + bandwidth, rate, group); + offset = hal->tx_pwr_by_rate_offset_2g[rf_path][rate]; + }else { + band =PHY_BAND_5G ; + tx_power =phy_get_5g_tx_power_index (rtwdev, + &pwr_idx->pwr_idx_5g, + bandwidth, rate, group); + offset = hal->tx_pwr_by_rate_offset_5g[rf_path][rate]; + } + + limit =phy_get_tx_power_limit (rtwdev, band, bandwidth, rf_path, + rate, channel, regd); + +if (offset > limit) + offset = limit; + + tx_power += offset; + +if (tx_power > rtwdev->chip->max_power_index) + tx_power = rtwdev->chip->max_power_index; + +return tx_power; +} + +void phy_set_tx_power_index_by_rs (void *adapter,u8 ch,u8 path,u8 rs) +{ +struct rtw_dev *rtwdev = adapter; +struct rtw_hal *hal = &rtwdev->hal; +u8 regd = rtwdev->regd.txpwr_regd; +u8 *rates; +u8 size; +u8 rate; +u8 pwr_idx; +u8 bw; +int i; + +if (rs >=RTW_RATE_SECTION_MAX ) +return ; + + rates = rtw_rate_section[rs]; + size = rtw_rate_size[rs]; + bw = hal->current_band_width; +for (i =0 ; i < size; i++) { + rate = rates[i]; + pwr_idx =phy_get_tx_power_index (adapter, path, rate, bw, ch, + regd); + hal->tx_pwr_tbl[path][rate] = pwr_idx; + } +} + +static u8 tbl_to_dec_pwr_by_rate (struct rtw_dev *rtwdev,u32 hex,u8 i) +{ +if (rtwdev->chip->is_pwr_by_rate_dec) +return bcd_to_dec_pwr_by_rate (hex, i); +else +return (hex >> (i *8 )) &0xFF ; +} + +static void phy_get_rate_values_of_txpwr_by_rate (struct rtw_dev *rtwdev, +u32 addr,u32 mask, +u32 val,u8 *rate, +u8 *pwr_by_rate,u8 *rate_num) +{ +int i; + +switch (addr) { +case 0xE00 : +case 0x830 : + rate[0 ] =DESC_RATE6M ; + rate[1 ] =DESC_RATE9M ; + rate[2 ] =DESC_RATE12M ; + rate[3 ] =DESC_RATE18M ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xE04 : +case 0x834 : + rate[0 ] =DESC_RATE24M ; + rate[1 ] =DESC_RATE36M ; + rate[2 ] =DESC_RATE48M ; + rate[3 ] =DESC_RATE54M ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xE08 : + rate[0 ] =DESC_RATE1M ; + pwr_by_rate[0 ] =bcd_to_dec_pwr_by_rate (val,1 ); + *rate_num =1 ; +break ; +case 0x86C : +if (mask ==0xffffff00 ) { + rate[0 ] =DESC_RATE2M ; + rate[1 ] =DESC_RATE5_5M ; + rate[2 ] =DESC_RATE11M ; +for (i =1 ; i <4 ; ++i) + pwr_by_rate[i -1 ] = +tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =3 ; + }else if (mask ==0x000000ff ) { + rate[0 ] =DESC_RATE11M ; + pwr_by_rate[0 ] =bcd_to_dec_pwr_by_rate (val,0 ); + *rate_num =1 ; + } +break ; +case 0xE10 : +case 0x83C : + rate[0 ] =DESC_RATEMCS0 ; + rate[1 ] =DESC_RATEMCS1 ; + rate[2 ] =DESC_RATEMCS2 ; + rate[3 ] =DESC_RATEMCS3 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xE14 : +case 0x848 : + rate[0 ] =DESC_RATEMCS4 ; + rate[1 ] =DESC_RATEMCS5 ; + rate[2 ] =DESC_RATEMCS6 ; + rate[3 ] =DESC_RATEMCS7 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xE18 : +case 0x84C : + rate[0 ] =DESC_RATEMCS8 ; + rate[1 ] =DESC_RATEMCS9 ; + rate[2 ] =DESC_RATEMCS10 ; + rate[3 ] =DESC_RATEMCS11 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xE1C : +case 0x868 : + rate[0 ] =DESC_RATEMCS12 ; + rate[1 ] =DESC_RATEMCS13 ; + rate[2 ] =DESC_RATEMCS14 ; + rate[3 ] =DESC_RATEMCS15 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; + +break ; +case 0x838 : + rate[0 ] =DESC_RATE1M ; + rate[1 ] =DESC_RATE2M ; + rate[2 ] =DESC_RATE5_5M ; +for (i =1 ; i <4 ; ++i) + pwr_by_rate[i -1 ] =tbl_to_dec_pwr_by_rate (rtwdev, + val, i); + *rate_num =3 ; +break ; +case 0xC20 : +case 0xE20 : +case 0x1820 : +case 0x1A20 : + rate[0 ] =DESC_RATE1M ; + rate[1 ] =DESC_RATE2M ; + rate[2 ] =DESC_RATE5_5M ; + rate[3 ] =DESC_RATE11M ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC24 : +case 0xE24 : +case 0x1824 : +case 0x1A24 : + rate[0 ] =DESC_RATE6M ; + rate[1 ] =DESC_RATE9M ; + rate[2 ] =DESC_RATE12M ; + rate[3 ] =DESC_RATE18M ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC28 : +case 0xE28 : +case 0x1828 : +case 0x1A28 : + rate[0 ] =DESC_RATE24M ; + rate[1 ] =DESC_RATE36M ; + rate[2 ] =DESC_RATE48M ; + rate[3 ] =DESC_RATE54M ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC2C : +case 0xE2C : +case 0x182C : +case 0x1A2C : + rate[0 ] =DESC_RATEMCS0 ; + rate[1 ] =DESC_RATEMCS1 ; + rate[2 ] =DESC_RATEMCS2 ; + rate[3 ] =DESC_RATEMCS3 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC30 : +case 0xE30 : +case 0x1830 : +case 0x1A30 : + rate[0 ] =DESC_RATEMCS4 ; + rate[1 ] =DESC_RATEMCS5 ; + rate[2 ] =DESC_RATEMCS6 ; + rate[3 ] =DESC_RATEMCS7 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC34 : +case 0xE34 : +case 0x1834 : +case 0x1A34 : + rate[0 ] =DESC_RATEMCS8 ; + rate[1 ] =DESC_RATEMCS9 ; + rate[2 ] =DESC_RATEMCS10 ; + rate[3 ] =DESC_RATEMCS11 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC38 : +case 0xE38 : +case 0x1838 : +case 0x1A38 : + rate[0 ] =DESC_RATEMCS12 ; + rate[1 ] =DESC_RATEMCS13 ; + rate[2 ] =DESC_RATEMCS14 ; + rate[3 ] =DESC_RATEMCS15 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC3C : +case 0xE3C : +case 0x183C : +case 0x1A3C : + rate[0 ] =DESC_RATEVHT1SS_MCS0 ; + rate[1 ] =DESC_RATEVHT1SS_MCS1 ; + rate[2 ] =DESC_RATEVHT1SS_MCS2 ; + rate[3 ] =DESC_RATEVHT1SS_MCS3 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC40 : +case 0xE40 : +case 0x1840 : +case 0x1A40 : + rate[0 ] =DESC_RATEVHT1SS_MCS4 ; + rate[1 ] =DESC_RATEVHT1SS_MCS5 ; + rate[2 ] =DESC_RATEVHT1SS_MCS6 ; + rate[3 ] =DESC_RATEVHT1SS_MCS7 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC44 : +case 0xE44 : +case 0x1844 : +case 0x1A44 : + rate[0 ] =DESC_RATEVHT1SS_MCS8 ; + rate[1 ] =DESC_RATEVHT1SS_MCS9 ; + rate[2 ] =DESC_RATEVHT2SS_MCS0 ; + rate[3 ] =DESC_RATEVHT2SS_MCS1 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC48 : +case 0xE48 : +case 0x1848 : +case 0x1A48 : + rate[0 ] =DESC_RATEVHT2SS_MCS2 ; + rate[1 ] =DESC_RATEVHT2SS_MCS3 ; + rate[2 ] =DESC_RATEVHT2SS_MCS4 ; + rate[3 ] =DESC_RATEVHT2SS_MCS5 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xC4C : +case 0xE4C : +case 0x184C : +case 0x1A4C : + rate[0 ] =DESC_RATEVHT2SS_MCS6 ; + rate[1 ] =DESC_RATEVHT2SS_MCS7 ; + rate[2 ] =DESC_RATEVHT2SS_MCS8 ; + rate[3 ] =DESC_RATEVHT2SS_MCS9 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xCD8 : +case 0xED8 : +case 0x18D8 : +case 0x1AD8 : + rate[0 ] =DESC_RATEMCS16 ; + rate[1 ] =DESC_RATEMCS17 ; + rate[2 ] =DESC_RATEMCS18 ; + rate[3 ] =DESC_RATEMCS19 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xCDC : +case 0xEDC : +case 0x18DC : +case 0x1ADC : + rate[0 ] =DESC_RATEMCS20 ; + rate[1 ] =DESC_RATEMCS21 ; + rate[2 ] =DESC_RATEMCS22 ; + rate[3 ] =DESC_RATEMCS23 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xCE0 : +case 0xEE0 : +case 0x18E0 : +case 0x1AE0 : + rate[0 ] =DESC_RATEVHT3SS_MCS0 ; + rate[1 ] =DESC_RATEVHT3SS_MCS1 ; + rate[2 ] =DESC_RATEVHT3SS_MCS2 ; + rate[3 ] =DESC_RATEVHT3SS_MCS3 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xCE4 : +case 0xEE4 : +case 0x18E4 : +case 0x1AE4 : + rate[0 ] =DESC_RATEVHT3SS_MCS4 ; + rate[1 ] =DESC_RATEVHT3SS_MCS5 ; + rate[2 ] =DESC_RATEVHT3SS_MCS6 ; + rate[3 ] =DESC_RATEVHT3SS_MCS7 ; +for (i =0 ; i <4 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =4 ; +break ; +case 0xCE8 : +case 0xEE8 : +case 0x18E8 : +case 0x1AE8 : + rate[0 ] =DESC_RATEVHT3SS_MCS8 ; + rate[1 ] =DESC_RATEVHT3SS_MCS9 ; +for (i =0 ; i <2 ; ++i) + pwr_by_rate[i] =tbl_to_dec_pwr_by_rate (rtwdev, val, i); + *rate_num =2 ; +break ; +default : +rtw_warn (rtwdev,"invalid tx power index addr 0x%08x\n" , addr); +break ; + } +} + +void phy_store_tx_power_by_rate (void *adapter,u32 band,u32 rfpath,u32 txnum, +u32 regaddr,u32 bitmask,u32 data) +{ +struct rtw_dev *rtwdev = adapter; +struct rtw_hal *hal = &rtwdev->hal; +u8 rate_num =0 ; +u8 rate; +u8 rates[RTW_RF_PATH_MAX ] = {0 }; +s8 offset; +s8 pwr_by_rate[RTW_RF_PATH_MAX ] = {0 }; +int i; + +phy_get_rate_values_of_txpwr_by_rate (rtwdev, regaddr, bitmask, data, + rates, pwr_by_rate, &rate_num); + +if (WARN_ON (rfpath >=RTW_RF_PATH_MAX || + (band !=PHY_BAND_2G && band !=PHY_BAND_5G ) || + rate_num >RTW_RF_PATH_MAX )) +return ; + +for (i =0 ; i < rate_num; i++) { + offset = pwr_by_rate[i]; + rate = rates[i]; +if (band ==PHY_BAND_2G ) + hal->tx_pwr_by_rate_offset_2g[rfpath][rate] = offset; +else if (band ==PHY_BAND_5G ) + hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset; +else +continue ; + } +} + +static +void phy_tx_power_by_rate_config_by_path (struct rtw_hal *hal,u8 path, +u8 rs,u8 size,u8 *rates) +{ +u8 rate; +u8 base_idx, rate_idx; +s8 base_2g, base_5g; + +if (rs >=RTW_RATE_SECTION_VHT_1S ) + base_idx = rates[size -3 ]; +else + base_idx = rates[size -1 ]; + base_2g = hal->tx_pwr_by_rate_offset_2g[path][base_idx]; + base_5g = hal->tx_pwr_by_rate_offset_5g[path][base_idx]; + hal->tx_pwr_by_rate_base_2g[path][rs] = base_2g; + hal->tx_pwr_by_rate_base_5g[path][rs] = base_5g; +for (rate =0 ; rate < size; rate++) { + rate_idx = rates[rate]; + hal->tx_pwr_by_rate_offset_2g[path][rate_idx] -= base_2g; + hal->tx_pwr_by_rate_offset_5g[path][rate_idx] -= base_5g; + } +} + +void rtw_phy_tx_power_by_rate_config (struct rtw_hal *hal) +{ +u8 path; + +for (path =0 ; path <RTW_RF_PATH_MAX ; path++) { +phy_tx_power_by_rate_config_by_path (hal, path, +RTW_RATE_SECTION_CCK , + rtw_cck_size, rtw_cck_rates); +phy_tx_power_by_rate_config_by_path (hal, path, +RTW_RATE_SECTION_OFDM , + rtw_ofdm_size, rtw_ofdm_rates); +phy_tx_power_by_rate_config_by_path (hal, path, +RTW_RATE_SECTION_HT_1S , + rtw_ht_1s_size, rtw_ht_1s_rates); +phy_tx_power_by_rate_config_by_path (hal, path, +RTW_RATE_SECTION_HT_2S , + rtw_ht_2s_size, rtw_ht_2s_rates); +phy_tx_power_by_rate_config_by_path (hal, path, +RTW_RATE_SECTION_VHT_1S , + rtw_vht_1s_size, rtw_vht_1s_rates); +phy_tx_power_by_rate_config_by_path (hal, path, +RTW_RATE_SECTION_VHT_2S , + rtw_vht_2s_size, rtw_vht_2s_rates); + } +} + +static void +phy_tx_power_limit_config (struct rtw_hal *hal,u8 regd,u8 bw,u8 rs) +{ +s8 base, orig; +u8 ch; + +for (ch =0 ; ch <RTW_MAX_CHANNEL_NUM_2G ; ch++) { + base = hal->tx_pwr_by_rate_base_2g[0 ][rs]; + orig = hal->tx_pwr_limit_2g[regd][bw][rs][ch]; + hal->tx_pwr_limit_2g[regd][bw][rs][ch] -= base; + } + +for (ch =0 ; ch <RTW_MAX_CHANNEL_NUM_5G ; ch++) { + base = hal->tx_pwr_by_rate_base_5g[0 ][rs]; + hal->tx_pwr_limit_5g[regd][bw][rs][ch] -= base; + } +} + +void rtw_phy_tx_power_limit_config (struct rtw_hal *hal) +{ +u8 regd, bw, rs; + +for (regd =0 ; regd <RTW_REGD_MAX ; regd++) +for (bw =0 ; bw <RTW_CHANNEL_WIDTH_MAX ; bw++) +for (rs =0 ; rs <RTW_RATE_SECTION_MAX ; rs++) +phy_tx_power_limit_config (hal, regd, bw, rs); +} + +static s8 get_tx_power_limit (struct rtw_hal *hal,u8 bw,u8 rs,u8 ch,u8 regd) +{ +if (regd >RTW_REGD_WW ) +return RTW_MAX_POWER_INDEX ; + +return hal->tx_pwr_limit_2g[regd][bw][rs][ch]; +} + +s8 phy_get_tx_power_limit (struct rtw_dev *rtwdev,u8 band, +enum rtw_bandwidth bw,u8 rf_path, +u8 rate,u8 channel,u8 regd) +{ +struct rtw_hal *hal = &rtwdev->hal; +s8 power_limit; +u8 rs; +int ch_idx; + +if (rate >=DESC_RATE1M && rate <=DESC_RATE11M ) + rs =RTW_RATE_SECTION_CCK ; +else if (rate >=DESC_RATE6M && rate <=DESC_RATE54M ) + rs =RTW_RATE_SECTION_OFDM ; +else if (rate >=DESC_RATEMCS0 && rate <=DESC_RATEMCS7 ) + rs =RTW_RATE_SECTION_HT_1S ; +else if (rate >=DESC_RATEMCS8 && rate <=DESC_RATEMCS15 ) + rs =RTW_RATE_SECTION_HT_2S ; +else if (rate >=DESC_RATEVHT1SS_MCS0 && rate <=DESC_RATEVHT1SS_MCS9 ) + rs =RTW_RATE_SECTION_VHT_1S ; +else if (rate >=DESC_RATEVHT2SS_MCS0 && rate <=DESC_RATEVHT2SS_MCS9 ) + rs =RTW_RATE_SECTION_VHT_2S ; +else + goto err; + + ch_idx =rtw_channel_to_idx (band, channel); +if (ch_idx <0 ) + goto err; + + power_limit =get_tx_power_limit (hal, bw, rs, ch_idx, regd); + +return power_limit; + +err: +WARN (1 ,"invalid arguments, band=%d, bw=%d, path=%d, rate=%d, ch=%d\n" , + band, bw, rf_path, rate, channel); +return RTW_MAX_POWER_INDEX ; +} + +void phy_set_tx_power_limit (struct rtw_dev *rtwdev,u8 regd,u8 band, +u8 bw,u8 rs,u8 ch,s8 pwr_limit) +{ +struct rtw_hal *hal = &rtwdev->hal; +int ch_idx; + + pwr_limit =clamp_t (s8, pwr_limit, + -RTW_MAX_POWER_INDEX ,RTW_MAX_POWER_INDEX ); + ch_idx =rtw_channel_to_idx (band, ch); + +if (regd >=RTW_REGD_MAX || bw >=RTW_CHANNEL_WIDTH_MAX || + rs >=RTW_RATE_SECTION_MAX || ch_idx <0 ) { +WARN (1 , +"wrong txpwr_lmt regd=%u, band=%u bw=%u, rs=%u, ch_idx=%u, pwr_limit=%d\n" , + regd, band, bw, rs, ch_idx, pwr_limit); +return ; + } + +if (band ==PHY_BAND_2G ) + hal->tx_pwr_limit_2g[regd][bw][rs][ch_idx] = pwr_limit; +else if (band ==PHY_BAND_5G ) + hal->tx_pwr_limit_5g[regd][bw][rs][ch_idx] = pwr_limit; +} + +static +void rtw_hw_tx_power_limit_init (struct rtw_hal *hal,u8 regd,u8 bw,u8 rs) +{ +u8 ch; + +/* 2.4G channels */ +for (ch =0 ; ch <RTW_MAX_CHANNEL_NUM_2G ; ch++) + hal->tx_pwr_limit_2g[regd][bw][rs][ch] =RTW_MAX_POWER_INDEX ; + +/* 5G channels */ +for (ch =0 ; ch <RTW_MAX_CHANNEL_NUM_5G ; ch++) + hal->tx_pwr_limit_5g[regd][bw][rs][ch] =RTW_MAX_POWER_INDEX ; +} + +void rtw_hw_init_tx_power (struct rtw_hal *hal) +{ +u8 regd, path, rate, rs, bw; + +/* init tx power by rate offset */ +for (path =0 ; path <RTW_RF_PATH_MAX ; path++) { +for (rate =0 ; rate <DESC_RATE_MAX ; rate++) { + hal->tx_pwr_by_rate_offset_2g[path][rate] =0 ; + hal->tx_pwr_by_rate_offset_5g[path][rate] =0 ; + } + } + +/* init tx power limit */ +for (regd =0 ; regd <RTW_REGD_MAX ; regd++) +for (bw =0 ; bw <RTW_CHANNEL_WIDTH_MAX ; bw++) +for (rs =0 ; rs <RTW_RATE_SECTION_MAX ; rs++) +rtw_hw_tx_power_limit_init (hal, regd, bw, rs); +}
drivers/net/wireless/realtek/rtw88/phy.h new file +134 -0
134 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v9 8/14 rtw88: debug files
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
debug files for Realtek 802.11ac wireless network chips
--- drivers/net/wireless/realtek/rtw88/debug.c | 637 +++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/debug.h | 52 +++ 2 files changed, 689 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/debug.c create mode 100644 drivers/net/wireless/realtek/rtw88/debug.h
drivers/net/wireless/realtek/rtw88/debug.c new file +637 -0
@@ -0,0 +1,637 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include <linux/debugfs.h> +#include <linux/seq_file.h> +#include "main.h" +#include "sec.h" +#include "fw.h" +#include "debug.h" + +#ifdef CONFIG_RTW88_DEBUGFS + +struct rtw_debugfs_priv { +struct rtw_dev *rtwdev; +int (*cb_read)(struct seq_file *m,void *v); +ssize_t (*cb_write)(struct file *filp,const char __user *buffer, +size_t count,loff_t *loff); +union { +u32 cb_data; +u8 *buf; +struct { +u32 page_offset; +u32 page_num; + } rsvd_page; +struct { +u8 rf_path; +u32 rf_addr; +u32 rf_mask; + }; +struct { +u32 addr; +u32 len; + } read_reg; + }; +}; + +static int rtw_debugfs_single_show (struct seq_file *m,void *v) +{ +struct rtw_debugfs_priv *debugfs_priv = m->private; + +return debugfs_priv->cb_read (m, v); +} + +static ssize_t rtw_debugfs_common_write (struct file *filp, +const char __user *buffer, +size_t count,loff_t *loff) +{ +struct rtw_debugfs_priv *debugfs_priv = filp->private_data; + +return debugfs_priv->cb_write (filp, buffer, count, loff); +} + +static ssize_t rtw_debugfs_single_write (struct file *filp, +const char __user *buffer, +size_t count,loff_t *loff) +{ +struct seq_file *seqpriv = (struct seq_file *)filp->private_data; +struct rtw_debugfs_priv *debugfs_priv = seqpriv->private; + +return debugfs_priv->cb_write (filp, buffer, count, loff); +} + +static int rtw_debugfs_single_open_rw (struct inode *inode,struct file *filp) +{ +return single_open (filp, rtw_debugfs_single_show, inode->i_private); +} + +static int rtw_debugfs_close (struct inode *inode,struct file *filp) +{ +return 0 ; +} + +static const struct file_operations file_ops_single_r = { + .owner =THIS_MODULE , + .open = rtw_debugfs_single_open_rw, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + +static const struct file_operations file_ops_single_rw = { + .owner =THIS_MODULE , + .open = rtw_debugfs_single_open_rw, + .release = single_release, + .read = seq_read, + .llseek = seq_lseek, + .write = rtw_debugfs_single_write, +}; + +static const struct file_operations file_ops_common_write = { + .owner =THIS_MODULE , + .write = rtw_debugfs_common_write, + .open = simple_open, + .release = rtw_debugfs_close, +}; + +static int rtw_debugfs_get_read_reg (struct seq_file *m,void *v) +{ +struct rtw_debugfs_priv *debugfs_priv = m->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +u32 val, len, addr; + + len = debugfs_priv->read_reg.len; + addr = debugfs_priv->read_reg.addr; +switch (len) { +case 1 : + val =rtw_read8 (rtwdev, addr); +seq_printf (m,"reg 0x%03x: 0x%02x\n" , addr, val); +break ; +case 2 : + val =rtw_read16 (rtwdev, addr); +seq_printf (m,"reg 0x%03x: 0x%04x\n" , addr, val); +break ; +case 4 : + val =rtw_read32 (rtwdev, addr); +seq_printf (m,"reg 0x%03x: 0x%08x\n" , addr, val); +break ; + } +return 0 ; +} + +static int rtw_debugfs_get_rf_read (struct seq_file *m,void *v) +{ +struct rtw_debugfs_priv *debugfs_priv = m->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +u32 val, addr, mask; +u8 path; + + path = debugfs_priv->rf_path; + addr = debugfs_priv->rf_addr; + mask = debugfs_priv->rf_mask; + + val =rtw_read_rf (rtwdev, path, addr, mask); + +seq_printf (m,"rf_read path:%d addr:0x%08x mask:0x%08x val=0x%08x\n" , + path, addr, mask, val); + +return 0 ; +} + +static int rtw_debugfs_copy_from_user (char tmp[],int size, +const char __user *buffer,size_t count, +int num) +{ +int tmp_len; + +if (count < num) +return -EFAULT ; + + tmp_len = (count > size -1 ? size -1 : count); + +if (!buffer ||copy_from_user (tmp, buffer, tmp_len)) +return count; + + tmp[tmp_len] ='\0' ; + +return 0 ; +} + +static ssize_t rtw_debugfs_set_read_reg (struct file *filp, +const char __user *buffer, +size_t count,loff_t *loff) +{ +struct seq_file *seqpriv = (struct seq_file *)filp->private_data; +struct rtw_debugfs_priv *debugfs_priv = seqpriv->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +char tmp[32 +1 ]; +u32 addr, len; +int num; + +rtw_debugfs_copy_from_user (tmp,sizeof (tmp), buffer, count,2 ); + + num =sscanf (tmp,"%x %x" , &addr, &len); + +if (num !=2 ) +return count; + +if (len !=1 && len !=2 && len !=4 ) { +rtw_warn (rtwdev,"read reg setting wrong len\n" ); +return -EINVAL ; + } + debugfs_priv->read_reg.addr = addr; + debugfs_priv->read_reg.len = len; + +return count; +} + +static int rtw_debugfs_get_dump_cam (struct seq_file *m,void *v) +{ +struct rtw_debugfs_priv *debugfs_priv = m->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +u32 val, command; +u32 hw_key_idx = debugfs_priv->cb_data <<RTW_SEC_CAM_ENTRY_SHIFT ; +u32 read_cmd =RTW_SEC_CMD_POLLING ; +int i; + +seq_printf (m,"cam entry%d\n" , debugfs_priv->cb_data); +seq_puts (m,"0x0 0x1 0x2 0x3 " ); +seq_puts (m,"0x4 0x5\n" ); +mutex_lock (&rtwdev->mutex); +for (i =0 ; i <=5 ; i++) { + command = read_cmd | (hw_key_idx + i); +rtw_write32 (rtwdev,RTW_SEC_CMD_REG , command); + val =rtw_read32 (rtwdev,RTW_SEC_READ_REG ); +seq_printf (m,"%8.8x" , val); +if (i <2 ) +seq_puts (m," " ); + } +seq_puts (m,"\n" ); +mutex_unlock (&rtwdev->mutex); +return 0 ; +} + +static int rtw_debugfs_get_rsvd_page (struct seq_file *m,void *v) +{ +struct rtw_debugfs_priv *debugfs_priv = m->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +u8 page_size = rtwdev->chip->page_size; +u32 buf_size = debugfs_priv->rsvd_page.page_num * page_size; +u32 offset = debugfs_priv->rsvd_page.page_offset * page_size; +u8 *buf; +int i; +int ret; + + buf =vzalloc (buf_size); +if (!buf) +return -ENOMEM ; + + ret =rtw_dump_drv_rsvd_page (rtwdev, offset, buf_size, (u32 *)buf); +if (ret) { +rtw_err (rtwdev,"failed to dump rsvd page\n" ); +vfree (buf); +return ret; + } + +for (i =0 ; i < buf_size ; i +=8 ) { +if (i % page_size ==0 ) +seq_printf (m,"PAGE %d\n" , (i + offset) / page_size); +seq_printf (m,"%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n" , + *(buf + i), *(buf + i +1 ), + *(buf + i +2 ), *(buf + i +3 ), + *(buf + i +4 ), *(buf + i +5 ), + *(buf + i +6 ), *(buf + i +7 )); + } +vfree (buf); + +return 0 ; +} + +static ssize_t rtw_debugfs_set_rsvd_page (struct file *filp, +const char __user *buffer, +size_t count,loff_t *loff) +{ +struct seq_file *seqpriv = (struct seq_file *)filp->private_data; +struct rtw_debugfs_priv *debugfs_priv = seqpriv->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +char tmp[32 +1 ]; +u32 offset, page_num; +int num; + +rtw_debugfs_copy_from_user (tmp,sizeof (tmp), buffer, count,2 ); + + num =sscanf (tmp,"%d %d" , &offset, &page_num); + +if (num !=2 ) { +rtw_warn (rtwdev,"invalid arguments\n" ); +return num; + } + + debugfs_priv->rsvd_page.page_offset = offset; + debugfs_priv->rsvd_page.page_num = page_num; + +return count; +} + +static ssize_t rtw_debugfs_set_single_input (struct file *filp, +const char __user *buffer, +size_t count,loff_t *loff) +{ +struct seq_file *seqpriv = (struct seq_file *)filp->private_data; +struct rtw_debugfs_priv *debugfs_priv = seqpriv->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +char tmp[32 +1 ]; +u32 input; +int num; + +rtw_debugfs_copy_from_user (tmp,sizeof (tmp), buffer, count,1 ); + + num =kstrtoint (tmp,0 , &input); + +if (num) { +rtw_warn (rtwdev,"kstrtoint failed\n" ); +return num; + } + + debugfs_priv->cb_data = input; + +return count; +} + +static ssize_t rtw_debugfs_set_write_reg (struct file *filp, +const char __user *buffer, +size_t count,loff_t *loff) +{ +struct rtw_debugfs_priv *debugfs_priv = filp->private_data; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +char tmp[32 +1 ]; +u32 addr, val, len; +int num; + +rtw_debugfs_copy_from_user (tmp,sizeof (tmp), buffer, count,3 ); + +/* write BB/MAC register */ + num =sscanf (tmp,"%x %x %x" , &addr, &val, &len); + +if (num !=3 ) +return count; + +switch (len) { +case 1 : +rtw_dbg (rtwdev,RTW_DBG_DEBUGFS , +"reg write8 0x%03x: 0x%08x\n" , addr, val); +rtw_write8 (rtwdev, addr, (u8 )val); +break ; +case 2 : +rtw_dbg (rtwdev,RTW_DBG_DEBUGFS , +"reg write16 0x%03x: 0x%08x\n" , addr, val); +rtw_write16 (rtwdev, addr, (u16 )val); +break ; +case 4 : +rtw_dbg (rtwdev,RTW_DBG_DEBUGFS , +"reg write32 0x%03x: 0x%08x\n" , addr, val); +rtw_write32 (rtwdev, addr, (u32 )val); +break ; +default : +rtw_dbg (rtwdev,RTW_DBG_DEBUGFS , +"error write length = %d\n" , len); +break ; + } + +return count; +} + +static ssize_t rtw_debugfs_set_rf_write (struct file *filp, +const char __user *buffer, +size_t count,loff_t *loff) +{ +struct rtw_debugfs_priv *debugfs_priv = filp->private_data; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +char tmp[32 +1 ]; +u32 path, addr, mask, val; +int num; + +rtw_debugfs_copy_from_user (tmp,sizeof (tmp), buffer, count,4 ); + + num =sscanf (tmp,"%x %x %x %x" , &path, &addr, &mask, &val); + +if (num !=4 ) { +rtw_warn (rtwdev,"invalid args, [path] [addr] [mask] [val]\n" ); +return count; + } + +rtw_write_rf (rtwdev, path, addr, mask, val); +rtw_dbg (rtwdev,RTW_DBG_DEBUGFS , +"write_rf path:%d addr:0x%08x mask:0x%08x, val:0x%08x\n" , + path, addr, mask, val); + +return count; +} + +static ssize_t rtw_debugfs_set_rf_read (struct file *filp, +const char __user *buffer, +size_t count,loff_t *loff) +{ +struct seq_file *seqpriv = (struct seq_file *)filp->private_data; +struct rtw_debugfs_priv *debugfs_priv = seqpriv->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +char tmp[32 +1 ]; +u32 path, addr, mask; +int num; + +rtw_debugfs_copy_from_user (tmp,sizeof (tmp), buffer, count,3 ); + + num =sscanf (tmp,"%x %x %x" , &path, &addr, &mask); + +if (num !=3 ) { +rtw_warn (rtwdev,"invalid args, [path] [addr] [mask] [val]\n" ); +return count; + } + + debugfs_priv->rf_path = path; + debugfs_priv->rf_addr = addr; + debugfs_priv->rf_mask = mask; + +return count; +} + +static int rtw_debug_get_mac_page (struct seq_file *m,void *v) +{ +struct rtw_debugfs_priv *debugfs_priv = m->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +u32 val; +u32 page = debugfs_priv->cb_data; +int i, n; +int max =0xff ; + + val =rtw_read32 (rtwdev, debugfs_priv->cb_data); +for (n =0 ; n <= max; ) { +seq_printf (m,"\n%8.8x " , n + page); +for (i =0 ; i <4 && n <= max; i++, n +=4 ) +seq_printf (m,"%8.8x " , +rtw_read32 (rtwdev, (page | n))); + } +seq_puts (m,"\n" ); +return 0 ; +} + +static int rtw_debug_get_bb_page (struct seq_file *m,void *v) +{ +struct rtw_debugfs_priv *debugfs_priv = m->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +u32 val; +u32 page = debugfs_priv->cb_data; +int i, n; +int max =0xff ; + + val =rtw_read32 (rtwdev, debugfs_priv->cb_data); +for (n =0 ; n <= max; ) { +seq_printf (m,"\n%8.8x " , n + page); +for (i =0 ; i <4 && n <= max; i++, n +=4 ) +seq_printf (m,"%8.8x " , +rtw_read32 (rtwdev, (page | n))); + } +seq_puts (m,"\n" ); +return 0 ; +} + +static int rtw_debug_get_rf_dump (struct seq_file *m,void *v) +{ +struct rtw_debugfs_priv *debugfs_priv = m->private; +struct rtw_dev *rtwdev = debugfs_priv->rtwdev; +u32 addr, offset, data; +u8 path; + +for (path =0 ; path < rtwdev->hal.rf_path_num; path++) { +seq_printf (m,"RF path:%d\n" , path); +for (addr =0 ; addr <0x100 ; addr +=4 ) { +seq_printf (m,"%8.8x " , addr); +for (offset =0 ; offset <4 ; offset++) { + data =rtw_read_rf (rtwdev, path, addr + offset, +0xffffffff ); +seq_printf (m,"%8.8x " , data); + } +seq_puts (m,"\n" ); + } +seq_puts (m,"\n" ); + } + +return 0 ; +} + +#define rtw_debug_impl_mac (page, addr) \ +static struct rtw_debugfs_priv rtw_debug_priv_mac_ ##page = { \ + .cb_read = rtw_debug_get_mac_page, \ + .cb_data = addr, \ +} + +rtw_debug_impl_mac (0 ,0x0000 ); +rtw_debug_impl_mac (1 ,0x0100 ); +rtw_debug_impl_mac (2 ,0x0200 ); +rtw_debug_impl_mac (3 ,0x0300 ); +rtw_debug_impl_mac (4 ,0x0400 ); +rtw_debug_impl_mac (5 ,0x0500 ); +rtw_debug_impl_mac (6 ,0x0600 ); +rtw_debug_impl_mac (7 ,0x0700 ); +rtw_debug_impl_mac (10 ,0x1000 ); +rtw_debug_impl_mac (11 ,0x1100 ); +rtw_debug_impl_mac (12 ,0x1200 ); +rtw_debug_impl_mac (13 ,0x1300 ); +rtw_debug_impl_mac (14 ,0x1400 ); +rtw_debug_impl_mac (15 ,0x1500 ); +rtw_debug_impl_mac (16 ,0x1600 ); +rtw_debug_impl_mac (17 ,0x1700 ); + +#define rtw_debug_impl_bb (page, addr) \ +static struct rtw_debugfs_priv rtw_debug_priv_bb_ ##page = { \ + .cb_read = rtw_debug_get_bb_page, \ + .cb_data = addr, \ +} + +rtw_debug_impl_bb (8 ,0x0800 ); +rtw_debug_impl_bb (9 ,0x0900 ); +rtw_debug_impl_bb (a,0x0a00 ); +rtw_debug_impl_bb (b,0x0b00 ); +rtw_debug_impl_bb (c,0x0c00 ); +rtw_debug_impl_bb (d,0x0d00 ); +rtw_debug_impl_bb (e,0x0e00 ); +rtw_debug_impl_bb (f,0x0f00 ); +rtw_debug_impl_bb (18 ,0x1800 ); +rtw_debug_impl_bb (19 ,0x1900 ); +rtw_debug_impl_bb(1a, 0x1a00); +rtw_debug_impl_bb (1b ,0x1b00 ); +rtw_debug_impl_bb(1c, 0x1c00); +rtw_debug_impl_bb (1d ,0x1d00 ); +rtw_debug_impl_bb (1e ,0x1e00 ); +rtw_debug_impl_bb (1f ,0x1f00 ); +rtw_debug_impl_bb(2c, 0x2c00); +rtw_debug_impl_bb (2d ,0x2d00 ); +rtw_debug_impl_bb (40 ,0x4000 ); +rtw_debug_impl_bb (41 ,0x4100 ); + +static struct rtw_debugfs_priv rtw_debug_priv_rf_dump = { + .cb_read = rtw_debug_get_rf_dump, +}; + +static struct rtw_debugfs_priv rtw_debug_priv_write_reg = { + .cb_write = rtw_debugfs_set_write_reg, +}; + +static struct rtw_debugfs_priv rtw_debug_priv_rf_write = { + .cb_write = rtw_debugfs_set_rf_write, +}; + +static struct rtw_debugfs_priv rtw_debug_priv_rf_read = { + .cb_write = rtw_debugfs_set_rf_read, + .cb_read = rtw_debugfs_get_rf_read, +}; + +static struct rtw_debugfs_priv rtw_debug_priv_read_reg = { + .cb_write = rtw_debugfs_set_read_reg, + .cb_read = rtw_debugfs_get_read_reg, +}; + +static struct rtw_debugfs_priv rtw_debug_priv_dump_cam = { + .cb_write = rtw_debugfs_set_single_input, + .cb_read = rtw_debugfs_get_dump_cam, +}; + +static struct rtw_debugfs_priv rtw_debug_priv_rsvd_page = { + .cb_write = rtw_debugfs_set_rsvd_page, + .cb_read = rtw_debugfs_get_rsvd_page, +}; + +#define rtw_debugfs_add_core (name, mode, fopname, parent) \ + do { \ + rtw_debug_priv_ ##name.rtwdev = rtwdev; \ + if (!debugfs_create_file(#name, mode, \ + parent, &rtw_debug_priv_ ##name,\ + &file_ops_ ##fopname)) \ + pr_debug("Unable to initialize debugfs:%s\n", \ + #name); \ + } while (0) + +#define rtw_debugfs_add_w (name) \ + rtw_debugfs_add_core(name, S_IFREG | 0222, common_write, debugfs_topdir) +#define rtw_debugfs_add_rw (name) \ + rtw_debugfs_add_core(name, S_IFREG | 0666, single_rw, debugfs_topdir) +#define rtw_debugfs_add_r (name) \ + rtw_debugfs_add_core(name, S_IFREG | 0444, single_r, debugfs_topdir) + +void rtw_debugfs_init (struct rtw_dev *rtwdev) +{ +struct dentry *debugfs_topdir = rtwdev->debugfs; + + debugfs_topdir =debugfs_create_dir ("rtw88" , + rtwdev->hw->wiphy->debugfsdir); +rtw_debugfs_add_w (write_reg); +rtw_debugfs_add_rw (read_reg); +rtw_debugfs_add_w (rf_write); +rtw_debugfs_add_rw (rf_read); +rtw_debugfs_add_rw (dump_cam); +rtw_debugfs_add_rw (rsvd_page); +rtw_debugfs_add_r (mac_0); +rtw_debugfs_add_r (mac_1); +rtw_debugfs_add_r (mac_2); +rtw_debugfs_add_r (mac_3); +rtw_debugfs_add_r (mac_4); +rtw_debugfs_add_r (mac_5); +rtw_debugfs_add_r (mac_6); +rtw_debugfs_add_r (mac_7); +rtw_debugfs_add_r (bb_8); +rtw_debugfs_add_r (bb_9); +rtw_debugfs_add_r (bb_a); +rtw_debugfs_add_r (bb_b); +rtw_debugfs_add_r (bb_c); +rtw_debugfs_add_r (bb_d); +rtw_debugfs_add_r (bb_e); +rtw_debugfs_add_r (bb_f); +rtw_debugfs_add_r (mac_10); +rtw_debugfs_add_r (mac_11); +rtw_debugfs_add_r (mac_12); +rtw_debugfs_add_r (mac_13); +rtw_debugfs_add_r (mac_14); +rtw_debugfs_add_r (mac_15); +rtw_debugfs_add_r (mac_16); +rtw_debugfs_add_r (mac_17); +rtw_debugfs_add_r (bb_18); +rtw_debugfs_add_r (bb_19); +rtw_debugfs_add_r (bb_1a); +rtw_debugfs_add_r (bb_1b); +rtw_debugfs_add_r (bb_1c); +rtw_debugfs_add_r (bb_1d); +rtw_debugfs_add_r (bb_1e); +rtw_debugfs_add_r (bb_1f); +if (rtwdev->chip->id ==RTW_CHIP_TYPE_8822C ) { +rtw_debugfs_add_r (bb_2c); +rtw_debugfs_add_r (bb_2d); +rtw_debugfs_add_r (bb_40); +rtw_debugfs_add_r (bb_41); + } +rtw_debugfs_add_r (rf_dump); +} + +#endif /* CONFIG_RTW88_DEBUGFS */ + +#ifdef CONFIG_RTW88_DEBUG + +void __rtw_dbg (struct rtw_dev *rtwdev,enum rtw_debug_mask mask, +const char *fmt, ...) +{ +struct va_format vaf = { + .fmt = fmt, + }; +va_list args; + +va_start (args, fmt); + vaf.va = &args; + +if (rtw_debug_mask & mask) +dev_printk (KERN_DEBUG , rtwdev->dev,"%pV" , &vaf); + +va_end (args); +} +EXPORT_SYMBOL (__rtw_dbg); + +#endif /* CONFIG_RTW88_DEBUG */
drivers/net/wireless/realtek/rtw88/debug.h new file +52 -0
52 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v9 9/14 rtw88: chip files
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
chip files Realtek 802.11ac wireless network chips 8822B & 8822C series files
--- drivers/net/wireless/realtek/rtw88/rtw8822b.c | 1594 +++++++++++++++++ drivers/net/wireless/realtek/rtw88/rtw8822b.h | 170 ++ .../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.h | 17 + 6 files changed, 3875 insertions(+) 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.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.h
drivers/net/wireless/realtek/rtw88/rtw8822b.c new file +1594 -0
@@ -0,0 +1,1594 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include "main.h" +#include "fw.h" +#include "tx.h" +#include "rx.h" +#include "phy.h" +#include "rtw8822b.h" +#include "rtw8822b_table.h" +#include "mac.h" +#include "reg.h" +#include "debug.h" + +static void rtw8822b_config_trx_mode (struct rtw_dev *rtwdev,u8 tx_path, +u8 rx_path,bool is_tx2_path); + +static void rtw8822be_efuse_parsing (struct rtw_efuse *efuse, +struct rtw8822b_efuse *map) +{ +ether_addr_copy (efuse->addr, map->e.mac_addr); +} + +static int rtw8822b_read_efuse (struct rtw_dev *rtwdev,u8 *log_map) +{ +struct rtw_efuse *efuse = &rtwdev->efuse; +struct rtw8822b_efuse *map; +int i; + + map = (struct rtw8822b_efuse *)log_map; + + efuse->rfe_option = map->rfe_option; + efuse->crystal_cap = map->xtal_k; + efuse->pa_type_2g = map->pa_type; + efuse->pa_type_5g = map->pa_type; + efuse->lna_type_2g = map->lna_type_2g[0 ]; + efuse->lna_type_5g = map->lna_type_5g[0 ]; + efuse->channel_plan = map->channel_plan; + efuse->country_code[0 ] = map->country_code[0 ]; + efuse->country_code[1 ] = map->country_code[1 ]; + efuse->bt_setting = map->rf_bt_setting; + efuse->regd = map->rf_board_option &0x7 ; + +for (i =0 ; i <4 ; i++) + efuse->txpwr_idx_table[i] = map->txpwr_idx_table[i]; + +switch (rtw_hci_type (rtwdev)) { +case RTW_HCI_TYPE_PCIE : +rtw8822be_efuse_parsing (efuse, map); +break ; +default : +/* unsupported now */ +return -ENOTSUPP ; + } + +return 0 ; +} + +static void rtw8822b_phy_rfe_init (struct rtw_dev *rtwdev) +{ +/* chip top mux */ +rtw_write32_mask (rtwdev,0x64 ,BIT (29 ) |BIT (28 ),0x3 ); +rtw_write32_mask (rtwdev,0x4c ,BIT (26 ) |BIT (25 ),0x0 ); +rtw_write32_mask (rtwdev,0x40 ,BIT (2 ),0x1 ); + +/* from s0 or s1 */ +rtw_write32_mask (rtwdev,0x1990 ,0x3f ,0x30 ); +rtw_write32_mask (rtwdev,0x1990 , (BIT (11 ) |BIT (10 )),0x3 ); + +/* input or output */ +rtw_write32_mask (rtwdev,0x974 ,0x3f ,0x3f ); +rtw_write32_mask (rtwdev,0x974 , (BIT (11 ) |BIT (10 )),0x3 ); +} + +static void rtw8822b_phy_set_param (struct rtw_dev *rtwdev) +{ +struct rtw_hal *hal = &rtwdev->hal; +u8 crystal_cap; +bool is_tx2_path; + +/* power on BB/RF domain */ +rtw_write8_set (rtwdev,REG_SYS_FUNC_EN , +BIT_FEN_BB_RSTB |BIT_FEN_BB_GLB_RST ); +rtw_write8_set (rtwdev,REG_RF_CTRL , +BIT_RF_EN |BIT_RF_RSTB |BIT_RF_SDM_RSTB ); +rtw_write32_set (rtwdev,REG_WLRF1 ,BIT_WLRF1_BBRF_EN ); + +/* pre init before header files config */ +rtw_write32_clr (rtwdev,REG_RXPSEL ,BIT_RX_PSEL_RST ); + +rtw_phy_load_tables (rtwdev); + + crystal_cap = rtwdev->efuse.crystal_cap &0x3F ; +rtw_write32_mask (rtwdev,0x24 ,0x7e000000 , crystal_cap); +rtw_write32_mask (rtwdev,0x28 ,0x7e , crystal_cap); + +/* post init after header files config */ +rtw_write32_set (rtwdev,REG_RXPSEL ,BIT_RX_PSEL_RST ); + + is_tx2_path = false; +rtw8822b_config_trx_mode (rtwdev, hal->antenna_tx, hal->antenna_rx, + is_tx2_path); +rtw_phy_init (rtwdev); + +rtw8822b_phy_rfe_init (rtwdev); + +/* wifi path controller */ +rtw_write32_mask (rtwdev,0x70 ,0x4000000 ,1 ); +/* BB control */ +rtw_write32_mask (rtwdev,0x4c ,0x01800000 ,0x2 ); +/* antenna mux switch */ +rtw_write8 (rtwdev,0x974 ,0xff ); +rtw_write32_mask (rtwdev,0x1990 ,0x300 ,0 ); +rtw_write32_mask (rtwdev,0xcbc ,0x80000 ,0x0 ); +/* SW control */ +rtw_write8 (rtwdev,0xcb4 ,0x77 ); +/* switch to WL side controller and gnt_wl gnt_bt debug signal */ +rtw_write32_mask (rtwdev,0x70 ,0xff000000 ,0x0e ); +/* gnt_wl = 1, gnt_bt = 0 */ +rtw_write32 (rtwdev,0x1704 ,0x7700 ); +rtw_write32 (rtwdev,0x1700 ,0xc00f0038 ); +/* switch for WL 2G */ +rtw_write8 (rtwdev,0xcbd ,0x2 ); +} + +#define WLAN_SLOT_TIME 0x09 +#define WLAN_PIFS_TIME 0x19 +#define WLAN_SIFS_CCK_CONT_TX 0xA +#define WLAN_SIFS_OFDM_CONT_TX 0xE +#define WLAN_SIFS_CCK_TRX 0x10 +#define WLAN_SIFS_OFDM_TRX 0x10 +#define WLAN_VO_TXOP_LIMIT 0x186/* unit : 32us */ +#define WLAN_VI_TXOP_LIMIT 0x3BC/* unit : 32us */ +#define WLAN_RDG_NAV 0x05 +#define WLAN_TXOP_NAV 0x1B +#define WLAN_CCK_RX_TSF 0x30 +#define WLAN_OFDM_RX_TSF 0x30 +#define WLAN_TBTT_PROHIBIT 0x04/* unit : 32us */ +#define WLAN_TBTT_HOLD_TIME 0x064/* unit : 32us */ +#define WLAN_DRV_EARLY_INT 0x04 +#define WLAN_BCN_DMA_TIME 0x02 + +#define WLAN_RX_FILTER0 0x0FFFFFFF +#define WLAN_RX_FILTER2 0xFFFF +#define WLAN_RCR_CFG 0xE400220E +#define WLAN_RXPKT_MAX_SZ 12288 +#define WLAN_RXPKT_MAX_SZ_512 (WLAN_RXPKT_MAX_SZ >> 9) + +#define WLAN_AMPDU_MAX_TIME 0x70 +#define WLAN_RTS_LEN_TH 0xFF +#define WLAN_RTS_TX_TIME_TH 0x08 +#define WLAN_MAX_AGG_PKT_LIMIT 0x20 +#define WLAN_RTS_MAX_AGG_PKT_LIMIT 0x20 +#define FAST_EDCA_VO_TH 0x06 +#define FAST_EDCA_VI_TH 0x06 +#define FAST_EDCA_BE_TH 0x06 +#define FAST_EDCA_BK_TH 0x06 +#define WLAN_BAR_RETRY_LIMIT 0x01 +#define WLAN_RA_TRY_RATE_AGG_LIMIT 0x08 + +#define WLAN_TX_FUNC_CFG1 0x30 +#define WLAN_TX_FUNC_CFG2 0x30 +#define WLAN_MAC_OPT_NORM_FUNC1 0x98 +#define WLAN_MAC_OPT_LB_FUNC1 0x80 +#define WLAN_MAC_OPT_FUNC2 0x30810041 + +#define WLAN_SIFS_CFG (WLAN_SIFS_CCK_CONT_TX | \ + (WLAN_SIFS_OFDM_CONT_TX << BIT_SHIFT_SIFS_OFDM_CTX) | \ + (WLAN_SIFS_CCK_TRX << BIT_SHIFT_SIFS_CCK_TRX) | \ + (WLAN_SIFS_OFDM_TRX << BIT_SHIFT_SIFS_OFDM_TRX)) + +#define WLAN_TBTT_TIME (WLAN_TBTT_PROHIBIT |\ + (WLAN_TBTT_HOLD_TIME << BIT_SHIFT_TBTT_HOLD_TIME_AP)) + +#define WLAN_NAV_CFG (WLAN_RDG_NAV | (WLAN_TXOP_NAV << 16)) +#define WLAN_RX_TSF_CFG (WLAN_CCK_RX_TSF | (WLAN_OFDM_RX_TSF) << 8) + +static int rtw8822b_mac_init (struct rtw_dev *rtwdev) +{ +u32 value32; + +/* protocol configuration */ +rtw_write8_clr (rtwdev,REG_SW_AMPDU_BURST_MODE_CTRL ,BIT_PRE_TX_CMD ); +rtw_write8 (rtwdev,REG_AMPDU_MAX_TIME_V1 ,WLAN_AMPDU_MAX_TIME ); +rtw_write8_set (rtwdev,REG_TX_HANG_CTRL ,BIT_EN_EOF_V1 ); + value32 =WLAN_RTS_LEN_TH | (WLAN_RTS_TX_TIME_TH <<8 ) | + (WLAN_MAX_AGG_PKT_LIMIT <<16 ) | + (WLAN_RTS_MAX_AGG_PKT_LIMIT <<24 ); +rtw_write32 (rtwdev,REG_PROT_MODE_CTRL , value32); +rtw_write16 (rtwdev,REG_BAR_MODE_CTRL +2 , +WLAN_BAR_RETRY_LIMIT |WLAN_RA_TRY_RATE_AGG_LIMIT <<8 ); +rtw_write8 (rtwdev,REG_FAST_EDCA_VOVI_SETTING ,FAST_EDCA_VO_TH ); +rtw_write8 (rtwdev,REG_FAST_EDCA_VOVI_SETTING +2 ,FAST_EDCA_VI_TH ); +rtw_write8 (rtwdev,REG_FAST_EDCA_BEBK_SETTING ,FAST_EDCA_BE_TH ); +rtw_write8 (rtwdev,REG_FAST_EDCA_BEBK_SETTING +2 ,FAST_EDCA_BK_TH ); +/* EDCA configuration */ +rtw_write8_clr (rtwdev,REG_TIMER0_SRC_SEL ,BIT_TSFT_SEL_TIMER0 ); +rtw_write16 (rtwdev,REG_TXPAUSE ,0x0000 ); +rtw_write8 (rtwdev,REG_SLOT ,WLAN_SLOT_TIME ); +rtw_write8 (rtwdev,REG_PIFS ,WLAN_PIFS_TIME ); +rtw_write32 (rtwdev,REG_SIFS ,WLAN_SIFS_CFG ); +rtw_write16 (rtwdev,REG_EDCA_VO_PARAM +2 ,WLAN_VO_TXOP_LIMIT ); +rtw_write16 (rtwdev,REG_EDCA_VI_PARAM +2 ,WLAN_VI_TXOP_LIMIT ); +rtw_write32 (rtwdev,REG_RD_NAV_NXT ,WLAN_NAV_CFG ); +rtw_write16 (rtwdev,REG_RXTSF_OFFSET_CCK ,WLAN_RX_TSF_CFG ); +/* Set beacon cotnrol - enable TSF and other related functions */ +rtw_write8_set (rtwdev,REG_BCN_CTRL ,BIT_EN_BCN_FUNCTION ); +/* Set send beacon related registers */ +rtw_write32 (rtwdev,REG_TBTT_PROHIBIT ,WLAN_TBTT_TIME ); +rtw_write8 (rtwdev,REG_DRVERLYINT ,WLAN_DRV_EARLY_INT ); +rtw_write8 (rtwdev,REG_BCNDMATIM ,WLAN_BCN_DMA_TIME ); +rtw_write8_clr (rtwdev,REG_TX_PTCL_CTRL +1 ,BIT_SIFS_BK_EN >>8 ); +/* WMAC configuration */ +rtw_write32 (rtwdev,REG_RXFLTMAP0 ,WLAN_RX_FILTER0 ); +rtw_write16 (rtwdev,REG_RXFLTMAP2 ,WLAN_RX_FILTER2 ); +rtw_write32 (rtwdev,REG_RCR ,WLAN_RCR_CFG ); +rtw_write8 (rtwdev,REG_RX_PKT_LIMIT ,WLAN_RXPKT_MAX_SZ_512 ); +rtw_write8 (rtwdev,REG_TCR +2 ,WLAN_TX_FUNC_CFG2 ); +rtw_write8 (rtwdev,REG_TCR +1 ,WLAN_TX_FUNC_CFG1 ); +rtw_write32 (rtwdev,REG_WMAC_OPTION_FUNCTION +8 ,WLAN_MAC_OPT_FUNC2 ); +rtw_write8 (rtwdev,REG_WMAC_OPTION_FUNCTION +4 ,WLAN_MAC_OPT_NORM_FUNC1 ); + +return 0 ; +} + +static void rtw8822b_set_channel_rfe_efem (struct rtw_dev *rtwdev,u8 channel) +{ +struct rtw_hal *hal = &rtwdev->hal; +bool is_channel_2g = (channel <=14 ) ? true : false; + +if (is_channel_2g) { +rtw_write32s_mask (rtwdev,REG_RFESEL0 ,0xffffff ,0x705770 ); +rtw_write32s_mask (rtwdev,REG_RFESEL8 ,MASKBYTE1 ,0x57 ); +rtw_write32s_mask (rtwdev,REG_RFECTL ,BIT (4 ),0 ); + }else { +rtw_write32s_mask (rtwdev,REG_RFESEL0 ,0xffffff ,0x177517 ); +rtw_write32s_mask (rtwdev,REG_RFESEL8 ,MASKBYTE1 ,0x75 ); +rtw_write32s_mask (rtwdev,REG_RFECTL ,BIT (5 ),0 ); + } + +rtw_write32s_mask (rtwdev,REG_RFEINV ,BIT (11 ) |BIT (10 ) |0x3f ,0x0 ); + +if (hal->antenna_rx ==BB_PATH_AB || + hal->antenna_tx ==BB_PATH_AB ) { +/* 2TX or 2RX */ +rtw_write32s_mask (rtwdev,REG_TRSW ,MASKLWORD ,0xa501 ); + }else if (hal->antenna_rx == hal->antenna_tx) { +/* TXA+RXA or TXB+RXB */ +rtw_write32s_mask (rtwdev,REG_TRSW ,MASKLWORD ,0xa500 ); + }else { +/* TXB+RXA or TXA+RXB */ +rtw_write32s_mask (rtwdev,REG_TRSW ,MASKLWORD ,0xa005 ); + } +} + +static void rtw8822b_set_channel_rfe_ifem (struct rtw_dev *rtwdev,u8 channel) +{ +struct rtw_hal *hal = &rtwdev->hal; +bool is_channel_2g = (channel <=14 ) ? true : false; + +if (is_channel_2g) { +/* signal source */ +rtw_write32s_mask (rtwdev,REG_RFESEL0 ,0xffffff ,0x745774 ); +rtw_write32s_mask (rtwdev,REG_RFESEL8 ,MASKBYTE1 ,0x57 ); + }else { +/* signal source */ +rtw_write32s_mask (rtwdev,REG_RFESEL0 ,0xffffff ,0x477547 ); +rtw_write32s_mask (rtwdev,REG_RFESEL8 ,MASKBYTE1 ,0x75 ); + } + +rtw_write32s_mask (rtwdev,REG_RFEINV ,BIT (11 ) |BIT (10 ) |0x3f ,0x0 ); + +if (is_channel_2g) { +if (hal->antenna_rx ==BB_PATH_AB || + hal->antenna_tx ==BB_PATH_AB ) { +/* 2TX or 2RX */ +rtw_write32s_mask (rtwdev,REG_TRSW ,MASKLWORD ,0xa501 ); + }else if (hal->antenna_rx == hal->antenna_tx) { +/* TXA+RXA or TXB+RXB */ +rtw_write32s_mask (rtwdev,REG_TRSW ,MASKLWORD ,0xa500 ); + }else { +/* TXB+RXA or TXA+RXB */ +rtw_write32s_mask (rtwdev,REG_TRSW ,MASKLWORD ,0xa005 ); + } + }else { +rtw_write32s_mask (rtwdev,REG_TRSW ,MASKLWORD ,0xa5a5 ); + } +} + +enum { +CCUT_IDX_1R_2G , +CCUT_IDX_2R_2G , +CCUT_IDX_1R_5G , +CCUT_IDX_2R_5G , +CCUT_IDX_NR , +}; + +struct cca_ccut { +u32 reg82c[CCUT_IDX_NR ]; +u32 reg830[CCUT_IDX_NR ]; +u32 reg838[CCUT_IDX_NR ]; +}; + +static const struct cca_ccut cca_ifem_ccut = { + {0x75C97010 ,0x75C97010 ,0x75C97010 ,0x75C97010 },/*Reg82C*/ + {0x79a0eaaa ,0x79A0EAAC ,0x79a0eaaa ,0x79a0eaaa },/*Reg830*/ + {0x87765541 ,0x87746341 ,0x87765541 ,0x87746341 },/*Reg838*/ +}; + +static const struct cca_ccut cca_efem_ccut = { + {0x75B86010 ,0x75B76010 ,0x75B86010 ,0x75B76010 },/*Reg82C*/ + {0x79A0EAA8 ,0x79A0EAAC ,0x79A0EAA8 ,0x79a0eaaa },/*Reg830*/ + {0x87766451 ,0x87766431 ,0x87766451 ,0x87766431 },/*Reg838*/ +}; + +static const struct cca_ccut cca_ifem_ccut_ext = { + {0x75da8010 ,0x75da8010 ,0x75da8010 ,0x75da8010 },/*Reg82C*/ + {0x79a0eaaa ,0x97A0EAAC ,0x79a0eaaa ,0x79a0eaaa },/*Reg830*/ + {0x87765541 ,0x86666341 ,0x87765561 ,0x86666361 },/*Reg838*/ +}; + +static void rtw8822b_get_cca_val (const struct cca_ccut *cca_ccut,u8 col, +u32 *reg82c,u32 *reg830,u32 *reg838) +{ + *reg82c = cca_ccut->reg82c[col]; + *reg830 = cca_ccut->reg830[col]; + *reg838 = cca_ccut->reg838[col]; +} + +struct rtw8822b_rfe_info { +const struct cca_ccut *cca_ccut_2g; +const struct cca_ccut *cca_ccut_5g; +enum rtw_rfe_fem fem; +bool ifem_ext; +void (*rtw_set_channel_rfe)(struct rtw_dev *rtwdev,u8 channel); +}; + +#define I2GE5G_CCUT (set_ch) { \ + .cca_ccut_2g = &cca_ifem_ccut, \ + .cca_ccut_5g = &cca_efem_ccut, \ + .fem = RTW_RFE_IFEM2G_EFEM5G, \ + .ifem_ext = false, \ + .rtw_set_channel_rfe = &rtw8822b_set_channel_rfe_ ## set_ch, \ + } +#define IFEM_EXT_CCUT (set_ch) { \ + .cca_ccut_2g = &cca_ifem_ccut_ext, \ + .cca_ccut_5g = &cca_ifem_ccut_ext, \ + .fem = RTW_RFE_IFEM, \ + .ifem_ext = true, \ + .rtw_set_channel_rfe = &rtw8822b_set_channel_rfe_ ## set_ch, \ + } + +static const struct rtw8822b_rfe_info rtw8822b_rfe_info[] = { + [2 ] =I2GE5G_CCUT (efem), + [5 ] =IFEM_EXT_CCUT (ifem), +}; + +static void rtw8822b_set_channel_cca (struct rtw_dev *rtwdev,u8 channel,u8 bw, +const struct rtw8822b_rfe_info *rfe_info) +{ +struct rtw_hal *hal = &rtwdev->hal; +struct rtw_efuse *efuse = &rtwdev->efuse; +const struct cca_ccut *cca_ccut; +u8 col; +u32 reg82c, reg830, reg838; +bool is_efem_cca = false, is_ifem_cca = false, is_rfe_type = false; + +if (channel <=14 ) { + cca_ccut = rfe_info->cca_ccut_2g; + +if (hal->antenna_rx ==BB_PATH_A || + hal->antenna_rx ==BB_PATH_B ) + col =CCUT_IDX_1R_2G ; +else + col =CCUT_IDX_2R_2G ; + }else { + cca_ccut = rfe_info->cca_ccut_5g; + +if (hal->antenna_rx ==BB_PATH_A || + hal->antenna_rx ==BB_PATH_B ) + col =CCUT_IDX_1R_5G ; +else + col =CCUT_IDX_2R_5G ; + } + +rtw8822b_get_cca_val (cca_ccut, col, ®82c, ®830, ®838); + +switch (rfe_info->fem) { +case RTW_RFE_IFEM : +default : + is_ifem_cca = true; +if (rfe_info->ifem_ext) + is_rfe_type = true; +break ; +case RTW_RFE_EFEM : + is_efem_cca = true; +break ; +case RTW_RFE_IFEM2G_EFEM5G : +if (channel <=14 ) + is_ifem_cca = true; +else + is_efem_cca = true; +break ; + } + +if (is_ifem_cca) { +if ((hal->cut_version ==RTW_CHIP_VER_CUT_B && + (col ==CCUT_IDX_2R_2G || col ==CCUT_IDX_2R_5G ) && + bw ==RTW_CHANNEL_WIDTH_40 ) || + (!is_rfe_type && col ==CCUT_IDX_2R_5G && + bw ==RTW_CHANNEL_WIDTH_40 ) || + (efuse->rfe_option ==5 && col ==CCUT_IDX_2R_5G )) + reg830 =0x79a0ea28 ; + } + +rtw_write32_mask (rtwdev,REG_CCASEL ,MASKDWORD , reg82c); +rtw_write32_mask (rtwdev,REG_PDMFTH ,MASKDWORD , reg830); +rtw_write32_mask (rtwdev,REG_CCA2ND ,MASKDWORD , reg838); + +if (is_efem_cca && !(hal->cut_version ==RTW_CHIP_VER_CUT_B )) +rtw_write32_mask (rtwdev,REG_L1WT ,MASKDWORD ,0x9194b2b9 ); + +if (bw ==RTW_CHANNEL_WIDTH_20 && + ((channel >=52 && channel <=64 ) || + (channel >=100 && channel <=144 ))) +rtw_write32_mask (rtwdev,REG_CCA2ND ,0xf0 ,0x4 ); +} + +static const u8 low_band[15 ] = {0x7 ,0x6 ,0x6 ,0x5 ,0x0 ,0x0 ,0x7 ,0xff ,0x6 , +0x5 ,0x0 ,0x0 ,0x7 ,0x6 ,0x6 }; +static const u8 middle_band[23 ] = {0x6 ,0x5 ,0x0 ,0x0 ,0x7 ,0x6 ,0x6 ,0xff ,0x0 , +0x0 ,0x7 ,0x6 ,0x6 ,0x5 ,0x0 ,0xff ,0x7 ,0x6 , +0x6 ,0x5 ,0x0 ,0x0 ,0x7 }; +static const u8 high_band[15 ] = {0x5 ,0x5 ,0x0 ,0x7 ,0x7 ,0x6 ,0x5 ,0xff ,0x0 , +0x7 ,0x7 ,0x6 ,0x5 ,0x5 ,0x0 }; + +static void rtw8822b_set_channel_rf (struct rtw_dev *rtwdev,u8 channel,u8 bw) +{ +#define RF18_BAND_MASK (BIT(16) | BIT(9) | BIT(8)) +#define RF18_BAND_2G (0) +#define RF18_BAND_5G (BIT(16) | BIT(8)) +#define RF18_CHANNEL_MASK (MASKBYTE0) +#define RF18_RFSI_MASK (BIT(18) | BIT(17)) +#define RF18_RFSI_GE_CH80 (BIT(17)) +#define RF18_RFSI_GT_CH144 (BIT(18)) +#define RF18_BW_MASK (BIT(11) | BIT(10)) +#define RF18_BW_20M (BIT(11) | BIT(10)) +#define RF18_BW_40M (BIT(11)) +#define RF18_BW_80M (BIT(10)) +#define RFBE_MASK (BIT(17) | BIT(16) | BIT(15)) + +struct rtw_hal *hal = &rtwdev->hal; +u32 rf_reg18, rf_reg_be; + + rf_reg18 =rtw_read_rf (rtwdev,RF_PATH_A ,0x18 ,RFREG_MASK ); + + rf_reg18 &= ~(RF18_BAND_MASK |RF18_CHANNEL_MASK |RF18_RFSI_MASK | +RF18_BW_MASK ); + + rf_reg18 |= (channel <=14 ?RF18_BAND_2G :RF18_BAND_5G ); + rf_reg18 |= (channel &RF18_CHANNEL_MASK ); +if (channel >144 ) + rf_reg18 |=RF18_RFSI_GT_CH144 ; +else if (channel >=80 ) + rf_reg18 |=RF18_RFSI_GE_CH80 ; + +switch (bw) { +case RTW_CHANNEL_WIDTH_5 : +case RTW_CHANNEL_WIDTH_10 : +case RTW_CHANNEL_WIDTH_20 : +default : + rf_reg18 |=RF18_BW_20M ; +break ; +case RTW_CHANNEL_WIDTH_40 : + rf_reg18 |=RF18_BW_40M ; +break ; +case RTW_CHANNEL_WIDTH_80 : + rf_reg18 |=RF18_BW_80M ; +break ; + } + +if (channel <=14 ) + rf_reg_be =0x0 ; +else if (channel >=36 && channel <=64 ) + rf_reg_be = low_band[(channel -36 ) >>1 ]; +else if (channel >=100 && channel <=144 ) + rf_reg_be = middle_band[(channel -100 ) >>1 ]; +else if (channel >=149 && channel <=177 ) + rf_reg_be = high_band[(channel -149 ) >>1 ]; +else + goto err; + +rtw_write_rf (rtwdev,RF_PATH_A ,RF_MALSEL ,RFBE_MASK , rf_reg_be); + +/* need to set 0xdf[18]=1 before writing RF18 when channel 144 */ +if (channel ==144 ) +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTDBG ,BIT (18 ),0x1 ); +else +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTDBG ,BIT (18 ),0x0 ); + +rtw_write_rf (rtwdev,RF_PATH_A ,0x18 ,RFREG_MASK , rf_reg18); +if (hal->rf_type >RF_1T1R ) +rtw_write_rf (rtwdev,RF_PATH_B ,0x18 ,RFREG_MASK , rf_reg18); + +rtw_write_rf (rtwdev,RF_PATH_A ,RF_XTALX2 ,BIT (19 ),0 ); +rtw_write_rf (rtwdev,RF_PATH_A ,RF_XTALX2 ,BIT (19 ),1 ); + +return ; + +err: +WARN_ON (1 ); +} + +static void rtw8822b_toggle_igi (struct rtw_dev *rtwdev) +{ +struct rtw_hal *hal = &rtwdev->hal; +u32 igi; + + igi =rtw_read32_mask (rtwdev,REG_RXIGI_A ,0x7f ); +rtw_write32_mask (rtwdev,REG_RXIGI_A ,0x7f , igi -2 ); +rtw_write32_mask (rtwdev,REG_RXIGI_A ,0x7f , igi); +rtw_write32_mask (rtwdev,REG_RXIGI_B ,0x7f , igi -2 ); +rtw_write32_mask (rtwdev,REG_RXIGI_B ,0x7f , igi); + +rtw_write32_mask (rtwdev,REG_RXPSEL ,MASKBYTE0 ,0x0 ); +rtw_write32_mask (rtwdev,REG_RXPSEL ,MASKBYTE0 , + hal->antenna_rx | (hal->antenna_rx <<4 )); +} + +static void rtw8822b_set_channel_rxdfir (struct rtw_dev *rtwdev,u8 bw) +{ +if (bw ==RTW_CHANNEL_WIDTH_40 ) { +/* RX DFIR for BW40 */ +rtw_write32_mask (rtwdev,REG_ACBB0 ,BIT (29 ) |BIT (28 ),0x1 ); +rtw_write32_mask (rtwdev,REG_ACBBRXFIR ,BIT (29 ) |BIT (28 ),0x0 ); +rtw_write32s_mask (rtwdev,REG_TXDFIR ,BIT (31 ),0x0 ); + }else if (bw ==RTW_CHANNEL_WIDTH_80 ) { +/* RX DFIR for BW80 */ +rtw_write32_mask (rtwdev,REG_ACBB0 ,BIT (29 ) |BIT (28 ),0x2 ); +rtw_write32_mask (rtwdev,REG_ACBBRXFIR ,BIT (29 ) |BIT (28 ),0x1 ); +rtw_write32s_mask (rtwdev,REG_TXDFIR ,BIT (31 ),0x0 ); + }else { +/* RX DFIR for BW20, BW10 and BW5*/ +rtw_write32_mask (rtwdev,REG_ACBB0 ,BIT (29 ) |BIT (28 ),0x2 ); +rtw_write32_mask (rtwdev,REG_ACBBRXFIR ,BIT (29 ) |BIT (28 ),0x2 ); +rtw_write32s_mask (rtwdev,REG_TXDFIR ,BIT (31 ),0x1 ); + } +} + +static void rtw8822b_set_channel_bb (struct rtw_dev *rtwdev,u8 channel,u8 bw, +u8 primary_ch_idx) +{ +struct rtw_efuse *efuse = &rtwdev->efuse; +u8 rfe_option = efuse->rfe_option; +u32 val32; + +if (channel <=14 ) { +rtw_write32_mask (rtwdev,REG_RXPSEL ,BIT (28 ),0x1 ); +rtw_write32_mask (rtwdev,REG_CCK_CHECK ,BIT (7 ),0x0 ); +rtw_write32_mask (rtwdev,REG_ENTXCCK ,BIT (18 ),0x0 ); +rtw_write32_mask (rtwdev,REG_RXCCAMSK ,0x0000FC00 ,15 ); + +rtw_write32_mask (rtwdev,REG_ACGG2TBL ,0x1f ,0x0 ); +rtw_write32_mask (rtwdev,REG_CLKTRK ,0x1ffe0000 ,0x96a ); +if (channel ==14 ) { +rtw_write32_mask (rtwdev,REG_TXSF2 ,MASKDWORD ,0x00006577 ); +rtw_write32_mask (rtwdev,REG_TXSF6 ,MASKLWORD ,0x0000 ); + }else { +rtw_write32_mask (rtwdev,REG_TXSF2 ,MASKDWORD ,0x384f6577 ); +rtw_write32_mask (rtwdev,REG_TXSF6 ,MASKLWORD ,0x1525 ); + } + +rtw_write32_mask (rtwdev,REG_RFEINV ,0x300 ,0x2 ); + }else if (channel >35 ) { +rtw_write32_mask (rtwdev,REG_ENTXCCK ,BIT (18 ),0x1 ); +rtw_write32_mask (rtwdev,REG_CCK_CHECK ,BIT (7 ),0x1 ); +rtw_write32_mask (rtwdev,REG_RXPSEL ,BIT (28 ),0x0 ); +rtw_write32_mask (rtwdev,REG_RXCCAMSK ,0x0000FC00 ,34 ); + +if (channel >=36 && channel <=64 ) +rtw_write32_mask (rtwdev,REG_ACGG2TBL ,0x1f ,0x1 ); +else if (channel >=100 && channel <=144 ) +rtw_write32_mask (rtwdev,REG_ACGG2TBL ,0x1f ,0x2 ); +else if (channel >=149 ) +rtw_write32_mask (rtwdev,REG_ACGG2TBL ,0x1f ,0x3 ); + +if (channel >=36 && channel <=48 ) +rtw_write32_mask (rtwdev,REG_CLKTRK ,0x1ffe0000 ,0x494 ); +else if (channel >=52 && channel <=64 ) +rtw_write32_mask (rtwdev,REG_CLKTRK ,0x1ffe0000 ,0x453 ); +else if (channel >=100 && channel <=116 ) +rtw_write32_mask (rtwdev,REG_CLKTRK ,0x1ffe0000 ,0x452 ); +else if (channel >=118 && channel <=177 ) +rtw_write32_mask (rtwdev,REG_CLKTRK ,0x1ffe0000 ,0x412 ); + +rtw_write32_mask (rtwdev,0xcbc ,0x300 ,0x1 ); + } + +switch (bw) { +case RTW_CHANNEL_WIDTH_20 : +default : + val32 =rtw_read32_mask (rtwdev,REG_ADCCLK ,MASKDWORD ); + val32 &=0xFFCFFC00 ; + val32 |= (RTW_CHANNEL_WIDTH_20 ); +rtw_write32_mask (rtwdev,REG_ADCCLK ,MASKDWORD , val32); + +rtw_write32_mask (rtwdev,REG_ADC160 ,BIT (30 ),0x1 ); +break ; +case RTW_CHANNEL_WIDTH_40 : +if (primary_ch_idx ==1 ) +rtw_write32_set (rtwdev,REG_RXSB ,BIT (4 )); +else +rtw_write32_clr (rtwdev,REG_RXSB ,BIT (4 )); + + val32 =rtw_read32_mask (rtwdev,REG_ADCCLK ,MASKDWORD ); + val32 &=0xFF3FF300 ; + val32 |= (((primary_ch_idx &0xf ) <<2 ) |RTW_CHANNEL_WIDTH_40 ); +rtw_write32_mask (rtwdev,REG_ADCCLK ,MASKDWORD , val32); + +rtw_write32_mask (rtwdev,REG_ADC160 ,BIT (30 ),0x1 ); +break ; +case RTW_CHANNEL_WIDTH_80 : + val32 =rtw_read32_mask (rtwdev,REG_ADCCLK ,MASKDWORD ); + val32 &=0xFCEFCF00 ; + val32 |= (((primary_ch_idx &0xf ) <<2 ) |RTW_CHANNEL_WIDTH_80 ); +rtw_write32_mask (rtwdev,REG_ADCCLK ,MASKDWORD , val32); + +rtw_write32_mask (rtwdev,REG_ADC160 ,BIT (30 ),0x1 ); + +if (rfe_option ==2 ) { +rtw_write32_mask (rtwdev,REG_L1PKWT ,0x0000f000 ,0x6 ); +rtw_write32_mask (rtwdev,REG_ADC40 ,BIT (10 ),0x1 ); + } +break ; +case RTW_CHANNEL_WIDTH_5 : + val32 =rtw_read32_mask (rtwdev,REG_ADCCLK ,MASKDWORD ); + val32 &=0xEFEEFE00 ; + val32 |= ((BIT (6 ) |RTW_CHANNEL_WIDTH_20 )); +rtw_write32_mask (rtwdev,REG_ADCCLK ,MASKDWORD , val32); + +rtw_write32_mask (rtwdev,REG_ADC160 ,BIT (30 ),0x0 ); +rtw_write32_mask (rtwdev,REG_ADC40 ,BIT (31 ),0x1 ); +break ; +case RTW_CHANNEL_WIDTH_10 : + val32 =rtw_read32_mask (rtwdev,REG_ADCCLK ,MASKDWORD ); + val32 &=0xEFFEFF00 ; + val32 |= ((BIT (7 ) |RTW_CHANNEL_WIDTH_20 )); +rtw_write32_mask (rtwdev,REG_ADCCLK ,MASKDWORD , val32); + +rtw_write32_mask (rtwdev,REG_ADC160 ,BIT (30 ),0x0 ); +rtw_write32_mask (rtwdev,REG_ADC40 ,BIT (31 ),0x1 ); +break ; + } +} + +static void rtw8822b_set_channel (struct rtw_dev *rtwdev,u8 channel,u8 bw, +u8 primary_chan_idx) +{ +struct rtw_efuse *efuse = &rtwdev->efuse; +const struct rtw8822b_rfe_info *rfe_info; + +if (WARN (efuse->rfe_option >=ARRAY_SIZE (rtw8822b_rfe_info), +"rfe_option %d is out of boundary\n" , efuse->rfe_option)) +return ; + + rfe_info = &rtw8822b_rfe_info[efuse->rfe_option]; + +rtw8822b_set_channel_bb (rtwdev, channel, bw, primary_chan_idx); +rtw_set_channel_mac (rtwdev, channel, bw, primary_chan_idx); +rtw8822b_set_channel_rf (rtwdev, channel, bw); +rtw8822b_set_channel_rxdfir (rtwdev, bw); +rtw8822b_toggle_igi (rtwdev); +rtw8822b_set_channel_cca (rtwdev, channel, bw, rfe_info); + (*rfe_info->rtw_set_channel_rfe)(rtwdev, channel); +} + +static void rtw8822b_config_trx_mode (struct rtw_dev *rtwdev,u8 tx_path, +u8 rx_path,bool is_tx2_path) +{ +struct rtw_efuse *efuse = &rtwdev->efuse; +const struct rtw8822b_rfe_info *rfe_info; +u8 ch = rtwdev->hal.current_channel; +u8 tx_path_sel, rx_path_sel; +int counter; + +if (WARN (efuse->rfe_option >=ARRAY_SIZE (rtw8822b_rfe_info), +"rfe_option %d is out of boundary\n" , efuse->rfe_option)) +return ; + + rfe_info = &rtw8822b_rfe_info[efuse->rfe_option]; + +if ((tx_path | rx_path) &BB_PATH_A ) +rtw_write32_mask (rtwdev,REG_AGCTR_A ,MASKLWORD ,0x3231 ); +else +rtw_write32_mask (rtwdev,REG_AGCTR_A ,MASKLWORD ,0x1111 ); + +if ((tx_path | rx_path) &BB_PATH_B ) +rtw_write32_mask (rtwdev,REG_AGCTR_B ,MASKLWORD ,0x3231 ); +else +rtw_write32_mask (rtwdev,REG_AGCTR_B ,MASKLWORD ,0x1111 ); + +rtw_write32_mask (rtwdev,REG_CDDTXP , (BIT (19 ) |BIT (18 )),0x3 ); +rtw_write32_mask (rtwdev,REG_TXPSEL , (BIT (29 ) |BIT (28 )),0x1 ); +rtw_write32_mask (rtwdev,REG_TXPSEL ,BIT (30 ),0x1 ); + +if (tx_path &BB_PATH_A ) { +rtw_write32_mask (rtwdev,REG_CDDTXP ,0xfff00000 ,0x001 ); +rtw_write32_mask (rtwdev,REG_ADCINI ,0xf0000000 ,0x8 ); + }else if (tx_path &BB_PATH_B ) { +rtw_write32_mask (rtwdev,REG_CDDTXP ,0xfff00000 ,0x002 ); +rtw_write32_mask (rtwdev,REG_ADCINI ,0xf0000000 ,0x4 ); + } + +if (tx_path ==BB_PATH_A || tx_path ==BB_PATH_B ) +rtw_write32_mask (rtwdev,REG_TXPSEL1 ,0xfff0 ,0x01 ); +else +rtw_write32_mask (rtwdev,REG_TXPSEL1 ,0xfff0 ,0x43 ); + + tx_path_sel = (tx_path <<4 ) | tx_path; +rtw_write32_mask (rtwdev,REG_TXPSEL ,MASKBYTE0 , tx_path_sel); + +if (tx_path !=BB_PATH_A && tx_path !=BB_PATH_B ) { +if (is_tx2_path || rtwdev->mp_mode) { +rtw_write32_mask (rtwdev,REG_CDDTXP ,0xfff00000 ,0x043 ); +rtw_write32_mask (rtwdev,REG_ADCINI ,0xf0000000 ,0xc ); + } + } + +rtw_write32_mask (rtwdev,REG_RXDESC ,BIT (22 ),0x0 ); +rtw_write32_mask (rtwdev,REG_RXDESC ,BIT (18 ),0x0 ); + +if (rx_path &BB_PATH_A ) +rtw_write32_mask (rtwdev,REG_ADCINI ,0x0f000000 ,0x0 ); +else if (rx_path &BB_PATH_B ) +rtw_write32_mask (rtwdev,REG_ADCINI ,0x0f000000 ,0x5 ); + + rx_path_sel = (rx_path <<4 ) | rx_path; +rtw_write32_mask (rtwdev,REG_RXPSEL ,MASKBYTE0 , rx_path_sel); + +if (rx_path ==BB_PATH_A || rx_path ==BB_PATH_B ) { +rtw_write32_mask (rtwdev,REG_ANTWT ,BIT (16 ),0x0 ); +rtw_write32_mask (rtwdev,REG_HTSTFWT ,BIT (28 ),0x0 ); +rtw_write32_mask (rtwdev,REG_MRC ,BIT (23 ),0x0 ); + }else { +rtw_write32_mask (rtwdev,REG_ANTWT ,BIT (16 ),0x1 ); +rtw_write32_mask (rtwdev,REG_HTSTFWT ,BIT (28 ),0x1 ); +rtw_write32_mask (rtwdev,REG_MRC ,BIT (23 ),0x1 ); + } + +for (counter =100 ; counter >0 ; counter--) { +u32 rf_reg33; + +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTWE ,RFREG_MASK ,0x80000 ); +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTWA ,RFREG_MASK ,0x00001 ); + +udelay (2 ); + rf_reg33 =rtw_read_rf (rtwdev,RF_PATH_A ,0x33 ,RFREG_MASK ); + +if (rf_reg33 ==0x00001 ) +break ; + } + +if (WARN (counter <=0 ,"write RF mode table fail\n" )) +return ; + +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTWE ,RFREG_MASK ,0x80000 ); +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTWA ,RFREG_MASK ,0x00001 ); +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTWD1 ,RFREG_MASK ,0x00034 ); +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTWD0 ,RFREG_MASK ,0x4080c ); +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTWE ,RFREG_MASK ,0x00000 ); +rtw_write_rf (rtwdev,RF_PATH_A ,RF_LUTWE ,RFREG_MASK ,0x00000 ); + +rtw8822b_toggle_igi (rtwdev); +rtw8822b_set_channel_cca (rtwdev,1 ,RTW_CHANNEL_WIDTH_20 , rfe_info); + (*rfe_info->rtw_set_channel_rfe)(rtwdev, ch); +} + +static void query_phy_status_page0 (struct rtw_dev *rtwdev,u8 *phy_status, +struct rtw_rx_pkt_stat *pkt_stat) +{ +s8 min_rx_power =-120 ; +u8 pwdb =GET_PHY_STAT_P0_PWDB (phy_status); + + pkt_stat->rx_power[RF_PATH_A ] = pwdb -110 ; + pkt_stat->rssi =rtw_phy_rf_power_2_rssi (pkt_stat->rx_power,1 ); + pkt_stat->bw =RTW_CHANNEL_WIDTH_20 ; + pkt_stat->signal_power =max (pkt_stat->rx_power[RF_PATH_A ], + min_rx_power); +} + +static void query_phy_status_page1 (struct rtw_dev *rtwdev,u8 *phy_status, +struct rtw_rx_pkt_stat *pkt_stat) +{ +u8 rxsc, bw; +s8 min_rx_power =-120 ; + +if (pkt_stat->rate >DESC_RATE11M && pkt_stat->rate <DESC_RATEMCS0 ) + rxsc =GET_PHY_STAT_P1_L_RXSC (phy_status); +else + rxsc =GET_PHY_STAT_P1_HT_RXSC (phy_status); + +if (rxsc >=1 && rxsc <=8 ) + bw =RTW_CHANNEL_WIDTH_20 ; +else if (rxsc >=9 && rxsc <=12 ) + bw =RTW_CHANNEL_WIDTH_40 ; +else if (rxsc >=13 ) + bw =RTW_CHANNEL_WIDTH_80 ; +else + bw =GET_PHY_STAT_P1_RF_MODE (phy_status); + + pkt_stat->rx_power[RF_PATH_A ] =GET_PHY_STAT_P1_PWDB_A (phy_status) -110 ; + pkt_stat->rx_power[RF_PATH_B ] =GET_PHY_STAT_P1_PWDB_B (phy_status) -110 ; + pkt_stat->rssi =rtw_phy_rf_power_2_rssi (pkt_stat->rx_power,2 ); + pkt_stat->bw = bw; + pkt_stat->signal_power =max3 (pkt_stat->rx_power[RF_PATH_A ], + pkt_stat->rx_power[RF_PATH_B ], + min_rx_power); +} + +static void query_phy_status (struct rtw_dev *rtwdev,u8 *phy_status, +struct rtw_rx_pkt_stat *pkt_stat) +{ +u8 page; + + page = *phy_status &0xf ; + +switch (page) { +case 0 : +query_phy_status_page0 (rtwdev, phy_status, pkt_stat); +break ; +case 1 : +query_phy_status_page1 (rtwdev, phy_status, pkt_stat); +break ; +default : +rtw_warn (rtwdev,"unused phy status page (%d)\n" , page); +return ; + } +} + +static void rtw8822b_query_rx_desc (struct rtw_dev *rtwdev,u8 *rx_desc, +struct rtw_rx_pkt_stat *pkt_stat, +struct ieee80211_rx_status *rx_status) +{ +struct ieee80211_hdr *hdr; +u32 desc_sz = rtwdev->chip->rx_pkt_desc_sz; +u8 *phy_status =NULL ; + +memset (pkt_stat,0 ,sizeof (*pkt_stat)); + + pkt_stat->phy_status =GET_RX_DESC_PHYST (rx_desc); + pkt_stat->icv_err =GET_RX_DESC_ICV_ERR (rx_desc); + pkt_stat->crc_err =GET_RX_DESC_CRC32 (rx_desc); + pkt_stat->decrypted = !GET_RX_DESC_SWDEC (rx_desc); + pkt_stat->is_c2h =GET_RX_DESC_C2H (rx_desc); + pkt_stat->pkt_len =GET_RX_DESC_PKT_LEN (rx_desc); + pkt_stat->drv_info_sz =GET_RX_DESC_DRV_INFO_SIZE (rx_desc); + pkt_stat->shift =GET_RX_DESC_SHIFT (rx_desc); + pkt_stat->rate =GET_RX_DESC_RX_RATE (rx_desc); + pkt_stat->cam_id =GET_RX_DESC_MACID (rx_desc); + pkt_stat->ppdu_cnt =GET_RX_DESC_PPDU_CNT (rx_desc); + pkt_stat->tsf_low =GET_RX_DESC_TSFL (rx_desc); + +/* drv_info_sz is in unit of 8-bytes */ + pkt_stat->drv_info_sz *=8 ; + +/* c2h cmd pkt's rx/phy status is not interested */ +if (pkt_stat->is_c2h) +return ; + + hdr = (struct ieee80211_hdr *)(rx_desc + desc_sz + pkt_stat->shift + + pkt_stat->drv_info_sz); +if (pkt_stat->phy_status) { + phy_status = rx_desc + desc_sz + pkt_stat->shift; +query_phy_status (rtwdev, phy_status, pkt_stat); + } + +rtw_rx_fill_rx_status (rtwdev, pkt_stat, hdr, rx_status, phy_status); +} + +static void +rtw8822b_set_tx_power_index_by_rate (struct rtw_dev *rtwdev,u8 path,u8 rs) +{ +struct rtw_hal *hal = &rtwdev->hal; +static const u32 offset_txagc[2 ] = {0x1d00 ,0x1d80 }; +static u32 phy_pwr_idx; +u8 rate, rate_idx, pwr_index, shift; +int j; + +for (j =0 ; j < rtw_rate_size[rs]; j++) { + rate = rtw_rate_section[rs][j]; + pwr_index = hal->tx_pwr_tbl[path][rate]; + shift = rate &0x3 ; + phy_pwr_idx |= ((u32 )pwr_index << (shift *8 )); +if (shift ==0x3 ) { + rate_idx = rate &0xfc ; +rtw_write32 (rtwdev, offset_txagc[path] + rate_idx, + phy_pwr_idx); + phy_pwr_idx =0 ; + } + } +} + +static void rtw8822b_set_tx_power_index (struct rtw_dev *rtwdev) +{ +struct rtw_hal *hal = &rtwdev->hal; +int rs, path; + +for (path =0 ; path < hal->rf_path_num; path++) { +for (rs =0 ; rs <RTW_RATE_SECTION_MAX ; rs++) +rtw8822b_set_tx_power_index_by_rate (rtwdev, path, rs); + } +} + +static bool rtw8822b_check_rf_path (u8 antenna) +{ +switch (antenna) { +case BB_PATH_A : +case BB_PATH_B : +case BB_PATH_AB : +return true; +default : +return false; + } +} + +static void rtw8822b_set_antenna (struct rtw_dev *rtwdev,u8 antenna_tx, +u8 antenna_rx) +{ +struct rtw_hal *hal = &rtwdev->hal; + +rtw_dbg (rtwdev,RTW_DBG_PHY ,"config RF path, tx=0x%x rx=0x%x\n" , + antenna_tx, antenna_rx); + +if (!rtw8822b_check_rf_path (antenna_tx)) { +rtw_info (rtwdev,"unsupport tx path, set to default path ab\n" ); + antenna_tx =BB_PATH_AB ; + } +if (!rtw8822b_check_rf_path (antenna_rx)) { +rtw_info (rtwdev,"unsupport rx path, set to default path ab\n" ); + antenna_rx =BB_PATH_AB ; + } + hal->antenna_tx = antenna_tx; + hal->antenna_rx = antenna_rx; +rtw8822b_config_trx_mode (rtwdev, antenna_tx, antenna_rx, false); +} + +static void rtw8822b_cfg_ldo25 (struct rtw_dev *rtwdev,bool enable) +{ +u8 ldo_pwr; + + ldo_pwr =rtw_read8 (rtwdev,REG_LDO_EFUSE_CTRL +3 ); + ldo_pwr = enable ? ldo_pwr |BIT (7 ) : ldo_pwr & ~BIT (7 ); +rtw_write8 (rtwdev,REG_LDO_EFUSE_CTRL +3 , ldo_pwr); +} + +static void rtw8822b_false_alarm_statistics (struct rtw_dev *rtwdev) +{ +struct rtw_dm_info *dm_info = &rtwdev->dm_info; +u32 cck_enable; +u32 cck_fa_cnt; +u32 ofdm_fa_cnt; + + cck_enable =rtw_read32 (rtwdev,0x808 ) &BIT (28 ); + cck_fa_cnt =rtw_read16 (rtwdev,0xa5c ); + ofdm_fa_cnt =rtw_read16 (rtwdev,0xf48 ); + + dm_info->cck_fa_cnt = cck_fa_cnt; + dm_info->ofdm_fa_cnt = ofdm_fa_cnt; + dm_info->total_fa_cnt = ofdm_fa_cnt; + dm_info->total_fa_cnt += cck_enable ? cck_fa_cnt :0 ; + +rtw_write32_set (rtwdev,0x9a4 ,BIT (17 )); +rtw_write32_clr (rtwdev,0x9a4 ,BIT (17 )); +rtw_write32_clr (rtwdev,0xa2c ,BIT (15 )); +rtw_write32_set (rtwdev,0xa2c ,BIT (15 )); +rtw_write32_set (rtwdev,0xb58 ,BIT (0 )); +rtw_write32_clr (rtwdev,0xb58 ,BIT (0 )); +} + +static void rtw8822b_do_iqk (struct rtw_dev *rtwdev) +{ +static int do_iqk_cnt; +struct rtw_iqk_para para = {.clear =0 , .segment_iqk =0 }; +u32 rf_reg, iqk_fail_mask; +int counter; +bool reload; + +rtw_fw_do_iqk (rtwdev, ¶); + +for (counter =0 ; counter <300 ; counter++) { + rf_reg =rtw_read_rf (rtwdev,RF_PATH_A ,RF_DTXLOK ,RFREG_MASK ); +if (rf_reg ==0xabcde ) +break ; +msleep (20 ); + } +rtw_write_rf (rtwdev,RF_PATH_A ,RF_DTXLOK ,RFREG_MASK ,0x0 ); + + reload = !!rtw_read32_mask (rtwdev,REG_IQKFAILMSK ,BIT (16 )); + iqk_fail_mask =rtw_read32_mask (rtwdev,REG_IQKFAILMSK ,GENMASK (0 ,7 )); +rtw_dbg (rtwdev,RTW_DBG_PHY , +"iqk counter=%d reload=%d do_iqk_cnt=%d n_iqk_fail(mask)=0x%02x\n" , + counter, reload, ++do_iqk_cnt, iqk_fail_mask); +} + +static struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8822b[] = { + {0x0086 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_WRITE ,BIT (0 ),0 }, + {0x0086 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_POLLING ,BIT (1 ),BIT (1 )}, + {0x004A , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),0 }, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (3 ) |BIT (4 ) |BIT (7 ),0 }, + {0x0300 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_PCI_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0 }, + {0x0301 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_PCI_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0 }, + {0xFFFF , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +0 , +RTW_PWR_CMD_END ,0 ,0 }, +}; + +static struct rtw_pwr_seq_cmd trans_cardemu_to_act_8822b[] = { + {0x0012 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (1 ),0 }, + {0x0012 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),BIT (0 )}, + {0x0020 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK |RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),BIT (0 )}, + {0x0001 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK |RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_DELAY ,1 ,RTW_PWR_DELAY_MS }, + {0x0000 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK |RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (5 ),0 }, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE , (BIT (4 ) |BIT (3 ) |BIT (2 )),0 }, + {0x0075 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_PCI_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),BIT (0 )}, + {0x0006 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_POLLING ,BIT (1 ),BIT (1 )}, + {0x0075 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_PCI_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),0 }, + {0xFF1A , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0 }, + {0x0006 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),BIT (0 )}, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (7 ),0 }, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE , (BIT (4 ) |BIT (3 )),0 }, + {0x10C3 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),BIT (0 )}, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),BIT (0 )}, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_POLLING ,BIT (0 ),0 }, + {0x0020 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (3 ),BIT (3 )}, + {0x10A8 , +RTW_PWR_CUT_C_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0 }, + {0x10A9 , +RTW_PWR_CUT_C_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0xef }, + {0x10AA , +RTW_PWR_CUT_C_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0x0c }, + {0x0068 , +RTW_PWR_CUT_C_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (4 ),BIT (4 )}, + {0x0029 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0xF9 }, + {0x0024 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (2 ),0 }, + {0x0074 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_PCI_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (5 ),BIT (5 )}, + {0x00AF , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (5 ),BIT (5 )}, + {0xFFFF , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +0 , +RTW_PWR_CMD_END ,0 ,0 }, +}; + +static struct rtw_pwr_seq_cmd trans_act_to_cardemu_8822b[] = { + {0x0003 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (2 ),0 }, + {0x0093 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (3 ),0 }, + {0x001F , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0 }, + {0x00EF , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0 }, + {0xFF1A , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0x30 }, + {0x0049 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (1 ),0 }, + {0x0006 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),BIT (0 )}, + {0x0002 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (1 ),0 }, + {0x10C3 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),0 }, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (1 ),BIT (1 )}, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_POLLING ,BIT (1 ),0 }, + {0x0020 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (3 ),0 }, + {0x0000 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK |RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (5 ),BIT (5 )}, + {0xFFFF , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +0 , +RTW_PWR_CMD_END ,0 ,0 }, +}; + +static struct rtw_pwr_seq_cmd trans_cardemu_to_carddis_8822b[] = { + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (7 ),BIT (7 )}, + {0x0007 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK |RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,0xFF ,0x20 }, + {0x0067 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (5 ),0 }, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_PCI_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (2 ),BIT (2 )}, + {0x004A , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),0 }, + {0x0067 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (5 ),0 }, + {0x0067 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (4 ),0 }, + {0x004F , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (0 ),0 }, + {0x0067 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (1 ),0 }, + {0x0046 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (6 ),BIT (6 )}, + {0x0067 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (2 ),0 }, + {0x0046 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (7 ),BIT (7 )}, + {0x0062 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (4 ),BIT (4 )}, + {0x0081 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (7 ) |BIT (6 ),0 }, + {0x0005 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK |RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (3 ) |BIT (4 ),BIT (3 )}, + {0x0086 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_WRITE ,BIT (0 ),BIT (0 )}, + {0x0086 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_POLLING ,BIT (1 ),0 }, + {0x0090 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_USB_MSK |RTW_PWR_INTF_PCI_MSK , +RTW_PWR_ADDR_MAC , +RTW_PWR_CMD_WRITE ,BIT (1 ),0 }, + {0x0044 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_WRITE ,0xFF ,0 }, + {0x0040 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_WRITE ,0xFF ,0x90 }, + {0x0041 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_WRITE ,0xFF ,0x00 }, + {0x0042 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_WRITE ,0xFF ,0x04 }, + {0xFFFF , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_ALL_MSK , +0 , +RTW_PWR_CMD_END ,0 ,0 }, +}; + +static struct rtw_pwr_seq_cmd *card_enable_flow_8822b[] = { + trans_carddis_to_cardemu_8822b, + trans_cardemu_to_act_8822b, +NULL +}; + +static struct rtw_pwr_seq_cmd *card_disable_flow_8822b[] = { + trans_act_to_cardemu_8822b, + trans_cardemu_to_carddis_8822b, +NULL +}; + +static struct rtw_intf_phy_para usb2_param_8822b[] = { + {0xFFFF ,0x00 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_ALL , +RTW_INTF_PHY_PLATFORM_ALL }, +}; + +static struct rtw_intf_phy_para usb3_param_8822b[] = { + {0x0001 ,0xA841 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_D , +RTW_INTF_PHY_PLATFORM_ALL }, + {0xFFFF ,0x0000 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_ALL , +RTW_INTF_PHY_PLATFORM_ALL }, +}; + +static struct rtw_intf_phy_para pcie_gen1_param_8822b[] = { + {0x0001 ,0xA841 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0002 ,0x60C6 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0008 ,0x3596 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0009 ,0x321C , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x000A ,0x9623 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0020 ,0x94FF , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0021 ,0xFFCF , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0026 ,0xC006 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0029 ,0xFF0E , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x002A ,0x1840 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0xFFFF ,0x0000 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_ALL , +RTW_INTF_PHY_PLATFORM_ALL }, +}; + +static struct rtw_intf_phy_para pcie_gen2_param_8822b[] = { + {0x0001 ,0xA841 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0002 ,0x60C6 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0008 ,0x3597 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0009 ,0x321C , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x000A ,0x9623 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0020 ,0x94FF , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0021 ,0xFFCF , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0026 ,0xC006 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x0029 ,0xFF0E , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0x002A ,0x3040 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_C , +RTW_INTF_PHY_PLATFORM_ALL }, + {0xFFFF ,0x0000 , +RTW_IP_SEL_PHY , +RTW_INTF_PHY_CUT_ALL , +RTW_INTF_PHY_PLATFORM_ALL }, +}; + +static struct rtw_intf_phy_para_table phy_para_table_8822b = { + .usb2_para = usb2_param_8822b, + .usb3_para = usb3_param_8822b, + .gen1_para = pcie_gen1_param_8822b, + .gen2_para = pcie_gen2_param_8822b, + .n_usb2_para =ARRAY_SIZE (usb2_param_8822b), + .n_usb3_para =ARRAY_SIZE (usb2_param_8822b), + .n_gen1_para =ARRAY_SIZE (pcie_gen1_param_8822b), + .n_gen2_para =ARRAY_SIZE (pcie_gen2_param_8822b), +}; + +static const struct rtw_rfe_def rtw8822b_rfe_defs[] = { + [2 ] =RTW_DEF_RFE (8822b ,2 ,2 ), + [5 ] =RTW_DEF_RFE (8822b ,5 ,5 ), +}; + +static struct rtw_hw_reg rtw8822b_dig[] = { + [0 ] = { .addr =0xc50 , .mask =0x7f }, + [1 ] = { .addr =0xe50 , .mask =0x7f }, +}; + +static struct rtw_page_table page_table_8822b[] = { + {64 ,64 ,64 ,64 ,1 }, + {64 ,64 ,64 ,64 ,1 }, + {64 ,64 ,0 ,0 ,1 }, + {64 ,64 ,64 ,0 ,1 }, + {64 ,64 ,64 ,64 ,1 }, +}; + +static struct rtw_rqpn rqpn_table_8822b[] = { + {RTW_DMA_MAPPING_NORMAL ,RTW_DMA_MAPPING_NORMAL , +RTW_DMA_MAPPING_LOW ,RTW_DMA_MAPPING_LOW , +RTW_DMA_MAPPING_EXTRA ,RTW_DMA_MAPPING_HIGH }, + {RTW_DMA_MAPPING_NORMAL ,RTW_DMA_MAPPING_NORMAL , +RTW_DMA_MAPPING_LOW ,RTW_DMA_MAPPING_LOW , +RTW_DMA_MAPPING_EXTRA ,RTW_DMA_MAPPING_HIGH }, + {RTW_DMA_MAPPING_NORMAL ,RTW_DMA_MAPPING_NORMAL , +RTW_DMA_MAPPING_NORMAL ,RTW_DMA_MAPPING_HIGH , +RTW_DMA_MAPPING_HIGH ,RTW_DMA_MAPPING_HIGH }, + {RTW_DMA_MAPPING_NORMAL ,RTW_DMA_MAPPING_NORMAL , +RTW_DMA_MAPPING_LOW ,RTW_DMA_MAPPING_LOW , +RTW_DMA_MAPPING_HIGH ,RTW_DMA_MAPPING_HIGH }, + {RTW_DMA_MAPPING_NORMAL ,RTW_DMA_MAPPING_NORMAL , +RTW_DMA_MAPPING_LOW ,RTW_DMA_MAPPING_LOW , +RTW_DMA_MAPPING_EXTRA ,RTW_DMA_MAPPING_HIGH }, +}; + +static struct rtw_chip_ops rtw8822b_ops = { + .phy_set_param = rtw8822b_phy_set_param, + .read_efuse = rtw8822b_read_efuse, + .query_rx_desc = rtw8822b_query_rx_desc, + .set_channel = rtw8822b_set_channel, + .mac_init = rtw8822b_mac_init, + .read_rf = rtw_phy_read_rf, + .write_rf = rtw_phy_write_rf_reg_sipi, + .set_tx_power_index = rtw8822b_set_tx_power_index, + .set_antenna = rtw8822b_set_antenna, + .cfg_ldo25 = rtw8822b_cfg_ldo25, + .false_alarm_statistics = rtw8822b_false_alarm_statistics, + .do_iqk = rtw8822b_do_iqk, +}; + +struct rtw_chip_info rtw8822b_hw_spec = { + .ops = &rtw8822b_ops, + .id =RTW_CHIP_TYPE_8822B , + .fw_name ="rtw88/rtw8822b_fw.bin" , + .tx_pkt_desc_sz =48 , + .tx_buf_desc_sz =16 , + .rx_pkt_desc_sz =24 , + .rx_buf_desc_sz =8 , + .phy_efuse_size =1024 , + .log_efuse_size =768 , + .ptct_efuse_size =96 , + .txff_size =262144 , + .rxff_size =24576 , + .txgi_factor =1 , + .is_pwr_by_rate_dec = true, + .max_power_index =0x3f , + .csi_buf_pg_num =0 , + .band =RTW_BAND_2G |RTW_BAND_5G , + .page_size =128 , + .dig_min =0x1c , + .ht_supported = true, + .vht_supported = true, + .sys_func_en =0xDC , + .pwr_on_seq = card_enable_flow_8822b, + .pwr_off_seq = card_disable_flow_8822b, + .page_table = page_table_8822b, + .rqpn_table = rqpn_table_8822b, + .intf_table = &phy_para_table_8822b, + .dig = rtw8822b_dig, + .rf_base_addr = {0x2800 ,0x2c00 }, + .rf_sipi_addr = {0xc90 ,0xe90 }, + .mac_tbl = &rtw8822b_mac_tbl, + .agc_tbl = &rtw8822b_agc_tbl, + .bb_tbl = &rtw8822b_bb_tbl, + .rf_tbl = {&rtw8822b_rf_a_tbl, &rtw8822b_rf_b_tbl}, + .rfe_defs = rtw8822b_rfe_defs, + .rfe_defs_size =ARRAY_SIZE (rtw8822b_rfe_defs), +}; +EXPORT_SYMBOL (rtw8822b_hw_spec); + +MODULE_FIRMWARE ("rtw88/rtw8822b_fw.bin" );
drivers/net/wireless/realtek/rtw88/rtw8822b.h new file +170 -0
170 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/rtw8822b_table.h new file +18 -0
@@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#ifndef __RTW8822B_TABLE_H__ +#define __RTW8822B_TABLE_H__ + +extern const struct rtw_table rtw8822b_mac_tbl; +extern const struct rtw_table rtw8822b_agc_tbl; +extern const struct rtw_table rtw8822b_bb_tbl; +extern const struct rtw_table rtw8822b_bb_pg_type2_tbl; +extern const struct rtw_table rtw8822b_bb_pg_type5_tbl; +extern const struct rtw_table rtw8822b_rf_a_tbl; +extern const struct rtw_table rtw8822b_rf_b_tbl; +extern const struct rtw_table rtw8822b_txpwr_lmt_type2_tbl; +extern const struct rtw_table rtw8822b_txpwr_lmt_type5_tbl; + +#endif
drivers/net/wireless/realtek/rtw88/rtw8822c.c new file +1890 -0
1,218 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/rtw8822c.h new file +186 -0
186 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/rtw8822c_table.h new file +17 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
Re: [PATCH v9 09/14] rtw88: chip files
Quoted 7 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
chip files Realtek 802.11ac wireless network chips 8822B & 8822C series files
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
drivers/net/wireless/realtek/rtw88/rtw8822b.c line 1011
Quoted 6 lines
drivers/net/wireless/realtek/rtw88/rtw8822b.c new file +6
-0+static struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8822b[] = { + {0x0086 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_WRITE ,BIT (0 ),0 },
I see lots of arrays like this which are not const. I think they should be const.
Signature · 1 line
Kalle Valo
Re: [PATCH v9 09/14] rtw88: chip files
Quoted 12 lines · Kalle Valo
Quoted 7 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
chip files Realtek 802.11ac wireless network chips 8822B & 8822C series files
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>[...]
Quoted 9 lines
drivers/net/wireless/realtek/rtw88/rtw8822b.c line 1011
Quoted 6 lines
drivers/net/wireless/realtek/rtw88/rtw8822b.c new file +6
-0+static struct rtw_pwr_seq_cmd trans_carddis_to_cardemu_8822b[] = { + {0x0086 , +RTW_PWR_CUT_ALL_MSK , +RTW_PWR_INTF_SDIO_MSK , +RTW_PWR_ADDR_SDIO , +RTW_PWR_CMD_WRITE ,BIT (0 ),0 },I see lots of arrays like this which are not const. I think they should be const.
And I'm seeing even more of these while I review the driver. So basically all static variables should be const to make sure you don't accidentally between driver instances. IIRC there was something in cfg80211 API which prevent to use const (maybe the channels? can't remember now) but that's just an exception to the rule.
Signature · 1 line
Kalle Valo
Re: [PATCH v9 09/14] rtw88: chip files
In reply to [email protected]Quoted 7 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
chip files Realtek 802.11ac wireless network chips 8822B & 8822C series files
Reviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
drivers/net/wireless/realtek/rtw88/rtw8822b.c line 23
Quoted 5 lines
drivers/net/wireless/realtek/rtw88/rtw8822b.c new file +5
-0+static void rtw8822be_efuse_parsing (struct rtw_efuse *efuse, +struct rtw8822b_efuse *map) +{ +ether_addr_copy (efuse->addr, map->e.mac_addr); +}
Looks like a quite useless function and just confuses the code.
Signature · 1 line
Kalle Valo
PATCH v9 10/14 rtw88: 8822B init table
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
8822B init table for chip files Realtek 802.11ac wireless network chips
--- .../net/wireless/realtek/rtw88/rtw8822b_table.c | 20783 +++++++++++++++++++ 1 file changed, 20783 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822b_table.c
drivers/net/wireless/realtek/rtw88/rtw8822b_table.c new file +20783 -0
@@ -0,0 +1,20783 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include "main.h" +#include "phy.h" +#include "rtw8822b_table.h" + +static const u32 rtw8822b_mac[] = { +0x029 ,0x000000F9 , +0x420 ,0x00000080 , +0x421 ,0x0000001F , +0x428 ,0x0000000A , +0x429 ,0x00000010 , +0x430 ,0x00000000 , +0x431 ,0x00000000 , +0x432 ,0x00000000 , +0x433 ,0x00000001 , +0x434 ,0x00000004 , +0x435 ,0x00000005 , +0x436 ,0x00000007 , +0x437 ,0x00000008 , +0x43C ,0x00000004 , +0x43D ,0x00000005 , +0x43E ,0x00000007 , +0x43F ,0x00000008 , +0x440 ,0x0000005D , +0x441 ,0x00000001 , +0x442 ,0x00000000 , +0x444 ,0x00000010 , +0x445 ,0x000000F0 , +0x446 ,0x00000001 , +0x447 ,0x000000FE , +0x448 ,0x00000000 , +0x449 ,0x00000000 , +0x44A ,0x00000000 , +0x44B ,0x00000040 , +0x44C ,0x00000010 , +0x44D ,0x000000F0 , +0x44E ,0x0000003F , +0x44F ,0x00000000 , +0x450 ,0x00000000 , +0x451 ,0x00000000 , +0x452 ,0x00000000 , +0x453 ,0x00000040 , +0x455 ,0x00000070 , +0x45E ,0x00000004 , +0x49C ,0x00000010 , +0x49D ,0x000000F0 , +0x49E ,0x00000000 , +0x49F ,0x00000006 , +0x4A0 ,0x000000E0 , +0x4A1 ,0x00000003 , +0x4A2 ,0x00000000 , +0x4A3 ,0x00000040 , +0x4A4 ,0x00000015 , +0x4A5 ,0x000000F0 , +0x4A6 ,0x00000000 , +0x4A7 ,0x00000006 , +0x4A8 ,0x000000E0 , +0x4A9 ,0x00000000 , +0x4AA ,0x00000000 , +0x4AB ,0x00000000 , +0x7DA ,0x00000008 , +0x1448 ,0x00000006 , +0x144A ,0x00000006 , +0x144C ,0x00000006 , +0x144E ,0x00000006 , +0x4C8 ,0x000000FF , +0x4C9 ,0x00000008 , +0x4CA ,0x00000020 , +0x4CB ,0x00000020 , +0x4CC ,0x000000FF , +0x4CD ,0x000000FF , +0x4CE ,0x00000001 , +0x4CF ,0x00000008 , +0x500 ,0x00000026 , +0x501 ,0x000000A2 , +0x502 ,0x0000002F , +0x503 ,0x00000000 , +0x504 ,0x00000028 , +0x505 ,0x000000A3 , +0x506 ,0x0000005E , +0x507 ,0x00000000 , +0x508 ,0x0000002B , +0x509 ,0x000000A4 , +0x50A ,0x0000005E , +0x50B ,0x00000000 , +0x50C ,0x0000004F , +0x50D ,0x000000A4 , +0x50E ,0x00000000 , +0x50F ,0x00000000 , +0x512 ,0x0000001C , +0x514 ,0x0000000A , +0x516 ,0x0000000A , +0x521 ,0x0000002F , +0x525 ,0x0000004F , +0x551 ,0x00000010 , +0x559 ,0x00000002 , +0x55C ,0x00000050 , +0x55D ,0x000000FF , +0x577 ,0x0000000B , +0x5BE ,0x00000064 , +0x605 ,0x00000030 , +0x608 ,0x0000000E , +0x609 ,0x00000022 , +0x60C ,0x00000018 , +0x6A0 ,0x000000FF , +0x6A1 ,0x000000FF , +0x6A2 ,0x000000FF , +0x6A3 ,0x000000FF , +0x6A4 ,0x000000FF , +0x6A5 ,0x000000FF , +0x6DE ,0x00000084 , +0x620 ,0x000000FF , +0x621 ,0x000000FF , +0x622 ,0x000000FF , +0x623 ,0x000000FF , +0x624 ,0x000000FF , +0x625 ,0x000000FF , +0x626 ,0x000000FF , +0x627 ,0x000000FF , +0x638 ,0x00000050 , +0x63C ,0x0000000A , +0x63D ,0x0000000A , +0x63E ,0x0000000E , +0x63F ,0x0000000E , +0x640 ,0x00000040 , +0x642 ,0x00000040 , +0x643 ,0x00000000 , +0x652 ,0x000000C8 , +0x66E ,0x00000005 , +0x718 ,0x00000040 , +0x7D4 ,0x00000098 , +}; + +RTW_DECL_TABLE_PHY_COND (rtw8822b_mac, rtw_phy_cfg_mac); + +static const u32 rtw8822b_agc[] = { +0x80000000 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFE000003 , +0x81C ,0xFD020003 , +0x81C ,0xFC040003 , +0x81C ,0xFB060003 , +0x81C ,0xFA080003 , +0x81C ,0xF90A0003 , +0x81C ,0xF80C0003 , +0x81C ,0xF70E0003 , +0x81C ,0xF6100003 , +0x81C ,0xF5120003 , +0x81C ,0xF4140003 , +0x81C ,0xF3160003 , +0x81C ,0xF2180003 , +0x81C ,0xF11A0003 , +0x81C ,0xF01C0003 , +0x81C ,0xEF1E0003 , +0x81C ,0xEE200003 , +0x81C ,0xED220003 , +0x81C ,0xEC240003 , +0x81C ,0xEB260003 , +0x81C ,0xEA280003 , +0x81C ,0xE92A0003 , +0x81C ,0xE82C0003 , +0x81C ,0xE72E0003 , +0x81C ,0xE6300003 , +0x81C ,0xE5320003 , +0x81C ,0xC8340003 , +0x81C ,0xC7360003 , +0x81C ,0xC6380003 , +0x81C ,0xC53A0003 , +0x81C ,0xC43C0003 , +0x81C ,0xC33E0003 , +0x81C ,0xC2400003 , +0x81C ,0xC1420003 , +0x81C ,0xC0440003 , +0x81C ,0xA3460003 , +0x81C ,0xA2480003 , +0x81C ,0xA14A0003 , +0x81C ,0xA04C0003 , +0x81C ,0x824E0003 , +0x81C ,0x81500003 , +0x81C ,0x80520003 , +0x81C ,0x64540003 , +0x81C ,0x63560003 , +0x81C ,0x62580003 , +0x81C ,0x445A0003 , +0x81C ,0x435C0003 , +0x81C ,0x425E0003 , +0x81C ,0x41600003 , +0x81C ,0x40620003 , +0x81C ,0x05640003 , +0x81C ,0x04660003 , +0x81C ,0x03680003 , +0x81C ,0x026A0003 , +0x81C ,0x016C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xF5000003 , +0x81C ,0xF4020003 , +0x81C ,0xF3040003 , +0x81C ,0xF2060003 , +0x81C ,0xF1080003 , +0x81C ,0xF00A0003 , +0x81C ,0xEF0C0003 , +0x81C ,0xEE0E0003 , +0x81C ,0xED100003 , +0x81C ,0xEC120003 , +0x81C ,0xEB140003 , +0x81C ,0xEA160003 , +0x81C ,0xE9180003 , +0x81C ,0xE81A0003 , +0x81C ,0xE71C0003 , +0x81C ,0xE61E0003 , +0x81C ,0xE5200003 , +0x81C ,0xE4220003 , +0x81C ,0xE3240003 , +0x81C ,0xE2260003 , +0x81C ,0xE1280003 , +0x81C ,0xE02A0003 , +0x81C ,0xC32C0003 , +0x81C ,0xC22E0003 , +0x81C ,0xC1300003 , +0x81C ,0xC0320003 , +0x81C ,0xA4340003 , +0x81C ,0xA3360003 , +0x81C ,0xA2380003 , +0x81C ,0xA13A0003 , +0x81C ,0xA03C0003 , +0x81C ,0x823E0003 , +0x81C ,0x81400003 , +0x81C ,0x80420003 , +0x81C ,0x64440003 , +0x81C ,0x63460003 , +0x81C ,0x62480003 , +0x81C ,0x614A0003 , +0x81C ,0x604C0003 , +0x81C ,0x454E0003 , +0x81C ,0x44500003 , +0x81C ,0x43520003 , +0x81C ,0x42540003 , +0x81C ,0x41560003 , +0x81C ,0x40580003 , +0x81C ,0x055A0003 , +0x81C ,0x045C0003 , +0x81C ,0x035E0003 , +0x81C ,0x02600003 , +0x81C ,0x01620003 , +0x81C ,0x00640003 , +0x81C ,0x00660003 , +0x81C ,0x00680003 , +0x81C ,0x006A0003 , +0x81C ,0x006C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFD000003 , +0x81C ,0xFC020003 , +0x81C ,0xFB040003 , +0x81C ,0xFA060003 , +0x81C ,0xF9080003 , +0x81C ,0xF80A0003 , +0x81C ,0xF70C0003 , +0x81C ,0xF60E0003 , +0x81C ,0xF5100003 , +0x81C ,0xF4120003 , +0x81C ,0xF3140003 , +0x81C ,0xF2160003 , +0x81C ,0xF1180003 , +0x81C ,0xF01A0003 , +0x81C ,0xEF1C0003 , +0x81C ,0xEE1E0003 , +0x81C ,0xED200003 , +0x81C ,0xEC220003 , +0x81C ,0xEB240003 , +0x81C ,0xEA260003 , +0x81C ,0xE9280003 , +0x81C ,0xE82A0003 , +0x81C ,0xE72C0003 , +0x81C ,0xE62E0003 , +0x81C ,0xE5300003 , +0x81C ,0xC8320003 , +0x81C ,0xC7340003 , +0x81C ,0xC6360003 , +0x81C ,0xC5380003 , +0x81C ,0xC43A0003 , +0x81C ,0xC33C0003 , +0x81C ,0xC23E0003 , +0x81C ,0xC1400003 , +0x81C ,0xC0420003 , +0x81C ,0xA5440003 , +0x81C ,0xA4460003 , +0x81C ,0xA3480003 , +0x81C ,0xA24A0003 , +0x81C ,0xA14C0003 , +0x81C ,0x834E0003 , +0x81C ,0x82500003 , +0x81C ,0x81520003 , +0x81C ,0x80540003 , +0x81C ,0x65560003 , +0x81C ,0x64580003 , +0x81C ,0x635A0003 , +0x81C ,0x625C0003 , +0x81C ,0x435E0003 , +0x81C ,0x42600003 , +0x81C ,0x41620003 , +0x81C ,0x40640003 , +0x81C ,0x06660003 , +0x81C ,0x05680003 , +0x81C ,0x046A0003 , +0x81C ,0x036C0003 , +0x81C ,0x026E0003 , +0x81C ,0x01700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000003 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFD000003 , +0x81C ,0xFC020003 , +0x81C ,0xFB040003 , +0x81C ,0xFA060003 , +0x81C ,0xF9080003 , +0x81C ,0xF80A0003 , +0x81C ,0xF70C0003 , +0x81C ,0xF60E0003 , +0x81C ,0xF5100003 , +0x81C ,0xF4120003 , +0x81C ,0xF3140003 , +0x81C ,0xF2160003 , +0x81C ,0xF1180003 , +0x81C ,0xF01A0003 , +0x81C ,0xEF1C0003 , +0x81C ,0xEE1E0003 , +0x81C ,0xED200003 , +0x81C ,0xEC220003 , +0x81C ,0xEB240003 , +0x81C ,0xEA260003 , +0x81C ,0xE9280003 , +0x81C ,0xE82A0003 , +0x81C ,0xE72C0003 , +0x81C ,0xE62E0003 , +0x81C ,0xE5300003 , +0x81C ,0xC8320003 , +0x81C ,0xC7340003 , +0x81C ,0xC6360003 , +0x81C ,0xC5380003 , +0x81C ,0xC43A0003 , +0x81C ,0xC33C0003 , +0x81C ,0xC23E0003 , +0x81C ,0xC1400003 , +0x81C ,0xC0420003 , +0x81C ,0xA5440003 , +0x81C ,0xA4460003 , +0x81C ,0xA3480003 , +0x81C ,0xA24A0003 , +0x81C ,0xA14C0003 , +0x81C ,0x834E0003 , +0x81C ,0x82500003 , +0x81C ,0x81520003 , +0x81C ,0x80540003 , +0x81C ,0x65560003 , +0x81C ,0x64580003 , +0x81C ,0x635A0003 , +0x81C ,0x625C0003 , +0x81C ,0x435E0003 , +0x81C ,0x42600003 , +0x81C ,0x41620003 , +0x81C ,0x40640003 , +0x81C ,0x06660003 , +0x81C ,0x05680003 , +0x81C ,0x046A0003 , +0x81C ,0x036C0003 , +0x81C ,0x026E0003 , +0x81C ,0x01700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000004 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xDC000003 , +0x81C ,0xDB020003 , +0x81C ,0xDA040003 , +0x81C ,0xD9060003 , +0x81C ,0xD8080003 , +0x81C ,0xD70A0003 , +0x81C ,0xD60C0003 , +0x81C ,0xD50E0003 , +0x81C ,0xD4100003 , +0x81C ,0xD3120003 , +0x81C ,0xD2140003 , +0x81C ,0xD1160003 , +0x81C ,0xD0180003 , +0x81C ,0xB41A0003 , +0x81C ,0xB31C0003 , +0x81C ,0xB21E0003 , +0x81C ,0xB1200003 , +0x81C ,0xB0220003 , +0x81C ,0xAF240003 , +0x81C ,0xAE260003 , +0x81C ,0xAD280003 , +0x81C ,0xAC2A0003 , +0x81C ,0xAB2C0003 , +0x81C ,0x8C2E0003 , +0x81C ,0x8B300003 , +0x81C ,0x8A320003 , +0x81C ,0x89340003 , +0x81C ,0x88360003 , +0x81C ,0x87380003 , +0x81C ,0x863A0003 , +0x81C ,0x853C0003 , +0x81C ,0x693E0003 , +0x81C ,0x68400003 , +0x81C ,0x67420003 , +0x81C ,0x66440003 , +0x81C ,0x65460003 , +0x81C ,0x48480003 , +0x81C ,0x474A0003 , +0x81C ,0x464C0003 , +0x81C ,0x454E0003 , +0x81C ,0x44500003 , +0x81C ,0x43520003 , +0x81C ,0x27540003 , +0x81C ,0x26560003 , +0x81C ,0x25580003 , +0x81C ,0x245A0003 , +0x81C ,0x235C0003 , +0x81C ,0x045E0003 , +0x81C ,0x03600003 , +0x81C ,0x02620003 , +0x81C ,0x01640003 , +0x81C ,0x00660003 , +0x81C ,0x00680003 , +0x81C ,0x006A0003 , +0x81C ,0x006C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000005 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFD000003 , +0x81C ,0xFC020003 , +0x81C ,0xFB040003 , +0x81C ,0xFA060003 , +0x81C ,0xF9080003 , +0x81C ,0xF80A0003 , +0x81C ,0xF70C0003 , +0x81C ,0xF60E0003 , +0x81C ,0xF5100003 , +0x81C ,0xF4120003 , +0x81C ,0xF3140003 , +0x81C ,0xF2160003 , +0x81C ,0xF1180003 , +0x81C ,0xF01A0003 , +0x81C ,0xEF1C0003 , +0x81C ,0xEE1E0003 , +0x81C ,0xED200003 , +0x81C ,0xEC220003 , +0x81C ,0xEB240003 , +0x81C ,0xEA260003 , +0x81C ,0xE9280003 , +0x81C ,0xE82A0003 , +0x81C ,0xE72C0003 , +0x81C ,0xE62E0003 , +0x81C ,0xE5300003 , +0x81C ,0xC8320003 , +0x81C ,0xC7340003 , +0x81C ,0xC6360003 , +0x81C ,0xC5380003 , +0x81C ,0xC43A0003 , +0x81C ,0xC33C0003 , +0x81C ,0xC23E0003 , +0x81C ,0xC1400003 , +0x81C ,0xC0420003 , +0x81C ,0xA5440003 , +0x81C ,0xA4460003 , +0x81C ,0xA3480003 , +0x81C ,0xA24A0003 , +0x81C ,0xA14C0003 , +0x81C ,0x834E0003 , +0x81C ,0x82500003 , +0x81C ,0x81520003 , +0x81C ,0x80540003 , +0x81C ,0x65560003 , +0x81C ,0x64580003 , +0x81C ,0x635A0003 , +0x81C ,0x625C0003 , +0x81C ,0x435E0003 , +0x81C ,0x42600003 , +0x81C ,0x41620003 , +0x81C ,0x40640003 , +0x81C ,0x06660003 , +0x81C ,0x05680003 , +0x81C ,0x046A0003 , +0x81C ,0x036C0003 , +0x81C ,0x026E0003 , +0x81C ,0x01700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000006 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xF5000003 , +0x81C ,0xF4020003 , +0x81C ,0xF3040003 , +0x81C ,0xF2060003 , +0x81C ,0xF1080003 , +0x81C ,0xF00A0003 , +0x81C ,0xEF0C0003 , +0x81C ,0xEE0E0003 , +0x81C ,0xED100003 , +0x81C ,0xEC120003 , +0x81C ,0xEB140003 , +0x81C ,0xEA160003 , +0x81C ,0xE9180003 , +0x81C ,0xE81A0003 , +0x81C ,0xE71C0003 , +0x81C ,0xE61E0003 , +0x81C ,0xE5200003 , +0x81C ,0xE4220003 , +0x81C ,0xE3240003 , +0x81C ,0xE2260003 , +0x81C ,0xE1280003 , +0x81C ,0xE02A0003 , +0x81C ,0xC32C0003 , +0x81C ,0xC22E0003 , +0x81C ,0xC1300003 , +0x81C ,0xC0320003 , +0x81C ,0xA4340003 , +0x81C ,0xA3360003 , +0x81C ,0xA2380003 , +0x81C ,0xA13A0003 , +0x81C ,0xA03C0003 , +0x81C ,0x823E0003 , +0x81C ,0x81400003 , +0x81C ,0x80420003 , +0x81C ,0x64440003 , +0x81C ,0x63460003 , +0x81C ,0x62480003 , +0x81C ,0x614A0003 , +0x81C ,0x604C0003 , +0x81C ,0x454E0003 , +0x81C ,0x44500003 , +0x81C ,0x43520003 , +0x81C ,0x42540003 , +0x81C ,0x41560003 , +0x81C ,0x40580003 , +0x81C ,0x055A0003 , +0x81C ,0x045C0003 , +0x81C ,0x035E0003 , +0x81C ,0x02600003 , +0x81C ,0x01620003 , +0x81C ,0x00640003 , +0x81C ,0x00660003 , +0x81C ,0x00680003 , +0x81C ,0x006A0003 , +0x81C ,0x006C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000007 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xF5000003 , +0x81C ,0xF4020003 , +0x81C ,0xF3040003 , +0x81C ,0xF2060003 , +0x81C ,0xF1080003 , +0x81C ,0xF00A0003 , +0x81C ,0xEF0C0003 , +0x81C ,0xEE0E0003 , +0x81C ,0xED100003 , +0x81C ,0xEC120003 , +0x81C ,0xEB140003 , +0x81C ,0xEA160003 , +0x81C ,0xE9180003 , +0x81C ,0xE81A0003 , +0x81C ,0xE71C0003 , +0x81C ,0xE61E0003 , +0x81C ,0xE5200003 , +0x81C ,0xE4220003 , +0x81C ,0xE3240003 , +0x81C ,0xE2260003 , +0x81C ,0xE1280003 , +0x81C ,0xE02A0003 , +0x81C ,0xC32C0003 , +0x81C ,0xC22E0003 , +0x81C ,0xC1300003 , +0x81C ,0xC0320003 , +0x81C ,0xA4340003 , +0x81C ,0xA3360003 , +0x81C ,0xA2380003 , +0x81C ,0xA13A0003 , +0x81C ,0xA03C0003 , +0x81C ,0x823E0003 , +0x81C ,0x81400003 , +0x81C ,0x80420003 , +0x81C ,0x64440003 , +0x81C ,0x63460003 , +0x81C ,0x62480003 , +0x81C ,0x614A0003 , +0x81C ,0x604C0003 , +0x81C ,0x454E0003 , +0x81C ,0x44500003 , +0x81C ,0x43520003 , +0x81C ,0x42540003 , +0x81C ,0x41560003 , +0x81C ,0x40580003 , +0x81C ,0x055A0003 , +0x81C ,0x045C0003 , +0x81C ,0x035E0003 , +0x81C ,0x02600003 , +0x81C ,0x01620003 , +0x81C ,0x00640003 , +0x81C ,0x00660003 , +0x81C ,0x00680003 , +0x81C ,0x006A0003 , +0x81C ,0x006C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000008 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFE000003 , +0x81C ,0xFD020003 , +0x81C ,0xFC040003 , +0x81C ,0xFB060003 , +0x81C ,0xFA080003 , +0x81C ,0xF90A0003 , +0x81C ,0xF80C0003 , +0x81C ,0xF70E0003 , +0x81C ,0xF6100003 , +0x81C ,0xF5120003 , +0x81C ,0xF4140003 , +0x81C ,0xF3160003 , +0x81C ,0xF2180003 , +0x81C ,0xF11A0003 , +0x81C ,0xF01C0003 , +0x81C ,0xEF1E0003 , +0x81C ,0xEE200003 , +0x81C ,0xED220003 , +0x81C ,0xEC240003 , +0x81C ,0xEB260003 , +0x81C ,0xEA280003 , +0x81C ,0xE92A0003 , +0x81C ,0xE82C0003 , +0x81C ,0xE72E0003 , +0x81C ,0xE6300003 , +0x81C ,0xE5320003 , +0x81C ,0xC8340003 , +0x81C ,0xC7360003 , +0x81C ,0xC6380003 , +0x81C ,0xC53A0003 , +0x81C ,0xC43C0003 , +0x81C ,0xC33E0003 , +0x81C ,0xC2400003 , +0x81C ,0xC1420003 , +0x81C ,0xC0440003 , +0x81C ,0xA3460003 , +0x81C ,0xA2480003 , +0x81C ,0xA14A0003 , +0x81C ,0xA04C0003 , +0x81C ,0x824E0003 , +0x81C ,0x81500003 , +0x81C ,0x80520003 , +0x81C ,0x64540003 , +0x81C ,0x63560003 , +0x81C ,0x62580003 , +0x81C ,0x445A0003 , +0x81C ,0x435C0003 , +0x81C ,0x425E0003 , +0x81C ,0x41600003 , +0x81C ,0x40620003 , +0x81C ,0x05640003 , +0x81C ,0x04660003 , +0x81C ,0x03680003 , +0x81C ,0x026A0003 , +0x81C ,0x016C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000009 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xF5000003 , +0x81C ,0xF4020003 , +0x81C ,0xF3040003 , +0x81C ,0xF2060003 , +0x81C ,0xF1080003 , +0x81C ,0xF00A0003 , +0x81C ,0xEF0C0003 , +0x81C ,0xEE0E0003 , +0x81C ,0xED100003 , +0x81C ,0xEC120003 , +0x81C ,0xEB140003 , +0x81C ,0xEA160003 , +0x81C ,0xE9180003 , +0x81C ,0xE81A0003 , +0x81C ,0xE71C0003 , +0x81C ,0xE61E0003 , +0x81C ,0xE5200003 , +0x81C ,0xE4220003 , +0x81C ,0xE3240003 , +0x81C ,0xE2260003 , +0x81C ,0xE1280003 , +0x81C ,0xE02A0003 , +0x81C ,0xC32C0003 , +0x81C ,0xC22E0003 , +0x81C ,0xC1300003 , +0x81C ,0xC0320003 , +0x81C ,0xA4340003 , +0x81C ,0xA3360003 , +0x81C ,0xA2380003 , +0x81C ,0xA13A0003 , +0x81C ,0xA03C0003 , +0x81C ,0x823E0003 , +0x81C ,0x81400003 , +0x81C ,0x80420003 , +0x81C ,0x64440003 , +0x81C ,0x63460003 , +0x81C ,0x62480003 , +0x81C ,0x614A0003 , +0x81C ,0x604C0003 , +0x81C ,0x454E0003 , +0x81C ,0x44500003 , +0x81C ,0x43520003 , +0x81C ,0x42540003 , +0x81C ,0x41560003 , +0x81C ,0x40580003 , +0x81C ,0x055A0003 , +0x81C ,0x045C0003 , +0x81C ,0x035E0003 , +0x81C ,0x02600003 , +0x81C ,0x01620003 , +0x81C ,0x00640003 , +0x81C ,0x00660003 , +0x81C ,0x00680003 , +0x81C ,0x006A0003 , +0x81C ,0x006C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x9000000a ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFE000003 , +0x81C ,0xFD020003 , +0x81C ,0xFC040003 , +0x81C ,0xFB060003 , +0x81C ,0xFA080003 , +0x81C ,0xF90A0003 , +0x81C ,0xF80C0003 , +0x81C ,0xF70E0003 , +0x81C ,0xF6100003 , +0x81C ,0xF5120003 , +0x81C ,0xF4140003 , +0x81C ,0xF3160003 , +0x81C ,0xF2180003 , +0x81C ,0xF11A0003 , +0x81C ,0xF01C0003 , +0x81C ,0xEF1E0003 , +0x81C ,0xEE200003 , +0x81C ,0xED220003 , +0x81C ,0xEC240003 , +0x81C ,0xEB260003 , +0x81C ,0xEA280003 , +0x81C ,0xE92A0003 , +0x81C ,0xE82C0003 , +0x81C ,0xE72E0003 , +0x81C ,0xE6300003 , +0x81C ,0xE5320003 , +0x81C ,0xC8340003 , +0x81C ,0xC7360003 , +0x81C ,0xC6380003 , +0x81C ,0xC53A0003 , +0x81C ,0xC43C0003 , +0x81C ,0xC33E0003 , +0x81C ,0xC2400003 , +0x81C ,0xC1420003 , +0x81C ,0xC0440003 , +0x81C ,0xA3460003 , +0x81C ,0xA2480003 , +0x81C ,0xA14A0003 , +0x81C ,0xA04C0003 , +0x81C ,0x824E0003 , +0x81C ,0x81500003 , +0x81C ,0x80520003 , +0x81C ,0x64540003 , +0x81C ,0x63560003 , +0x81C ,0x62580003 , +0x81C ,0x445A0003 , +0x81C ,0x435C0003 , +0x81C ,0x425E0003 , +0x81C ,0x41600003 , +0x81C ,0x40620003 , +0x81C ,0x05640003 , +0x81C ,0x04660003 , +0x81C ,0x03680003 , +0x81C ,0x026A0003 , +0x81C ,0x016C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x9000000b ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xF5000003 , +0x81C ,0xF4020003 , +0x81C ,0xF3040003 , +0x81C ,0xF2060003 , +0x81C ,0xF1080003 , +0x81C ,0xF00A0003 , +0x81C ,0xEF0C0003 , +0x81C ,0xEE0E0003 , +0x81C ,0xED100003 , +0x81C ,0xEC120003 , +0x81C ,0xEB140003 , +0x81C ,0xEA160003 , +0x81C ,0xE9180003 , +0x81C ,0xE81A0003 , +0x81C ,0xE71C0003 , +0x81C ,0xE61E0003 , +0x81C ,0xE5200003 , +0x81C ,0xE4220003 , +0x81C ,0xE3240003 , +0x81C ,0xE2260003 , +0x81C ,0xE1280003 , +0x81C ,0xE02A0003 , +0x81C ,0xC32C0003 , +0x81C ,0xC22E0003 , +0x81C ,0xC1300003 , +0x81C ,0xC0320003 , +0x81C ,0xA4340003 , +0x81C ,0xA3360003 , +0x81C ,0xA2380003 , +0x81C ,0xA13A0003 , +0x81C ,0xA03C0003 , +0x81C ,0x823E0003 , +0x81C ,0x81400003 , +0x81C ,0x80420003 , +0x81C ,0x64440003 , +0x81C ,0x63460003 , +0x81C ,0x62480003 , +0x81C ,0x614A0003 , +0x81C ,0x604C0003 , +0x81C ,0x454E0003 , +0x81C ,0x44500003 , +0x81C ,0x43520003 , +0x81C ,0x42540003 , +0x81C ,0x41560003 , +0x81C ,0x40580003 , +0x81C ,0x055A0003 , +0x81C ,0x045C0003 , +0x81C ,0x035E0003 , +0x81C ,0x02600003 , +0x81C ,0x01620003 , +0x81C ,0x00640003 , +0x81C ,0x00660003 , +0x81C ,0x00680003 , +0x81C ,0x006A0003 , +0x81C ,0x006C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x9000000c ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFD000003 , +0x81C ,0xFC020003 , +0x81C ,0xFB040003 , +0x81C ,0xFA060003 , +0x81C ,0xF9080003 , +0x81C ,0xF80A0003 , +0x81C ,0xF70C0003 , +0x81C ,0xF60E0003 , +0x81C ,0xF5100003 , +0x81C ,0xF4120003 , +0x81C ,0xF3140003 , +0x81C ,0xF2160003 , +0x81C ,0xF1180003 , +0x81C ,0xF01A0003 , +0x81C ,0xEF1C0003 , +0x81C ,0xEE1E0003 , +0x81C ,0xED200003 , +0x81C ,0xEC220003 , +0x81C ,0xEB240003 , +0x81C ,0xEA260003 , +0x81C ,0xE9280003 , +0x81C ,0xE82A0003 , +0x81C ,0xE72C0003 , +0x81C ,0xE62E0003 , +0x81C ,0xE5300003 , +0x81C ,0xC8320003 , +0x81C ,0xC7340003 , +0x81C ,0xC6360003 , +0x81C ,0xC5380003 , +0x81C ,0xC43A0003 , +0x81C ,0xC33C0003 , +0x81C ,0xC23E0003 , +0x81C ,0xC1400003 , +0x81C ,0xC0420003 , +0x81C ,0xA5440003 , +0x81C ,0xA4460003 , +0x81C ,0xA3480003 , +0x81C ,0xA24A0003 , +0x81C ,0xA14C0003 , +0x81C ,0x834E0003 , +0x81C ,0x82500003 , +0x81C ,0x81520003 , +0x81C ,0x80540003 , +0x81C ,0x65560003 , +0x81C ,0x64580003 , +0x81C ,0x635A0003 , +0x81C ,0x625C0003 , +0x81C ,0x435E0003 , +0x81C ,0x42600003 , +0x81C ,0x41620003 , +0x81C ,0x40640003 , +0x81C ,0x06660003 , +0x81C ,0x05680003 , +0x81C ,0x046A0003 , +0x81C ,0x036C0003 , +0x81C ,0x026E0003 , +0x81C ,0x01700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x9000000d ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFE000003 , +0x81C ,0xFD020003 , +0x81C ,0xFC040003 , +0x81C ,0xFB060003 , +0x81C ,0xFA080003 , +0x81C ,0xF90A0003 , +0x81C ,0xF80C0003 , +0x81C ,0xF70E0003 , +0x81C ,0xF6100003 , +0x81C ,0xF5120003 , +0x81C ,0xF4140003 , +0x81C ,0xF3160003 , +0x81C ,0xF2180003 , +0x81C ,0xF11A0003 , +0x81C ,0xF01C0003 , +0x81C ,0xEF1E0003 , +0x81C ,0xEE200003 , +0x81C ,0xED220003 , +0x81C ,0xEC240003 , +0x81C ,0xEB260003 , +0x81C ,0xEA280003 , +0x81C ,0xE92A0003 , +0x81C ,0xE82C0003 , +0x81C ,0xE72E0003 , +0x81C ,0xE6300003 , +0x81C ,0xE5320003 , +0x81C ,0xC8340003 , +0x81C ,0xC7360003 , +0x81C ,0xC6380003 , +0x81C ,0xC53A0003 , +0x81C ,0xC43C0003 , +0x81C ,0xC33E0003 , +0x81C ,0xC2400003 , +0x81C ,0xC1420003 , +0x81C ,0xC0440003 , +0x81C ,0xA3460003 , +0x81C ,0xA2480003 , +0x81C ,0xA14A0003 , +0x81C ,0xA04C0003 , +0x81C ,0x824E0003 , +0x81C ,0x81500003 , +0x81C ,0x80520003 , +0x81C ,0x64540003 , +0x81C ,0x63560003 , +0x81C ,0x62580003 , +0x81C ,0x445A0003 , +0x81C ,0x435C0003 , +0x81C ,0x425E0003 , +0x81C ,0x41600003 , +0x81C ,0x40620003 , +0x81C ,0x05640003 , +0x81C ,0x04660003 , +0x81C ,0x03680003 , +0x81C ,0x026A0003 , +0x81C ,0x016C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x9000000e ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFE000003 , +0x81C ,0xFD020003 , +0x81C ,0xFC040003 , +0x81C ,0xFB060003 , +0x81C ,0xFA080003 , +0x81C ,0xF90A0003 , +0x81C ,0xF80C0003 , +0x81C ,0xF70E0003 , +0x81C ,0xF6100003 , +0x81C ,0xF5120003 , +0x81C ,0xF4140003 , +0x81C ,0xF3160003 , +0x81C ,0xF2180003 , +0x81C ,0xF11A0003 , +0x81C ,0xF01C0003 , +0x81C ,0xEF1E0003 , +0x81C ,0xEE200003 , +0x81C ,0xED220003 , +0x81C ,0xEC240003 , +0x81C ,0xEB260003 , +0x81C ,0xEA280003 , +0x81C ,0xE92A0003 , +0x81C ,0xE82C0003 , +0x81C ,0xE72E0003 , +0x81C ,0xE6300003 , +0x81C ,0xE5320003 , +0x81C ,0xC8340003 , +0x81C ,0xC7360003 , +0x81C ,0xC6380003 , +0x81C ,0xC53A0003 , +0x81C ,0xC43C0003 , +0x81C ,0xC33E0003 , +0x81C ,0xC2400003 , +0x81C ,0xC1420003 , +0x81C ,0xC0440003 , +0x81C ,0xA3460003 , +0x81C ,0xA2480003 , +0x81C ,0xA14A0003 , +0x81C ,0xA04C0003 , +0x81C ,0x824E0003 , +0x81C ,0x81500003 , +0x81C ,0x80520003 , +0x81C ,0x64540003 , +0x81C ,0x63560003 , +0x81C ,0x62580003 , +0x81C ,0x445A0003 , +0x81C ,0x435C0003 , +0x81C ,0x425E0003 , +0x81C ,0x41600003 , +0x81C ,0x40620003 , +0x81C ,0x05640003 , +0x81C ,0x04660003 , +0x81C ,0x03680003 , +0x81C ,0x026A0003 , +0x81C ,0x016C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x9000000f ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFC000003 , +0x81C ,0xFB020003 , +0x81C ,0xFA040003 , +0x81C ,0xF9060003 , +0x81C ,0xF8080003 , +0x81C ,0xF70A0003 , +0x81C ,0xF60C0003 , +0x81C ,0xF50E0003 , +0x81C ,0xF4100003 , +0x81C ,0xF3120003 , +0x81C ,0xF2140003 , +0x81C ,0xF1160003 , +0x81C ,0xF0180003 , +0x81C ,0xEF1A0003 , +0x81C ,0xEE1C0003 , +0x81C ,0xED1E0003 , +0x81C ,0xEC200003 , +0x81C ,0xEB220003 , +0x81C ,0xEA240003 , +0x81C ,0xE9260003 , +0x81C ,0xE8280003 , +0x81C ,0xE72A0003 , +0x81C ,0xE62C0003 , +0x81C ,0xE52E0003 , +0x81C ,0xC8300003 , +0x81C ,0xC7320003 , +0x81C ,0xC6340003 , +0x81C ,0xC5360003 , +0x81C ,0xC4380003 , +0x81C ,0xC33A0003 , +0x81C ,0xC23C0003 , +0x81C ,0xC13E0003 , +0x81C ,0xA4400003 , +0x81C ,0xA3420003 , +0x81C ,0xA2440003 , +0x81C ,0xA1460003 , +0x81C ,0xA0480003 , +0x81C ,0x684A0003 , +0x81C ,0x674C0003 , +0x81C ,0x664E0003 , +0x81C ,0x65500003 , +0x81C ,0x64520003 , +0x81C ,0x63540003 , +0x81C ,0x44560003 , +0x81C ,0x43580003 , +0x81C ,0x425A0003 , +0x81C ,0x415C0003 , +0x81C ,0x405E0003 , +0x81C ,0x23600003 , +0x81C ,0x22620003 , +0x81C ,0x21640003 , +0x81C ,0x03660003 , +0x81C ,0x02680003 , +0x81C ,0x016A0003 , +0x81C ,0x006C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000010 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFD000003 , +0x81C ,0xFC020003 , +0x81C ,0xFB040003 , +0x81C ,0xFA060003 , +0x81C ,0xF9080003 , +0x81C ,0xF80A0003 , +0x81C ,0xF70C0003 , +0x81C ,0xF60E0003 , +0x81C ,0xF5100003 , +0x81C ,0xF4120003 , +0x81C ,0xF3140003 , +0x81C ,0xF2160003 , +0x81C ,0xF1180003 , +0x81C ,0xF01A0003 , +0x81C ,0xEF1C0003 , +0x81C ,0xEE1E0003 , +0x81C ,0xED200003 , +0x81C ,0xEC220003 , +0x81C ,0xEB240003 , +0x81C ,0xEA260003 , +0x81C ,0xE9280003 , +0x81C ,0xE82A0003 , +0x81C ,0xE72C0003 , +0x81C ,0xE62E0003 , +0x81C ,0xE5300003 , +0x81C ,0xC8320003 , +0x81C ,0xC7340003 , +0x81C ,0xC6360003 , +0x81C ,0xC5380003 , +0x81C ,0xC43A0003 , +0x81C ,0xC33C0003 , +0x81C ,0xC23E0003 , +0x81C ,0xC1400003 , +0x81C ,0xC0420003 , +0x81C ,0xA5440003 , +0x81C ,0xA4460003 , +0x81C ,0xA3480003 , +0x81C ,0xA24A0003 , +0x81C ,0xA14C0003 , +0x81C ,0x834E0003 , +0x81C ,0x82500003 , +0x81C ,0x81520003 , +0x81C ,0x80540003 , +0x81C ,0x65560003 , +0x81C ,0x64580003 , +0x81C ,0x635A0003 , +0x81C ,0x625C0003 , +0x81C ,0x435E0003 , +0x81C ,0x42600003 , +0x81C ,0x41620003 , +0x81C ,0x40640003 , +0x81C ,0x06660003 , +0x81C ,0x05680003 , +0x81C ,0x046A0003 , +0x81C ,0x036C0003 , +0x81C ,0x026E0003 , +0x81C ,0x01700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0x90000012 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xDC000003 , +0x81C ,0xDB020003 , +0x81C ,0xDA040003 , +0x81C ,0xD9060003 , +0x81C ,0xD8080003 , +0x81C ,0xD70A0003 , +0x81C ,0xD60C0003 , +0x81C ,0xD50E0003 , +0x81C ,0xD4100003 , +0x81C ,0xD3120003 , +0x81C ,0xD2140003 , +0x81C ,0xD1160003 , +0x81C ,0xD0180003 , +0x81C ,0xB41A0003 , +0x81C ,0xB31C0003 , +0x81C ,0xB21E0003 , +0x81C ,0xB1200003 , +0x81C ,0xB0220003 , +0x81C ,0xAF240003 , +0x81C ,0xAE260003 , +0x81C ,0xAD280003 , +0x81C ,0xAC2A0003 , +0x81C ,0xAB2C0003 , +0x81C ,0x8C2E0003 , +0x81C ,0x8B300003 , +0x81C ,0x8A320003 , +0x81C ,0x89340003 , +0x81C ,0x88360003 , +0x81C ,0x87380003 , +0x81C ,0x863A0003 , +0x81C ,0x853C0003 , +0x81C ,0x693E0003 , +0x81C ,0x68400003 , +0x81C ,0x67420003 , +0x81C ,0x66440003 , +0x81C ,0x65460003 , +0x81C ,0x48480003 , +0x81C ,0x474A0003 , +0x81C ,0x464C0003 , +0x81C ,0x454E0003 , +0x81C ,0x44500003 , +0x81C ,0x43520003 , +0x81C ,0x27540003 , +0x81C ,0x26560003 , +0x81C ,0x25580003 , +0x81C ,0x245A0003 , +0x81C ,0x235C0003 , +0x81C ,0x045E0003 , +0x81C ,0x03600003 , +0x81C ,0x02620003 , +0x81C ,0x01640003 , +0x81C ,0x00660003 , +0x81C ,0x00680003 , +0x81C ,0x006A0003 , +0x81C ,0x006C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0xA0000000 ,0x00000000 , +0x81C ,0xFF000003 , +0x81C ,0xFE000003 , +0x81C ,0xFD020003 , +0x81C ,0xFC040003 , +0x81C ,0xFB060003 , +0x81C ,0xFA080003 , +0x81C ,0xF90A0003 , +0x81C ,0xF80C0003 , +0x81C ,0xF70E0003 , +0x81C ,0xF6100003 , +0x81C ,0xF5120003 , +0x81C ,0xF4140003 , +0x81C ,0xF3160003 , +0x81C ,0xF2180003 , +0x81C ,0xF11A0003 , +0x81C ,0xF01C0003 , +0x81C ,0xEF1E0003 , +0x81C ,0xEE200003 , +0x81C ,0xED220003 , +0x81C ,0xEC240003 , +0x81C ,0xEB260003 , +0x81C ,0xEA280003 , +0x81C ,0xE92A0003 , +0x81C ,0xE82C0003 , +0x81C ,0xE72E0003 , +0x81C ,0xE6300003 , +0x81C ,0xE5320003 , +0x81C ,0xC8340003 , +0x81C ,0xC7360003 , +0x81C ,0xC6380003 , +0x81C ,0xC53A0003 , +0x81C ,0xC43C0003 , +0x81C ,0xC33E0003 , +0x81C ,0xC2400003 , +0x81C ,0xC1420003 , +0x81C ,0xC0440003 , +0x81C ,0xA3460003 , +0x81C ,0xA2480003 , +0x81C ,0xA14A0003 , +0x81C ,0xA04C0003 , +0x81C ,0x824E0003 , +0x81C ,0x81500003 , +0x81C ,0x80520003 , +0x81C ,0x64540003 , +0x81C ,0x63560003 , +0x81C ,0x62580003 , +0x81C ,0x445A0003 , +0x81C ,0x435C0003 , +0x81C ,0x425E0003 , +0x81C ,0x41600003 , +0x81C ,0x40620003 , +0x81C ,0x05640003 , +0x81C ,0x04660003 , +0x81C ,0x03680003 , +0x81C ,0x026A0003 , +0x81C ,0x016C0003 , +0x81C ,0x006E0003 , +0x81C ,0x00700003 , +0x81C ,0x00720003 , +0x81C ,0x00740003 , +0x81C ,0x00760003 , +0x81C ,0x00780003 , +0x81C ,0x007A0003 , +0x81C ,0x007C0003 , +0x81C ,0x007E0003 , +0xB0000000 ,0x00000000 , +0x80000000 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFD000103 , +0x81C ,0xFC020103 , +0x81C ,0xFB040103 , +0x81C ,0xFA060103 , +0x81C ,0xF9080103 , +0x81C ,0xF80A0103 , +0x81C ,0xF70C0103 , +0x81C ,0xF60E0103 , +0x81C ,0xF5100103 , +0x81C ,0xF4120103 , +0x81C ,0xF3140103 , +0x81C ,0xF2160103 , +0x81C ,0xF1180103 , +0x81C ,0xF01A0103 , +0x81C ,0xEE1C0103 , +0x81C ,0xED1E0103 , +0x81C ,0xEC200103 , +0x81C ,0xEB220103 , +0x81C ,0xEA240103 , +0x81C ,0xE9260103 , +0x81C ,0xE8280103 , +0x81C ,0xE72A0103 , +0x81C ,0xE62C0103 , +0x81C ,0xE52E0103 , +0x81C ,0xE4300103 , +0x81C ,0xE3320103 , +0x81C ,0xE2340103 , +0x81C ,0xC5360103 , +0x81C ,0xC4380103 , +0x81C ,0xC33A0103 , +0x81C ,0xC23C0103 , +0x81C ,0xA53E0103 , +0x81C ,0xA4400103 , +0x81C ,0xA3420103 , +0x81C ,0xA2440103 , +0x81C ,0xA1460103 , +0x81C ,0x83480103 , +0x81C ,0x824A0103 , +0x81C ,0x814C0103 , +0x81C ,0x804E0103 , +0x81C ,0x63500103 , +0x81C ,0x62520103 , +0x81C ,0x61540103 , +0x81C ,0x43560103 , +0x81C ,0x42580103 , +0x81C ,0x415A0103 , +0x81C ,0x405C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x20620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF8000103 , +0x81C ,0xF7020103 , +0x81C ,0xF6040103 , +0x81C ,0xF5060103 , +0x81C ,0xF4080103 , +0x81C ,0xF30A0103 , +0x81C ,0xF20C0103 , +0x81C ,0xF10E0103 , +0x81C ,0xF0100103 , +0x81C ,0xEF120103 , +0x81C ,0xEE140103 , +0x81C ,0xED160103 , +0x81C ,0xEC180103 , +0x81C ,0xEB1A0103 , +0x81C ,0xEA1C0103 , +0x81C ,0xE91E0103 , +0x81C ,0xE8200103 , +0x81C ,0xE7220103 , +0x81C ,0xE6240103 , +0x81C ,0xE5260103 , +0x81C ,0xE4280103 , +0x81C ,0xE32A0103 , +0x81C ,0xC32C0103 , +0x81C ,0xC22E0103 , +0x81C ,0xC1300103 , +0x81C ,0xC0320103 , +0x81C ,0xA3340103 , +0x81C ,0xA2360103 , +0x81C ,0xA1380103 , +0x81C ,0xA03A0103 , +0x81C ,0x823C0103 , +0x81C ,0x813E0103 , +0x81C ,0x80400103 , +0x81C ,0x63420103 , +0x81C ,0x62440103 , +0x81C ,0x61460103 , +0x81C ,0x60480103 , +0x81C ,0x424A0103 , +0x81C ,0x414C0103 , +0x81C ,0x404E0103 , +0x81C ,0x06500103 , +0x81C ,0x05520103 , +0x81C ,0x04540103 , +0x81C ,0x03560103 , +0x81C ,0x02580103 , +0x81C ,0x015A0103 , +0x81C ,0x005C0103 , +0x81C ,0x005E0103 , +0x81C ,0x00600103 , +0x81C ,0x00620103 , +0x81C ,0x00640103 , +0x81C ,0x00660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF8000103 , +0x81C ,0xF7020103 , +0x81C ,0xF6040103 , +0x81C ,0xF5060103 , +0x81C ,0xF4080103 , +0x81C ,0xF30A0103 , +0x81C ,0xF20C0103 , +0x81C ,0xF10E0103 , +0x81C ,0xF0100103 , +0x81C ,0xEF120103 , +0x81C ,0xEE140103 , +0x81C ,0xED160103 , +0x81C ,0xEC180103 , +0x81C ,0xEB1A0103 , +0x81C ,0xEA1C0103 , +0x81C ,0xE91E0103 , +0x81C ,0xE8200103 , +0x81C ,0xE7220103 , +0x81C ,0xE6240103 , +0x81C ,0xE5260103 , +0x81C ,0xE4280103 , +0x81C ,0xE32A0103 , +0x81C ,0xC32C0103 , +0x81C ,0xC22E0103 , +0x81C ,0xC1300103 , +0x81C ,0xC0320103 , +0x81C ,0xA3340103 , +0x81C ,0xA2360103 , +0x81C ,0xA1380103 , +0x81C ,0xA03A0103 , +0x81C ,0x823C0103 , +0x81C ,0x813E0103 , +0x81C ,0x80400103 , +0x81C ,0x63420103 , +0x81C ,0x62440103 , +0x81C ,0x61460103 , +0x81C ,0x60480103 , +0x81C ,0x424A0103 , +0x81C ,0x414C0103 , +0x81C ,0x404E0103 , +0x81C ,0x22500103 , +0x81C ,0x21520103 , +0x81C ,0x20540103 , +0x81C ,0x03560103 , +0x81C ,0x02580103 , +0x81C ,0x015A0103 , +0x81C ,0x005C0103 , +0x81C ,0x005E0103 , +0x81C ,0x00600103 , +0x81C ,0x00620103 , +0x81C ,0x00640103 , +0x81C ,0x00660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000003 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFE000103 , +0x81C ,0xFD020103 , +0x81C ,0xFC040103 , +0x81C ,0xFB060103 , +0x81C ,0xFA080103 , +0x81C ,0xF90A0103 , +0x81C ,0xF80C0103 , +0x81C ,0xF70E0103 , +0x81C ,0xF6100103 , +0x81C ,0xF5120103 , +0x81C ,0xF4140103 , +0x81C ,0xF3160103 , +0x81C ,0xF2180103 , +0x81C ,0xF11A0103 , +0x81C ,0xF01C0103 , +0x81C ,0xEF1E0103 , +0x81C ,0xEE200103 , +0x81C ,0xED220103 , +0x81C ,0xEC240103 , +0x81C ,0xEB260103 , +0x81C ,0xEA280103 , +0x81C ,0xE92A0103 , +0x81C ,0xE82C0103 , +0x81C ,0xE72E0103 , +0x81C ,0xE6300103 , +0x81C ,0xE5320103 , +0x81C ,0xE4340103 , +0x81C ,0xE3360103 , +0x81C ,0xC6380103 , +0x81C ,0xC53A0103 , +0x81C ,0xC43C0103 , +0x81C ,0xC33E0103 , +0x81C ,0xA5400103 , +0x81C ,0xA4420103 , +0x81C ,0xA3440103 , +0x81C ,0xA2460103 , +0x81C ,0xA1480103 , +0x81C ,0xA04A0103 , +0x81C ,0x824C0103 , +0x81C ,0x814E0103 , +0x81C ,0x80500103 , +0x81C ,0x64520103 , +0x81C ,0x63540103 , +0x81C ,0x62560103 , +0x81C ,0x61580103 , +0x81C ,0x605A0103 , +0x81C ,0x235C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x20620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000004 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF8000103 , +0x81C ,0xF7020103 , +0x81C ,0xF6040103 , +0x81C ,0xF5060103 , +0x81C ,0xF4080103 , +0x81C ,0xF30A0103 , +0x81C ,0xF20C0103 , +0x81C ,0xF10E0103 , +0x81C ,0xF0100103 , +0x81C ,0xEF120103 , +0x81C ,0xEE140103 , +0x81C ,0xED160103 , +0x81C ,0xEC180103 , +0x81C ,0xEB1A0103 , +0x81C ,0xEA1C0103 , +0x81C ,0xE91E0103 , +0x81C ,0xE8200103 , +0x81C ,0xE7220103 , +0x81C ,0xE6240103 , +0x81C ,0xE5260103 , +0x81C ,0xE4280103 , +0x81C ,0xE32A0103 , +0x81C ,0xC32C0103 , +0x81C ,0xC22E0103 , +0x81C ,0xC1300103 , +0x81C ,0xC0320103 , +0x81C ,0xA3340103 , +0x81C ,0xA2360103 , +0x81C ,0xA1380103 , +0x81C ,0xA03A0103 , +0x81C ,0x823C0103 , +0x81C ,0x813E0103 , +0x81C ,0x80400103 , +0x81C ,0x63420103 , +0x81C ,0x62440103 , +0x81C ,0x61460103 , +0x81C ,0x60480103 , +0x81C ,0x424A0103 , +0x81C ,0x414C0103 , +0x81C ,0x404E0103 , +0x81C ,0x22500103 , +0x81C ,0x21520103 , +0x81C ,0x20540103 , +0x81C ,0x03560103 , +0x81C ,0x02580103 , +0x81C ,0x015A0103 , +0x81C ,0x005C0103 , +0x81C ,0x005E0103 , +0x81C ,0x00600103 , +0x81C ,0x00620103 , +0x81C ,0x00640103 , +0x81C ,0x00660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000005 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFD000103 , +0x81C ,0xFC020103 , +0x81C ,0xFB040103 , +0x81C ,0xFA060103 , +0x81C ,0xF9080103 , +0x81C ,0xF80A0103 , +0x81C ,0xF70C0103 , +0x81C ,0xF60E0103 , +0x81C ,0xF5100103 , +0x81C ,0xF4120103 , +0x81C ,0xF3140103 , +0x81C ,0xF2160103 , +0x81C ,0xF1180103 , +0x81C ,0xF01A0103 , +0x81C ,0xEF1C0103 , +0x81C ,0xEE1E0103 , +0x81C ,0xED200103 , +0x81C ,0xEC220103 , +0x81C ,0xEB240103 , +0x81C ,0xEA260103 , +0x81C ,0xE9280103 , +0x81C ,0xE82A0103 , +0x81C ,0xE72C0103 , +0x81C ,0xE62E0103 , +0x81C ,0xE5300103 , +0x81C ,0xE4320103 , +0x81C ,0xE3340103 , +0x81C ,0xE2360103 , +0x81C ,0xC5380103 , +0x81C ,0xC43A0103 , +0x81C ,0xC33C0103 , +0x81C ,0xC23E0103 , +0x81C ,0xA5400103 , +0x81C ,0xA4420103 , +0x81C ,0xA3440103 , +0x81C ,0xA2460103 , +0x81C ,0xA1480103 , +0x81C ,0x834A0103 , +0x81C ,0x824C0103 , +0x81C ,0x814E0103 , +0x81C ,0x64500103 , +0x81C ,0x63520103 , +0x81C ,0x62540103 , +0x81C ,0x61560103 , +0x81C ,0x42580103 , +0x81C ,0x415A0103 , +0x81C ,0x405C0103 , +0x81C ,0x065E0103 , +0x81C ,0x05600103 , +0x81C ,0x04620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000006 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFA000103 , +0x81C ,0xF9020103 , +0x81C ,0xF8040103 , +0x81C ,0xF7060103 , +0x81C ,0xF6080103 , +0x81C ,0xF50A0103 , +0x81C ,0xF40C0103 , +0x81C ,0xF30E0103 , +0x81C ,0xF2100103 , +0x81C ,0xF1120103 , +0x81C ,0xF0140103 , +0x81C ,0xEF160103 , +0x81C ,0xEE180103 , +0x81C ,0xED1A0103 , +0x81C ,0xEC1C0103 , +0x81C ,0xEB1E0103 , +0x81C ,0xEA200103 , +0x81C ,0xE9220103 , +0x81C ,0xE8240103 , +0x81C ,0xE7260103 , +0x81C ,0xE6280103 , +0x81C ,0xE52A0103 , +0x81C ,0xC42C0103 , +0x81C ,0xC32E0103 , +0x81C ,0xC2300103 , +0x81C ,0xC1320103 , +0x81C ,0xA4340103 , +0x81C ,0xA3360103 , +0x81C ,0xA2380103 , +0x81C ,0xA13A0103 , +0x81C ,0x833C0103 , +0x81C ,0x823E0103 , +0x81C ,0x81400103 , +0x81C ,0x63420103 , +0x81C ,0x62440103 , +0x81C ,0x61460103 , +0x81C ,0x60480103 , +0x81C ,0x424A0103 , +0x81C ,0x414C0103 , +0x81C ,0x404E0103 , +0x81C ,0x22500103 , +0x81C ,0x21520103 , +0x81C ,0x20540103 , +0x81C ,0x03560103 , +0x81C ,0x02580103 , +0x81C ,0x015A0103 , +0x81C ,0x005C0103 , +0x81C ,0x005E0103 , +0x81C ,0x00600103 , +0x81C ,0x00620103 , +0x81C ,0x00640103 , +0x81C ,0x00660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000007 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF8000103 , +0x81C ,0xF7020103 , +0x81C ,0xF6040103 , +0x81C ,0xF5060103 , +0x81C ,0xF4080103 , +0x81C ,0xF30A0103 , +0x81C ,0xF20C0103 , +0x81C ,0xF10E0103 , +0x81C ,0xF0100103 , +0x81C ,0xEF120103 , +0x81C ,0xEE140103 , +0x81C ,0xED160103 , +0x81C ,0xEC180103 , +0x81C ,0xEB1A0103 , +0x81C ,0xEA1C0103 , +0x81C ,0xE91E0103 , +0x81C ,0xE8200103 , +0x81C ,0xE7220103 , +0x81C ,0xE6240103 , +0x81C ,0xE5260103 , +0x81C ,0xE4280103 , +0x81C ,0xE32A0103 , +0x81C ,0xE22C0103 , +0x81C ,0xC32E0103 , +0x81C ,0xC2300103 , +0x81C ,0xC1320103 , +0x81C ,0xA3340103 , +0x81C ,0xA2360103 , +0x81C ,0xA1380103 , +0x81C ,0xA03A0103 , +0x81C ,0x823C0103 , +0x81C ,0x813E0103 , +0x81C ,0x80400103 , +0x81C ,0x64420103 , +0x81C ,0x63440103 , +0x81C ,0x62460103 , +0x81C ,0x61480103 , +0x81C ,0x434A0103 , +0x81C ,0x424C0103 , +0x81C ,0x414E0103 , +0x81C ,0x40500103 , +0x81C ,0x22520103 , +0x81C ,0x21540103 , +0x81C ,0x20560103 , +0x81C ,0x04580103 , +0x81C ,0x035A0103 , +0x81C ,0x025C0103 , +0x81C ,0x015E0103 , +0x81C ,0x00600103 , +0x81C ,0x00620103 , +0x81C ,0x00640103 , +0x81C ,0x00660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000008 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFD000103 , +0x81C ,0xFC020103 , +0x81C ,0xFB040103 , +0x81C ,0xFA060103 , +0x81C ,0xF9080103 , +0x81C ,0xF80A0103 , +0x81C ,0xF70C0103 , +0x81C ,0xF60E0103 , +0x81C ,0xF5100103 , +0x81C ,0xF4120103 , +0x81C ,0xF3140103 , +0x81C ,0xF2160103 , +0x81C ,0xF1180103 , +0x81C ,0xF01A0103 , +0x81C ,0xEF1C0103 , +0x81C ,0xEE1E0103 , +0x81C ,0xED200103 , +0x81C ,0xEC220103 , +0x81C ,0xEB240103 , +0x81C ,0xEA260103 , +0x81C ,0xE9280103 , +0x81C ,0xE82A0103 , +0x81C ,0xE72C0103 , +0x81C ,0xE62E0103 , +0x81C ,0xE5300103 , +0x81C ,0xE4320103 , +0x81C ,0xE3340103 , +0x81C ,0xC6360103 , +0x81C ,0xC5380103 , +0x81C ,0xC43A0103 , +0x81C ,0xC33C0103 , +0x81C ,0xC23E0103 , +0x81C ,0xA5400103 , +0x81C ,0xA4420103 , +0x81C ,0xA3440103 , +0x81C ,0xA2460103 , +0x81C ,0xA1480103 , +0x81C ,0x834A0103 , +0x81C ,0x824C0103 , +0x81C ,0x814E0103 , +0x81C ,0x63500103 , +0x81C ,0x62520103 , +0x81C ,0x61540103 , +0x81C ,0x43560103 , +0x81C ,0x42580103 , +0x81C ,0x245A0103 , +0x81C ,0x235C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x04620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000009 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF8000103 , +0x81C ,0xF7020103 , +0x81C ,0xF6040103 , +0x81C ,0xF5060103 , +0x81C ,0xF4080103 , +0x81C ,0xF30A0103 , +0x81C ,0xF20C0103 , +0x81C ,0xF10E0103 , +0x81C ,0xF0100103 , +0x81C ,0xEF120103 , +0x81C ,0xEE140103 , +0x81C ,0xED160103 , +0x81C ,0xEC180103 , +0x81C ,0xEB1A0103 , +0x81C ,0xEA1C0103 , +0x81C ,0xE91E0103 , +0x81C ,0xE8200103 , +0x81C ,0xE7220103 , +0x81C ,0xE6240103 , +0x81C ,0xE5260103 , +0x81C ,0xE4280103 , +0x81C ,0xE32A0103 , +0x81C ,0xE22C0103 , +0x81C ,0xC32E0103 , +0x81C ,0xC2300103 , +0x81C ,0xC1320103 , +0x81C ,0xA3340103 , +0x81C ,0xA2360103 , +0x81C ,0xA1380103 , +0x81C ,0xA03A0103 , +0x81C ,0x823C0103 , +0x81C ,0x813E0103 , +0x81C ,0x80400103 , +0x81C ,0x64420103 , +0x81C ,0x63440103 , +0x81C ,0x62460103 , +0x81C ,0x61480103 , +0x81C ,0x434A0103 , +0x81C ,0x424C0103 , +0x81C ,0x414E0103 , +0x81C ,0x40500103 , +0x81C ,0x22520103 , +0x81C ,0x21540103 , +0x81C ,0x20560103 , +0x81C ,0x04580103 , +0x81C ,0x035A0103 , +0x81C ,0x025C0103 , +0x81C ,0x015E0103 , +0x81C ,0x00600103 , +0x81C ,0x00620103 , +0x81C ,0x00640103 , +0x81C ,0x00660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x9000000a ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFD000103 , +0x81C ,0xFC020103 , +0x81C ,0xFB040103 , +0x81C ,0xFA060103 , +0x81C ,0xF9080103 , +0x81C ,0xF80A0103 , +0x81C ,0xF70C0103 , +0x81C ,0xF60E0103 , +0x81C ,0xF5100103 , +0x81C ,0xF4120103 , +0x81C ,0xF3140103 , +0x81C ,0xF2160103 , +0x81C ,0xF1180103 , +0x81C ,0xF01A0103 , +0x81C ,0xEE1C0103 , +0x81C ,0xED1E0103 , +0x81C ,0xEC200103 , +0x81C ,0xEB220103 , +0x81C ,0xEA240103 , +0x81C ,0xE9260103 , +0x81C ,0xE8280103 , +0x81C ,0xE72A0103 , +0x81C ,0xE62C0103 , +0x81C ,0xE52E0103 , +0x81C ,0xE4300103 , +0x81C ,0xE3320103 , +0x81C ,0xE2340103 , +0x81C ,0xC5360103 , +0x81C ,0xC4380103 , +0x81C ,0xC33A0103 , +0x81C ,0xC23C0103 , +0x81C ,0xA53E0103 , +0x81C ,0xA4400103 , +0x81C ,0xA3420103 , +0x81C ,0xA2440103 , +0x81C ,0xA1460103 , +0x81C ,0x83480103 , +0x81C ,0x824A0103 , +0x81C ,0x814C0103 , +0x81C ,0x804E0103 , +0x81C ,0x63500103 , +0x81C ,0x62520103 , +0x81C ,0x61540103 , +0x81C ,0x43560103 , +0x81C ,0x42580103 , +0x81C ,0x415A0103 , +0x81C ,0x405C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x20620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x9000000b ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF9000103 , +0x81C ,0xF8020103 , +0x81C ,0xF7040103 , +0x81C ,0xF6060103 , +0x81C ,0xF5080103 , +0x81C ,0xF40A0103 , +0x81C ,0xF30C0103 , +0x81C ,0xF20E0103 , +0x81C ,0xF1100103 , +0x81C ,0xF0120103 , +0x81C ,0xEF140103 , +0x81C ,0xEE160103 , +0x81C ,0xED180103 , +0x81C ,0xEC1A0103 , +0x81C ,0xEB1C0103 , +0x81C ,0xEA1E0103 , +0x81C ,0xE9200103 , +0x81C ,0xE8220103 , +0x81C ,0xE7240103 , +0x81C ,0xE6260103 , +0x81C ,0xE5280103 , +0x81C ,0xE42A0103 , +0x81C ,0xE32C0103 , +0x81C ,0xC32E0103 , +0x81C ,0xC2300103 , +0x81C ,0xC1320103 , +0x81C ,0xA4340103 , +0x81C ,0xA3360103 , +0x81C ,0xA2380103 , +0x81C ,0xA13A0103 , +0x81C ,0xA03C0103 , +0x81C ,0x823E0103 , +0x81C ,0x81400103 , +0x81C ,0x80420103 , +0x81C ,0x63440103 , +0x81C ,0x62460103 , +0x81C ,0x61480103 , +0x81C ,0x604A0103 , +0x81C ,0x244C0103 , +0x81C ,0x234E0103 , +0x81C ,0x22500103 , +0x81C ,0x21520103 , +0x81C ,0x20540103 , +0x81C ,0x05560103 , +0x81C ,0x04580103 , +0x81C ,0x035A0103 , +0x81C ,0x025C0103 , +0x81C ,0x015E0103 , +0x81C ,0x00600103 , +0x81C ,0x00620103 , +0x81C ,0x00640103 , +0x81C ,0x00660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x9000000c ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFE000103 , +0x81C ,0xFD020103 , +0x81C ,0xFC040103 , +0x81C ,0xFB060103 , +0x81C ,0xFA080103 , +0x81C ,0xF90A0103 , +0x81C ,0xF80C0103 , +0x81C ,0xF70E0103 , +0x81C ,0xF6100103 , +0x81C ,0xF5120103 , +0x81C ,0xF4140103 , +0x81C ,0xF3160103 , +0x81C ,0xF2180103 , +0x81C ,0xF11A0103 , +0x81C ,0xF01C0103 , +0x81C ,0xEF1E0103 , +0x81C ,0xEE200103 , +0x81C ,0xED220103 , +0x81C ,0xEC240103 , +0x81C ,0xEB260103 , +0x81C ,0xEA280103 , +0x81C ,0xE92A0103 , +0x81C ,0xE82C0103 , +0x81C ,0xE72E0103 , +0x81C ,0xE6300103 , +0x81C ,0xE5320103 , +0x81C ,0xE4340103 , +0x81C ,0xE3360103 , +0x81C ,0xC6380103 , +0x81C ,0xC53A0103 , +0x81C ,0xC43C0103 , +0x81C ,0xC33E0103 , +0x81C ,0xA5400103 , +0x81C ,0xA4420103 , +0x81C ,0xA3440103 , +0x81C ,0xA2460103 , +0x81C ,0xA1480103 , +0x81C ,0xA04A0103 , +0x81C ,0x824C0103 , +0x81C ,0x814E0103 , +0x81C ,0x80500103 , +0x81C ,0x64520103 , +0x81C ,0x63540103 , +0x81C ,0x62560103 , +0x81C ,0x61580103 , +0x81C ,0x605A0103 , +0x81C ,0x235C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x20620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x9000000d ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFC000103 , +0x81C ,0xFB020103 , +0x81C ,0xFA040103 , +0x81C ,0xF9060103 , +0x81C ,0xF8080103 , +0x81C ,0xF70A0103 , +0x81C ,0xF60C0103 , +0x81C ,0xF50E0103 , +0x81C ,0xF4100103 , +0x81C ,0xF3120103 , +0x81C ,0xF2140103 , +0x81C ,0xF1160103 , +0x81C ,0xF0180103 , +0x81C ,0xEE1A0103 , +0x81C ,0xED1C0103 , +0x81C ,0xEC1E0103 , +0x81C ,0xEB200103 , +0x81C ,0xEA220103 , +0x81C ,0xE9240103 , +0x81C ,0xE8260103 , +0x81C ,0xE7280103 , +0x81C ,0xE62A0103 , +0x81C ,0xE52C0103 , +0x81C ,0xE42E0103 , +0x81C ,0xE3300103 , +0x81C ,0xE2320103 , +0x81C ,0xE1340103 , +0x81C ,0xC5360103 , +0x81C ,0xC4380103 , +0x81C ,0xC33A0103 , +0x81C ,0xC23C0103 , +0x81C ,0xA53E0103 , +0x81C ,0xA4400103 , +0x81C ,0xA3420103 , +0x81C ,0xA2440103 , +0x81C ,0xA1460103 , +0x81C ,0x83480103 , +0x81C ,0x824A0103 , +0x81C ,0x814C0103 , +0x81C ,0x804E0103 , +0x81C ,0x63500103 , +0x81C ,0x62520103 , +0x81C ,0x61540103 , +0x81C ,0x43560103 , +0x81C ,0x42580103 , +0x81C ,0x415A0103 , +0x81C ,0x405C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x20620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x9000000e ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFD000103 , +0x81C ,0xFC020103 , +0x81C ,0xFB040103 , +0x81C ,0xFA060103 , +0x81C ,0xF9080103 , +0x81C ,0xF80A0103 , +0x81C ,0xF70C0103 , +0x81C ,0xF60E0103 , +0x81C ,0xF5100103 , +0x81C ,0xF4120103 , +0x81C ,0xF3140103 , +0x81C ,0xF2160103 , +0x81C ,0xF1180103 , +0x81C ,0xF01A0103 , +0x81C ,0xEE1C0103 , +0x81C ,0xED1E0103 , +0x81C ,0xEC200103 , +0x81C ,0xEB220103 , +0x81C ,0xEA240103 , +0x81C ,0xE9260103 , +0x81C ,0xE8280103 , +0x81C ,0xE72A0103 , +0x81C ,0xE62C0103 , +0x81C ,0xE52E0103 , +0x81C ,0xE4300103 , +0x81C ,0xE3320103 , +0x81C ,0xE2340103 , +0x81C ,0xC5360103 , +0x81C ,0xC4380103 , +0x81C ,0xC33A0103 , +0x81C ,0xC23C0103 , +0x81C ,0xA53E0103 , +0x81C ,0xA4400103 , +0x81C ,0xA3420103 , +0x81C ,0xA2440103 , +0x81C ,0xA1460103 , +0x81C ,0x83480103 , +0x81C ,0x824A0103 , +0x81C ,0x814C0103 , +0x81C ,0x804E0103 , +0x81C ,0x63500103 , +0x81C ,0x62520103 , +0x81C ,0x61540103 , +0x81C ,0x43560103 , +0x81C ,0x42580103 , +0x81C ,0x415A0103 , +0x81C ,0x405C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x20620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x9000000f ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFC000103 , +0x81C ,0xFB020103 , +0x81C ,0xFA040103 , +0x81C ,0xF9060103 , +0x81C ,0xF8080103 , +0x81C ,0xF70A0103 , +0x81C ,0xF60C0103 , +0x81C ,0xF50E0103 , +0x81C ,0xF4100103 , +0x81C ,0xF3120103 , +0x81C ,0xF2140103 , +0x81C ,0xF1160103 , +0x81C ,0xF0180103 , +0x81C ,0xEF1A0103 , +0x81C ,0xEE1C0103 , +0x81C ,0xED1E0103 , +0x81C ,0xEC200103 , +0x81C ,0xEB220103 , +0x81C ,0xEA240103 , +0x81C ,0xE9260103 , +0x81C ,0xE8280103 , +0x81C ,0xE72A0103 , +0x81C ,0xE62C0103 , +0x81C ,0xE52E0103 , +0x81C ,0xE4300103 , +0x81C ,0xE3320103 , +0x81C ,0xE2340103 , +0x81C ,0xE1360103 , +0x81C ,0xC3380103 , +0x81C ,0xC23A0103 , +0x81C ,0xC13C0103 , +0x81C ,0xC03E0103 , +0x81C ,0xA4400103 , +0x81C ,0xA3420103 , +0x81C ,0xA2440103 , +0x81C ,0xA1460103 , +0x81C ,0x82480103 , +0x81C ,0x814A0103 , +0x81C ,0x804C0103 , +0x81C ,0x634E0103 , +0x81C ,0x62500103 , +0x81C ,0x61520103 , +0x81C ,0x42540103 , +0x81C ,0x41560103 , +0x81C ,0x24580103 , +0x81C ,0x235A0103 , +0x81C ,0x225C0103 , +0x81C ,0x215E0103 , +0x81C ,0x20600103 , +0x81C ,0x03620103 , +0x81C ,0x02640103 , +0x81C ,0x01660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000010 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFE000103 , +0x81C ,0xFD020103 , +0x81C ,0xFC040103 , +0x81C ,0xFB060103 , +0x81C ,0xFA080103 , +0x81C ,0xF90A0103 , +0x81C ,0xF80C0103 , +0x81C ,0xF70E0103 , +0x81C ,0xF6100103 , +0x81C ,0xF5120103 , +0x81C ,0xF4140103 , +0x81C ,0xF3160103 , +0x81C ,0xF2180103 , +0x81C ,0xF11A0103 , +0x81C ,0xF01C0103 , +0x81C ,0xEF1E0103 , +0x81C ,0xEE200103 , +0x81C ,0xED220103 , +0x81C ,0xEC240103 , +0x81C ,0xEB260103 , +0x81C ,0xEA280103 , +0x81C ,0xE92A0103 , +0x81C ,0xE82C0103 , +0x81C ,0xE72E0103 , +0x81C ,0xE6300103 , +0x81C ,0xE5320103 , +0x81C ,0xE4340103 , +0x81C ,0xE3360103 , +0x81C ,0xC6380103 , +0x81C ,0xC53A0103 , +0x81C ,0xC43C0103 , +0x81C ,0xC33E0103 , +0x81C ,0xA5400103 , +0x81C ,0xA4420103 , +0x81C ,0xA3440103 , +0x81C ,0xA2460103 , +0x81C ,0xA1480103 , +0x81C ,0xA04A0103 , +0x81C ,0x824C0103 , +0x81C ,0x814E0103 , +0x81C ,0x80500103 , +0x81C ,0x64520103 , +0x81C ,0x63540103 , +0x81C ,0x62560103 , +0x81C ,0x61580103 , +0x81C ,0x605A0103 , +0x81C ,0x235C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x20620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0x90000012 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF8000103 , +0x81C ,0xF7020103 , +0x81C ,0xF6040103 , +0x81C ,0xF5060103 , +0x81C ,0xF4080103 , +0x81C ,0xF30A0103 , +0x81C ,0xF20C0103 , +0x81C ,0xF10E0103 , +0x81C ,0xF0100103 , +0x81C ,0xEF120103 , +0x81C ,0xEE140103 , +0x81C ,0xED160103 , +0x81C ,0xEC180103 , +0x81C ,0xEB1A0103 , +0x81C ,0xEA1C0103 , +0x81C ,0xE91E0103 , +0x81C ,0xE8200103 , +0x81C ,0xE7220103 , +0x81C ,0xE6240103 , +0x81C ,0xE5260103 , +0x81C ,0xE4280103 , +0x81C ,0xE32A0103 , +0x81C ,0xC32C0103 , +0x81C ,0xC22E0103 , +0x81C ,0xC1300103 , +0x81C ,0xC0320103 , +0x81C ,0xA3340103 , +0x81C ,0xA2360103 , +0x81C ,0xA1380103 , +0x81C ,0xA03A0103 , +0x81C ,0x823C0103 , +0x81C ,0x813E0103 , +0x81C ,0x80400103 , +0x81C ,0x63420103 , +0x81C ,0x62440103 , +0x81C ,0x61460103 , +0x81C ,0x60480103 , +0x81C ,0x424A0103 , +0x81C ,0x414C0103 , +0x81C ,0x404E0103 , +0x81C ,0x22500103 , +0x81C ,0x21520103 , +0x81C ,0x20540103 , +0x81C ,0x03560103 , +0x81C ,0x02580103 , +0x81C ,0x015A0103 , +0x81C ,0x005C0103 , +0x81C ,0x005E0103 , +0x81C ,0x00600103 , +0x81C ,0x00620103 , +0x81C ,0x00640103 , +0x81C ,0x00660103 , +0x81C ,0x00680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0xA0000000 ,0x00000000 , +0x81C ,0xFE000103 , +0x81C ,0xFD020103 , +0x81C ,0xFC040103 , +0x81C ,0xFB060103 , +0x81C ,0xFA080103 , +0x81C ,0xF90A0103 , +0x81C ,0xF80C0103 , +0x81C ,0xF70E0103 , +0x81C ,0xF6100103 , +0x81C ,0xF5120103 , +0x81C ,0xF4140103 , +0x81C ,0xF3160103 , +0x81C ,0xF2180103 , +0x81C ,0xF11A0103 , +0x81C ,0xF01C0103 , +0x81C ,0xEF1E0103 , +0x81C ,0xEE200103 , +0x81C ,0xED220103 , +0x81C ,0xEC240103 , +0x81C ,0xEB260103 , +0x81C ,0xEA280103 , +0x81C ,0xE92A0103 , +0x81C ,0xE82C0103 , +0x81C ,0xE72E0103 , +0x81C ,0xE6300103 , +0x81C ,0xE5320103 , +0x81C ,0xE4340103 , +0x81C ,0xE3360103 , +0x81C ,0xC6380103 , +0x81C ,0xC53A0103 , +0x81C ,0xC43C0103 , +0x81C ,0xC33E0103 , +0x81C ,0xA5400103 , +0x81C ,0xA4420103 , +0x81C ,0xA3440103 , +0x81C ,0xA2460103 , +0x81C ,0xA1480103 , +0x81C ,0xA04A0103 , +0x81C ,0x824C0103 , +0x81C ,0x814E0103 , +0x81C ,0x80500103 , +0x81C ,0x64520103 , +0x81C ,0x63540103 , +0x81C ,0x62560103 , +0x81C ,0x61580103 , +0x81C ,0x605A0103 , +0x81C ,0x235C0103 , +0x81C ,0x225E0103 , +0x81C ,0x21600103 , +0x81C ,0x20620103 , +0x81C ,0x03640103 , +0x81C ,0x02660103 , +0x81C ,0x01680103 , +0x81C ,0x006A0103 , +0x81C ,0x006C0103 , +0x81C ,0x006E0103 , +0x81C ,0x00700103 , +0x81C ,0x00720103 , +0x81C ,0x00740103 , +0x81C ,0x00760103 , +0x81C ,0x00780103 , +0x81C ,0x007A0103 , +0x81C ,0x007C0103 , +0x81C ,0x007E0103 , +0xB0000000 ,0x00000000 , +0x80000000 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFC000203 , +0x81C ,0xFB020203 , +0x81C ,0xFA040203 , +0x81C ,0xF9060203 , +0x81C ,0xF8080203 , +0x81C ,0xF70A0203 , +0x81C ,0xF60C0203 , +0x81C ,0xF50E0203 , +0x81C ,0xF4100203 , +0x81C ,0xF3120203 , +0x81C ,0xF2140203 , +0x81C ,0xF1160203 , +0x81C ,0xF0180203 , +0x81C ,0xEE1A0203 , +0x81C ,0xED1C0203 , +0x81C ,0xEC1E0203 , +0x81C ,0xEB200203 , +0x81C ,0xEA220203 , +0x81C ,0xE9240203 , +0x81C ,0xE8260203 , +0x81C ,0xE7280203 , +0x81C ,0xE62A0203 , +0x81C ,0xE52C0203 , +0x81C ,0xE42E0203 , +0x81C ,0xE3300203 , +0x81C ,0xE2320203 , +0x81C ,0xC6340203 , +0x81C ,0xC5360203 , +0x81C ,0xC4380203 , +0x81C ,0xC33A0203 , +0x81C ,0xA63C0203 , +0x81C ,0xA53E0203 , +0x81C ,0xA4400203 , +0x81C ,0xA3420203 , +0x81C ,0xA2440203 , +0x81C ,0xA1460203 , +0x81C ,0x83480203 , +0x81C ,0x824A0203 , +0x81C ,0x814C0203 , +0x81C ,0x804E0203 , +0x81C ,0x63500203 , +0x81C ,0x62520203 , +0x81C ,0x61540203 , +0x81C ,0x42560203 , +0x81C ,0x41580203 , +0x81C ,0x405A0203 , +0x81C ,0x225C0203 , +0x81C ,0x215E0203 , +0x81C ,0x20600203 , +0x81C ,0x04620203 , +0x81C ,0x03640203 , +0x81C ,0x02660203 , +0x81C ,0x01680203 , +0x81C ,0x006A0203 , +0x81C ,0x006C0203 , +0x81C ,0x006E0203 , +0x81C ,0x00700203 , +0x81C ,0x00720203 , +0x81C ,0x00740203 , +0x81C ,0x00760203 , +0x81C ,0x00780203 , +0x81C ,0x007A0203 , +0x81C ,0x007C0203 , +0x81C ,0x007E0203 , +0x90000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF7000203 , +0x81C ,0xF6020203 , +0x81C ,0xF5040203 , +0x81C ,0xF4060203 , +0x81C ,0xF3080203 , +0x81C ,0xF20A0203 , +0x81C ,0xF10C0203 , +0x81C ,0xF00E0203 , +0x81C ,0xEF100203 , +0x81C ,0xEE120203 , +0x81C ,0xED140203 , +0x81C ,0xEC160203 , +0x81C ,0xEB180203 , +0x81C ,0xEA1A0203 , +0x81C ,0xE91C0203 , +0x81C ,0xE81E0203 , +0x81C ,0xE7200203 , +0x81C ,0xE6220203 , +0x81C ,0xE5240203 , +0x81C ,0xE4260203 , +0x81C ,0xE3280203 , +0x81C ,0xC42A0203 , +0x81C ,0xC32C0203 , +0x81C ,0xC22E0203 , +0x81C ,0xC1300203 , +0x81C ,0xC0320203 , +0x81C ,0xA3340203 , +0x81C ,0xA2360203 , +0x81C ,0xA1380203 , +0x81C ,0xA03A0203 , +0x81C ,0x823C0203 , +0x81C ,0x813E0203 , +0x81C ,0x80400203 , +0x81C ,0x63420203 , +0x81C ,0x62440203 , +0x81C ,0x61460203 , +0x81C ,0x60480203 , +0x81C ,0x424A0203 , +0x81C ,0x414C0203 , +0x81C ,0x404E0203 , +0x81C ,0x06500203 , +0x81C ,0x05520203 , +0x81C ,0x04540203 , +0x81C ,0x03560203 , +0x81C ,0x02580203 , +0x81C ,0x015A0203 , +0x81C ,0x005C0203 , +0x81C ,0x005E0203 , +0x81C ,0x00600203 , +0x81C ,0x00620203 , +0x81C ,0x00640203 , +0x81C ,0x00660203 , +0x81C ,0x00680203 , +0x81C ,0x006A0203 , +0x81C ,0x006C0203 , +0x81C ,0x006E0203 , +0x81C ,0x00700203 , +0x81C ,0x00720203 , +0x81C ,0x00740203 , +0x81C ,0x00760203 , +0x81C ,0x00780203 , +0x81C ,0x007A0203 , +0x81C ,0x007C0203 , +0x81C ,0x007E0203 , +0x90000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF7000203 , +0x81C ,0xF6020203 , +0x81C ,0xF5040203 , +0x81C ,0xF4060203 , +0x81C ,0xF3080203 , +0x81C ,0xF20A0203 , +0x81C ,0xF10C0203 , +0x81C ,0xF00E0203 , +0x81C ,0xEF100203 , +0x81C ,0xEE120203 , +0x81C ,0xED140203 , +0x81C ,0xEC160203 , +0x81C ,0xEB180203 , +0x81C ,0xEA1A0203 , +0x81C ,0xE91C0203 , +0x81C ,0xE81E0203 , +0x81C ,0xE7200203 , +0x81C ,0xE6220203 , +0x81C ,0xE5240203 , +0x81C ,0xE4260203 , +0x81C ,0xE3280203 , +0x81C ,0xC42A0203 , +0x81C ,0xC32C0203 , +0x81C ,0xC22E0203 , +0x81C ,0xC1300203 , +0x81C ,0xC0320203 , +0x81C ,0xA3340203 , +0x81C ,0xA2360203 , +0x81C ,0xA1380203 , +0x81C ,0xA03A0203 , +0x81C ,0x823C0203 , +0x81C ,0x813E0203 , +0x81C ,0x80400203 , +0x81C ,0x64420203 , +0x81C ,0x63440203 , +0x81C ,0x62460203 , +0x81C ,0x61480203 , +0x81C ,0x604A0203 , +0x81C ,0x414C0203 , +0x81C ,0x404E0203 , +0x81C ,0x22500203 , +0x81C ,0x21520203 , +0x81C ,0x20540203 , +0x81C ,0x03560203 , +0x81C ,0x02580203 , +0x81C ,0x015A0203 , +0x81C ,0x005C0203 , +0x81C ,0x005E0203 , +0x81C ,0x00600203 , +0x81C ,0x00620203 , +0x81C ,0x00640203 , +0x81C ,0x00660203 , +0x81C ,0x00680203 , +0x81C ,0x006A0203 , +0x81C ,0x006C0203 , +0x81C ,0x006E0203 , +0x81C ,0x00700203 , +0x81C ,0x00720203 , +0x81C ,0x00740203 , +0x81C ,0x00760203 , +0x81C ,0x00780203 , +0x81C ,0x007A0203 , +0x81C ,0x007C0203 , +0x81C ,0x007E0203 , +0x90000003 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFC000203 , +0x81C ,0xFB020203 , +0x81C ,0xFA040203 , +0x81C ,0xF9060203 , +0x81C ,0xF8080203 , +0x81C ,0xF70A0203 , +0x81C ,0xF60C0203 , +0x81C ,0xF50E0203 , +0x81C ,0xF4100203 , +0x81C ,0xF3120203 , +0x81C ,0xF2140203 , +0x81C ,0xF1160203 , +0x81C ,0xF0180203 , +0x81C ,0xEF1A0203 , +0x81C ,0xEE1C0203 , +0x81C ,0xED1E0203 , +0x81C ,0xEC200203 , +0x81C ,0xEB220203 , +0x81C ,0xEA240203 , +0x81C ,0xE9260203 , +0x81C ,0xE8280203 , +0x81C ,0xE72A0203 , +0x81C ,0xE62C0203 , +0x81C ,0xE52E0203 , +0x81C ,0xE4300203 , +0x81C ,0xE3320203 , +0x81C ,0xE2340203 , +0x81C ,0xC6360203 , +0x81C ,0xC5380203 , +0x81C ,0xC43A0203 , +0x81C ,0xC33C0203 , +0x81C ,0xA63E0203 , +0x81C ,0xA5400203 , +0x81C ,0xA4420203 , +0x81C ,0xA3440203 , +0x81C ,0xA2460203 , +0x81C ,0xA1480203 , +0x81C ,0x834A0203 , +0x81C ,0x824C0203 , +0x81C ,0x814E0203 , +0x81C ,0x64500203 , +0x81C ,0x63520203 , +0x81C ,0x62540203 , +0x81C ,0x61560203 , +0x81C ,0x60580203 , +0x81C ,0x405A0203 , +0x81C ,0x215C0203 , +0x81C ,0x205E0203 , +0x81C ,0x03600203 , +0x81C ,0x02620203 , +0x81C ,0x01640203 , +0x81C ,0x00660203 , +0x81C ,0x00680203 , +0x81C ,0x006A0203 , +0x81C ,0x006C0203 , +0x81C ,0x006E0203 , +0x81C ,0x00700203 , +0x81C ,0x00720203 , +0x81C ,0x00740203 , +0x81C ,0x00760203 , +0x81C ,0x00780203 , +0x81C ,0x007A0203 , +0x81C ,0x007C0203 , +0x81C ,0x007E0203 , +0x90000004 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xF7000203 , +0x81C ,0xF6020203 , +0x81C ,0xF5040203 , +0x81C ,0xF4060203 , +0x81C ,0xF3080203 , +0x81C ,0xF20A0203 , +0x81C ,0xF10C0203 , +0x81C ,0xF00E0203 , +0x81C ,0xEF100203 , +0x81C ,0xEE120203 , +0x81C ,0xED140203 , +0x81C ,0xEC160203 , +0x81C ,0xEB180203 , +0x81C ,0xEA1A0203 , +0x81C ,0xE91C0203 , +0x81C ,0xE81E0203 , +0x81C ,0xE7200203 , +0x81C ,0xE6220203 , +0x81C ,0xE5240203 , +0x81C ,0xE4260203 , +0x81C ,0xE3280203 , +0x81C ,0xC42A0203 , +0x81C ,0xC32C0203 , +0x81C ,0xC22E0203 , +0x81C ,0xC1300203 , +0x81C ,0xC0320203 , +0x81C ,0xA3340203 , +0x81C ,0xA2360203 , +0x81C ,0xA1380203 , +0x81C ,0xA03A0203 , +0x81C ,0x823C0203 , +0x81C ,0x813E0203 , +0x81C ,0x80400203 , +0x81C ,0x64420203 , +0x81C ,0x63440203 , +0x81C ,0x62460203 , +0x81C ,0x61480203 , +0x81C ,0x604A0203 , +0x81C ,0x414C0203 , +0x81C ,0x404E0203 , +0x81C ,0x22500203 , +0x81C ,0x21520203 , +0x81C ,0x20540203 , +0x81C ,0x03560203 , +0x81C ,0x02580203 , +0x81C ,0x015A0203 , +0x81C ,0x005C0203 , +0x81C ,0x005E0203 , +0x81C ,0x00600203 , +0x81C ,0x00620203 , +0x81C ,0x00640203 , +0x81C ,0x00660203 , +0x81C ,0x00680203 , +0x81C ,0x006A0203 , +0x81C ,0x006C0203 , +0x81C ,0x006E0203 , +0x81C ,0x00700203 , +0x81C ,0x00720203 , +0x81C ,0x00740203 , +0x81C ,0x00760203 , +0x81C ,0x00780203 , +0x81C ,0x007A0203 , +0x81C ,0x007C0203 , +0x81C ,0x007E0203 , +0x90000005 ,0x00000000 ,0x40000000 ,0x00000000 , +0x81C ,0xFC000203 , +0x81C ,0xFB020203 , +0x81C ,0xFA040203 , +0x81C ,0xF9060203 , +0x81C ,0xF8080203 , +0x81C ,0xF70A0203 , +0x81C ,0xF60C0203 , +0x81C ,0xF50E0203 , +0x81C ,0xF4100203 , +0x81C ,0xF3120203 , +0x81C ,0xF2140203 , +0x81C ,0xF1160203 , +0x81C ,0xF0180203 , +0x81C ,0xEF1A0203 , +0x81C ,0xEE1C0203 , +0x81C ,0xED1E0203 , +0x81C ,0xEC200203 , +0x81C ,0xEB220203 , +0x81C ,0xEA240203 , +0x81C ,0xE9260203 , +0x81C ,0xE8280203 , +0x81C ,0xE72A0203 , +0x81C ,0xE62C0203 , +0x81C ,0xE52E0203 , +0x81C ,0xE4300203 , +0x81C ,0xE3320203 , +0x81C ,0xE2340203 , +0x81C ,0xE1360203 , +0x81C ,0xC5380203 , +0x81C ,0xC43A0203 , +0x81C ,0xC33C0203 , +0x81C ,0xC23E0203 , +0x81C ,0xC1400203 , +0x81C ,0xA3420203 , +0x81C ,0xA2440203 , +0x81C ,0xA1460203 , +0x81C ,0xA0480203 , +0x81C ,0x834A0203 , +0x81C ,0x824C0203 , +0x81C ,0x814E0203 , +0x81C ,0x64500203 , +0x81C ,0x63520203 , +0x81C ,0x62540203 , +0x81C ,0x61560203 ,
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
PATCH v9 11/14 rtw88: 8822C init table
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
8822C init table for chip files Realtek 802.11ac wireless network chips
--- .../net/wireless/realtek/rtw88/rtw8822c_table.c | 11753 +++++++++++++++++++ 1 file changed, 11753 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/rtw8822c_table.c
drivers/net/wireless/realtek/rtw88/rtw8822c_table.c new file +11753 -0
@@ -0,0 +1,11753 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* Copyright(c) 2018-2019 Realtek Corporation +*/ + +#include "main.h" +#include "phy.h" +#include "rtw8822c_table.h" + +static const u32 rtw8822c_mac[] = { +}; + +RTW_DECL_TABLE_PHY_COND (rtw8822c_mac, rtw_phy_cfg_mac); + +static const u32 rtw8822c_agc[] = { +0x1D90 ,0x300001FF , +0x1D90 ,0x300101FF , +0x1D90 ,0x300201FE , +0x1D90 ,0x300301FD , +0x1D90 ,0x300401FC , +0x1D90 ,0x300501FB , +0x1D90 ,0x300601FA , +0x1D90 ,0x300701F9 , +0x1D90 ,0x300801F8 , +0x1D90 ,0x300901F7 , +0x1D90 ,0x300A01F6 , +0x1D90 ,0x300B01F5 , +0x1D90 ,0x300C01F4 , +0x1D90 ,0x300D01F3 , +0x1D90 ,0x300E01F2 , +0x1D90 ,0x300F01F1 , +0x1D90 ,0x301001F0 , +0x1D90 ,0x301101EF , +0x1D90 ,0x301201EE , +0x1D90 ,0x301301ED , +0x1D90 ,0x301401EC , +0x1D90 ,0x301501EB , +0x1D90 ,0x30160192 , +0x1D90 ,0x30170191 , +0x1D90 ,0x30180190 , +0x1D90 ,0x3019018F , +0x1D90 ,0x301A018E , +0x1D90 ,0x301B018D , +0x1D90 ,0x301C018C , +0x1D90 ,0x301D018B , +0x1D90 ,0x301E018A , +0x1D90 ,0x301F0189 , +0x1D90 ,0x30200188 , +0x1D90 ,0x30210187 , +0x1D90 ,0x30220186 , +0x1D90 ,0x30230185 , +0x1D90 ,0x3024014B , +0x1D90 ,0x3025014A , +0x1D90 ,0x30260149 , +0x1D90 ,0x30270148 , +0x1D90 ,0x30280147 , +0x1D90 ,0x30290146 , +0x1D90 ,0x302A0145 , +0x1D90 ,0x302B0144 , +0x1D90 ,0x302C0143 , +0x1D90 ,0x302D0142 , +0x1D90 ,0x302E00C8 , +0x1D90 ,0x302F00C7 , +0x1D90 ,0x303000C6 , +0x1D90 ,0x303100C5 , +0x1D90 ,0x303200C4 , +0x1D90 ,0x30330088 , +0x1D90 ,0x30340087 , +0x1D90 ,0x30350086 , +0x1D90 ,0x30360045 , +0x1D90 ,0x30370044 , +0x1D90 ,0x30380043 , +0x1D90 ,0x30390023 , +0x1D90 ,0x303A0022 , +0x1D90 ,0x303B0021 , +0x1D90 ,0x303C0020 , +0x1D90 ,0x303D0002 , +0x1D90 ,0x303E0001 , +0x1D90 ,0x303F0000 , +0x1D90 ,0x304000FF , +0x1D90 ,0x304100FF , +0x1D90 ,0x304200FF , +0x1D90 ,0x304300FF , +0x1D90 ,0x304400FE , +0x1D90 ,0x304500FD , +0x1D90 ,0x304600FC , +0x1D90 ,0x304700FB , +0x1D90 ,0x304800FA , +0x1D90 ,0x304900F9 , +0x1D90 ,0x304A00F8 , +0x1D90 ,0x304B00F7 , +0x1D90 ,0x304C00F6 , +0x1D90 ,0x304D00F5 , +0x1D90 ,0x304E00F4 , +0x1D90 ,0x304F00F3 , +0x1D90 ,0x305000F2 , +0x1D90 ,0x305100F1 , +0x1D90 ,0x305200F0 , +0x1D90 ,0x305300EF , +0x1D90 ,0x305400EE , +0x1D90 ,0x305500ED , +0x1D90 ,0x305600EC , +0x1D90 ,0x305700EB , +0x1D90 ,0x305800EA , +0x1D90 ,0x305900E9 , +0x1D90 ,0x305A00E8 , +0x1D90 ,0x305B00E7 , +0x1D90 ,0x305C00E6 , +0x1D90 ,0x305D00C7 , +0x1D90 ,0x305E00C6 , +0x1D90 ,0x305F00C5 , +0x1D90 ,0x306000C4 , +0x1D90 ,0x306100C3 , +0x1D90 ,0x306200C2 , +0x1D90 ,0x306300A4 , +0x1D90 ,0x306400A3 , +0x1D90 ,0x306500A2 , +0x1D90 ,0x30660086 , +0x1D90 ,0x30670085 , +0x1D90 ,0x30680084 , +0x1D90 ,0x30690083 , +0x1D90 ,0x306A0082 , +0x1D90 ,0x306B0069 , +0x1D90 ,0x306C0068 , +0x1D90 ,0x306D0067 , +0x1D90 ,0x306E0066 , +0x1D90 ,0x306F0065 , +0x1D90 ,0x30700064 , +0x1D90 ,0x30710063 , +0x1D90 ,0x30720044 , +0x1D90 ,0x30730043 , +0x1D90 ,0x30740042 , +0x1D90 ,0x30750025 , +0x1D90 ,0x30760024 , +0x1D90 ,0x30770023 , +0x1D90 ,0x30780022 , +0x1D90 ,0x30790021 , +0x1D90 ,0x307A0020 , +0x1D90 ,0x307B0003 , +0x1D90 ,0x307C0002 , +0x1D90 ,0x307D0001 , +0x1D90 ,0x307E0000 , +0x1D90 ,0x307F0000 , +0x1D90 ,0x308000FF , +0x1D90 ,0x308100FF , +0x1D90 ,0x308200FF , +0x1D90 ,0x308300FF , +0x1D90 ,0x308400FE , +0x1D90 ,0x308500FD , +0x1D90 ,0x308600FC , +0x1D90 ,0x308700FB , +0x1D90 ,0x308800FA , +0x1D90 ,0x308900F9 , +0x1D90 ,0x308A00F8 , +0x1D90 ,0x308B00F7 , +0x1D90 ,0x308C00F6 , +0x1D90 ,0x308D00F5 , +0x1D90 ,0x308E00F4 , +0x1D90 ,0x308F00F3 , +0x1D90 ,0x309000F2 , +0x1D90 ,0x309100F1 , +0x1D90 ,0x309200F0 , +0x1D90 ,0x309300EF , +0x1D90 ,0x309400EE , +0x1D90 ,0x309500ED , +0x1D90 ,0x309600EC , +0x1D90 ,0x309700EB , +0x1D90 ,0x309800EA , +0x1D90 ,0x309900E9 , +0x1D90 ,0x309A00E8 , +0x1D90 ,0x309B00E7 , +0x1D90 ,0x309C00E6 , +0x1D90 ,0x309D00C7 , +0x1D90 ,0x309E00C6 , +0x1D90 ,0x309F00C5 , +0x1D90 ,0x30A000C4 , +0x1D90 ,0x30A100C3 , +0x1D90 ,0x30A200C2 , +0x1D90 ,0x30A300A4 , +0x1D90 ,0x30A400A3 , +0x1D90 ,0x30A500A2 , +0x1D90 ,0x30A60086 , +0x1D90 ,0x30A70085 , +0x1D90 ,0x30A80084 , +0x1D90 ,0x30A90083 , +0x1D90 ,0x30AA0082 , +0x1D90 ,0x30AB0069 , +0x1D90 ,0x30AC0068 , +0x1D90 ,0x30AD0067 , +0x1D90 ,0x30AE0066 , +0x1D90 ,0x30AF0065 , +0x1D90 ,0x30B00064 , +0x1D90 ,0x30B10063 , +0x1D90 ,0x30B20044 , +0x1D90 ,0x30B30043 , +0x1D90 ,0x30B40042 , +0x1D90 ,0x30B50025 , +0x1D90 ,0x30B60024 , +0x1D90 ,0x30B70023 , +0x1D90 ,0x30B80022 , +0x1D90 ,0x30B90021 , +0x1D90 ,0x30BA0020 , +0x1D90 ,0x30BB0003 , +0x1D90 ,0x30BC0002 , +0x1D90 ,0x30BD0001 , +0x1D90 ,0x30BE0000 , +0x1D90 ,0x30BF0000 , +0x1D90 ,0x30C000FF , +0x1D90 ,0x30C100FF , +0x1D90 ,0x30C200FF , +0x1D90 ,0x30C300FF , +0x1D90 ,0x30C400FE , +0x1D90 ,0x30C500FD , +0x1D90 ,0x30C600FC , +0x1D90 ,0x30C700FB , +0x1D90 ,0x30C800FA , +0x1D90 ,0x30C900F9 , +0x1D90 ,0x30CA00F8 , +0x1D90 ,0x30CB00F7 , +0x1D90 ,0x30CC00F6 , +0x1D90 ,0x30CD00F5 , +0x1D90 ,0x30CE00F4 , +0x1D90 ,0x30CF00F3 , +0x1D90 ,0x30D000F2 , +0x1D90 ,0x30D100F1 , +0x1D90 ,0x30D200F0 , +0x1D90 ,0x30D300EF , +0x1D90 ,0x30D400EE , +0x1D90 ,0x30D500ED , +0x1D90 ,0x30D600EC , +0x1D90 ,0x30D700EB , +0x1D90 ,0x30D800EA , +0x1D90 ,0x30D900E9 , +0x1D90 ,0x30DA00E8 , +0x1D90 ,0x30DB00E7 , +0x1D90 ,0x30DC00E6 , +0x1D90 ,0x30DD00C7 , +0x1D90 ,0x30DE00C6 , +0x1D90 ,0x30DF00C5 , +0x1D90 ,0x30E000C4 , +0x1D90 ,0x30E100C3 , +0x1D90 ,0x30E200C2 , +0x1D90 ,0x30E300A4 , +0x1D90 ,0x30E400A3 , +0x1D90 ,0x30E500A2 , +0x1D90 ,0x30E60086 , +0x1D90 ,0x30E70085 , +0x1D90 ,0x30E80084 , +0x1D90 ,0x30E90083 , +0x1D90 ,0x30EA0082 , +0x1D90 ,0x30EB0069 , +0x1D90 ,0x30EC0068 , +0x1D90 ,0x30ED0067 , +0x1D90 ,0x30EE0066 , +0x1D90 ,0x30EF0065 , +0x1D90 ,0x30F00064 , +0x1D90 ,0x30F10063 , +0x1D90 ,0x30F20044 , +0x1D90 ,0x30F30043 , +0x1D90 ,0x30F40042 , +0x1D90 ,0x30F50025 , +0x1D90 ,0x30F60024 , +0x1D90 ,0x30F70023 , +0x1D90 ,0x30F80022 , +0x1D90 ,0x30F90021 , +0x1D90 ,0x30FA0020 , +0x1D90 ,0x30FB0003 , +0x1D90 ,0x30FC0002 , +0x1D90 ,0x30FD0001 , +0x1D90 ,0x30FE0000 , +0x1D90 ,0x30FF0000 , +0x1D90 ,0x310001FF , +0x1D90 ,0x310101FF , +0x1D90 ,0x310201FF , +0x1D90 ,0x310301FF , +0x1D90 ,0x310401FF , +0x1D90 ,0x310501FF , +0x1D90 ,0x310601FF , +0x1D90 ,0x310701FF , +0x1D90 ,0x310801FF , +0x1D90 ,0x310901FE , +0x1D90 ,0x310A01FD , +0x1D90 ,0x310B01FC , +0x1D90 ,0x310C01FB , +0x1D90 ,0x310D01FA , +0x1D90 ,0x310E01F9 , +0x1D90 ,0x310F01F8 , +0x1D90 ,0x311001F7 , +0x1D90 ,0x311101F6 , +0x1D90 ,0x311201F5 , +0x1D90 ,0x311301F4 , +0x1D90 ,0x311401F3 , +0x1D90 ,0x311501F2 , +0x1D90 ,0x311601F1 , +0x1D90 ,0x311701F0 , +0x1D90 ,0x311801EF , +0x1D90 ,0x311901EE , +0x1D90 ,0x311A01ED , +0x1D90 ,0x311B01EC , +0x1D90 ,0x311C01EB , +0x1D90 ,0x311D0192 , +0x1D90 ,0x311E0191 , +0x1D90 ,0x311F0190 , +0x1D90 ,0x3120018F , +0x1D90 ,0x3121018E , +0x1D90 ,0x3122018D , +0x1D90 ,0x3123018C , +0x1D90 ,0x3124018B , +0x1D90 ,0x3125018A , +0x1D90 ,0x31260189 , +0x1D90 ,0x31270188 , +0x1D90 ,0x31280187 , +0x1D90 ,0x31290186 , +0x1D90 ,0x312A0185 , +0x1D90 ,0x312B0149 , +0x1D90 ,0x312C0148 , +0x1D90 ,0x312D0147 , +0x1D90 ,0x312E0146 , +0x1D90 ,0x312F0145 , +0x1D90 ,0x31300144 , +0x1D90 ,0x31310143 , +0x1D90 ,0x31320142 , +0x1D90 ,0x31330141 , +0x1D90 ,0x31340140 , +0x1D90 ,0x313500C7 , +0x1D90 ,0x313600C6 , +0x1D90 ,0x313700C5 , +0x1D90 ,0x313800C4 , +0x1D90 ,0x313900C3 , +0x1D90 ,0x313A0088 , +0x1D90 ,0x313B0087 , +0x1D90 ,0x313C0086 , +0x1D90 ,0x313D0045 , +0x1D90 ,0x313E0044 , +0x1D90 ,0x313F0043 , +0x1D90 ,0x314001FF , +0x1D90 ,0x314101FF , +0x1D90 ,0x314201FF , +0x1D90 ,0x314301FF , +0x1D90 ,0x314401FF , +0x1D90 ,0x314501FF , +0x1D90 ,0x314601FF , +0x1D90 ,0x314701FE , +0x1D90 ,0x314801FD , +0x1D90 ,0x314901FC , +0x1D90 ,0x314A01FB , +0x1D90 ,0x314B01FA , +0x1D90 ,0x314C01F9 , +0x1D90 ,0x314D01F8 , +0x1D90 ,0x314E01F7 , +0x1D90 ,0x314F01F6 , +0x1D90 ,0x315001F5 , +0x1D90 ,0x315101F4 , +0x1D90 ,0x315201F3 , +0x1D90 ,0x315301F2 , +0x1D90 ,0x315401F1 , +0x1D90 ,0x315501F0 , +0x1D90 ,0x315601EF , +0x1D90 ,0x315701EE , +0x1D90 ,0x315801ED , +0x1D90 ,0x315901EC , +0x1D90 ,0x315A01EB , +0x1D90 ,0x315B01EA , +0x1D90 ,0x315C01E9 , +0x1D90 ,0x315D018F , +0x1D90 ,0x315E018E , +0x1D90 ,0x315F018D , +0x1D90 ,0x3160018C , +0x1D90 ,0x3161018B , +0x1D90 ,0x3162018A , +0x1D90 ,0x31630189 , +0x1D90 ,0x31640188 , +0x1D90 ,0x31650187 , +0x1D90 ,0x31660186 , +0x1D90 ,0x31670185 , +0x1D90 ,0x31680184 , +0x1D90 ,0x31690183 , +0x1D90 ,0x316A0182 , +0x1D90 ,0x316B0149 , +0x1D90 ,0x316C0148 , +0x1D90 ,0x316D0147 , +0x1D90 ,0x316E0146 , +0x1D90 ,0x316F0145 , +0x1D90 ,0x31700144 , +0x1D90 ,0x31710143 , +0x1D90 ,0x31720142 , +0x1D90 ,0x31730141 , +0x1D90 ,0x31740140 , +0x1D90 ,0x317500C7 , +0x1D90 ,0x317600C6 , +0x1D90 ,0x317700C5 , +0x1D90 ,0x317800C4 , +0x1D90 ,0x317900C3 , +0x1D90 ,0x317A0088 , +0x1D90 ,0x317B0087 , +0x1D90 ,0x317C0086 , +0x1D90 ,0x317D0045 , +0x1D90 ,0x317E0044 , +0x1D90 ,0x317F0043 , +0x1D90 ,0x318001FE , +0x1D90 ,0x318101FD , +0x1D90 ,0x318201FC , +0x1D90 ,0x318301FB , +0x1D90 ,0x318401FA , +0x1D90 ,0x318501F9 , +0x1D90 ,0x318601F8 , +0x1D90 ,0x318701F7 , +0x1D90 ,0x318801F6 , +0x1D90 ,0x318901F5 , +0x1D90 ,0x318A01F4 , +0x1D90 ,0x318B01F3 , +0x1D90 ,0x318C01F2 , +0x1D90 ,0x318D01F1 , +0x1D90 ,0x318E01F0 , +0x1D90 ,0x318F01EF , +0x1D90 ,0x319001EE , +0x1D90 ,0x319101ED , +0x1D90 ,0x319201EC , +0x1D90 ,0x319301EB , +0x1D90 ,0x319401EA , +0x1D90 ,0x319501E9 , +0x1D90 ,0x3196018F , +0x1D90 ,0x3197018E , +0x1D90 ,0x3198018D , +0x1D90 ,0x3199018C , +0x1D90 ,0x319A018B , +0x1D90 ,0x319B018A , +0x1D90 ,0x319C0189 , +0x1D90 ,0x319D0188 , +0x1D90 ,0x319E0187 , +0x1D90 ,0x319F0186 , +0x1D90 ,0x31A00185 , +0x1D90 ,0x31A10184 , +0x1D90 ,0x31A20183 , +0x1D90 ,0x31A30182 , +0x1D90 ,0x31A40149 , +0x1D90 ,0x31A50148 , +0x1D90 ,0x31A60147 , +0x1D90 ,0x31A70146 , +0x1D90 ,0x31A80145 , +0x1D90 ,0x31A90144 , +0x1D90 ,0x31AA0143 , +0x1D90 ,0x31AB0142 , +0x1D90 ,0x31AC0141 , +0x1D90 ,0x31AD0140 , +0x1D90 ,0x31AE00C7 , +0x1D90 ,0x31AF00C6 , +0x1D90 ,0x31B000C5 , +0x1D90 ,0x31B100C4 , +0x1D90 ,0x31B200C3 , +0x1D90 ,0x31B30088 , +0x1D90 ,0x31B40087 , +0x1D90 ,0x31B50086 , +0x1D90 ,0x31B60045 , +0x1D90 ,0x31B70044 , +0x1D90 ,0x31B80043 , +0x1D90 ,0x31B90023 , +0x1D90 ,0x31BA0022 , +0x1D90 ,0x31BB0021 , +0x1D90 ,0x31BC0020 , +0x1D90 ,0x31BD0002 , +0x1D90 ,0x31BE0001 , +0x1D90 ,0x31BF0000 , +0x1D70 ,0x22222222 , +0x1D70 ,0x20202020 , +}; + +RTW_DECL_TABLE_PHY_COND (rtw8822c_agc, rtw_phy_cfg_agc); + +static const u32 rtw8822c_bb[] = { +0x1D0C ,0x00410000 , +0x1C3C ,0x01038040 , +0x1C90 ,0x00E49708 , +0x800 ,0x00000000 , +0x804 ,0xD6300000 , +0x808 ,0x60956093 , +0x80C ,0x00000025 , +0x810 ,0x11B019B0 , +0x814 ,0x00904080 , +0x818 ,0xC30056F1 , +0x81C ,0x00050000 , +0x820 ,0x11111133 , +0x824 ,0xC3C3CCC4 , +0x828 ,0x30FB186C , +0x82C ,0x185D6556 , +0x830 ,0x1751145B , +0x834 ,0x776995D7 , +0x838 ,0x74777A7D , +0x83C ,0xF9AA9982 , +0x840 ,0x89AA9ABB , +0x844 ,0x0DEEDDC1 , +0x848 ,0xCDEEDEFF , +0x84C ,0xFFFF5555 , +0x850 ,0x6F7A727D , +0x854 ,0x6C776F7A , +0x858 ,0x6F7A6C77 , +0x85C ,0x69746974 , +0x860 ,0x6F7A6C77 , +0x864 ,0x6C776C77 , +0x868 ,0x727D6F7A , +0x86C ,0x69D7B196 , +0x870 ,0x1A6D769B , +0x874 ,0x55823917 , +0x878 ,0x00C025BD , +0x87C ,0x4140557D , +0x880 ,0x9A1D9D47 , +0x884 ,0x1DE7134F , +0x888 ,0x2857A857 , +0x88C ,0x520E8A24 , +0x890 ,0x8F628C44 , +0x894 ,0x72745F43 , +0x898 ,0x03F02F0D , +0x89C ,0x5DB6886F , +0x8A0 ,0x07DC309F , +0x8A4 ,0x09412495 , +0x8A8 ,0x222222A9 , +0x8AC ,0x89628C44 , +0x8B0 ,0x72745F43 , +0x8B4 ,0x03F02F0D , +0x8B8 ,0x55B6886F , +0x8BC ,0x07D0309F , +0x8C0 ,0x70404023 , +0x8C4 ,0x00440001 , +0x8C8 ,0x7A7A2E26 , +0x8CC ,0x25297777 , +0x8D0 ,0x6CEB6DCE , +0x8D4 ,0x0005A632 , +0x8D8 ,0x00000000 , +0x8DC ,0x00000000 , +0x8E0 ,0x00000000 , +0x8E4 ,0x00000000 , +0x8E8 ,0x00000000 , +0x8EC ,0x00000000 , +0x8F0 ,0x00000000 , +0x8F4 ,0x00000000 , +0x8F8 ,0x25239843 , +0x900 ,0x00000000 , +0x904 ,0x00000000 , +0x908 ,0x000008CB , +0x90C ,0x00000000 , +0x910 ,0x00000000 , +0x914 ,0x20000000 , +0x918 ,0x20000000 , +0x91C ,0x20000000 , +0x920 ,0x20000000 , +0x924 ,0x00000000 , +0x928 ,0x0000003A , +0x92C ,0x0000003A , +0x930 ,0x0000003A , +0x934 ,0x0000003A , +0x938 ,0x0000000F , +0x93C ,0x00000000 , +0x940 ,0x4E1F3E81 , +0x944 ,0x4E1F3E81 , +0x948 ,0x4E1F3E81 , +0x94C ,0x4E1F3E81 , +0x950 ,0x03020100 , +0x954 ,0x07060504 , +0x958 ,0x0B0A0908 , +0x95C ,0x0F0E0D0C , +0x960 ,0x13121110 , +0x964 ,0x17161514 , +0x968 ,0x03020100 , +0x96C ,0x07060504 , +0x970 ,0x0B0A0908 , +0x974 ,0x0F0E0D0C , +0x978 ,0x13121110 , +0x97C ,0x17161514 , +0x980 ,0x03020100 , +0x984 ,0x07060504 , +0x988 ,0x0B0A0908 , +0x98C ,0x0F0E0D0C , +0x990 ,0x13121110 , +0x994 ,0x17161514 , +0x998 ,0x03020100 , +0x99C ,0x07060504 , +0x9A0 ,0x0B0A0908 , +0x9A4 ,0x0F0E0D0C , +0x9A8 ,0x13121110 , +0x9AC ,0x17161514 , +0x9B0 ,0x00002200 , +0x9B4 ,0xDB6FFF00 , +0x9B8 ,0x00400064 , +0x9BC ,0x00000000 , +0x9C0 ,0x01010101 , +0x9C4 ,0x00640064 , +0x9C8 ,0x00640064 , +0x9CC ,0x00007777 , +0x9D0 ,0x00000000 , +0x9D4 ,0x00000000 , +0x9D8 ,0x00000000 , +0x9DC ,0x00000000 , +0x9E0 ,0x00000000 , +0x9E4 ,0x00000000 , +0x9E8 ,0x00000000 , +0x9EC ,0x00000000 , +0x9F0 ,0x100024E0 , +0x9F4 ,0x00000000 , +0x9F8 ,0x00000000 , +0xA00 ,0x02001208 , +0xA04 ,0x00000000 , +0xA08 ,0x00000000 , +0xA0C ,0x00000000 , +0xA10 ,0x00000000 , +0xA14 ,0x00000000 , +0xA18 ,0x00000000 , +0xA1C ,0x00000000 , +0xA20 ,0xEB31B333 , +0xA24 ,0x00275485 , +0xA28 ,0x00166366 , +0xA2C ,0x00275485 , +0xA30 ,0x00166366 , +0xA34 ,0x00275485 , +0xA38 ,0x00200400 , +0xA3C ,0x00200400 , +0xA40 ,0xB35DC5BD , +0xA44 ,0x3033BEBD , +0xA48 ,0x2A521254 , +0xA4C ,0xA2733345 , +0xA50 ,0x617BE003 , +0xA54 ,0x50000968 , +0xA58 ,0x00020000 , +0xA5C ,0x01000000 , +0xA60 ,0x02000000 , +0xA64 ,0x03000000 , +0xA68 ,0x00020000 , +0xA6C ,0x00000000 , +0xA70 ,0x00000000 , +0xA74 ,0x00000000 , +0xA78 ,0x00000000 , +0xA7C ,0x00000000 , +0xA80 ,0x00000000 , +0xA84 ,0x00000000 , +0xA88 ,0x00000000 , +0xA8C ,0x00000000 , +0xA90 ,0x00000000 , +0xA94 ,0x00000000 , +0xA98 ,0x00000000 , +0xA9C ,0x00000000 , +0xAA0 ,0x00000000 , +0xAA4 ,0x00000000 , +0xAA8 ,0x00000000 , +0xAAC ,0x00000000 , +0xAB0 ,0x00000000 , +0xAB4 ,0x00000000 , +0xAB8 ,0x00000000 , +0xABC ,0x00000000 , +0xAC0 ,0x00000000 , +0xAC4 ,0x00000000 , +0xAC8 ,0x00000000 , +0xACC ,0x00000000 , +0xAD0 ,0x00000000 , +0xAD4 ,0x00000000 , +0xAD8 ,0x00000000 , +0xADC ,0x00000000 , +0xAE0 ,0x00000000 , +0xAE4 ,0x00000000 , +0xAE8 ,0x00000000 , +0xAEC ,0x00000000 , +0xAF0 ,0x00000000 , +0xAF4 ,0x00000000 , +0xAF8 ,0x00000000 , +0xB00 ,0x00000000 , +0xB04 ,0x00000000 , +0xB08 ,0x00000000 , +0xB0C ,0x00000000 , +0xB10 ,0x00000000 , +0xB14 ,0x00000000 , +0xB18 ,0x00000000 , +0xB1C ,0x00000000 , +0xB20 ,0x00000000 , +0xB24 ,0x00000000 , +0xB28 ,0x00000000 , +0xB2C ,0x00000000 , +0xB30 ,0x00000000 , +0xB34 ,0x00000000 , +0xB38 ,0x00000000 , +0xB3C ,0x00000000 , +0xB40 ,0x00000000 , +0xB44 ,0x00000000 , +0xB48 ,0x00000000 , +0xB4C ,0x00000000 , +0xB50 ,0x00000000 , +0xB54 ,0x00000000 , +0xB58 ,0x00060100 , +0xB5C ,0x00000000 , +0xB60 ,0x00000000 , +0xB64 ,0x00000000 , +0xB68 ,0x00000000 , +0xB6C ,0x00000000 , +0xB70 ,0x00000000 , +0xB74 ,0x00000000 , +0xB78 ,0x00000000 , +0xB7C ,0x00000000 , +0xB80 ,0x00000000 , +0xB84 ,0x00000000 , +0xB88 ,0x00000000 , +0xB8C ,0x00000000 , +0xB90 ,0x00000000 , +0xB94 ,0x00000000 , +0xB98 ,0x00000000 , +0xB9C ,0x00000000 , +0xBA0 ,0x00000000 , +0xBA4 ,0x00000000 , +0xBA8 ,0x00000000 , +0xBAC ,0x00000000 , +0xBB0 ,0x00000000 , +0xBB4 ,0x00000000 , +0xBB8 ,0x00000000 , +0xBBC ,0x00000000 , +0xBC0 ,0x00000000 , +0xBC4 ,0x00000000 , +0xBC8 ,0x00000000 , +0xBCC ,0x00000000 , +0xBD0 ,0x00000000 , +0xBD4 ,0x00000000 , +0xBD8 ,0x00000000 , +0xBDC ,0x00000000 , +0xBE0 ,0x00000000 , +0xBE4 ,0x00000000 , +0xBE8 ,0x00000000 , +0xBEC ,0x00000000 , +0xBF0 ,0x00000000 , +0xBF4 ,0x00000000 , +0xBF8 ,0x00000000 , +0xC00 ,0x1C8BA0D6 , +0xC04 ,0x00000001 , +0xC08 ,0x00000000 , +0xC0C ,0x02F1D8B7 , +0xC10 ,0x000000B0 , +0xC14 ,0x0000D891 , +0xC18 ,0x00087672 , +0xC1C ,0x15260000 , +0xC20 ,0x00000000 , +0xC24 ,0x40600000 , +0xC28 ,0x06400F76 , +0xC2C ,0xE30020E1 , +0xC30 ,0x140C9494 , +0xC34 ,0x00A04946 , +0xC38 ,0x011D4820 , +0xC3C ,0x168DB61B , +0xC40 ,0x009C50F8 , +0xC44 ,0x2013BAD1 , +0xC48 ,0xFFFFF7CC , +0xC4C ,0xA000FFFF , +0xC50 ,0x20D0F800 , +0xC54 ,0x941A0200 , +0xC58 ,0x18380111 , +0xC5C ,0x006E01B8 , +0xC60 ,0x2CA5555B , +0xC64 ,0x0210005F , +0xC68 ,0x039A5300 , +0xC6C ,0x0265C2BA , +0xC70 ,0x000CEB21 , +0xC74 ,0x0E149CA1 , +0xC78 ,0x1AB4956B , +0xC7C ,0x00000ABF , +0xC80 ,0xC02A8799 , +0xC84 ,0x06C636C6 , +0xC88 ,0x08090202 , +0xC8C ,0x00204048 , +0xC90 ,0x00F85F85 , +0xC94 ,0x00000F85 , +0xC98 ,0x58385858 , +0xC9C ,0x18382838 , +0xCA0 ,0x00002838 , +0xCA4 ,0x3A253A3A , +0xCA8 ,0x10251A25 , +0xCAC ,0x00001025 , +0xCB0 ,0x3A133A3A , +0xCB4 ,0x08130D13 , +0xCB8 ,0x00000813 , +0xCBC ,0x001F1066 , +0xCC0 ,0x88A00400 , +0xCC4 ,0x00200400 , +0xCC8 ,0x0B200400 , +0xCCC ,0x00600400 , +0xCD0 ,0x00000092 , +0xCD4 ,0x22220000 , +0xCD8 ,0x22222222 , +0xCDC ,0x22222222 , +0xCE0 ,0x22222222 , +0xCE4 ,0x22222222 , +0xCE8 ,0x00002222 , +0xCEC ,0x00000000 , +0xCF0 ,0x00000000 , +0xCF4 ,0x00000000 , +0xCF8 ,0x00000000 , +0xD00 ,0x1083A10A , +0xD04 ,0x0EC42948 , +0xD08 ,0x10852108 , +0xD0C ,0x0CC41D08 , +0xD10 ,0x108620EC , +0xD14 ,0x0CA42108 , +0xD18 ,0x107620E8 , +0xD1C ,0x0E742108 , +0xD20 ,0x0E8618C8 , +0xD24 ,0x00000108 , +0xD28 ,0x288C224C , +0xD2C ,0x11C6320C , +0xD30 ,0x30CEBD98 , +0xD34 ,0x10C31908 , +0xD38 ,0x310A318C , +0xD3C ,0x18C41D08 , +0xD40 ,0x28CC4190 , +0xD44 ,0x19062108 , +0xD48 ,0x294A5A17 , +0xD4C ,0x00000108 , +0xD50 ,0x10A3A908 , +0xD54 ,0x10842148 , +0xD58 ,0x14C5314A , +0xD5C ,0x1086258C , +0xD60 ,0x10A42948 , +0xD64 ,0x10842108 , +0xD68 ,0x08C42108 , +0xD6C ,0x10842148 , +0xD70 ,0x08822084 , +0xD74 ,0x10841D04 , +0xD78 ,0x08421088 , +0xD7C ,0x1083A104 , +0xD80 ,0x10842108 , +0xD84 ,0x1085294A , +0xD88 ,0x08822104 , +0xD8C ,0x10852948 , +0xD90 ,0x08421084 , +0xD94 ,0x10852104 , +0xD98 ,0x08421084 , +0xD9C ,0x10863184 , +0xDA0 ,0x1083B10A , +0xDA4 ,0x10842148 , +0xDA8 ,0x1984718C , +0xDAC ,0x108C33AF , +0xDB0 ,0x00000000 , +0xDB4 ,0x00000000 , +0xDB8 ,0x00000000 , +0xDBC ,0x00000000 , +0xDC0 ,0x00000000 , +0xDC4 ,0x00000000 , +0xDC8 ,0x00000000 , +0xDCC ,0x00000000 , +0xDD0 ,0x00000000 , +0xDD4 ,0x00000000 , +0xDD8 ,0x00000000 , +0xDDC ,0x00000000 , +0xDE0 ,0x00000000 , +0xDE4 ,0x00000000 , +0xDE8 ,0x00000000 , +0xDEC ,0x00000000 , +0xDF0 ,0x00000000 , +0xDF4 ,0x00000000 , +0xDF8 ,0x00000000 , +0x1800 ,0x00033312 , +0x1804 ,0x00033312 , +0x180C ,0x17F40060 , +0x1810 ,0x62F508C4 , +0x1814 ,0x506AA5B4 , +0x1818 ,0x000014FF , +0x181C ,0x00000000 , +0x1820 ,0x02D508CC , +0x1824 ,0x506AA5B4 , +0x1828 ,0x000004FD , +0x182C ,0x00000000 , +0x1834 ,0x00000000 , +0x1838 ,0x20000000 , +0x183C ,0x00000000 , +0x1840 ,0x00000000 , +0x1844 ,0x00000000 , +0x1848 ,0x00000000 , +0x184C ,0x00000000 , +0x1850 ,0x00000000 , +0x1854 ,0x00000000 , +0x1858 ,0x00000000 , +0x185C ,0x00000000 , +0x1860 ,0xF0040FF8 , +0x1864 ,0x7F000000 , +0x1868 ,0x00000000 , +0x186C ,0x0000FF00 , +0x1870 ,0x00000000 , +0x1874 ,0x00000000 , +0x1878 ,0x00000000 , +0x187C ,0x00000000 , +0x1880 ,0x00000000 , +0x1884 ,0x02B00000 , +0x1888 ,0x00000000 , +0x188C ,0x00000000 , +0x1890 ,0x00000000 , +0x1894 ,0x00000000 , +0x1898 ,0x00000000 , +0x18A0 ,0x00510000 , +0x18A4 ,0x183C1F7F , +0x18A8 ,0x0A02C99A , +0x18AC ,0x00004200 , +0x18B0 ,0x0809FB08 , +0x18B0 ,0x0809FB09 , +0x18B4 ,0x00000000 , +0x18B8 ,0x00000000 , +0x18BC ,0x00C3FF80 , +0x18C0 ,0x0002D100 , +0x18C4 ,0x00000004 , +0x18C8 ,0x001FFFE0 , +0x18CC ,0x0809FB08 , +0x18CC ,0x0809FB09 , +0x18D0 ,0x00000000 , +0x18D4 ,0x00000000 , +0x18D8 ,0x00C3FF80 , +0x18DC ,0x0002D100 , +0x18E0 ,0x00000004 , +0x18E4 ,0x001FFFE0 , +0x18E8 ,0x00800000 , +0x18EC ,0x1EC08000 , +0x18F0 ,0x7F000064 , +0x18F4 ,0x1F7DE75C , +0x18F8 ,0x7F7F7F7F , +0x18FC ,0x7F7F7F7F , +0x1900 ,0xA7A7A7A7 , +0x1904 ,0x95959595 , +0x1908 ,0x00777788 , +0x190C ,0x77776666 , +0x1910 ,0x00033333 , +0x1914 ,0xAAAC875A , +0x1918 ,0x2AA2A8A2 , +0x191C ,0x2AAAA8A2 , +0x1920 ,0x00878766 , +0x1924 ,0x000C4924 , +0x1928 ,0x5669B6C0 , +0x192C ,0x00409190 , +0x1930 ,0xB85C0492 , +0x1934 ,0x00B4A298 , +0x1938 ,0x00030151 , +0x193C ,0x0058C618 , +0x1940 ,0x41000000 , +0x1944 ,0x00000BCB , +0x1948 ,0xAAAAAAAA , +0x194C ,0x00B99999 , +0x1950 ,0x88886665 , +0x1954 ,0x08888888 , +0x1958 ,0x00000618 , +0x195C ,0x00000000 , +0x1960 ,0x00000000 , +0x1964 ,0x00000000 , +0x1968 ,0x00000000 , +0x196C ,0x00000000 , +0x1970 ,0x00000000 , +0x1974 ,0x00000000 , +0x1978 ,0x00000000 , +0x197C ,0x00000000 , +0x1980 ,0x00000000 , +0x1984 ,0x00000000 , +0x1988 ,0x00000000 , +0x198C ,0x00000000 , +0x1990 ,0x00000000 , +0x1994 ,0x00000000 , +0x1998 ,0x00000000 , +0x199C ,0x00000000 , +0x19A0 ,0x00000000 , +0x19A4 ,0x00000000 , +0x19A8 ,0x00000000 , +0x19AC ,0x00000000 , +0x19B0 ,0x00000000 , +0x19B4 ,0x00000000 , +0x19B8 ,0x00000000 , +0x19BC ,0x00000000 , +0x19C0 ,0x00000000 , +0x19C4 ,0x00000000 , +0x19C8 ,0x00000000 , +0x19CC ,0x00000000 , +0x19D0 ,0x00000000 , +0x19D4 ,0x00000000 , +0x19D8 ,0x00000000 , +0x19DC ,0x00000000 , +0x19E0 ,0x00000000 , +0x19E4 ,0x00000000 , +0x19E8 ,0x00000000 , +0x19EC ,0x00000000 , +0x19F0 ,0x00000000 , +0x19F4 ,0x00000000 , +0x19F8 ,0x00000000 , +0x1C00 ,0x00000000 , +0x1C04 ,0x00000000 , +0x1C08 ,0x00000000 , +0x1C0C ,0x00000000 , +0x1C10 ,0x00000000 , +0x1C14 ,0x00000000 , +0x1C18 ,0x00000000 , +0x1C1C ,0x00000000 , +0x1C20 ,0x03C23F00 , +0x1C24 ,0xF101F002 , +0x1C28 ,0x0FFE0010 , +0x1C2C ,0x453090FF , +0x1C30 ,0xFE0090FE , +0x1C34 ,0xE4E42000 , +0x1C38 ,0xFFA1005E , +0x1C40 ,0x8F588837 , +0x1C44 ,0x04400300 , +0x1C48 ,0x00000000 , +0x1C4C ,0x00000200 , +0x1C50 ,0x8E588837 , +0x1C54 ,0x04400300 , +0x1C58 ,0x00000000 , +0x1C5C ,0xFFFFFFFF , +0x1C60 ,0x0F030032 , +0x1C64 ,0x360F0000 , +0x1C68 ,0x007F0000 , +0x1C6C ,0x00010000 , +0x1C70 ,0x00037FFE , +0x1C74 ,0x00000000 , +0x1C78 ,0x00020000 , +0x1C7C ,0x00310000 , +0x1C80 ,0x0E38E000 , +0x1C84 ,0x245120D4 , +0x1C88 ,0xC8400483 , +0x1C8C ,0x40005A20 , +0x1C94 ,0x00000000 , +0x1C98 ,0x00000000 , +0x1C9C ,0x00000000 , +0x1CA0 ,0x00000000 , +0x1CA4 ,0x20000000 , +0x1CA8 ,0x0E000000 , +0x1CAC ,0xE424A2CC , +0x1CB0 ,0x00000000 , +0x1CB4 ,0x00000000 , +0x1CB8 ,0x24800000 , +0x1CBC ,0x60004800 , +0x1CC0 ,0x24800000 , +0x1CC4 ,0x60004800 , +0x1CC8 ,0xF0444900 , +0x1CCC ,0x030300F1 , +0x1CD0 ,0x0F000000 , +0x1CD4 ,0x02024B00 , +0x1CD8 ,0x04000000 , +0x1CDC ,0x10000000 , +0x1CE0 ,0x60000000 , +0x1CE4 ,0x00000000 , +0x1CE8 ,0xC0000000 , +0x1CEC ,0x00000000 , +0x1CF0 ,0x00000000 , +0x1CF4 ,0xE4000000 , +0x1CF8 ,0x00000000 , +0x1D00 ,0x00000000 , +0x1D04 ,0x08A3C000 , +0x1D08 ,0xA0000000 , +0x1D10 ,0x08B5BBBB , +0x1D14 ,0x77777777 , +0x1D18 ,0x99999999 , +0x1D1C ,0x99999999 , +0x1D20 ,0x000081E0 , +0x1D24 ,0x00000000 , +0x1D28 ,0x00000000 , +0x1D2C ,0xC0000000 , +0x1D30 ,0x50009C00 , +0x1D34 ,0x00000000 , +0x1D38 ,0x00000000 , +0x1D3C ,0xF8000000 , +0x1D40 ,0x00000000 , +0x1D44 ,0x74740000 , +0x1D48 ,0x14147474 , +0x1D4C ,0x00FFFF14 , +0x1D50 ,0x00000000 , +0x1D54 ,0x03A00000 , +0x1D58 ,0x80800000 , +0x1D5C ,0x00000000 , +0x1D60 ,0x00000000 , +0x1D64 ,0x88000000 , +0x1D68 ,0x00000000 , +0x1D6C ,0x666D8001 , +0x1D70 ,0x20202020 , +0x1D74 ,0x4E4E4E4E , +0x1D78 ,0x18189818 , +0x1D7C ,0x0005A000 , +0x1D80 ,0x00080000 , +0x1D84 ,0x00080000 , +0x1D88 ,0x000000EF , +0x1D8C ,0x0C0C0C0C , +0x1D90 ,0x103F003F , +0x1D94 ,0x00000000 , +0x1D98 ,0x00000000 , +0x1D9C ,0x00000000 , +0x1DA0 ,0x00000000 , +0x1DA4 ,0x00000000 , +0x1DA8 ,0x00000000 , +0x1DAC ,0x00000000 , +0x1DB0 ,0x00000000 , +0x1DB4 ,0x00000000 , +0x1DB8 ,0x00000000 , +0x1DBC ,0x00000000 , +0x1DC0 ,0x00000000 , +0x1DC4 ,0x00000000 , +0x1DC8 ,0x00000000 , +0x1DCC ,0x00000000 , +0x1DD0 ,0x00000000 , +0x1DD4 ,0x00000000 , +0x1DD8 ,0x00000000 , +0x1DDC ,0x1FDF0000 , +0x1DE0 ,0x01010000 , +0x1DE4 ,0x05210123 , +0x1DE8 ,0xFFFF4848 , +0x1DEC ,0x00000000 , +0x1DF0 ,0x00000000 , +0x1DF4 ,0x80000002 , +0x1DF8 ,0x00000000 , +0x1E00 ,0x00000000 , +0x1E04 ,0x00000000 , +0x1E08 ,0x00000000 , +0x1E0C ,0x00000000 , +0x1E10 ,0x00000000 , +0x1E14 ,0x00000000 , +0x1E18 ,0x00000000 , +0x1E1C ,0x00000000 , +0x1E20 ,0x00000000 , +0x1E24 ,0x80003000 , +0x1E28 ,0x000CC0C3 , +0x1E2C ,0xE4E40404 , +0x1E30 ,0xE4E4E4E4 , +0x1E34 ,0xF3001234 , +0x1E38 ,0x00000000 , +0x1E3C ,0x00000000 , +0x1E40 ,0x00000000 , +0x1E44 ,0x00000000 , +0x1E48 ,0x00000000 , +0x1E4C ,0x00000000 , +0x1E50 ,0x00000000 , +0x1E54 ,0x00000000 , +0x1E58 ,0x00000000 , +0x1E5C ,0xC1000000 , +0x1E60 ,0x00000000 , +0x1E64 ,0xF3A00001 , +0x1E68 ,0x0028846E , +0x1E6C ,0x40274906 , +0x1E70 ,0x00001000 , +0x1E74 ,0x00000000 , +0x1E78 ,0x00000000 , +0x1E7C ,0x00000000 , +0x1E80 ,0x00000000 , +0x1E84 ,0x00000000 , +0x1E84 ,0x40000000 , +0x1E84 ,0x41000000 , +0x1E84 ,0x42000000 , +0x1E84 ,0x43000000 , +0x1E84 ,0x44000000 , +0x1E84 ,0x45000000 , +0x1E84 ,0x46000000 , +0x1E84 ,0x47000000 , +0x1E84 ,0x48000000 , +0x1E84 ,0x49000000 , +0x1E84 ,0x4A000000 , +0x1E84 ,0x4B000000 , +0x1E84 ,0x4C000000 , +0x1E84 ,0x4D000000 , +0x1E84 ,0x4E000000 , +0x1E84 ,0x4F000000 , +0x1E84 ,0x50000000 , +0x1E84 ,0x51000000 , +0x1E84 ,0x52000000 , +0x1E84 ,0x53000000 , +0x1E84 ,0x54000000 , +0x1E84 ,0x55000000 , +0x1E84 ,0x56000000 , +0x1E84 ,0x57000000 , +0x1E84 ,0x58000000 , +0x1E84 ,0x59000000 , +0x1E84 ,0x5A000000 , +0x1E84 ,0x5B000000 , +0x1E84 ,0x5C000000 , +0x1E84 ,0x5D000000 , +0x1E84 ,0x5E000000 , +0x1E84 ,0x5F000000 , +0x1E84 ,0x60000000 , +0x1E84 ,0x61000000 , +0x1E84 ,0x62000000 , +0x1E84 ,0x63000000 , +0x1E84 ,0x64000000 , +0x1E84 ,0x65000000 , +0x1E84 ,0x66000000 , +0x1E84 ,0x67000000 , +0x1E84 ,0x68000000 , +0x1E84 ,0x69000000 , +0x1E84 ,0x6A000000 , +0x1E84 ,0x6B000000 , +0x1E84 ,0x6C000000 , +0x1E84 ,0x6D000000 , +0x1E84 ,0x6E000000 , +0x1E84 ,0x6F000000 , +0x1E84 ,0x70000000 , +0x1E84 ,0x71000000 , +0x1E84 ,0x72000000 , +0x1E84 ,0x73000000 , +0x1E84 ,0x74000000 , +0x1E84 ,0x75000000 , +0x1E84 ,0x76000000 , +0x1E84 ,0x77000000 , +0x1E84 ,0x78000000 , +0x1E84 ,0x79000000 , +0x1E84 ,0x7A000000 , +0x1E84 ,0x7B000000 , +0x1E84 ,0x7C000000 , +0x1E84 ,0x7D000000 , +0x1E84 ,0x7E000000 , +0x1E84 ,0x7F000000 , +0x1E84 ,0x80000000 , +0x1E84 ,0x00000000 , +0x1E88 ,0x0200FC1C , +0x1E8C ,0x00000000 , +0x1E90 ,0x00000000 , +0x1E94 ,0x04000000 , +0x1E98 ,0x00000000 , +0x1E9C ,0x00000000 , +0x1EA0 ,0x00000000 , +0x1EA4 ,0x00000000 , +0x1EA8 ,0xAA464646 , +0x1EAC ,0x01800030 , +0x1EB0 ,0x00003002 , +0x1EB4 ,0x31800002 , +0x1EB8 ,0x00000000 , +0x1EBC ,0x00000000 , +0x1EC0 ,0x00000000 , +0x1EC4 ,0x00000000 , +0x1EC8 ,0x00000000 , +0x1ECC ,0x00000000 , +0x1ED0 ,0x00000000 , +0x1ED4 ,0x8000000A , +0x1ED8 ,0x800B03E8 , +0x1EDC ,0x83E90FFF , +0x1EE0 ,0x8000FFFF , +0x1EE4 ,0x70000000 , +0x1EE8 ,0x00000000 , +0x1EEC ,0x0280A933 , +0x1EF0 ,0x00000A80 , +0x1EF4 ,0x00001266 , +0x1EF8 ,0x01000100 , +0x3A00 ,0x0004080C , +0x3A04 ,0x1C202428 , +0x3A08 ,0x0C101418 , +0x3A0C ,0x181C2024 , +0x3A10 ,0x080C1014 , +0x3A14 ,0x181C2024 , +0x3A18 ,0x080C1014 , +0x3A1C ,0x00000000 , +0x3A20 ,0x00000000 , +0x3A24 ,0x00000000 , +0x3A28 ,0x00000000 , +0x3A2C ,0x181C2024 , +0x3A30 ,0x080C1014 , +0x3A34 ,0x20240004 , +0x3A38 ,0x1014181C , +0x3A3C ,0x0004080C , +0x3A40 ,0x00000000 , +0x3A44 ,0x00000000 , +0x3A48 ,0x00000000 , +0x3A4C ,0x00000000 , +0x3A50 ,0x00000000 , +0x3A54 ,0x00000000 , +0x3A58 ,0x00000000 , +0x3A5C ,0x00000000 , +0x3A60 ,0x00000000 , +0x3A64 ,0x00000000 , +0x3A68 ,0x00000000 , +0x3A6C ,0x00000000 , +0x3A70 ,0x00000000 , +0x3A74 ,0x00000000 , +0x3A78 ,0x00000000 , +0x3A7C ,0x00000000 , +0x3A80 ,0x00000000 , +0x3A84 ,0x00000000 , +0x3A88 ,0x00000000 , +0x3A8C ,0x00000000 , +0x3A90 ,0x00000000 , +0x3A94 ,0x00000000 , +0x3A98 ,0x00000000 , +0x3A9C ,0x00000000 , +0x3AA0 ,0x00000000 , +0x3AA4 ,0x00000000 , +0x4000 ,0xA6A6A6A6 , +0x4004 ,0x95959595 , +0x4008 ,0x00777777 , +0x400C ,0x77776666 , +0x4010 ,0x00033333 , +0x4014 ,0xAAAC875A , +0x4018 ,0x2AA2A8A2 , +0x401C ,0x2AAAA8A2 , +0x4020 ,0x00878766 , +0x4024 ,0x000C4924 , +0x4028 ,0x5669B6C0 , +0x402C ,0x00409190 , +0x4030 ,0xB85C0492 , +0x4034 ,0x00B4A298 , +0x4038 ,0x00030151 , +0x403C ,0x0058C618 , +0x4040 ,0x41000000 , +0x4044 ,0x00000BCB , +0x4048 ,0xAAAAAAAA , +0x404C ,0x00B98989 , +0x4050 ,0x88886665 , +0x4054 ,0x08888888 , +0x4058 ,0x00000618 , +0x405C ,0x00000000 , +0x4060 ,0x00000000 , +0x4064 ,0x00000000 , +0x4068 ,0x00000000 , +0x406C ,0x00000000 , +0x4070 ,0x00000000 , +0x4074 ,0x00000000 , +0x4078 ,0x00000000 , +0x407C ,0x00000000 , +0x4080 ,0x00000000 , +0x4084 ,0x00000000 , +0x4088 ,0x00000000 , +0x408C ,0x00000000 , +0x4090 ,0x00000000 , +0x4094 ,0x00000000 , +0x4098 ,0x00000000 , +0x409C ,0x00000000 , +0x40A0 ,0x00000000 , +0x40A4 ,0x00000000 , +0x40A8 ,0x00000000 , +0x40AC ,0x00000000 , +0x40B0 ,0x00000000 , +0x40B4 ,0x00000000 , +0x40B8 ,0x00000000 , +0x40BC ,0x00000000 , +0x40C0 ,0x00000000 , +0x40C4 ,0x00000000 , +0x40C8 ,0x00000000 , +0x40CC ,0x00000000 , +0x40D0 ,0x00000000 , +0x40D4 ,0x00000000 , +0x40D8 ,0x00000000 , +0x40DC ,0x00000000 , +0x40E0 ,0x00000000 , +0x40E4 ,0x00000000 , +0x40E8 ,0x00000000 , +0x40EC ,0x00000000 , +0x40F0 ,0x00000000 , +0x40F4 ,0x00000000 , +0x40F8 ,0x00000000 , +0x4100 ,0x00033312 , +0x4104 ,0x00033312 , +0x410C ,0x17F40060 , +0x4110 ,0x62D508C4 , +0x4114 ,0x506AA5B4 , +0x4118 ,0x000014FF , +0x411C ,0x00000000 , +0x4120 ,0x02D508CC , +0x4124 ,0x506AA5B4 , +0x4128 ,0x000004FD , +0x412C ,0x00000000 , +0x4134 ,0x00000000 , +0x4138 ,0x20000000 , +0x413C ,0x00000000 , +0x4140 ,0x00000000 , +0x4144 ,0x00000000 , +0x4148 ,0x00000000 , +0x414C ,0x00000000 , +0x4150 ,0x00000000 , +0x4154 ,0x00000000 , +0x4158 ,0x00000000 , +0x415C ,0x00000000 , +0x4160 ,0xF0040FF8 , +0x4164 ,0x7F000000 , +0x4168 ,0x00000000 , +0x416C ,0x00008000 , +0x4170 ,0x00000000 , +0x4174 ,0x00000000 , +0x4178 ,0x00000000 , +0x417C ,0x00000000 , +0x4180 ,0x00000000 , +0x4184 ,0x02B00000 , +0x4188 ,0x00000000 , +0x418C ,0x00000000 , +0x4190 ,0x00000000 , +0x4194 ,0x00000000 , +0x4198 ,0x00000000 , +0x41A0 ,0x00510000 , +0x41A4 ,0x183C1F7F , +0x41A8 ,0x1402C99A , +0x41AC ,0x00004200 , +0x41B0 ,0x0809FB08 , +0x41B0 ,0x0809FB09 , +0x41B4 ,0x00000000 , +0x41B8 ,0x00000000 , +0x41BC ,0x00C3FF80 , +0x41C0 ,0x0002D100 , +0x41C4 ,0x00000004 , +0x41C8 ,0x001FFFE0 , +0x41CC ,0x0809FB08 , +0x41CC ,0x0809FB09 , +0x41D0 ,0x00000000 , +0x41D4 ,0x00000000 , +0x41D8 ,0x00C3FF80 , +0x41DC ,0x0002D100 , +0x41E0 ,0x00000004 , +0x41E4 ,0x001FFFE0 , +0x41E8 ,0x00000200 , +0x41EC ,0x1E008000 , +0x41F0 ,0x7F000064 , +0x41F4 ,0x1F7DE75C , +0x41F8 ,0x7F7F7F7F , +0x41FC ,0x7F7F7F7F , +0x1830 ,0x700B8001 , +0x1830 ,0x700B8001 , +0x1830 ,0x70144001 , +0x1830 ,0x70244001 , +0x1830 ,0x70344001 , +0x1830 ,0x70444001 , +0x1830 ,0x705B8001 , +0x1830 ,0x70644001 , +0x1830 ,0x707B8001 , +0x1830 ,0x708B8001 , +0x1830 ,0x709B8001 , +0x1830 ,0x70AB8001 , +0x1830 ,0x70BB8001 , +0x1830 ,0x70CB8001 , +0x1830 ,0x70DB8001 , +0x1830 ,0x70EB8001 , +0x1830 ,0x70FB8001 , +0x1830 ,0x70FB8001 , +0x4130 ,0x700B8001 , +0x4130 ,0x700B8001 , +0x4130 ,0x70144001 , +0x4130 ,0x70244001 , +0x4130 ,0x70344001 , +0x4130 ,0x70444001 , +0x4130 ,0x705B8001 , +0x4130 ,0x70644001 , +0x4130 ,0x707B8001 , +0x4130 ,0x708B8001 , +0x4130 ,0x709B8001 , +0x4130 ,0x70AB8001 , +0x4130 ,0x70BB8001 , +0x4130 ,0x70CB8001 , +0x4130 ,0x70DB8001 , +0x4130 ,0x70EB8001 , +0x4130 ,0x70FB8001 , +0x4130 ,0x70FB8001 , +0x1A00 ,0x00D047C8 , +0x1A04 ,0xC0000008 , +0x1A08 ,0x88838300 , +0x1A0C ,0x2E20100F , +0x1A10 ,0x9500BB78 , +0x1A14 ,0x111440A8 , +0x1A18 ,0x00881117 , +0x1A1C ,0x89140F00 , +0x1A20 ,0x52840000 , +0x1A24 ,0x3E18FEC8 , +0x1A28 ,0x00150A88 , +0x1A2C ,0x12988000 , +0x1A30 ,0x10114007 , +0x1A34 ,0x1011C007 , +0x1A38 ,0x00000000 , +0x1A3C ,0x00000000 , +0x1A40 ,0x00000000 , +0x1A44 ,0x00000000 , +0x1A48 ,0x000C0000 , +0x1A4C ,0xB00000C0 , +0x1A50 ,0x22040700 , +0x1A54 ,0x09003000 , +0x1A58 ,0x00000881 , +0x1A5C ,0x00000128 , +0x1A60 ,0x85830000 , +0x1A64 ,0x00000128 , +0x1A68 ,0x00222211 , +0x1A6C ,0x00000000 , +0x1A70 ,0x00008000 , +0x1A74 ,0x00000048 , +0x1A78 ,0x000089F0 , +0x1A7C ,0x225B0606 , +0x1A80 ,0x208A7532 , +0x1A84 ,0x85200200 , +0x1A88 ,0x048C0000 , +0x1A8C ,0x00000000 , +0x1A90 ,0x00000000 , +0x1A94 ,0x00000000 , +0x1A98 ,0xACC4C040 , +0x1A9C ,0x0016C8B2 , +0x1AA0 ,0x00FAF0DE , +0x1AA4 ,0x00020000 , +0x1AA8 ,0xBA0F0004 , +0x1AAC ,0x00122344 , +0x1AB0 ,0x0FFFFFFF , +0x1AB4 ,0x0F201402 , +0x1AB8 ,0x00000000 , +0x1ABC ,0xC2008080 , +0x1AC0 ,0x54D0A742 , +0x1AC4 ,0x00000000 , +0x1AC8 ,0x00000807 , +0x1ACC ,0x00000707 , +0x1AD0 ,0xA33529AD , +0x1AD4 ,0x0D8D8452 , +0x1AD8 ,0x08024024 , +0x1ADC ,0x000DB001 , +0x1AE0 ,0x00600391 , +0x1AE4 ,0x08000080 , +0x1AE8 ,0x00000002 , +0x1AEC ,0x00000000 , +0x1AF0 ,0x00000000 , +0x1AF4 ,0x00000000 , +0x1AF8 ,0x00000000 , +0x1AFC ,0x00000000 , +0x1D0C ,0x00400000 , +0x1D0C ,0x00410000 , +0x1EE8 ,0x00000003 , +0xC0C ,0x02F1D8BF , +0x1D94 ,0x40000000 , +0x1D94 ,0x40010000 , +0x1D94 ,0x40020000 , +0x1D94 ,0x40030000 , +0x1D94 ,0x40040000 , +0x1D94 ,0x40050000 , +0x1D94 ,0x40060000 , +0x1D94 ,0x40070000 , +0x1D94 ,0x40080000 , +0x1D94 ,0x40090000 , +0x1D94 ,0x400A0000 , +0x1D94 ,0x400B0000 , +0x1D94 ,0x400C0000 , +0x1D94 ,0x400D0000 , +0x1D94 ,0x400E0000 , +0x1D94 ,0x400F0000 , +0x1D94 ,0x40100000 , +0x1D94 ,0x40110000 , +0x1D94 ,0x40120000 , +0x1D94 ,0x40130000 , +0x1D94 ,0x40140000 , +0x1D94 ,0x40150000 , +0x1D94 ,0x40160000 , +0x1D94 ,0x40170000 , +0x1D94 ,0x40180000 , +0x1D94 ,0x40190000 , +0x1D94 ,0x401A0000 , +0x1D94 ,0x401B0000 , +0x1D94 ,0x401C0000 , +0x1D94 ,0x401D0000 , +0x1D94 ,0x401E0000 , +0x1D94 ,0x401F0000 , +0x1D94 ,0x40200000 , +0x1D94 ,0x40210000 , +0x1D94 ,0x40220000 , +0x1D94 ,0x40230000 , +0x1D94 ,0x40240000 , +0x1D94 ,0x40250000 , +0x1D94 ,0x40260000 , +0x1D94 ,0x40270000 , +0x1D94 ,0x40280000 , +0x1D94 ,0x40290000 , +0x1D94 ,0x402A0000 , +0x1D94 ,0x402B0000 , +0x1D94 ,0x402C0000 , +0x1D94 ,0x402D0000 , +0x1D94 ,0x402E0000 , +0x1D94 ,0x402F0000 , +0x1D94 ,0x40300000 , +0x1D94 ,0x40310000 , +0x1D94 ,0x40320000 , +0x1D94 ,0x40330000 , +0x1D94 ,0x40340000 , +0x1D94 ,0x40350000 , +0x1D94 ,0x40360000 , +0x1D94 ,0x40370000 , +0x1D94 ,0x40380000 , +0x1D94 ,0x40390000 , +0x1D94 ,0x403A0000 , +0x1D94 ,0x403B0000 , +0x1D94 ,0x403C0000 , +0x1D94 ,0x403D0000 , +0x1D94 ,0x403E0000 , +0x1D94 ,0x403F0000 , +0x1D94 ,0x40400000 , +0x1D94 ,0x40410000 , +0x1D94 ,0x40420000 , +0x1D94 ,0x40430000 , +0x1D94 ,0x40440000 , +0x1D94 ,0x40450000 , +0x1D94 ,0x40460000 , +0x1D94 ,0x40470000 , +0x1D94 ,0x40480000 , +0x1D94 ,0x40490000 , +0x1D94 ,0x404A0000 , +0x1D94 ,0x404B0000 , +0x1D94 ,0x404C0000 , +0x1D94 ,0x404D0000 , +0x1D94 ,0x404E0000 , +0x1D94 ,0x404F0000 , +0x1D94 ,0x40500000 , +0x1D94 ,0x40510000 , +0x1D94 ,0x40520000 , +0x1D94 ,0x40530000 , +0x1D94 ,0x40540000 , +0x1D94 ,0x40550000 , +0x1D94 ,0x40560000 , +0x1D94 ,0x40570000 , +0x1D94 ,0x40580000 , +0x1D94 ,0x40590000 , +0x1D94 ,0x405A0000 , +0x1D94 ,0x405B0000 , +0x1D94 ,0x405C0000 , +0x1D94 ,0x405D0000 , +0x1D94 ,0x405E0000 , +0x1D94 ,0x405F0000 , +0x1D94 ,0x40600000 , +0x1D94 ,0x40610000 , +0x1D94 ,0x40620000 , +0x1D94 ,0x40630000 , +0x1D94 ,0x40640000 , +0x1D94 ,0x40650000 , +0x1D94 ,0x40660000 , +0x1D94 ,0x40670000 , +0x1D94 ,0x40680000 , +0x1D94 ,0x40690000 , +0x1D94 ,0x406A0000 , +0x1D94 ,0x406B0000 , +0x1D94 ,0x406C0000 , +0x1D94 ,0x406D0000 , +0x1D94 ,0x406E0000 , +0x1D94 ,0x406F0000 , +0x1D94 ,0x40700000 , +0x1D94 ,0x40710000 , +0x1D94 ,0x40720000 , +0x1D94 ,0x40730000 , +0x1D94 ,0x40740000 , +0x1D94 ,0x40750000 , +0x1D94 ,0x40760000 , +0x1D94 ,0x40770000 , +0x1D94 ,0x40780000 , +0x1D94 ,0x40790000 , +0x1D94 ,0x407A0000 , +0x1D94 ,0x407B0000 , +0x1D94 ,0x407C0000 , +0x1D94 ,0x407D0000 , +0x1D94 ,0x407E0000 , +0x1D94 ,0x407F0000 , +0x1D94 ,0x40800000 , +0x1D94 ,0x40810000 , +0x1D94 ,0x40820000 , +0x1D94 ,0x40830000 , +0x1D94 ,0x40840000 , +0x1D94 ,0x40850000 , +0x1D94 ,0x40860000 , +0x1D94 ,0x40870000 , +0x1D94 ,0x40880000 , +0x1D94 ,0x40890000 , +0x1D94 ,0x408A0000 , +0x1D94 ,0x408B0000 , +0x1D94 ,0x408C0000 , +0x1D94 ,0x408D0000 , +0x1D94 ,0x408E0000 , +0x1D94 ,0x408F0000 , +0x1D94 ,0x40900000 , +0x1D94 ,0x40910000 , +0x1D94 ,0x40920000 , +0x1D94 ,0x40930000 , +0x1D94 ,0x40940000 , +0x1D94 ,0x40950000 , +0x1D94 ,0x40960000 , +0x1D94 ,0x40970000 , +0x1D94 ,0x40980000 , +0x1D94 ,0x40990000 , +0x1D94 ,0x409A0000 , +0x1D94 ,0x409B0000 , +0x1D94 ,0x409C0000 , +0x1D94 ,0x409D0000 , +0x1D94 ,0x409E0000 , +0x1D94 ,0x409F0000 , +0x1D94 ,0x40A00000 , +0x1D94 ,0x40A10000 , +0x1D94 ,0x40A20000 , +0x1D94 ,0x40A30000 , +0x1D94 ,0x40A40000 , +0x1D94 ,0x40A50000 , +0x1D94 ,0x40A60000 , +0x1D94 ,0x40A70000 , +0x1D94 ,0x40A80000 , +0x1D94 ,0x40A90000 , +0x1D94 ,0x40AA0000 , +0x1D94 ,0x40AB0000 , +0x1D94 ,0x40AC0000 , +0x1D94 ,0x40AD0000 , +0x1D94 ,0x40AE0000 , +0x1D94 ,0x40AF0000 , +0x1D94 ,0x40B00000 , +0x1D94 ,0x40B10000 , +0x1D94 ,0x40B20000 , +0x1D94 ,0x40B30000 , +0x1D94 ,0x40B40000 , +0x1D94 ,0x40B50000 , +0x1D94 ,0x40B60000 , +0x1D94 ,0x40B70000 , +0x1D94 ,0x40B80000 , +0x1D94 ,0x40B90000 , +0x1D94 ,0x40BA0000 , +0x1D94 ,0x40BB0000 , +0x1D94 ,0x40BC0000 , +0x1D94 ,0x40BD0000 , +0x1D94 ,0x40BE0000 , +0x1D94 ,0x40BF0000 , +0x1D94 ,0x40C00000 , +0x1D94 ,0x40C10000 , +0x1D94 ,0x40C20000 , +0x1D94 ,0x40C30000 , +0x1D94 ,0x40C40000 , +0x1D94 ,0x40C50000 , +0x1D94 ,0x40C60000 , +0x1D94 ,0x40C70000 , +0x1D94 ,0x40C80000 , +0x1D94 ,0x40C90000 , +0x1D94 ,0x40CA0000 , +0x1D94 ,0x40CB0000 , +0x1D94 ,0x40CC0000 , +0x1D94 ,0x40CD0000 , +0x1D94 ,0x40CE0000 , +0x1D94 ,0x40CF0000 , +0x1D94 ,0x40D00000 , +0x1D94 ,0x40D10000 , +0x1D94 ,0x40D20000 , +0x1D94 ,0x40D30000 , +0x1D94 ,0x40D40000 , +0x1D94 ,0x40D50000 , +0x1D94 ,0x40D60000 , +0x1D94 ,0x40D70000 , +0x1D94 ,0x40D80000 , +0x1D94 ,0x40D90000 , +0x1D94 ,0x40DA0000 , +0x1D94 ,0x40DB0000 , +0x1D94 ,0x40DC0000 , +0x1D94 ,0x40DD0000 , +0x1D94 ,0x40DE0000 , +0x1D94 ,0x40DF0000 , +0x1D94 ,0x40E00000 , +0x1D94 ,0x40E10000 , +0x1D94 ,0x40E20000 , +0x1D94 ,0x40E30000 , +0x1D94 ,0x40E40000 , +0x1D94 ,0x40E50000 , +0x1D94 ,0x40E60000 , +0x1D94 ,0x40E70000 , +0x1D94 ,0x40E80000 , +0x1D94 ,0x40E90000 , +0x1D94 ,0x40EA0000 , +0x1D94 ,0x40EB0000 , +0x1D94 ,0x40EC0000 , +0x1D94 ,0x40ED0000 , +0x1D94 ,0x40EE0000 , +0x1D94 ,0x40EF0000 , +0x1D94 ,0x40F00000 , +0x1D94 ,0x40F10000 , +0x1D94 ,0x40F20000 , +0x1D94 ,0x40F30000 , +0x1D94 ,0x40F40000 , +0x1D94 ,0x40F50000 , +0x1D94 ,0x40F60000 , +0x1D94 ,0x40F70000 , +0x1D94 ,0x40F80000 , +0x1D94 ,0x40F90000 , +0x1D94 ,0x40FA0000 , +0x1D94 ,0x40FB0000 , +0x1D94 ,0x40FC0000 , +0x1D94 ,0x40FD0000 , +0x1D94 ,0x40FE0000 , +0x1D94 ,0x40FF0000 , +0xC0C ,0x02F1D8B7 , +0x1EE8 ,0x00000000 , +}; + +RTW_DECL_TABLE_PHY_COND (rtw8822c_bb, rtw_phy_cfg_bb); + +static const u32 rtw8822c_bb_pg_type0[] = { +0 ,0 ,0 ,0x00000c20 ,0xffffffff ,0x484c5054 , +0 ,0 ,0 ,0x00000c24 ,0xffffffff ,0x54585c60 , +0 ,0 ,0 ,0x00000c28 ,0xffffffff ,0x44484c50 , +0 ,0 ,0 ,0x00000c2c ,0xffffffff ,0x5054585c , +0 ,0 ,0 ,0x00000c30 ,0xffffffff ,0x4044484c , +0 ,0 ,1 ,0x00000c34 ,0xffffffff ,0x5054585c , +0 ,0 ,1 ,0x00000c38 ,0xffffffff ,0x4044484c , +0 ,0 ,0 ,0x00000c3c ,0xffffffff ,0x5054585c , +0 ,0 ,0 ,0x00000c40 ,0xffffffff ,0x4044484c , +0 ,0 ,0 ,0x00000c44 ,0xffffffff ,0x585c383c , +0 ,0 ,1 ,0x00000c48 ,0xffffffff ,0x484c5054 , +0 ,0 ,1 ,0x00000c4c ,0xffffffff ,0x383c4044 , +0 ,1 ,0 ,0x00000e20 ,0xffffffff ,0x484c5054 , +0 ,1 ,0 ,0x00000e24 ,0xffffffff ,0x54585c60 , +0 ,1 ,0 ,0x00000e28 ,0xffffffff ,0x44484c50 , +0 ,1 ,0 ,0x00000e2c ,0xffffffff ,0x5054585c , +0 ,1 ,0 ,0x00000e30 ,0xffffffff ,0x4044484c , +0 ,1 ,1 ,0x00000e34 ,0xffffffff ,0x5054585c , +0 ,1 ,1 ,0x00000e38 ,0xffffffff ,0x4044484c , +0 ,1 ,0 ,0x00000e3c ,0xffffffff ,0x5054585c , +0 ,1 ,0 ,0x00000e40 ,0xffffffff ,0x4044484c , +0 ,1 ,0 ,0x00000e44 ,0xffffffff ,0x585c383c , +0 ,1 ,1 ,0x00000e48 ,0xffffffff ,0x484c5054 , +0 ,1 ,1 ,0x00000e4c ,0xffffffff ,0x383c4044 , +1 ,0 ,0 ,0x00000c24 ,0xffffffff ,0x54585c60 , +1 ,0 ,0 ,0x00000c28 ,0xffffffff ,0x44484c50 , +1 ,0 ,0 ,0x00000c2c ,0xffffffff ,0x5054585c , +1 ,0 ,0 ,0x00000c30 ,0xffffffff ,0x4044484c , +1 ,0 ,1 ,0x00000c34 ,0xffffffff ,0x5054585c , +1 ,0 ,1 ,0x00000c38 ,0xffffffff ,0x4044484c , +1 ,0 ,0 ,0x00000c3c ,0xffffffff ,0x5054585c , +1 ,0 ,0 ,0x00000c40 ,0xffffffff ,0x4044484c , +1 ,0 ,0 ,0x00000c44 ,0xffffffff ,0x585c383c , +1 ,0 ,1 ,0x00000c48 ,0xffffffff ,0x484c5054 , +1 ,0 ,1 ,0x00000c4c ,0xffffffff ,0x383c4044 , +1 ,1 ,0 ,0x00000e24 ,0xffffffff ,0x54585c60 , +1 ,1 ,0 ,0x00000e28 ,0xffffffff ,0x44484c50 , +1 ,1 ,0 ,0x00000e2c ,0xffffffff ,0x5054585c , +1 ,1 ,0 ,0x00000e30 ,0xffffffff ,0x4044484c , +1 ,1 ,1 ,0x00000e34 ,0xffffffff ,0x5054585c , +1 ,1 ,1 ,0x00000e38 ,0xffffffff ,0x4044484c , +1 ,1 ,0 ,0x00000e3c ,0xffffffff ,0x5054585c , +1 ,1 ,0 ,0x00000e40 ,0xffffffff ,0x4044484c , +1 ,1 ,0 ,0x00000e44 ,0xffffffff ,0x585c383c , +1 ,1 ,1 ,0x00000e48 ,0xffffffff ,0x484c5054 , +1 ,1 ,1 ,0x00000e4c ,0xffffffff ,0x383c4044 +}; + +RTW_DECL_TABLE_BB_PG (rtw8822c_bb_pg_type0); + +static const u32 rtw8822c_rf_a[] = { +0x000 ,0x00030000 , +0x018 ,0x00013124 , +0x093 ,0x0008483F , +0x0DE ,0x00000020 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x08E ,0x000B9140 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x08E ,0x000B9140 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x08E ,0x000A5540 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x08E ,0x000A5540 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x08E ,0x000A5540 , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x08E ,0x000A5540 , +0xA0000000 ,0x00000000 , +0x08E ,0x000A5540 , +0xB0000000 ,0x00000000 , +0x081 ,0x0000FC01 , +0x081 ,0x0002FC01 , +0x081 ,0x0003FC01 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x085 ,0x0006A06C , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x085 ,0x0006A06C , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x085 ,0x0006A06C , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x085 ,0x0006A06C , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x085 ,0x0006A06C , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x085 ,0x0006A06C , +0xA0000000 ,0x00000000 , +0x085 ,0x0006A06C , +0xB0000000 ,0x00000000 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EE ,0x00000010 , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000002 , +0x03F ,0x0000002A , +0x0EE ,0x00000000 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EE ,0x00000010 , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000002 , +0x03F ,0x0000002A , +0x0EE ,0x00000000 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EE ,0x00000010 , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000002 , +0x03F ,0x0000002A , +0x0EE ,0x00000000 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EE ,0x00000010 , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000002 , +0x03F ,0x0000002A , +0x0EE ,0x00000000 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EE ,0x00000010 , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000002 , +0x03F ,0x0000002A , +0x0EE ,0x00000000 , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EE ,0x00000010 , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000001 , +0x03F ,0x0000002A , +0x033 ,0x00000002 , +0x03F ,0x0000002A , +0x0EE ,0x00000000 , +0xA0000000 ,0x00000000 , +0x0EE ,0x00000010 , +0x033 ,0x00000001 , +0x03F ,0x0000003F , +0x033 ,0x00000001 , +0x03F ,0x0000003F , +0x033 ,0x00000002 , +0x03F ,0x0000003F , +0x0EE ,0x00000000 , +0xB0000000 ,0x00000000 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00010000 , +0x033 ,0x0000000F , +0x03F ,0x000773C0 , +0x033 ,0x0000000E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000000D , +0x03F ,0x000773E8 , +0x033 ,0x0000000C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000000B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000000A , +0x03F ,0x000002A8 , +0x033 ,0x00000009 , +0x03F ,0x00000280 , +0x033 ,0x00000008 , +0x03F ,0x000FF280 , +0x033 ,0x00000007 , +0x03F ,0x00000200 , +0x033 ,0x00000006 , +0x03F ,0x000001C0 , +0x033 ,0x00000005 , +0x03F ,0x00000180 , +0x033 ,0x00000004 , +0x03F ,0x00000040 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00010000 , +0x033 ,0x0000000F , +0x03F ,0x000773C0 , +0x033 ,0x0000000E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000000D , +0x03F ,0x000773E8 , +0x033 ,0x0000000C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000000B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000000A , +0x03F ,0x000002A8 , +0x033 ,0x00000009 , +0x03F ,0x00000280 , +0x033 ,0x00000008 , +0x03F ,0x000FF280 , +0x033 ,0x00000007 , +0x03F ,0x00000200 , +0x033 ,0x00000006 , +0x03F ,0x000001C0 , +0x033 ,0x00000005 , +0x03F ,0x00000180 , +0x033 ,0x00000004 , +0x03F ,0x00000040 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00010000 , +0x033 ,0x0000000F , +0x03F ,0x000773C0 , +0x033 ,0x0000000E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000000D , +0x03F ,0x000773E8 , +0x033 ,0x0000000C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000000B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000000A , +0x03F ,0x000002A8 , +0x033 ,0x00000009 , +0x03F ,0x00000280 , +0x033 ,0x00000008 , +0x03F ,0x000FF280 , +0x033 ,0x00000007 , +0x03F ,0x00000200 , +0x033 ,0x00000006 , +0x03F ,0x000001C0 , +0x033 ,0x00000005 , +0x03F ,0x00000180 , +0x033 ,0x00000004 , +0x03F ,0x00000040 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00010000 , +0x033 ,0x0000000F , +0x03F ,0x000773C0 , +0x033 ,0x0000000E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000000D , +0x03F ,0x000773E8 , +0x033 ,0x0000000C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000000B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000000A , +0x03F ,0x000002A8 , +0x033 ,0x00000009 , +0x03F ,0x00000280 , +0x033 ,0x00000008 , +0x03F ,0x000FF280 , +0x033 ,0x00000007 , +0x03F ,0x00000200 , +0x033 ,0x00000006 , +0x03F ,0x000001C0 , +0x033 ,0x00000005 , +0x03F ,0x00000180 , +0x033 ,0x00000004 , +0x03F ,0x00000040 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00010000 , +0x033 ,0x0000000F , +0x03F ,0x000773C0 , +0x033 ,0x0000000E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000000D , +0x03F ,0x000773E8 , +0x033 ,0x0000000C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000000B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000000A , +0x03F ,0x000002A8 , +0x033 ,0x00000009 , +0x03F ,0x00000280 , +0x033 ,0x00000008 , +0x03F ,0x000FF280 , +0x033 ,0x00000007 , +0x03F ,0x00000200 , +0x033 ,0x00000006 , +0x03F ,0x000001C0 , +0x033 ,0x00000005 , +0x03F ,0x00000180 , +0x033 ,0x00000004 , +0x03F ,0x00000040 , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00010000 , +0x033 ,0x0000000F , +0x03F ,0x000773C0 , +0x033 ,0x0000000E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000000D , +0x03F ,0x000773E8 , +0x033 ,0x0000000C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000000B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000000A , +0x03F ,0x000002A8 , +0x033 ,0x00000009 , +0x03F ,0x00000280 , +0x033 ,0x00000008 , +0x03F ,0x000FF280 , +0x033 ,0x00000007 , +0x03F ,0x00000200 , +0x033 ,0x00000006 , +0x03F ,0x000001C0 , +0x033 ,0x00000005 , +0x03F ,0x00000180 , +0x033 ,0x00000004 , +0x03F ,0x00000040 , +0xA0000000 ,0x00000000 , +0x0EF ,0x00010000 , +0x033 ,0x0000000F , +0x03F ,0x000773E8 , +0x033 ,0x0000000E , +0x03F ,0x000FF3A0 , +0x033 ,0x0000000D , +0x03F ,0x00000380 , +0x033 ,0x0000000C , +0x03F ,0x000FF380 , +0x033 ,0x0000000B , +0x03F ,0x00000300 , +0x033 ,0x0000000A , +0x03F ,0x000002A8 , +0x033 ,0x00000009 , +0x03F ,0x00000280 , +0x033 ,0x00000008 , +0x03F ,0x000FF280 , +0x033 ,0x00000007 , +0x03F ,0x00000200 , +0x033 ,0x00000006 , +0x03F ,0x000001C0 , +0x033 ,0x00000005 , +0x03F ,0x00000180 , +0x033 ,0x00000004 , +0x03F ,0x00000040 , +0xB0000000 ,0x00000000 , +0x033 ,0x00000003 , +0x03F ,0x00000000 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000001F , +0x03F ,0x000773C0 , +0x033 ,0x0000001E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000001D , +0x03F ,0x000773E8 , +0x033 ,0x0000001C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000001B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000001A , +0x03F ,0x000002A8 , +0x033 ,0x00000019 , +0x03F ,0x00000280 , +0x033 ,0x00000018 , +0x03F ,0x000FF280 , +0x033 ,0x00000017 , +0x03F ,0x00000200 , +0x033 ,0x00000016 , +0x03F ,0x000001C0 , +0x033 ,0x00000015 , +0x03F ,0x00000180 , +0x033 ,0x00000014 , +0x03F ,0x00000040 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000001F , +0x03F ,0x000773C0 , +0x033 ,0x0000001E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000001D , +0x03F ,0x000773E8 , +0x033 ,0x0000001C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000001B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000001A , +0x03F ,0x000002A8 , +0x033 ,0x00000019 , +0x03F ,0x00000280 , +0x033 ,0x00000018 , +0x03F ,0x000FF280 , +0x033 ,0x00000017 , +0x03F ,0x00000200 , +0x033 ,0x00000016 , +0x03F ,0x000001C0 , +0x033 ,0x00000015 , +0x03F ,0x00000180 , +0x033 ,0x00000014 , +0x03F ,0x00000040 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000001F , +0x03F ,0x000773C0 , +0x033 ,0x0000001E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000001D , +0x03F ,0x000773E8 , +0x033 ,0x0000001C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000001B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000001A , +0x03F ,0x000002A8 , +0x033 ,0x00000019 , +0x03F ,0x00000280 , +0x033 ,0x00000018 , +0x03F ,0x000FF280 , +0x033 ,0x00000017 , +0x03F ,0x00000200 , +0x033 ,0x00000016 , +0x03F ,0x000001C0 , +0x033 ,0x00000015 , +0x03F ,0x00000180 , +0x033 ,0x00000014 , +0x03F ,0x00000040 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000001F , +0x03F ,0x000773C0 , +0x033 ,0x0000001E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000001D , +0x03F ,0x000773E8 , +0x033 ,0x0000001C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000001B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000001A , +0x03F ,0x000002A8 , +0x033 ,0x00000019 , +0x03F ,0x00000280 , +0x033 ,0x00000018 , +0x03F ,0x000FF280 , +0x033 ,0x00000017 , +0x03F ,0x00000200 , +0x033 ,0x00000016 , +0x03F ,0x000001C0 , +0x033 ,0x00000015 , +0x03F ,0x00000180 , +0x033 ,0x00000014 , +0x03F ,0x00000040 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000001F , +0x03F ,0x000773C0 , +0x033 ,0x0000001E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000001D , +0x03F ,0x000773E8 , +0x033 ,0x0000001C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000001B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000001A , +0x03F ,0x000002A8 , +0x033 ,0x00000019 , +0x03F ,0x00000280 , +0x033 ,0x00000018 , +0x03F ,0x000FF280 , +0x033 ,0x00000017 , +0x03F ,0x00000200 , +0x033 ,0x00000016 , +0x03F ,0x000001C0 , +0x033 ,0x00000015 , +0x03F ,0x00000180 , +0x033 ,0x00000014 , +0x03F ,0x00000040 , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000001F , +0x03F ,0x000773C0 , +0x033 ,0x0000001E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000001D , +0x03F ,0x000773E8 , +0x033 ,0x0000001C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000001B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000001A , +0x03F ,0x000002A8 , +0x033 ,0x00000019 , +0x03F ,0x00000280 , +0x033 ,0x00000018 , +0x03F ,0x000FF280 , +0x033 ,0x00000017 , +0x03F ,0x00000200 , +0x033 ,0x00000016 , +0x03F ,0x000001C0 , +0x033 ,0x00000015 , +0x03F ,0x00000180 , +0x033 ,0x00000014 , +0x03F ,0x00000040 , +0xA0000000 ,0x00000000 , +0x033 ,0x0000001F , +0x03F ,0x000773E8 , +0x033 ,0x0000001E , +0x03F ,0x000FF3A0 , +0x033 ,0x0000001D , +0x03F ,0x00000380 , +0x033 ,0x0000001C , +0x03F ,0x000FF380 , +0x033 ,0x0000001B , +0x03F ,0x00000300 , +0x033 ,0x0000001A , +0x03F ,0x000002A8 , +0x033 ,0x00000019 , +0x03F ,0x00000280 , +0x033 ,0x00000018 , +0x03F ,0x000FF280 , +0x033 ,0x00000017 , +0x03F ,0x00000200 , +0x033 ,0x00000016 , +0x03F ,0x000001C0 , +0x033 ,0x00000015 , +0x03F ,0x00000180 , +0x033 ,0x00000014 , +0x03F ,0x00000040 , +0xB0000000 ,0x00000000 , +0x033 ,0x00000013 , +0x03F ,0x00000000 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000002F , +0x03F ,0x000773C0 , +0x033 ,0x0000002E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000002D , +0x03F ,0x000773E8 , +0x033 ,0x0000002C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000002B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000002A , +0x03F ,0x000002A8 , +0x033 ,0x00000029 , +0x03F ,0x00000280 , +0x033 ,0x00000028 , +0x03F ,0x000FF280 , +0x033 ,0x00000027 , +0x03F ,0x00000200 , +0x033 ,0x00000026 , +0x03F ,0x000001C0 , +0x033 ,0x00000025 , +0x03F ,0x00000180 , +0x033 ,0x00000024 , +0x03F ,0x00000040 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000002F , +0x03F ,0x000773C0 , +0x033 ,0x0000002E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000002D , +0x03F ,0x000773E8 , +0x033 ,0x0000002C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000002B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000002A , +0x03F ,0x000002A8 , +0x033 ,0x00000029 , +0x03F ,0x00000280 , +0x033 ,0x00000028 , +0x03F ,0x000FF280 , +0x033 ,0x00000027 , +0x03F ,0x00000200 , +0x033 ,0x00000026 , +0x03F ,0x000001C0 , +0x033 ,0x00000025 , +0x03F ,0x00000180 , +0x033 ,0x00000024 , +0x03F ,0x00000040 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000002F , +0x03F ,0x000773C0 , +0x033 ,0x0000002E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000002D , +0x03F ,0x000773E8 , +0x033 ,0x0000002C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000002B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000002A , +0x03F ,0x000002A8 , +0x033 ,0x00000029 , +0x03F ,0x00000280 , +0x033 ,0x00000028 , +0x03F ,0x000FF280 , +0x033 ,0x00000027 , +0x03F ,0x00000200 , +0x033 ,0x00000026 , +0x03F ,0x000001C0 , +0x033 ,0x00000025 , +0x03F ,0x00000180 , +0x033 ,0x00000024 , +0x03F ,0x00000040 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000002F , +0x03F ,0x000773C0 , +0x033 ,0x0000002E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000002D , +0x03F ,0x000773E8 , +0x033 ,0x0000002C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000002B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000002A , +0x03F ,0x000002A8 , +0x033 ,0x00000029 , +0x03F ,0x00000280 , +0x033 ,0x00000028 , +0x03F ,0x000FF280 , +0x033 ,0x00000027 , +0x03F ,0x00000200 , +0x033 ,0x00000026 , +0x03F ,0x000001C0 , +0x033 ,0x00000025 , +0x03F ,0x00000180 , +0x033 ,0x00000024 , +0x03F ,0x00000040 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000002F , +0x03F ,0x000773C0 , +0x033 ,0x0000002E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000002D , +0x03F ,0x000773E8 , +0x033 ,0x0000002C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000002B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000002A , +0x03F ,0x000002A8 , +0x033 ,0x00000029 , +0x03F ,0x00000280 , +0x033 ,0x00000028 , +0x03F ,0x000FF280 , +0x033 ,0x00000027 , +0x03F ,0x00000200 , +0x033 ,0x00000026 , +0x03F ,0x000001C0 , +0x033 ,0x00000025 , +0x03F ,0x00000180 , +0x033 ,0x00000024 , +0x03F ,0x00000040 , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000002F , +0x03F ,0x000773C0 , +0x033 ,0x0000002E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000002D , +0x03F ,0x000773E8 , +0x033 ,0x0000002C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000002B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000002A , +0x03F ,0x000002A8 , +0x033 ,0x00000029 , +0x03F ,0x00000280 , +0x033 ,0x00000028 , +0x03F ,0x000FF280 , +0x033 ,0x00000027 , +0x03F ,0x00000200 , +0x033 ,0x00000026 , +0x03F ,0x000001C0 , +0x033 ,0x00000025 , +0x03F ,0x00000180 , +0x033 ,0x00000024 , +0x03F ,0x00000040 , +0xA0000000 ,0x00000000 , +0x033 ,0x0000002F , +0x03F ,0x000773E8 , +0x033 ,0x0000002E , +0x03F ,0x000FF3A0 , +0x033 ,0x0000002D , +0x03F ,0x00000380 , +0x033 ,0x0000002C , +0x03F ,0x000FF380 , +0x033 ,0x0000002B , +0x03F ,0x00000300 , +0x033 ,0x0000002A , +0x03F ,0x000002A8 , +0x033 ,0x00000029 , +0x03F ,0x00000280 , +0x033 ,0x00000028 , +0x03F ,0x000FF280 , +0x033 ,0x00000027 , +0x03F ,0x00000200 , +0x033 ,0x00000026 , +0x03F ,0x000001C0 , +0x033 ,0x00000025 , +0x03F ,0x00000180 , +0x033 ,0x00000024 , +0x03F ,0x00000040 , +0xB0000000 ,0x00000000 , +0x033 ,0x00000023 , +0x03F ,0x00000000 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000003F , +0x03F ,0x000773C0 , +0x033 ,0x0000003E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000003D , +0x03F ,0x000773E8 , +0x033 ,0x0000003C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000003B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000003A , +0x03F ,0x000002A8 , +0x033 ,0x00000039 , +0x03F ,0x00000280 , +0x033 ,0x00000038 , +0x03F ,0x000FF280 , +0x033 ,0x00000037 , +0x03F ,0x00000200 , +0x033 ,0x00000036 , +0x03F ,0x000001C0 , +0x033 ,0x00000035 , +0x03F ,0x00000180 , +0x033 ,0x00000034 , +0x03F ,0x00000040 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000003F , +0x03F ,0x000773C0 , +0x033 ,0x0000003E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000003D , +0x03F ,0x000773E8 , +0x033 ,0x0000003C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000003B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000003A , +0x03F ,0x000002A8 , +0x033 ,0x00000039 , +0x03F ,0x00000280 , +0x033 ,0x00000038 , +0x03F ,0x000FF280 , +0x033 ,0x00000037 , +0x03F ,0x00000200 , +0x033 ,0x00000036 , +0x03F ,0x000001C0 , +0x033 ,0x00000035 , +0x03F ,0x00000180 , +0x033 ,0x00000034 , +0x03F ,0x00000040 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000003F , +0x03F ,0x000773C0 , +0x033 ,0x0000003E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000003D , +0x03F ,0x000773E8 , +0x033 ,0x0000003C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000003B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000003A , +0x03F ,0x000002A8 , +0x033 ,0x00000039 , +0x03F ,0x00000280 , +0x033 ,0x00000038 , +0x03F ,0x000FF280 , +0x033 ,0x00000037 , +0x03F ,0x00000200 , +0x033 ,0x00000036 , +0x03F ,0x000001C0 , +0x033 ,0x00000035 , +0x03F ,0x00000180 , +0x033 ,0x00000034 , +0x03F ,0x00000040 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000003F , +0x03F ,0x000773C0 , +0x033 ,0x0000003E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000003D , +0x03F ,0x000773E8 , +0x033 ,0x0000003C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000003B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000003A , +0x03F ,0x000002A8 , +0x033 ,0x00000039 , +0x03F ,0x00000280 , +0x033 ,0x00000038 , +0x03F ,0x000FF280 , +0x033 ,0x00000037 , +0x03F ,0x00000200 , +0x033 ,0x00000036 , +0x03F ,0x000001C0 , +0x033 ,0x00000035 , +0x03F ,0x00000180 , +0x033 ,0x00000034 , +0x03F ,0x00000040 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000003F , +0x03F ,0x000773C0 , +0x033 ,0x0000003E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000003D , +0x03F ,0x000773E8 , +0x033 ,0x0000003C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000003B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000003A , +0x03F ,0x000002A8 , +0x033 ,0x00000039 , +0x03F ,0x00000280 , +0x033 ,0x00000038 , +0x03F ,0x000FF280 , +0x033 ,0x00000037 , +0x03F ,0x00000200 , +0x033 ,0x00000036 , +0x03F ,0x000001C0 , +0x033 ,0x00000035 , +0x03F ,0x00000180 , +0x033 ,0x00000034 , +0x03F ,0x00000040 , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000003F , +0x03F ,0x000773C0 , +0x033 ,0x0000003E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000003D , +0x03F ,0x000773E8 , +0x033 ,0x0000003C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000003B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000003A , +0x03F ,0x000002A8 , +0x033 ,0x00000039 , +0x03F ,0x00000280 , +0x033 ,0x00000038 , +0x03F ,0x000FF280 , +0x033 ,0x00000037 , +0x03F ,0x00000200 , +0x033 ,0x00000036 , +0x03F ,0x000001C0 , +0x033 ,0x00000035 , +0x03F ,0x00000180 , +0x033 ,0x00000034 , +0x03F ,0x00000040 , +0xA0000000 ,0x00000000 , +0x033 ,0x0000003F , +0x03F ,0x000773E8 , +0x033 ,0x0000003E , +0x03F ,0x000FF3A0 , +0x033 ,0x0000003D , +0x03F ,0x00000380 , +0x033 ,0x0000003C , +0x03F ,0x000FF380 , +0x033 ,0x0000003B , +0x03F ,0x00000300 , +0x033 ,0x0000003A , +0x03F ,0x000002A8 , +0x033 ,0x00000039 , +0x03F ,0x00000280 , +0x033 ,0x00000038 , +0x03F ,0x000FF280 , +0x033 ,0x00000037 , +0x03F ,0x00000200 , +0x033 ,0x00000036 , +0x03F ,0x000001C0 , +0x033 ,0x00000035 , +0x03F ,0x00000180 , +0x033 ,0x00000034 , +0x03F ,0x00000040 , +0xB0000000 ,0x00000000 , +0x033 ,0x00000033 , +0x03F ,0x00000000 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000004F , +0x03F ,0x000773C0 , +0x033 ,0x0000004E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000004D , +0x03F ,0x000773E8 , +0x033 ,0x0000004C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000004B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000004A , +0x03F ,0x000002A8 , +0x033 ,0x00000049 , +0x03F ,0x00000280 , +0x033 ,0x00000048 , +0x03F ,0x000FF280 , +0x033 ,0x00000047 , +0x03F ,0x00000200 , +0x033 ,0x00000046 , +0x03F ,0x000001C0 , +0x033 ,0x00000045 , +0x03F ,0x00000180 , +0x033 ,0x00000044 , +0x03F ,0x00000040 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000004F , +0x03F ,0x000773C0 , +0x033 ,0x0000004E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000004D , +0x03F ,0x000773E8 , +0x033 ,0x0000004C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000004B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000004A , +0x03F ,0x000002A8 , +0x033 ,0x00000049 , +0x03F ,0x00000280 , +0x033 ,0x00000048 , +0x03F ,0x000FF280 , +0x033 ,0x00000047 , +0x03F ,0x00000200 , +0x033 ,0x00000046 , +0x03F ,0x000001C0 , +0x033 ,0x00000045 , +0x03F ,0x00000180 , +0x033 ,0x00000044 , +0x03F ,0x00000040 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000004F , +0x03F ,0x000773C0 , +0x033 ,0x0000004E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000004D , +0x03F ,0x000773E8 , +0x033 ,0x0000004C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000004B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000004A , +0x03F ,0x000002A8 , +0x033 ,0x00000049 , +0x03F ,0x00000280 , +0x033 ,0x00000048 , +0x03F ,0x000FF280 , +0x033 ,0x00000047 , +0x03F ,0x00000200 , +0x033 ,0x00000046 , +0x03F ,0x000001C0 , +0x033 ,0x00000045 , +0x03F ,0x00000180 , +0x033 ,0x00000044 , +0x03F ,0x00000040 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000004F , +0x03F ,0x000773C0 , +0x033 ,0x0000004E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000004D , +0x03F ,0x000773E8 , +0x033 ,0x0000004C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000004B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000004A , +0x03F ,0x000002A8 , +0x033 ,0x00000049 , +0x03F ,0x00000280 , +0x033 ,0x00000048 , +0x03F ,0x000FF280 , +0x033 ,0x00000047 , +0x03F ,0x00000200 , +0x033 ,0x00000046 , +0x03F ,0x000001C0 , +0x033 ,0x00000045 , +0x03F ,0x00000180 , +0x033 ,0x00000044 , +0x03F ,0x00000040 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000004F , +0x03F ,0x000773C0 , +0x033 ,0x0000004E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000004D , +0x03F ,0x000773E8 , +0x033 ,0x0000004C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000004B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000004A , +0x03F ,0x000002A8 , +0x033 ,0x00000049 , +0x03F ,0x00000280 , +0x033 ,0x00000048 , +0x03F ,0x000FF280 , +0x033 ,0x00000047 , +0x03F ,0x00000200 , +0x033 ,0x00000046 , +0x03F ,0x000001C0 , +0x033 ,0x00000045 , +0x03F ,0x00000180 , +0x033 ,0x00000044 , +0x03F ,0x00000040 , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000004F , +0x03F ,0x000773C0 , +0x033 ,0x0000004E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000004D , +0x03F ,0x000773E8 , +0x033 ,0x0000004C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000004B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000004A , +0x03F ,0x000002A8 , +0x033 ,0x00000049 , +0x03F ,0x00000280 , +0x033 ,0x00000048 , +0x03F ,0x000FF280 , +0x033 ,0x00000047 , +0x03F ,0x00000200 , +0x033 ,0x00000046 , +0x03F ,0x000001C0 , +0x033 ,0x00000045 , +0x03F ,0x00000180 , +0x033 ,0x00000044 , +0x03F ,0x00000040 , +0xA0000000 ,0x00000000 , +0x033 ,0x0000004F , +0x03F ,0x000773E8 , +0x033 ,0x0000004E , +0x03F ,0x000FF3A0 , +0x033 ,0x0000004D , +0x03F ,0x00000380 , +0x033 ,0x0000004C , +0x03F ,0x000FF380 , +0x033 ,0x0000004B , +0x03F ,0x00000300 , +0x033 ,0x0000004A , +0x03F ,0x000002A8 , +0x033 ,0x00000049 , +0x03F ,0x00000280 , +0x033 ,0x00000048 , +0x03F ,0x000FF280 , +0x033 ,0x00000047 , +0x03F ,0x00000200 , +0x033 ,0x00000046 , +0x03F ,0x000001C0 , +0x033 ,0x00000045 , +0x03F ,0x00000180 , +0x033 ,0x00000044 , +0x03F ,0x00000040 , +0xB0000000 ,0x00000000 , +0x033 ,0x00000043 , +0x03F ,0x00000000 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000005F , +0x03F ,0x000773C0 , +0x033 ,0x0000005E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000005D , +0x03F ,0x000773E8 , +0x033 ,0x0000005C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000005B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000005A , +0x03F ,0x000002A8 , +0x033 ,0x00000059 , +0x03F ,0x00000280 , +0x033 ,0x00000058 , +0x03F ,0x000FF280 , +0x033 ,0x00000057 , +0x03F ,0x00000200 , +0x033 ,0x00000056 , +0x03F ,0x000001C0 , +0x033 ,0x00000055 , +0x03F ,0x00000180 , +0x033 ,0x00000054 , +0x03F ,0x00000040 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000005F , +0x03F ,0x000773C0 , +0x033 ,0x0000005E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000005D , +0x03F ,0x000773E8 , +0x033 ,0x0000005C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000005B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000005A , +0x03F ,0x000002A8 , +0x033 ,0x00000059 , +0x03F ,0x00000280 , +0x033 ,0x00000058 , +0x03F ,0x000FF280 , +0x033 ,0x00000057 , +0x03F ,0x00000200 , +0x033 ,0x00000056 , +0x03F ,0x000001C0 , +0x033 ,0x00000055 , +0x03F ,0x00000180 , +0x033 ,0x00000054 , +0x03F ,0x00000040 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000005F , +0x03F ,0x000773C0 , +0x033 ,0x0000005E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000005D , +0x03F ,0x000773E8 , +0x033 ,0x0000005C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000005B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000005A , +0x03F ,0x000002A8 , +0x033 ,0x00000059 , +0x03F ,0x00000280 , +0x033 ,0x00000058 , +0x03F ,0x000FF280 , +0x033 ,0x00000057 , +0x03F ,0x00000200 , +0x033 ,0x00000056 , +0x03F ,0x000001C0 , +0x033 ,0x00000055 , +0x03F ,0x00000180 , +0x033 ,0x00000054 , +0x03F ,0x00000040 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000005F , +0x03F ,0x000773C0 , +0x033 ,0x0000005E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000005D , +0x03F ,0x000773E8 , +0x033 ,0x0000005C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000005B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000005A , +0x03F ,0x000002A8 , +0x033 ,0x00000059 , +0x03F ,0x00000280 , +0x033 ,0x00000058 , +0x03F ,0x000FF280 , +0x033 ,0x00000057 , +0x03F ,0x00000200 , +0x033 ,0x00000056 , +0x03F ,0x000001C0 , +0x033 ,0x00000055 , +0x03F ,0x00000180 , +0x033 ,0x00000054 , +0x03F ,0x00000040 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000005F , +0x03F ,0x000773C0 , +0x033 ,0x0000005E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000005D , +0x03F ,0x000773E8 , +0x033 ,0x0000005C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000005B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000005A , +0x03F ,0x000002A8 , +0x033 ,0x00000059 , +0x03F ,0x00000280 , +0x033 ,0x00000058 , +0x03F ,0x000FF280 , +0x033 ,0x00000057 , +0x03F ,0x00000200 , +0x033 ,0x00000056 , +0x03F ,0x000001C0 , +0x033 ,0x00000055 , +0x03F ,0x00000180 , +0x033 ,0x00000054 , +0x03F ,0x00000040 , +0x93000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x033 ,0x0000005F , +0x03F ,0x000773C0 , +0x033 ,0x0000005E , +0x03F ,0x000FF3C0 , +0x033 ,0x0000005D , +0x03F ,0x000773E8 , +0x033 ,0x0000005C , +0x03F ,0x000FF3E8 , +0x033 ,0x0000005B , +0x03F ,0x000FF3A0 , +0x033 ,0x0000005A , +0x03F ,0x000002A8 , +0x033 ,0x00000059 , +0x03F ,0x00000280 , +0x033 ,0x00000058 , +0x03F ,0x000FF280 , +0x033 ,0x00000057 , +0x03F ,0x00000200 , +0x033 ,0x00000056 , +0x03F ,0x000001C0 , +0x033 ,0x00000055 , +0x03F ,0x00000180 , +0x033 ,0x00000054 , +0x03F ,0x00000040 , +0xA0000000 ,0x00000000 , +0x033 ,0x0000005F , +0x03F ,0x000773E8 , +0x033 ,0x0000005E , +0x03F ,0x000FF3A0 , +0x033 ,0x0000005D , +0x03F ,0x00000380 , +0x033 ,0x0000005C , +0x03F ,0x000FF380 , +0x033 ,0x0000005B , +0x03F ,0x00000300 , +0x033 ,0x0000005A , +0x03F ,0x000002A8 , +0x033 ,0x00000059 , +0x03F ,0x00000280 , +0x033 ,0x00000058 , +0x03F ,0x000FF280 , +0x033 ,0x00000057 , +0x03F ,0x00000200 , +0x033 ,0x00000056 , +0x03F ,0x000001C0 , +0x033 ,0x00000055 , +0x03F ,0x00000180 , +0x033 ,0x00000054 , +0x03F ,0x00000040 , +0xB0000000 ,0x00000000 , +0x033 ,0x00000053 , +0x03F ,0x00000000 , +0x81000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00000000 , +0x91000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00000000 , +0x92000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00000000 , +0x92000002 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00000000 , +0x93000001 ,0x00000000 ,0x40000000 ,0x00000000 , +0x0EF ,0x00000000 ,
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
PATCH v9 12/14 rtw88: Kconfig & Makefile
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
Kconfig & Makefile for Realtek 802.11ac wireless network chips
--- drivers/net/wireless/realtek/Kconfig | 1 + drivers/net/wireless/realtek/Makefile | 1 + drivers/net/wireless/realtek/rtw88/Kconfig | 54 +++++++++++++++++++++++++++++ drivers/net/wireless/realtek/rtw88/Makefile | 20 +++++++++++ 4 files changed, 76 insertions(+) create mode 100644 drivers/net/wireless/realtek/rtw88/Kconfig create mode 100644 drivers/net/wireless/realtek/rtw88/Makefile
drivers/net/wireless/realtek/Kconfig +1 -0
@@ -14,5 +14,6 @@ if WLAN_VENDOR_REALTEK source "drivers/net/wireless/realtek/rtl818x/Kconfig" source "drivers/net/wireless/realtek/rtlwifi/Kconfig" source "drivers/net/wireless/realtek/rtl8xxxu/Kconfig" +source "drivers/net/wireless/realtek/rtw88/Kconfig" endif # WLAN_VENDOR_REALTEK
drivers/net/wireless/realtek/Makefile +1 -0
@@ -6,4 +6,5 @@ obj-$(CONFIG_RTL8180) += rtl818x/ obj-$(CONFIG_RTL8187) += rtl818x/ obj-$(CONFIG_RTLWIFI) += rtlwifi/ obj-$(CONFIG_RTL8XXXU) += rtl8xxxu/ +obj-$(CONFIG_RTW88) += rtw88/
drivers/net/wireless/realtek/rtw88/Kconfig new file +54 -0
54 lines not on this page · raw message
drivers/net/wireless/realtek/rtw88/Makefile new file +20 -0
@@ -0,0 +1,20 @@ +obj-$(CONFIG_RTW88_CORE) += rtw88.o +rtw88-y += main.o \ + mac80211.o \ + util.o \ + debug.o \ + tx.o \ + rx.o \ + mac.o \ + phy.o \ + efuse.o \ + fw.o \ + ps.o \ + sec.o \ + regd.o + +rtw88-$(CONFIG_RTW88_8822BE) += rtw8822b.o rtw8822b_table.o +rtw88-$(CONFIG_RTW88_8822CE) += rtw8822c.o rtw8822c_table.o + +obj-$(CONFIG_RTW88_PCI) += rtwpci.o +rtwpci-objs := pci.o
Signature · 1 line
2.7.4
Re: [PATCH v9 12/14] rtw88: Kconfig & Makefile
Quoted 6 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
Kconfig&Makefilefor Realtek 802.11ac wireless network chipsReviewed-by Stanislaw Gruszka <[email protected]>Signed-off-by Yan-Hsuan Chuang <[email protected]>
[...]
Quoted 13 lines
drivers/net/wireless/realtek/rtw88/Makefile new file +10
-0@@ -0,0 +1,20 @@ +obj-$(CONFIG_RTW88_CORE) += rtw88.o +rtw88-y += main.o \ + mac80211.o \ + util.o \ + debug.o \ + tx.o \ + rx.o \ + mac.o \ + phy.o \ + efuse.o \
drivers/net/wireless/realtek/rtw88/Makefile line 20
Quoted 10 lines
drivers/net/wireless/realtek/rtw88/Makefile new file +10
-0+ fw.o \ + ps.o \ + sec.o \ + regd.o + +rtw88-$(CONFIG_RTW88_8822BE) += rtw8822b.o rtw8822b_table.o +rtw88-$(CONFIG_RTW88_8822CE) += rtw8822c.o rtw8822c_table.o + +obj-$(CONFIG_RTW88_PCI) += rtwpci.o +rtwpci-objs := pci.o
Please add an SPDX tag also for the makefile.
Signature · 1 line
Kalle Valo
PATCH v9 13/14 rtw88: add MAINTAINERS entry
In reply to [email protected]From: Yan-Hsuan Chuang <[email protected]>
Add an entry for rtw88 in MAINTAINERS
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -13177,6 +13177,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.g S: Maintained F: drivers/net/wireless/realtek/rtlwifi/ +REALTEK WIRELESS DRIVER (rtw88) +M: Yan-Hsuan Chuang <[email protected]> +L: [email protected] +S: Maintained +F: drivers/net/wireless/realtek/rtw88/ + RTL8XXXU WIRELESS DRIVER (rtl8xxxu) M: Jes Sorensen <[email protected]> L: [email protected]
Signature · 1 line
2.7.4
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v9 14/14] staging: rtlwifi: remove staging rtlwifi driver
Quoted 9 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
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/rtw88Signed-off-by Yan-Hsuan Chuang <[email protected]>
BTW, this patch does not apply to wireless-drivers-next anymore. To avoid any conflicts, would be it be safer that the driver is removed directly from Greg's tree? After rtw88 is applied to wireless-drivers-next, of course.
error: patch failed: drivers/staging/rtlwifi/Kconfig:1
error: drivers/staging/rtlwifi/Kconfig: patch does not apply
error: patch failed: drivers/staging/rtlwifi/efuse.c:1
error: drivers/staging/rtlwifi/efuse.c: patch does not apply
error: patch failed: drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:1
error: drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c: patch does not apply
error: patch failed: drivers/staging/rtlwifi/pci.h:1
error: drivers/staging/rtlwifi/pci.h: patch does not apply
error: patch failed: drivers/staging/rtlwifi/phydm/phydm_rainfo.c:1
error: drivers/staging/rtlwifi/phydm/phydm_rainfo.c: patch does not apply
error: patch failed: drivers/staging/rtlwifi/phydm/rtl_phydm.c:1
error: drivers/staging/rtlwifi/phydm/rtl_phydm.c: patch does not apply
error: patch failed: drivers/staging/rtlwifi/rtl8822be/fw.c:1
error: drivers/staging/rtlwifi/rtl8822be/fw.c: patch does not apply
Patch failed at 0014 staging: rtlwifi: remove staging rtlwifi driver
Signature · 1 line
Kalle Valo
RE: [PATCH v9 14/14] staging: rtlwifi: remove staging rtlwifi driver
Hi Greg,
Quoted 35 lines
-----Original Message-----
From: Kalle Valo [mailto:[email protected]]
Sent: Friday, April 26, 2019 8:10 PM
To: Tony Chuang
Cc: [email protected]; [email protected]; Pkshih; Andy Huang; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v9 14/14] staging: rtlwifi: remove staging rtlwifi driverQuoted 9 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
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/rtw88Signed-off-by Yan-Hsuan Chuang <[email protected]>BTW, this patch does not apply to wireless-drivers-next anymore. To avoid any conflicts, would be it be safer that the driver is removed directly from Greg's tree? After rtw88 is applied to wireless-drivers-next, of course.
error: patch failed:
drivers/staging/rtlwifi/Kconfig:1
error:drivers/staging/rtlwifi/Kconfig: patch does not apply
error: patch failed:drivers/staging/rtlwifi/efuse.c:1
error:drivers/staging/rtlwifi/efuse.c: patch does not apply
error: patch failed:drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:1
error:drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c: patch does not apply
error: patch failed:drivers/staging/rtlwifi/pci.h:1
Quoted 9 lines
error:
drivers/staging/rtlwifi/pci.h: patch does not apply
error: patch failed:drivers/staging/rtlwifi/phydm/phydm_rainfo.c:1
error:drivers/staging/rtlwifi/phydm/phydm_rainfo.c: patch does not apply
error: patch failed:drivers/staging/rtlwifi/phydm/rtl_phydm.c:1
error:drivers/staging/rtlwifi/phydm/rtl_phydm.c: patch does not apply
error: patch failed:drivers/staging/rtlwifi/rtl8822be/fw.c:1
error:drivers/staging/rtlwifi/rtl8822be/fw.c: patch does not apply Patch failed at 0014 staging: rtlwifi: remove staging rtlwifi driver
Hi Greg,
Can you help us to remove the staging driver rtlwifi in your tree ? I think Kalle can issue a signal to you when he has done reviewing the rtw88 driver and merge it into wireless-drivers-next. Thanks
Yan-Hsuan
[email protected]
maintainerRe: [PATCH v9 14/14] staging: rtlwifi: remove staging rtlwifi driver
Quoted 47 lines · Tony Chuang
Hi Greg,
Quoted 35 lines
-----Original Message-----
From: Kalle Valo [mailto:[email protected]]
Sent: Friday, April 26, 2019 8:10 PM
To: Tony Chuang
Cc: [email protected]; [email protected]; Pkshih; Andy Huang; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v9 14/14] staging: rtlwifi: remove staging rtlwifi driverQuoted 9 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
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/rtw88Signed-off-by Yan-Hsuan Chuang <[email protected]>BTW, this patch does not apply to wireless-drivers-next anymore. To avoid any conflicts, would be it be safer that the driver is removed directly from Greg's tree? After rtw88 is applied to wireless-drivers-next, of course.
error: patch failed:
drivers/staging/rtlwifi/Kconfig:1
error:drivers/staging/rtlwifi/Kconfig: patch does not apply
error: patch failed:drivers/staging/rtlwifi/efuse.c:1
error:drivers/staging/rtlwifi/efuse.c: patch does not apply
error: patch failed:drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:1
error:drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c: patch does not apply
error: patch failed:drivers/staging/rtlwifi/pci.h:1Quoted 9 lines
error:
drivers/staging/rtlwifi/pci.h: patch does not apply
error: patch failed:drivers/staging/rtlwifi/phydm/phydm_rainfo.c:1
error:drivers/staging/rtlwifi/phydm/phydm_rainfo.c: patch does not apply
error: patch failed:drivers/staging/rtlwifi/phydm/rtl_phydm.c:1
error:drivers/staging/rtlwifi/phydm/rtl_phydm.c: patch does not apply
error: patch failed:drivers/staging/rtlwifi/rtl8822be/fw.c:1
error:drivers/staging/rtlwifi/rtl8822be/fw.c: patch does not apply Patch failed at 0014 staging: rtlwifi: remove staging rtlwifi driver
Quoted 5 lines
Hi Greg,
Can you help us to remove the staging driver rtlwifi in your tree ? I think Kalle can issue a signal to you when he has done reviewing the rtw88 driver and merge it into wireless-drivers-next.
Sure, I will be glad to drop the driver from my tree once the new driver has been added to the wireless-drivers-next tree. Just let me know!
thanks,
greg k-h
Quoted 5 lines · <[email protected]> writes:
From: Yan-Hsuan Chuang <[email protected]>
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.
This looks very good now. I did a quick review of the driver and had few netpicks but nothing really blocking applying this. So I have now combined these patches into one big patch and pushed it to the pending branch:
I appreciate if people could do a quick check and make sure that I didn't do anything stupid when folding the patches. I'm planning to apply this to master branch still today evening so that it makes to tomorrow's linux-next build, and I can get it to net-next before the merge window starts on Sunday.
Yan-Hsuan, during review you have received very good comments from a lot of folks, I recommend you go through all of them and send fixes as follow up patches. I can then apply them after the merge window.
Signature · 1 line
Kalle Valo
Quoted 11 lines · Kalle Valo
Quoted 5 lines
From: Yan-Hsuan Chuang <[email protected]>
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.
This looks very good now. I did a quick review of the driver and had few netpicks but nothing really blocking applying this. So I have now combined these patches into one big patch and pushed it to the pending branch:
Quoted 4 lines
I appreciate if people could do a quick check and make sure that I didn't do anything stupid when folding the patches.
I've build pending branch and done few quick tests on Realtek 8822CE device. Everything works ok.
Quoted 4 lines
I'm planning to
apply this to master branch still today evening so that it makes to tomorrow's linux-next build, and I can get it to net-next before the merge window starts on Sunday.
Yay! Great :-)
Stanislaw
Quoted 12 lines · Stanislaw Gruszka
Quoted 11 lines · Kalle Valo
Quoted 5 lines
From: Yan-Hsuan Chuang <[email protected]>
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.
This looks very good now. I did a quick review of the driver and had few netpicks but nothing really blocking applying this. So I have now combined these patches into one big patch and pushed it to the pending branch:
Quoted 7 lines
Quoted 4 lines
I appreciate if people could do a quick check and make sure that I didn't do anything stupid when folding the patches.
I've build pending branch and done few quick tests on Realtek 8822CE device. Everything works ok.
Thanks so much for this, I now feel much more comfortable merging it :)
So this is manually applied to wireless-drivers-next:
e3037485c68e rtw88: new Realtek 802.11ac driver
And it should be in tomorrow's linux-next build, let's see what kind of reports we get. Greg, feel free to delete the corresponding staging driver from your tree (I forgot the name of the driver already).
Signature · 1 line
Kalle Valo
Greg KH
maintainerQuoted 24 lines · Kalle Valo
Quoted 12 lines · Stanislaw Gruszka
Quoted 11 lines · Kalle Valo
Quoted 5 lines
From: Yan-Hsuan Chuang <[email protected]>
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.
This looks very good now. I did a quick review of the driver and had few netpicks but nothing really blocking applying this. So I have now combined these patches into one big patch and pushed it to the pending branch:
Quoted 7 lines
Quoted 4 lines
I appreciate if people could do a quick check and make sure that I didn't do anything stupid when folding the patches.
I've build pending branch and done few quick tests on Realtek 8822CE device. Everything works ok.
Thanks so much for this, I now feel much more comfortable merging it :)
Quoted 7 lines
So this is manually applied to wireless-drivers-next:
e3037485c68ertw88: new Realtek 802.11ac driverAnd it should be in tomorrow's linux-next build, let's see what kind of reports we get. Greg, feel free to delete the corresponding staging driver from your tree (I forgot the name of the driver already).
I'll be glad to do so if someone also tells me what the driver's name is as well, I don't remember either :)
thanks,
greg k-h
Quoted 27 lines · Greg KH
Quoted 26 lines · Kalle Valo
Quoted 12 lines · Stanislaw Gruszka
Quoted 11 lines · Kalle Valo
Quoted 5 lines
From: Yan-Hsuan Chuang <[email protected]>
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.
This looks very good now. I did a quick review of the driver and had few netpicks but nothing really blocking applying this. So I have now combined these patches into one big patch and pushed it to the pending branch:
Quoted 7 lines
Quoted 4 lines
I appreciate if people could do a quick check and make sure that I didn't do anything stupid when folding the patches.
I've build pending branch and done few quick tests on Realtek 8822CE device. Everything works ok.
Thanks so much for this, I now feel much more comfortable merging it :)
So this is manually applied to wireless-drivers-next:
Quoted 8 lines
Quoted 5 lines
e3037485c68ertw88: new Realtek 802.11ac driverAnd it should be in tomorrow's linux-next build, let's see what kind of reports we get. Greg, feel free to delete the corresponding staging driver from your tree (I forgot the name of the driver already).
I'll be glad to do so if someone also tells me what the driver's name is as well, I don't remember either :)
I checked it now, the directory is drivers/staging/rtlwifi. Here's the commit adding the upstream driver, in case you need that in the commit log:
Signature · 1 line
Kalle Valo
Greg KH
maintainerQuoted 35 lines · Kalle Valo
Quoted 33 lines · Greg KH
Quoted 31 lines · Kalle Valo
Quoted 12 lines · Stanislaw Gruszka
Quoted 11 lines · Kalle Valo
Quoted 5 lines
From: Yan-Hsuan Chuang <[email protected]>
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.
This looks very good now. I did a quick review of the driver and had few netpicks but nothing really blocking applying this. So I have now combined these patches into one big patch and pushed it to the pending branch:
Quoted 7 lines
Quoted 4 lines
I appreciate if people could do a quick check and make sure that I didn't do anything stupid when folding the patches.
I've build pending branch and done few quick tests on Realtek 8822CE device. Everything works ok.
Thanks so much for this, I now feel much more comfortable merging it :)
So this is manually applied to wireless-drivers-next:
e3037485c68ertw88: new Realtek 802.11ac driverAnd it should be in tomorrow's linux-next build, let's see what kind of reports we get. Greg, feel free to delete the corresponding staging driver from your tree (I forgot the name of the driver already).
Quoted 8 lines
Quoted 2 lines
I'll be glad to do so if someone also tells me what the driver's name is as well, I don't remember either :)
I checked it now, the directory is
drivers/staging/rtlwifi. Here's the commit adding the upstream driver, in case you need that in the commit log:
Thanks for this, now dropped from my tree (with the exception of 2 .h files which a different driver used, and I'll clean that up as well with a later patch.)
Note, the diffstat involved here shows that a "proper" Linux driver that is merged into the kernel tree follows the rule-of-thumb that I have consistently seen over time. An in-tree driver that has been reviewed properly is 33% of the size of an "out of tree" driver. It's always nice to see users benefit from properly developed drivers like this.
thanks,
greg k-h
Greg KH
maintainerQuoted 43 lines · Greg KH
Quoted 42 lines · Kalle Valo
Quoted 27 lines · Greg KH
Quoted 26 lines · Kalle Valo
Quoted 12 lines · Stanislaw Gruszka
Quoted 11 lines · Kalle Valo
Quoted 5 lines
From: Yan-Hsuan Chuang <[email protected]>
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.
This looks very good now. I did a quick review of the driver and had few netpicks but nothing really blocking applying this. So I have now combined these patches into one big patch and pushed it to the pending branch:
Quoted 7 lines
Quoted 4 lines
I appreciate if people could do a quick check and make sure that I didn't do anything stupid when folding the patches.
I've build pending branch and done few quick tests on Realtek 8822CE device. Everything works ok.
Thanks so much for this, I now feel much more comfortable merging it :)
So this is manually applied to wireless-drivers-next:
Quoted 8 lines
Quoted 5 lines
e3037485c68ertw88: new Realtek 802.11ac driverAnd it should be in tomorrow's linux-next build, let's see what kind of reports we get. Greg, feel free to delete the corresponding staging driver from your tree (I forgot the name of the driver already).
I'll be glad to do so if someone also tells me what the driver's name is as well, I don't remember either :)
I checked it now, the directory is
drivers/staging/rtlwifi. Here's the commit adding the upstream driver, in case you need that in the commit log:
Quoted 5 lines
Thanks for this, now dropped from my tree (with the exception of 2 .h files which a different driver used, and I'll clean that up as well with a later patch.)
Attached below are the 2 follow-on patches that I have applied that clean up the remaining .h rtlwifi files, and then move them into the location where they are used.
thanks,
greg k-h
From 8a90bdcb64a9e3732279bb6d9f5054dd6ce3dfbd Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <[email protected]>
Date: Wed, 1 May 2019 10:37:13 +0200
Subject: [PATCH 1/2] staging: rtlwifi: strip down phydm .h files
The phydm .h files are used by another driver, but not all of the defines are used, so strip them down to their basic necessities before we move them out of this directory.
--- drivers/staging/rtlwifi/phydm/phydm_reg.h | 118 -------------- .../rtlwifi/phydm/phydm_regdefine11n.h | 153 +----------------- 2 files changed, 2 insertions(+), 269 deletions(-)
drivers/staging/rtlwifi/phydm/phydm_reg.h +0 -118
@@ -11,130 +11,12 @@* Larry Finger <[email protected]> * *****************************************************************************/ -/* ************************************************************ -* File Name: odm_reg.h -* -* Description: -* -* This file is for general register definition. -* -* -* *************************************************************/ #ifndef __HAL_ODM_REG_H__#define __HAL_ODM_REG_H__ -/* -* Register Definition -*/ - -/* MAC REG */ -#define ODM_BB_RESET 0x002 -#define ODM_DUMMY 0x4fe -#define RF_T_METER_OLD 0x24 -#define RF_T_METER_NEW 0x42 -#define ODM_EDCA_VO_PARAM 0x500#define ODM_EDCA_VI_PARAM 0x504#define ODM_EDCA_BE_PARAM 0x508#define ODM_EDCA_BK_PARAM 0x50C -#define ODM_TXPAUSE 0x522 - -/* LTE_COEX */ -#define REG_LTECOEX_CTRL 0x07C0 -#define REG_LTECOEX_WRITE_DATA 0x07C4 -#define REG_LTECOEX_READ_DATA 0x07C8 -#define REG_LTECOEX_PATH_CONTROL 0x70 - -/* BB REG */ -#define ODM_FPGA_PHY0_PAGE8 0x800 -#define ODM_PSD_SETTING 0x808 -#define ODM_AFE_SETTING 0x818 -#define ODM_TXAGC_B_6_18 0x830 -#define ODM_TXAGC_B_24_54 0x834 -#define ODM_TXAGC_B_MCS32_5 0x838 -#define ODM_TXAGC_B_MCS0_MCS3 0x83c -#define ODM_TXAGC_B_MCS4_MCS7 0x848 -#define ODM_TXAGC_B_MCS8_MCS11 0x84c -#define ODM_ANALOG_REGISTER 0x85c -#define ODM_RF_INTERFACE_OUTPUT 0x860 -#define ODM_TXAGC_B_MCS12_MCS15 0x868 -#define ODM_TXAGC_B_11_A_2_11 0x86c -#define ODM_AD_DA_LSB_MASK 0x874 -#define ODM_ENABLE_3_WIRE 0x88c -#define ODM_PSD_REPORT 0x8b4 -#define ODM_R_ANT_SELECT 0x90c -#define ODM_CCK_ANT_SELECT 0xa07 -#define ODM_CCK_PD_THRESH 0xa0a -#define ODM_CCK_RF_REG1 0xa11 -#define ODM_CCK_MATCH_FILTER 0xa20 -#define ODM_CCK_RAKE_MAC 0xa2e -#define ODM_CCK_CNT_RESET 0xa2d -#define ODM_CCK_TX_DIVERSITY 0xa2f -#define ODM_CCK_FA_CNT_MSB 0xa5b -#define ODM_CCK_FA_CNT_LSB 0xa5c -#define ODM_CCK_NEW_FUNCTION 0xa75 -#define ODM_OFDM_PHY0_PAGE_C 0xc00 -#define ODM_OFDM_RX_ANT 0xc04 -#define ODM_R_A_RXIQI 0xc14 -#define ODM_R_A_AGC_CORE1 0xc50 -#define ODM_R_A_AGC_CORE2 0xc54 -#define ODM_R_B_AGC_CORE1 0xc58 -#define ODM_R_AGC_PAR 0xc70 -#define ODM_R_HTSTF_AGC_PAR 0xc7c -#define ODM_TX_PWR_TRAINING_A 0xc90 -#define ODM_TX_PWR_TRAINING_B 0xc98 -#define ODM_OFDM_FA_CNT1 0xcf0 -#define ODM_OFDM_PHY0_PAGE_D 0xd00 -#define ODM_OFDM_FA_CNT2 0xda0 -#define ODM_OFDM_FA_CNT3 0xda4 -#define ODM_OFDM_FA_CNT4 0xda8 -#define ODM_TXAGC_A_6_18 0xe00 -#define ODM_TXAGC_A_24_54 0xe04 -#define ODM_TXAGC_A_1_MCS32 0xe08 -#define ODM_TXAGC_A_MCS0_MCS3 0xe10 -#define ODM_TXAGC_A_MCS4_MCS7 0xe14 -#define ODM_TXAGC_A_MCS8_MCS11 0xe18 -#define ODM_TXAGC_A_MCS12_MCS15 0xe1c - -/* RF REG */ -#define ODM_GAIN_SETTING 0x00 -#define ODM_CHANNEL 0x18 -#define ODM_RF_T_METER 0x24 -#define ODM_RF_T_METER_92D 0x42 -#define ODM_RF_T_METER_88E 0x42 -#define ODM_RF_T_METER_92E 0x42 -#define ODM_RF_T_METER_8812 0x42 -#define REG_RF_TX_GAIN_OFFSET 0x55 - -/* ant Detect Reg */ -#define ODM_DPDT 0x300 - -/* PSD Init */ -#define ODM_PSDREG 0x808 - -/* 92D path Div */ -#define PATHDIV_REG 0xB30 -#define PATHDIV_TRI 0xBA0 - -/* -* Bitmap Definition -*/ - -#define BIT_FA_RESET BIT(0) - -#define REG_OFDM_0_XA_TX_IQ_IMBALANCE 0xC80 -#define REG_OFDM_0_ECCA_THRESHOLD 0xC4C -#define REG_FPGA0_XB_LSSI_READ_BACK 0x8A4 -#define REG_FPGA0_TX_GAIN_STAGE 0x80C -#define REG_OFDM_0_XA_AGC_CORE1 0xC50 -#define REG_OFDM_0_XB_AGC_CORE1 0xC58 -#define REG_A_TX_SCALE_JAGUAR 0xC1C -#define REG_B_TX_SCALE_JAGUAR 0xE1C - -#define REG_AFE_XTAL_CTRL 0x0024 -#define REG_AFE_PLL_CTRL 0x0028 -#define REG_MAC_PHY_CTRL 0x002C - -#define RF_CHNLBW 0x18#endif
drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h +2 -151
190 lines not on this page · raw message
Signature · 1 line
2.21.0
From adc7af464ceba1962c2eb875a97f4d3bd82fbc5f Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <[email protected]>
Date: Wed, 1 May 2019 10:40:10 +0200
Subject: [PATCH 2/2] staging: rtlwifi: move remaining phydm .h files
The rtl8188eu driver uses the phydm .h files from the rtlwifi driver, but now that the rtlwifi driver is gone, it's silly to have a whole directory for just 2 .h files. So move these files into the rtl8188eu driver's directory so that it can be self-contained.
---
drivers/staging/rtl8188eu/include/odm_precomp.h | 4 ++--
.../staging/{rtlwifi/phydm => rtl8188eu/include}/phydm_reg.h | 0
.../{rtlwifi/phydm => rtl8188eu/include}/phydm_regdefine11n.h | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/staging/{rtlwifi/phydm => rtl8188eu/include}/phydm_reg.h (100%)
rename drivers/staging/{rtlwifi/phydm => rtl8188eu/include}/phydm_regdefine11n.h (100%)drivers/staging/rtl8188eu/include/odm_precomp.h +2 -2
@@ -24,12 +24,12 @@#include "odm.h" #include "odm_hwconfig.h" #include "odm_debug.h" -#include "../../rtlwifi/phydm/phydm_regdefine11n.h" +#include "phydm_regdefine11n.h" #include "hal8188e_rate_adaptive.h" /* for RA,Power training */ #include "rtl8188e_hal.h" -#include "../../rtlwifi/phydm/phydm_reg.h" +#include "phydm_reg.h" #include "odm_rtl8188e.h"
drivers/staging/rtl8188eu/include/phydm_reg.h renamed from drivers/staging/rtlwifi/phydm/phydm_reg.h +0 -0
drivers/staging/rtl8188eu/include/phydm_regdefine11n.h renamed from drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h +0 -0
Signature · 1 line
2.21.0
Quoted 12 lines
Quoted 6 lines
From: Yan-Hsuan Chuang <[email protected]>
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.
This looks very good now. I did a quick review of the driver and had few netpicks but nothing really blocking applying this. So I have now combined these patches into one big patch and pushed it to the pending branch:
Quoted 8 lines
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/c
ommit/?h=pending&id=284d1e4e3311cfe67c1c57ccc275ff0f5666aeeaI appreciate if people could do a quick check and make sure that I didn't do anything stupid when folding the patches. I'm planning to apply this to master branch still today evening so that it makes to tomorrow's linux-next build, and I can get it to net-next before the merge window starts on Sunday.
Thanks, that's great.
Quoted 4 lines
Yan-Hsuan, during review you have received very good comments from a lot of folks, I recommend you go through all of them and send fixes as follow up patches. I can then apply them after the merge window.
Yes I will include those good comments.
Should I send them to your next branch? Such as [PATCH][next].
Yan-Hsuan
rtw88: SDIO Support
In reply to [email protected]Hi Realtek Team,
I was hoping to get an update on your progress with SDIO in the rtw88 mainline driver? Is there a WIP or prerelease available?
The UART BT is working in Mainline, but was hoping to include wireless in the device tree kernel updates.
Thanks
Rudi
Quoted 1 line · On Fri, Apr 19, 2019 at 01:49:50PM +0800, [email protected] wrote:
From: Yan-Hsuan Chuang <[email protected]>
...
Quoted 4 lines
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.
...
Quoted 5 lines
Missing feature:
* WOW/PNO
* USB & SDIO bus (such as RTL8xxxU/RTL8xxxS)
* BT coexistence (8822B/8822C are combo ICs)
...
Quoted 3 lines
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.