├── debian ├── compat ├── source │ └── format ├── changelog ├── rtl8852bu.dkms ├── rules └── control ├── include ├── rtw_version.h ├── rtw_mcc.h ├── gspi_ops_linux.h ├── rtw_ioctl_query.h ├── sdio_ops_linux.h ├── rtw_btc.h ├── gspi_hal.h ├── rtw_trx_usb.h ├── circ_buf.h ├── rtw_trx_pci.h ├── phl_api_tmp.h ├── rtw_mem.h ├── rtw_phl_cmd.h ├── rtw_hwsim_intf.h ├── custom_gpio.h ├── pci_ops_linux.h ├── rtw_byteorder.h ├── rtw_trx.h ├── rtw_io.h ├── rtw_sdio.h ├── sdio_ops.h ├── rtw_cfg.h ├── drv_types_gspi.h └── ethernet.h ├── phl ├── hal_g6 │ ├── mac │ │ ├── mac_reg.h │ │ ├── mac_ax │ │ │ ├── otpkeysinfo.c │ │ │ ├── otpkeysinfo.h │ │ │ ├── trx_desc.c │ │ │ ├── common.c │ │ │ ├── mac_8852b │ │ │ │ ├── mac_priv_8852b.h │ │ │ │ ├── hdr_conv_rx_8852b.c │ │ │ │ ├── fwcmd_8852b.h │ │ │ │ ├── cmac_tx_8852b.h │ │ │ │ ├── phy_rpt_8852b.h │ │ │ │ ├── pwr_seq_8852b.h │ │ │ │ ├── init_8852b.h │ │ │ │ ├── phy_rpt_8852b.c │ │ │ │ ├── fwcmd_8852b.c │ │ │ │ ├── hwamsdu_8852b.h │ │ │ │ └── hdr_conv_rx_8852b.h │ │ │ ├── mac_ax_dfs.h │ │ │ ├── spatial_reuse.h │ │ │ ├── common.h │ │ │ ├── phy_misc.h │ │ │ ├── pwr_seq_func.h │ │ │ ├── h2c_agg.h │ │ │ └── trx_desc.h │ │ ├── mac2drv_def.h │ │ ├── halmac_wpp.h │ │ └── feature_cfg_drv.h │ ├── phy │ │ ├── rf │ │ │ ├── halrf_ex.c │ │ │ ├── halrf_headers.h │ │ │ ├── halrf_struct.h │ │ │ ├── halrf_8852b │ │ │ │ ├── halrf_version_rtl8852b.h │ │ │ │ ├── halrf_8852b_api_ex.h │ │ │ │ ├── halrf_reg_cfg_8852b.h │ │ │ │ ├── halrf_dack_8852b.h │ │ │ │ └── halrf_psd_8852b.h │ │ │ ├── halrf_dack.h │ │ │ ├── halrf_init.h │ │ │ ├── halrf_psd.h │ │ │ ├── halrf_export_fun.h │ │ │ ├── halrf_dbg_cmd_ex.h │ │ │ ├── halrf_dbg_cmd.h │ │ │ ├── halrf_hwimg.h │ │ │ ├── halrf_kfree.h │ │ │ ├── halrf_init_ex.h │ │ │ ├── halrf_ic_sw_info.h │ │ │ └── halrf_hw_cfg.h │ │ └── bb │ │ │ ├── halbb_8852b │ │ │ ├── halbb_hwimg_raw_data_8852b_gain.h │ │ │ ├── halbb_version_rtl8852b.h │ │ │ ├── halbb_version_rtl8852bp.h │ │ │ ├── halbb_reg_cfg_8852b.h │ │ │ └── halbb_8852b_api_ex.h │ │ │ ├── halbb_types.h │ │ │ ├── halbb_dbg_cmd_ex.h │ │ │ ├── halbb_physts_7.h │ │ │ ├── halbb_la_mode_ex.h │ │ │ ├── halbb_dyn_1r_cca_ex.h │ │ │ ├── halbb_init.h │ │ │ ├── halbb_statistics_ex.h │ │ │ ├── halbb_math_lib_ex.h │ │ │ └── halbb_dyn_csi_rsp_ex.h │ ├── rtl8852b │ │ ├── rtl8852b_mac.c │ │ ├── rtl8852b_phy.c │ │ ├── rtl8852b_cmd.c │ │ ├── usb │ │ │ ├── rtl8852bu_halmac.c │ │ │ ├── rtl8852bu_led.c │ │ │ ├── rtl8852bu.h │ │ │ ├── rtl8852bu_io.c │ │ │ └── hal_trx_8852bu.h │ │ ├── rtl8852b_spec.h │ │ ├── rtl8852b_phy.h │ │ ├── rtl8852b.h │ │ └── rtl8852b.mk │ ├── hal_dfs.h │ ├── hal_ser.h │ ├── hal_def_btc.h │ ├── hal_def_mac.h │ ├── hal_def_phy.h │ ├── test │ │ ├── hal_test_module.c │ │ └── mp │ │ │ └── hal_test_mp.c │ ├── btc │ │ ├── halbtc_def.h │ │ ├── halbtc_dbg_cmd.h │ │ └── btc.mk │ ├── hal_mcc_def.h │ ├── hal_c2h.h │ ├── hal_wow.h │ ├── hal_cap.h │ ├── hal_regulation.c │ ├── hal_acs.h │ ├── hal_ps.h │ ├── hal_dbcc.h │ ├── hal_fw.h │ ├── hal_mcc.h │ ├── hal_sta.h │ ├── hal_dfs.c │ ├── hal_com_i.h │ ├── hal_acs.c │ ├── hal_scanofld.h │ ├── hal_notify.h │ ├── hal_twt.c │ ├── hal_chan.h │ ├── hal_str_proc.h │ ├── hal_tx.h │ └── hal_rx.h ├── phl_cmd_btc.h ├── test │ ├── phl_ser_dbg_cmd.h │ ├── verify │ │ ├── dbcc │ │ │ └── phl_test_dbcc_api.h │ │ └── phl_test_verify_api.h │ ├── cmd_disp_test.h │ └── mp │ │ └── phl_test_mp_api.h ├── phl_led.h ├── phl_scanofld.h ├── pltfm_ops.h ├── phl_notify.h ├── phl_trx_mit.h ├── phl_version.h ├── phl_thermal.h ├── phl_cmd_ser.h ├── phl_p2pps_def.h ├── phl_acs_def.h ├── phl_regulation_6g.h ├── phl_country.h ├── custom │ └── phl_custom_api.h ├── phl_acs.h ├── phl_dm.h ├── phl_ser_def.h ├── phl_scan_instance.h ├── phl_rx_agg.h ├── phl_sw_cap.h └── hci │ └── phl_trx_def_usb.h ├── platform ├── autoconf_arm_9617b.h ├── android_x86.mk ├── nv_tk1_ubuntu.mk ├── android_intel_x86.mk ├── autoconf_i386_ap_func.h ├── mips_98d.mk ├── nv_tk1.mk ├── autoconf_mips_98d.h ├── i386_pc.mk ├── arm_sunxi.mk ├── platform_ops.c ├── platform_RTK_DMP_usb.c ├── custom_country_chplan.h ├── arm_rk.mk ├── arm_1619b.mk ├── plat_huanglong.mk └── arm_1319.mk ├── core ├── crypto │ ├── aes.h │ ├── aes_siv.h │ ├── sha256_i.h │ └── sha256.h ├── rtw_ioctl_query.c ├── rtw_btc.c └── rtw_mem.c └── .gitignore /debian/compat: -------------------------------------------------------------------------------- 1 | 13 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /include/rtw_version.h: -------------------------------------------------------------------------------- 1 | #define DRIVERVERSION "v1.19.3-45-g7583a804a.20230505" 2 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_reg.h: -------------------------------------------------------------------------------- 1 | #ifndef __MAC_REG_H__ 2 | #define __MAC_REG_H__ 3 | 4 | #include "chip_cfg.h" 5 | 6 | #include "mac_reg_ax.h" 7 | #include "mac_reg_be.h" 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /platform/autoconf_arm_9617b.h: -------------------------------------------------------------------------------- 1 | #ifdef CONFIG_ARCH_CORTINA 2 | 3 | #define CONFIG_RTW_HOSTAPD_ACS 4 | #ifdef CONFIG_RTW_HOSTAPD_ACS 5 | #define WKARD_ACS /* for compile happy */ 6 | #endif /* CONFIG_RTW_HOSTAPD_ACS */ 7 | 8 | #endif /* CONFIG_ARCH_CORTINA */ 9 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/otpkeysinfo.c: -------------------------------------------------------------------------------- 1 | #include "otpkeysinfo.h" 2 | 3 | u8 otp_key_info_externalPN[OTP_KEY_INFO_NUM] = {0x0, 0x0}; 4 | u8 otp_key_info_customer[OTP_KEY_INFO_NUM] = {0x0, 0x1}; 5 | u8 otp_key_info_serialNum[OTP_KEY_INFO_NUM] = {0x0, 0x1}; 6 | 7 | u32 otp_key_info_keyID[OTP_KEY_INFO_NUM] = {0x0, 0x1}; 8 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | rtw89 (1.0.2-3) unstable; urgency=medium 2 | 3 | * Updated debian packaging to 3.0 (quilt) format 4 | * Enable builds on both debian and ubuntu 5 | 6 | -- Jesse Rhodes Thu, 16 Mar 2023 15:14:59 -0400 7 | 8 | rtl8852bu (1.0.2-2) unstable; urgency=medium 9 | 10 | * Upstream updates 11 | * Enable kernel 5.7 12 | 13 | -- Larry Finger 14 | 15 | 16 | -------------------------------------------------------------------------------- /platform/android_x86.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y) 2 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN 3 | SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) 4 | ARCH := $(SUBARCH) 5 | CROSS_COMPILE := /media/DATA-2/android-x86/ics-x86_20120130/prebuilt/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/bin/i686-unknown-linux-gnu- 6 | KSRC := /media/DATA-2/android-x86/ics-x86_20120130/out/target/product/generic_x86/obj/kernel 7 | MODULE_NAME :=wlan 8 | endif 9 | -------------------------------------------------------------------------------- /platform/nv_tk1_ubuntu.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_NV_TK1_UBUNTU), y) 2 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_NV_TK1 3 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN 4 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 5 | 6 | ARCH ?= arm 7 | 8 | CROSS_COMPILE ?= 9 | KVER := $(shell uname -r) 10 | KSRC := /lib/modules/$(KVER)/build 11 | MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ 12 | INSTALL_PREFIX := 13 | endif 14 | 15 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac2drv_def.h: -------------------------------------------------------------------------------- 1 | #ifndef _MAC2DRV_DEF_H_ 2 | #define _MAC2DRV_DEF_H_ 3 | 4 | #include "mac_reg.h" 5 | 6 | /* export MAC-related definitions to drv */ 7 | /* currently, we redefine reg name used in driver */ 8 | /* because we sync header from reg excel */ 9 | /* but we do not want to cause driver build fail */ 10 | #define B_AX_SDIO_HS0ISR_IND_EN B_AX_HS0ISR_IND_EN 11 | #define B_AX_SDIO_BT_INT B_AX_BT_INT_EN 12 | #define B_AX_WLOCK_1C_B6 B_AX_WLOCK_1C_BIT6 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /debian/rtl8852bu.dkms: -------------------------------------------------------------------------------- 1 | PACKAGE_NAME="rtl8852bu" 2 | PACKAGE_VERSION="#MODULE_VERSION#" 3 | MAKE="make -C ${kernel_source_dir} KBUILD_EXTMOD=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build modules" 4 | CLEAN="make -C ${kernel_source_dir} KBUILD_EXTMOD=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean" 5 | BUILT_MODULE_NAME[0]="8852bu" 6 | DEST_MODULE_LOCATION[0]="/updates/" 7 | AUTOINSTALL="YES" 8 | # Set the acceptable kernel values - 5.7+ 9 | BUILD_EXCLUSIVE_KERNEL="^(5\.[7-9]\.|5\.[1-9][0-9]+\.|6.[0-9]+\.)" 10 | -------------------------------------------------------------------------------- /platform/android_intel_x86.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_ANDROID_INTEL_X86), y) 2 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_ANDROID_INTEL_X86 3 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_INTEL_BYT 4 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID 5 | EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 6 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 7 | EXTRA_CFLAGS += -DCONFIG_SKIP_SIGNAL_SCALE_MAPPING 8 | ifeq ($(CONFIG_SDIO_HCI), y) 9 | EXTRA_CFLAGS += -DCONFIG_RESUME_IN_WORKQUEUE 10 | endif 11 | endif 12 | -------------------------------------------------------------------------------- /platform/autoconf_i386_ap_func.h: -------------------------------------------------------------------------------- 1 | /* CORE RX path shortcut */ 2 | #define CONFIG_RTW_CORE_RXSC 3 | 4 | /* CORE TX path shortcut */ 5 | #define CONFIG_CORE_TXSC 6 | #ifdef CONFIG_CORE_TXSC 7 | /* TX shorcut amsdu */ 8 | #ifdef CONFIG_TX_AMSDU 9 | //#define CONFIG_TXSC_AMSDU 10 | #endif 11 | /* PHL TX path shortcut */ 12 | #define CONFIG_PHL_TXSC 13 | #endif/* CONFIG_CORE_TXSC */ 14 | 15 | /* Separate TX path into different CPUs */ 16 | /*#define RTW_TX_CPU_BALANCE*/ 17 | #ifdef RTW_TX_CPU_BALANCE 18 | #define CPU_ID_TX_CORE 2 19 | #endif 20 | -------------------------------------------------------------------------------- /platform/mips_98d.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_RTL8198D), y) 2 | EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -DCONFIG_PLATFORM_RTL8198D 3 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 4 | export DIR_LINUX=$(shell pwd)/../../../../../../linux-4.4.x 5 | ARCH ?= mips 6 | CROSS_COMPILE := /toolchain/msdk-4.8.5-mips-EB-4.4-u0.9.33-m32ut-180206/bin/msdk-linux- 7 | KSRC := $(DIR_LINUX) 8 | MODULE_NAME := $(MODULE_NAME)_98d 9 | ifeq ($(CONFIG_PCI_HCI), y) 10 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS 11 | _PLATFORM_FILES := platform/platform_mips_98d_pci.o 12 | OBJS += $(_PLATFORM_FILES) 13 | endif 14 | endif -------------------------------------------------------------------------------- /core/crypto/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AES functions 3 | * Copyright (c) 2003-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AES_H 10 | #define AES_H 11 | 12 | #define AES_BLOCK_SIZE 16 13 | 14 | void * aes_encrypt_init(const u8 *key, size_t len); 15 | int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt); 16 | void aes_encrypt_deinit(void *ctx); 17 | void * aes_decrypt_init(const u8 *key, size_t len); 18 | int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain); 19 | void aes_decrypt_deinit(void *ctx); 20 | 21 | #endif /* AES_H */ 22 | -------------------------------------------------------------------------------- /core/crypto/aes_siv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AES SIV (RFC 5297) 3 | * Copyright (c) 2013 Cozybit, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AES_SIV_H 10 | #define AES_SIV_H 11 | 12 | int aes_siv_encrypt(const u8 *key, size_t key_len, 13 | const u8 *pw, size_t pwlen, 14 | size_t num_elem, const u8 *addr[], const size_t *len, 15 | u8 *out); 16 | int aes_siv_decrypt(const u8 *key, size_t key_len, 17 | const u8 *iv_crypt, size_t iv_c_len, 18 | size_t num_elem, const u8 *addr[], const size_t *len, 19 | u8 *out); 20 | 21 | #endif /* AES_SIV_H */ 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | include /usr/share/dpkg/default.mk 5 | include /usr/share/dpkg/pkg-info.mk 6 | 7 | export DH_VERBOSE = 1 8 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all 9 | 10 | VERSION ?= $(DEB_VERSION_UPSTREAM) 11 | 12 | %: 13 | dh $@ --with dkms 14 | 15 | override_dh_auto_install: 16 | dh_install -prtl8852bu-dkms *.c *.h *.md usr/src/rtl8852bu-$(VERSION) 17 | dh_install -prtl8852bu-dkms LICENSE usr/src/rtl8852bu-$(VERSION) 18 | dh_install -prtl8852bu-dkms Makefile usr/src/rtl8852bu-$(VERSION) 19 | 20 | override_dh_dkms: 21 | dh_dkms -V $(VERSION) 22 | 23 | override_dh_auto_build: 24 | : 25 | -------------------------------------------------------------------------------- /core/crypto/sha256_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA-256 internal definitions 3 | * Copyright (c) 2003-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA256_I_H 10 | #define SHA256_I_H 11 | 12 | #define SHA256_BLOCK_SIZE 64 13 | 14 | struct _sha256_state { 15 | u64 length; 16 | u32 state[8], curlen; 17 | u8 buf[SHA256_BLOCK_SIZE]; 18 | }; 19 | 20 | void _sha256_init(struct _sha256_state *md); 21 | int sha256_process(struct _sha256_state *md, const unsigned char *in, 22 | unsigned long inlen); 23 | int sha256_done(struct _sha256_state *md, unsigned char *out); 24 | 25 | #endif /* SHA256_I_H */ 26 | -------------------------------------------------------------------------------- /include/rtw_mcc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2015 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_ex.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | 16 | 17 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: rtl8852bu 2 | Section: misc 3 | Priority: optional 4 | Maintainer: lwfinger 5 | Build-Depends: debhelper (>= 13), 6 | dh-sequence-dkms 7 | Standards-Version: 4.1.3 8 | Vcs-Browser: https://github.com/lwfinger/rtw89 9 | Vcs-Git: https://github.com/lwfinger/rtw89.git 10 | 11 | Package: 8852bu-dkms 12 | Architecture: all 13 | Depends: ${misc:Depends}, bc 14 | Description: dkms source for the Realtek rtl8852bu driver 15 | This package provides the rtl8852bu source and makes use of the 16 | DKMS build utility to install them for the running kernel. It is 17 | intended for use with kernel versions 5.7 - 6.5. 18 | . 19 | Kernel source or headers are required to build these modules. 20 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/rtl8852b_mac.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _RTL8852B_MAC_C_ 16 | 17 | 18 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/rtl8852b_phy.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _RTL8852B_PHY_C_ 16 | 17 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_dfs.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_DFS_H_ 16 | #define _HAL_DFS_H_ 17 | 18 | #endif -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/rtl8852b_cmd.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _RTL8852B_CMD_C_ 16 | 17 | 18 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/usb/rtl8852bu_halmac.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 22019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _RTL8852BU_HALMAC_C_ 16 | 17 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/usb/rtl8852bu_led.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _RTL8852BU_LED_C_ 16 | 17 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/otpkeysinfo.h: -------------------------------------------------------------------------------- 1 | #include "../type.h" 2 | #define OTP_KEY_INFO_NUM 2 3 | 4 | #define EFUSE_EXTERNALPN_DEFAULT 0xFF 5 | #define EFUSE_EXTERNALPN_ADDR 0x5EC 6 | #define EFUSE_EXTERNALPN_SH 0 7 | #define EFUSE_EXTERNALPN_MSK 0xff 8 | 9 | #define EFUSE_CUSTOMER_DEFAULT 0xF 10 | #define EFUSE_CUSTOMER_ADDR 0x5ED 11 | #define EFUSE_CUSTOMER_SH 0 12 | #define EFUSE_CUSTOMER_MSK 0xf 13 | 14 | #define EFUSE_SERIALNUM_DEFAULT 0x7 15 | #define EFUSE_SERIALNUM_ADDR 0x5ED 16 | #define EFUSE_SERIALNUM_SH 4 17 | #define EFUSE_SERIALNUM_MSK 0x7 18 | 19 | extern u8 otp_key_info_externalPN[OTP_KEY_INFO_NUM]; 20 | extern u8 otp_key_info_customer[OTP_KEY_INFO_NUM]; 21 | extern u8 otp_key_info_serialNum[OTP_KEY_INFO_NUM]; 22 | extern u32 otp_key_info_keyID[OTP_KEY_INFO_NUM]; 23 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/trx_desc.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | ******************************************************************************/ 15 | 16 | #include "trx_desc.h" 17 | 18 | -------------------------------------------------------------------------------- /core/rtw_ioctl_query.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _RTW_IOCTL_QUERY_C_ 16 | 17 | #include 18 | 19 | 20 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_ser.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_SER_H_ 16 | #define _HAL_SER_H_ 17 | 18 | #endif /* _HAL_SER_H_ */ 19 | -------------------------------------------------------------------------------- /include/gspi_ops_linux.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __SDIO_OPS_LINUX_H__ 16 | #define __SDIO_OPS_LINUX_H__ 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /platform/nv_tk1.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_NV_TK1), y) 2 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_NV_TK1 3 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN 4 | # default setting for Android 4.1, 4.2 5 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 6 | EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 7 | EXTRA_CFLAGS += -DCONFIG_P2P_IPS -DCONFIG_PLATFORM_ANDROID 8 | # Enable this for Android 5.0 9 | EXTRA_CFLAGS += -DCONFIG_RADIO_WORK 10 | EXTRA_CFLAGS += -DRTW_VENDOR_EXT_SUPPORT 11 | EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC 12 | ARCH ?= arm 13 | 14 | CROSS_COMPILE := /mnt/newdisk/android_sdk/nvidia_tk1/android_L/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- 15 | KSRC :=/mnt/newdisk/android_sdk/nvidia_tk1/android_L/out/target/product/shieldtablet/obj/KERNEL/ 16 | MODULE_NAME = wlan 17 | endif 18 | -------------------------------------------------------------------------------- /core/rtw_btc.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2013 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifdef CONFIG_BTC 16 | 17 | #include 18 | 19 | #endif /* CONFIG_BTC */ 20 | 21 | -------------------------------------------------------------------------------- /include/rtw_ioctl_query.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTW_IOCTL_QUERY_H_ 16 | #define _RTW_IOCTL_QUERY_H_ 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_def_btc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_DEF_BTC_H_ 16 | #define _HAL_DEF_BTC_H_ 17 | 18 | #endif /*_HAL_DEF_BTC_H_*/ 19 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_def_mac.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_DEF_MAC_H_ 16 | #define _HAL_DEF_MAC_H_ 17 | 18 | #endif /*_HAL_DEF_MAC_H_*/ 19 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_def_phy.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_DEF_PHY_H_ 16 | #define _HAL_DEF_PHY_H_ 17 | 18 | #endif /*_HAL_DEF_PHY_H_*/ 19 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/rtl8852b_spec.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __RTL8852B_SPEC_H__ 16 | #define __RTL8852B_SPEC_H__ 17 | 18 | 19 | #endif /* __RTL8852B_SPEC_H__ */ 20 | -------------------------------------------------------------------------------- /phl/hal_g6/test/hal_test_module.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _HAL_TEST_MODULE_C_ 16 | 17 | #ifdef CONFIG_HAL_TEST_SUITE 18 | #endif /*ifdef CONFIG_HAL_TEST_SUITE*/ 19 | -------------------------------------------------------------------------------- /include/sdio_ops_linux.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2021 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __SDIO_OPS_LINUX_H__ 16 | #define __SDIO_OPS_LINUX_H__ 17 | 18 | 19 | #endif /* __SDIO_OPS_LINUX_H__ */ 20 | 21 | -------------------------------------------------------------------------------- /phl/hal_g6/btc/halbtc_def.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __INC_BTC_DEF_H__ 16 | #define __INC_BTC_DEF_H__ 17 | 18 | 19 | const char *id_to_str(u8 type, u32 id); 20 | 21 | #endif -------------------------------------------------------------------------------- /phl/hal_g6/hal_mcc_def.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_MCC_DEF_H_ 16 | #define _HAL_MCC_DEF_H_ 17 | /* MCC definition for public usage */ 18 | 19 | #endif /*_HAL_MCC_DEF_H_*/ 20 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/rtl8852b_phy.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __RTL8852B_PHY_H__ 16 | #define __RTL8852B_PHY_H__ 17 | /* rtl8852b_phy.c */ 18 | 19 | 20 | #endif /*__RTL8852B_PHY_H__*/ 21 | -------------------------------------------------------------------------------- /include/rtw_btc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2013 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifdef CONFIG_BTC 16 | 17 | #ifndef __RTW_BTC_H__ 18 | #define __RTW_BTC_H__ 19 | 20 | #endif /* __RTW_BTC_H__ */ 21 | #endif /* CONFIG_BTC */ 22 | 23 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_c2h.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | *****************************************************************************/ 16 | #ifndef _HAL_C2H_H_ 17 | #define _HAL_C2H_H_ 18 | 19 | void hal_c2h_post_process(void *phl, void *hal, void *c2h); 20 | 21 | #endif /*_HAL_C2H_H_*/ 22 | -------------------------------------------------------------------------------- /include/gspi_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __GSPI_HAL_H__ 16 | #define __GSPI_HAL_H__ 17 | 18 | 19 | void spi_int_dpc(_adapter *padapter, u32 sdio_hisr); 20 | 21 | #endif /* __GSPI_HAL_H__ */ 22 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_wow.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_WOW_H_ 16 | #define _HAL_WOW_H_ 17 | 18 | #ifdef CONFIG_WOWLAN 19 | /* ... */ 20 | #endif /* CONFIG_WOWLAN */ 21 | 22 | #endif /* _HAL_WOW_H_ */ 23 | 24 | -------------------------------------------------------------------------------- /platform/autoconf_mips_98d.h: -------------------------------------------------------------------------------- 1 | #ifdef CONFIG_PLATFORM_RTL8198D 2 | 3 | #define CONFIG_RTW_FC_FASTFWD 4 | 5 | #ifndef CONFIG_PHL_USE_KMEM_ALLOC 6 | #define CONFIG_PHL_USE_KMEM_ALLOC 7 | #endif 8 | #ifdef RTW_WKARD_RATE_DRV_CTRL 9 | #undef RTW_WKARD_RATE_DRV_CTRL 10 | #endif 11 | #ifdef RTW_WKARD_RATE_INIT_6M 12 | #undef RTW_WKARD_RATE_INIT_6M 13 | #endif 14 | 15 | /* CORE RX path shortcut */ 16 | #define CONFIG_RTW_CORE_RXSC 17 | 18 | /* CORE TX path shortcut */ 19 | #define CONFIG_CORE_TXSC 20 | #ifdef CONFIG_CORE_TXSC 21 | /* TX shorcut amsdu */ 22 | #ifdef CONFIG_TX_AMSDU 23 | //#define CONFIG_TXSC_AMSDU 24 | #endif 25 | /* PHL TX path shortcut */ 26 | #define CONFIG_PHL_TXSC 27 | #endif/* CONFIG_CORE_TXSC */ 28 | 29 | /* Separate TX path into different CPUs */ 30 | //#define RTW_TX_CPU_BALANCE 31 | #ifdef RTW_TX_CPU_BALANCE 32 | #define CPU_ID_TX_CORE 2 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_headers.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_HEADERS_H_ 16 | #define _HALRF_HEADERS_H_ 17 | #include "../../hal_headers_le.h" 18 | #include "halrf_struct.h" 19 | 20 | #endif /*_HALRF_HEADERS_H_*/ 21 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/usb/rtl8852bu.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTL8852BU_H_ 16 | #define _RTL8852BU_H_ 17 | /*provide IC-BUS's function declaration or definition to IC*/ 18 | 19 | 20 | 21 | #endif /* _RTL8852BU_H_ */ 22 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_cap.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_CAP_H_ 16 | #define _HAL_CAP_H_ 17 | 18 | void rtw_hal_final_cap_decision(struct rtw_phl_com_t *phl_com, void *hal); 19 | 20 | #endif /* _HAL_CAP_H_ */ 21 | 22 | -------------------------------------------------------------------------------- /phl/phl_cmd_btc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_BTC_DISPATCH_H_ 16 | #define _PHL_BTC_DISPATCH_H_ 17 | 18 | enum rtw_phl_status phl_register_btc_module(struct phl_info_t *phl_info); 19 | 20 | 21 | #endif /* _PHL_BTC_DISPATCH_H_ */ 22 | -------------------------------------------------------------------------------- /platform/i386_pc.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_I386_PC), y) 2 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN 3 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 4 | 5 | EXTRA_CFLAGS += -DCONFIG_RADIO_WORK 6 | #EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 7 | 8 | ifeq ($(CONFIG_SDIO_HCI), y) 9 | EXTRA_CFLAGS += -DRTW_WKARD_SDIO_TX_USE_YIELD 10 | endif 11 | SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) 12 | ARCH ?= $(SUBARCH) 13 | CROSS_COMPILE ?= 14 | KVER := $(shell uname -r) 15 | KSRC := /lib/modules/$(KVER)/build 16 | MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ 17 | INSTALL_PREFIX := 18 | STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging 19 | ifeq ($(CONFIG_PCI_HCI), y) 20 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS 21 | _PLATFORM_FILES := platform/platform_linux_pc_pci.o 22 | OBJS += $(_PLATFORM_FILES) 23 | endif 24 | _PLATFORM_FILES += platform/platform_ops.o 25 | endif 26 | -------------------------------------------------------------------------------- /include/rtw_trx_usb.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTW_TRX_USB_H_ 16 | #define _RTW_TRX_USB_H_ 17 | #include /* struct dvobj_priv and etc. */ 18 | 19 | extern struct rtw_intf_ops usb_ops; 20 | 21 | #endif /* _RTW_TRX_USB_H_ */ 22 | -------------------------------------------------------------------------------- /phl/test/phl_ser_dbg_cmd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_SER_DBG_CMD_H_ 16 | #define _PHL_SER_DBG_CMD_H_ 17 | 18 | void phl_ser_cmd_parser(struct phl_info_t *phl_info, char input[][MAX_ARGV], 19 | u32 input_num, char *output, u32 out_len); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_regulation.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _HAL_REGULATION_C_ 16 | #include "hal_headers.h" 17 | 18 | bool rtw_hal_query_regulation(void *phl, struct rtw_regulation_info *info) 19 | { 20 | return rtw_phl_query_regulation_info(phl, info); 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_struct.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_STRUCT_H_ 16 | #define _HALRF_STRUCT_H_ 17 | 18 | 19 | struct hal_rf_t { 20 | struct rtw_phl_com_t *phl_com; 21 | struct rtw_hal_com_t *hal_com; 22 | 23 | }; 24 | 25 | #endif /*_HALRF_STRUCT_H_*/ 26 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/common.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | ******************************************************************************/ 15 | 16 | #include "common.h" 17 | 18 | u8 shift_mask(u32 mask) 19 | { 20 | u8 i; 21 | 22 | for (i = 0; i < 32; i++) { 23 | if ((mask >> i) & BIT0) 24 | break; 25 | } 26 | 27 | return i; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /include/circ_buf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __CIRC_BUF_H_ 16 | #define __CIRC_BUF_H_ 1 17 | 18 | #define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1)) 19 | 20 | #define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size)) 21 | 22 | #endif //_CIRC_BUF_H_ 23 | 24 | -------------------------------------------------------------------------------- /phl/phl_led.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_LED_H_ 16 | #define _PHL_LED_H_ 17 | 18 | enum rtw_phl_status phl_register_led_module(struct phl_info_t *phl_info); 19 | 20 | void phl_led_control(struct phl_info_t *phl_info, enum rtw_led_event led_event); 21 | 22 | #endif /*_PHL_LED_H_*/ 23 | -------------------------------------------------------------------------------- /phl/test/verify/dbcc/phl_test_dbcc_api.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_TEST_DBCC_API_H_ 16 | #define _PHL_TEST_DBCC_API_H_ 17 | 18 | #ifdef CONFIG_PHL_TEST_VERIFY 19 | 20 | enum rtw_phl_status rtw_test_dbcc_cmd_process(void *priv); 21 | 22 | #endif /* CONFIG_PHL_TEST_VERIFY */ 23 | #endif /* _PHL_TEST_DBCC_API_H_ */ 24 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_acs.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_ACS_H_ 16 | #define _HAL_ACS_H_ 17 | 18 | void rtw_hal_acs_mntr_trigger(void *hal, enum phl_band_idx band_idx, struct acs_mntr_parm *parm); 19 | enum rtw_hal_status rtw_hal_acs_mntr_result(void *hal, 20 | enum phl_band_idx band_idx, struct acs_mntr_rpt *rpt); 21 | 22 | #endif -------------------------------------------------------------------------------- /platform/arm_sunxi.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_ARM_SUNxI), y) 2 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN 3 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUNxI 4 | # default setting for Android 4.1, 4.2 5 | EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 6 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 7 | 8 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS 9 | ifeq ($(CONFIG_USB_HCI), y) 10 | EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX 11 | _PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o 12 | endif 13 | ifeq ($(CONFIG_SDIO_HCI), y) 14 | # default setting for A10-EVB mmc0 15 | #EXTRA_CFLAGS += -DCONFIG_WITS_EVB_V13 16 | _PLATFORM_FILES += platform/platform_ARM_SUNxI_sdio.o 17 | endif 18 | 19 | ARCH := arm 20 | #CROSS_COMPILE := arm-none-linux-gnueabi- 21 | CROSS_COMPILE=/home/android_sdk/Allwinner/a10/android-jb42/lichee-jb42/buildroot/output/external-toolchain/bin/arm-none-linux-gnueabi- 22 | KVER := 3.0.8 23 | #KSRC:= ../lichee/linux-3.0/ 24 | KSRC=/home/android_sdk/Allwinner/a10/android-jb42/lichee-jb42/linux-3.0 25 | endif 26 | -------------------------------------------------------------------------------- /platform/platform_ops.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2013 - 2022 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #include 16 | 17 | int platform_wifi_power_on(void) 18 | { 19 | return 0; 20 | } 21 | 22 | void platform_wifi_power_off(void) 23 | { 24 | 25 | } 26 | 27 | void platform_wifi_get_oob_irq(int *oob_irq) 28 | { 29 | 30 | } 31 | 32 | void platform_wifi_mac_addr(u8 *mac_addr) 33 | { 34 | 35 | } -------------------------------------------------------------------------------- /phl/phl_scanofld.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2022 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_SCANOFLD_H_ 16 | #define _PHL_SCANOFLD_H_ 17 | #include "phl_status.h" 18 | #ifdef CONFIG_PHL_SCANOFLD 19 | void phl_cmd_scanofld_end(void *drv, void *param, u8 band_idx); 20 | enum phl_mdl_ret_code 21 | phl_cmd_scanofld_hdl_internal_evt(void *dispr, void *priv, void *msg); 22 | #endif 23 | #endif /* _PHL_SCANOFLD_H_ */ 24 | -------------------------------------------------------------------------------- /include/rtw_trx_pci.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTW_TRX_PCI_H_ 16 | #define _RTW_TRX_PCI_H_ 17 | 18 | extern struct rtw_intf_ops pci_ops; 19 | 20 | static inline u8 is_pci_support_dma64(struct dvobj_priv *dvobj) 21 | { 22 | PPCI_DATA pci_data = dvobj_to_pci(dvobj); 23 | 24 | return (pci_data->bdma64 == _TRUE) ? _TRUE : _FALSE; 25 | } 26 | #endif /* _RTW_TRX_PCI_H_ */ 27 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_ps.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_PS_H_ 16 | #define _HAL_PS_H_ 17 | #ifdef CONFIG_POWER_SAVE 18 | /* Can be used to verify sw flow without configure hw */ 19 | #define HAL_LPS_SKIP_HW_CFG 0 20 | #define HAL_IPS_SKIP_HW_CFG 0 21 | 22 | enum rtw_hal_status rtw_hal_ps_pwr_req(struct rtw_phl_com_t *phl_com, u8 src, bool pwr_req); 23 | #endif 24 | #endif /*_HAL_PS_H_*/ 25 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_dbcc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_DBCC_H_ 16 | #define _HAL_DBCC_H_ 17 | 18 | enum phl_phy_idx 19 | hal_dbcc_cck_phyidx_decision(struct hal_info_t *hal_info, 20 | struct rtw_phl_com_t *phl_com, 21 | bool dbcc_en); 22 | 23 | void 24 | hal_dbcc_cfg_phy_map(struct hal_info_t *hal, enum phl_band_idx band_idx); 25 | 26 | #endif /* _HAL_DBCC_H_ */ 27 | 28 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/mac_priv_8852b.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_MAC_PRIV_8852B_H_ 18 | #define _MAC_AX_MAC_PRIV_8852B_H_ 19 | 20 | #include "../mac_priv.h" 21 | #if MAC_AX_8852B_SUPPORT 22 | 23 | struct mac_ax_priv_ops *get_mac_8852b_priv_ops(enum mac_ax_intf intf); 24 | 25 | #endif /* #if MAC_AX_8852B_SUPPORT */ 26 | #endif 27 | -------------------------------------------------------------------------------- /phl/pltfm_ops.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PLTFM_OPS_H_ 16 | #define _PLTFM_OPS_H_ 17 | 18 | #ifdef PHL_PLATFORM_WINDOWS 19 | #include "pltfm_ops_windows.h" 20 | #elif defined(PHL_PLATFORM_LINUX) 21 | #include "pltfm_ops_linux.h" 22 | #elif defined(PHL_PLATFORM_MACOS) 23 | #include "pltfm_ops_macos.h" 24 | #else 25 | #include "pltfm_ops_none.h" 26 | #endif 27 | 28 | #endif /*_PLTFM_OPS_H_*/ 29 | -------------------------------------------------------------------------------- /phl/test/cmd_disp_test.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _CMD_DISP_TEST_H_ 16 | #define _CMD_DISP_TEST_H_ 17 | 18 | #ifdef CONFIG_PHL_TEST_SUITE 19 | //#define ENABLE_CMD_DISP_TEST 20 | #ifdef ENABLE_CMD_DISP_TEST 21 | void phl_cmd_disp_test_start(void* phl_info, u8 test_case); 22 | #else 23 | #define phl_cmd_disp_test_start(_phl, _case, _mode) 24 | #endif 25 | #endif 26 | 27 | #endif /*_TRX_TEST_H_*/ 28 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_ax_dfs.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_DFS_H_ 18 | #define _MAC_AX_DFS_H_ 19 | 20 | /* dword0 */ 21 | #define AX_DFS_DROP_NUM_SH 0 22 | #define AX_DFS_DROP_NUM_MSK 0xffff 23 | #define AX_DFS_MAX_CONT_DROP_SH 16 24 | #define AX_DFS_MAX_CONT_DROP_MSK 0xff 25 | #define AX_DFS_TOTAL_DROP_SH 24 26 | #define AX_DFS_TOTAL_DROP_MSK 0xff 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_fw.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_FW_H_ 16 | #define _HAL_FW_H_ 17 | 18 | enum rtw_hal_status 19 | rtw_hal_download_fw(struct rtw_phl_com_t *phl_com, void *hal); 20 | 21 | enum rtw_hal_status 22 | rtw_hal_redownload_fw(struct rtw_phl_com_t *phl_com, void *hal); 23 | 24 | void rtw_hal_fw_dbg_dump(void *hal); 25 | 26 | void hal_fw_en_basic_log(struct rtw_hal_com_t *hal_com); 27 | 28 | #endif /* _HAL_FW_H_ */ 29 | 30 | -------------------------------------------------------------------------------- /platform/platform_RTK_DMP_usb.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2013 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #include 16 | 17 | int platform_wifi_power_on(void) 18 | { 19 | int ret = 0; 20 | u32 tmp; 21 | tmp = readl((volatile unsigned int *)0xb801a608); 22 | tmp &= 0xffffff00; 23 | tmp |= 0x55; 24 | writel(tmp, (volatile unsigned int *)0xb801a608); /* write dummy register for 1055 */ 25 | return ret; 26 | } 27 | 28 | void platform_wifi_power_off(void) 29 | { 30 | } 31 | -------------------------------------------------------------------------------- /include/phl_api_tmp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __PHL_API_TMP_H_ 16 | #define __PHL_API_TMP_H_ 17 | 18 | 19 | #ifdef CONFIG_SDIO_HCI 20 | static inline void rtw_hal_sd_f0_reg_dump(void *sel, void *h){ }; 21 | static inline void rtw_hal_sdio_local_reg_dump(void *sel, void *h){ }; 22 | #endif 23 | 24 | static inline u32 rtw_hal_get_txdesc_len(void *h, 25 | struct pkt_attrib *attrib){return 0;}; 26 | 27 | 28 | #endif /*__PHL_API_TMP_H_*/ 29 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_mcc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_MCC_H_ 16 | #define _HAL_MCC_H_ 17 | /* MCC definition for private usage */ 18 | #ifdef CONFIG_MCC_SUPPORT 19 | enum rtw_hal_status rtw_hal_mcc_update_macid_bitmap(void *hal, u8 group, 20 | u16 macid, struct rtw_phl_mcc_macid_bitmap *info); 21 | 22 | enum rtw_hal_status rtw_hal_mcc_sync_enable(void *hal, 23 | struct rtw_phl_mcc_en_info *info); 24 | #endif 25 | #endif /*_HAL_MCC_H_*/ 26 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/spatial_reuse.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_SPATIAL_REUSE_H_ 18 | #define _MAC_AX_SPATIAL_REUSE_H_ 19 | 20 | #include "../type.h" 21 | 22 | u32 mac_sr_update(struct mac_ax_adapter *adapter, 23 | struct mac_ax_sr_info *sr_info, 24 | enum mac_ax_band band); 25 | 26 | u32 spatial_reuse_init(struct mac_ax_adapter *adapter, 27 | enum mac_ax_band band); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_sta.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_STA_H_ 16 | #define _HAL_STA_H_ 17 | 18 | struct rtw_hw_cfg_tab { 19 | u8 dummy; 20 | }; 21 | 22 | enum rtw_hal_status 23 | rtw_hal_restore_sta_entry(struct rtw_phl_com_t* phl_com, void *hal, 24 | struct rtw_phl_stainfo_t *sta, bool is_connect); 25 | 26 | enum rtw_hal_status 27 | rtw_hal_init_tmp_entry(void *hal, u8 tmp_entry_num, u8 std_entry_num); 28 | 29 | #endif /*_HAL_STA_H_*/ 30 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/common.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_COMMON_H_ 18 | #define _MAC_AX_COMMON_H_ 19 | 20 | #include "../type.h" 21 | 22 | /** 23 | * @addtogroup Common 24 | * @{ 25 | * @addtogroup HW_Related 26 | * @{ 27 | */ 28 | /** 29 | * @brief shift_mask 30 | * 31 | * @param mask 32 | * @return Please Place Description here. 33 | * @retval mask_last_bit 34 | */ 35 | u8 shift_mask(u32 mask); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_dfs.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _HAL_DFS_C_ 16 | #include "hal_headers.h" 17 | 18 | #ifdef CONFIG_PHL_DFS 19 | 20 | enum rtw_hal_status 21 | rtw_hal_radar_detect_cfg(void *hal, bool dfs_enable) 22 | { 23 | struct hal_info_t *hal_info = (struct hal_info_t *)hal; 24 | 25 | PHL_INFO("====>%s dfs_en:%d ============\n", __func__, dfs_enable); 26 | 27 | rtw_hal_bb_dfs_rpt_cfg(hal_info, dfs_enable); 28 | 29 | return RTW_HAL_STATUS_SUCCESS; 30 | } 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/usb/rtl8852bu_io.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _RTL8852BU_IO_C_ 16 | #include "../rtl8852b_hal.h" 17 | 18 | void hal_usb_set_io_ops_8852bu(struct hal_info_t *hal, struct hal_io_ops *ops) 19 | { 20 | /* 21 | ops->_read8 = &usb_read8; 22 | ops->_read16 = &usb_read16; 23 | ops->_read32 = &usb_read32; 24 | 25 | ops->_write8 = &usb_write8; 26 | ops->_write16 = &usb_write16; 27 | ops->_write32 = &usb_write32; 28 | ops->_write_mem = &usb_write_mem; 29 | */ 30 | } 31 | -------------------------------------------------------------------------------- /platform/custom_country_chplan.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2013 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | 16 | #error "You have defined CONFIG_CUSTOMIZED_COUNTRY_CHPLAN_MAP to use a customized map of your own instead of the default one" 17 | #error "Before removing these error notifications, please make sure regulatory certification requirements of your target markets" 18 | 19 | static const struct country_chplan CUSTOMIZED_country_chplan_map[] = { 20 | COUNTRY_CHPLAN_ENT("TW", 0x76, 0x00, DEF , 1, 1, 1), /* Taiwan */ 21 | }; 22 | 23 | -------------------------------------------------------------------------------- /include/rtw_mem.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2022 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __RTW_MEM_H__ 16 | #define __RTW_MEM_H__ 17 | 18 | #define RTKM_MGMT_SIZE PAGE_SIZE 19 | 20 | void *rtkm_kmalloc(size_t size, gfp_t flags); 21 | void *rtkm_kzalloc(size_t size, gfp_t flags); 22 | void rtkm_kfree(const void *objp, size_t size); 23 | 24 | int rtkm_prealloc_init(void); 25 | void rtkm_prealloc_destroy(void); 26 | void rtkm_dump_mstatus(void *sel); 27 | void rtkm_set_trace(unsigned int mask); 28 | 29 | #endif /* __RTW_MEM_H__ */ 30 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/hdr_conv_rx_8852b.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | ******************************************************************************/ 15 | #include "hdr_conv_rx_8852b.h" 16 | 17 | #if MAC_AX_8852B_SUPPORT 18 | u32 mac_hdr_conv_rx_en_8852b(struct mac_ax_adapter *adapter, 19 | struct mac_ax_rx_hdr_conv_cfg *cfg) 20 | { 21 | return MACNOTSUP; 22 | } 23 | 24 | u32 mac_hdr_conv_rx_en_driv_info_hdr_8852b(struct mac_ax_adapter *adapter, 25 | struct mac_ax_rx_driv_info_hdr_cfg *cfg) 26 | { 27 | return MACNOTSUP; 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /phl/phl_notify.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_NOTIFY_H_ 16 | #define _PHL_NOTIFY_H_ 17 | 18 | #ifdef CONFIG_CMD_DISP 19 | enum rtw_phl_status 20 | rtw_phl_cmd_notify(struct rtw_phl_com_t *phl_com, 21 | enum phl_msg_evt_id event, 22 | void *hal_cmd, 23 | u8 hw_idx); 24 | 25 | enum rtw_phl_status 26 | phl_notify_cmd_hdl(struct phl_info_t *phl_info, u8 *param); 27 | #endif /* CONFIG_CMD_DISP */ 28 | 29 | #endif /*_PHL_NOTIFY_H_*/ 30 | 31 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/phy_misc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | ******************************************************************************/ 15 | 16 | #ifndef _MAC_AX_PHY_MISC_H_ 17 | #define _MAC_AX_PHY_MISC_H_ 18 | 19 | #include "../type.h" 20 | #include "fwcmd.h" 21 | 22 | u32 mac_fast_ch_sw(struct mac_ax_adapter *adapter, 23 | struct mac_ax_fast_ch_sw_param *fast_ch_sw_param); 24 | u32 mac_fast_ch_sw_done(struct mac_ax_adapter *adapter); 25 | u32 mac_get_fast_ch_sw_rpt(struct mac_ax_adapter *adapter, u32 *fast_ch_sw_status_code); 26 | #endif // __MAC_AX_PHY_MISC_H_ -------------------------------------------------------------------------------- /phl/phl_trx_mit.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_TRX_MIT_H_ 16 | #define _PHL_TRX_MIT_H_ 17 | 18 | #if defined(CONFIG_PCI_HCI) && defined(PCIE_TRX_MIT_EN) 19 | enum rtw_phl_status phl_pcie_trx_mit_start(struct phl_info_t *phl_info, 20 | u8 dispr_idx); 21 | enum rtw_phl_status phl_evt_pcie_trx_mit_hdlr(struct phl_info_t *phl_info, 22 | u8 *mit_info); 23 | 24 | 25 | void phl_pcie_trx_mit_watchdog(struct phl_info_t *phl_info); 26 | #endif 27 | 28 | #endif /*_PHL_CMD_GENERAL_H_*/ 29 | -------------------------------------------------------------------------------- /include/rtw_phl_cmd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __RTW_PHL_CMD__ 16 | #define __RTW_PHL_CMD__ 17 | u32 rtw_enqueue_phl_cmd(struct cmd_obj *pcmd); 18 | #ifdef CONFIG_TDLS 19 | enum rtw_phl_status rtw_send_tdls_sync_msg(_adapter *padapter); 20 | #endif 21 | #if defined (CONFIG_CMD_GENERAL) && defined (CONFIG_PCIE_TRX_MIT) 22 | u8 rtw_pcie_trx_mit_cmd(_adapter *padapter, u32 tx_timer, u8 tx_counter, 23 | u32 rx_timer, u8 rx_counter, u8 fixed_mit); 24 | #endif 25 | #endif /* __RTW_PHL_CMD__ */ 26 | 27 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/fwcmd_8852b.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | #ifndef _MAC_AX_FW_CMD_8852B_H_ 17 | #define _MAC_AX_FW_CMD_8852B_H_ 18 | 19 | #include "../../mac_def.h" 20 | #if MAC_AX_8852B_SUPPORT 21 | 22 | struct mac_ax_h2creg_offset * 23 | get_h2creg_offset_8852b(struct mac_ax_adapter *adapter); 24 | 25 | struct mac_ax_c2hreg_offset * 26 | get_c2hreg_offset_8852b(struct mac_ax_adapter *adapter); 27 | 28 | #endif /* #if MAC_AX_8852B_SUPPORT */ 29 | #endif 30 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_8852b/halrf_version_rtl8852b.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | /*RTL8852B RF Parameters*/ 26 | #define RF_RELEASE_VERSION_8852B 0x32 27 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/pwr_seq_func.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_PWR_SEQ_FUNC_H_ 18 | #define _MAC_AX_PWR_SEQ_FUNC_H_ 19 | 20 | #include "../mac_def.h" 21 | 22 | u32 pwr_poll_u32(struct mac_ax_adapter *adapter, u32 offset, 23 | u32 mask, u32 pwr_val); 24 | u32 pwr_poll_u16(struct mac_ax_adapter *adapter, u32 offset, 25 | u16 mask, u16 pwr_val); 26 | u32 pwr_poll_u8(struct mac_ax_adapter *adapter, u32 offset, 27 | u8 mask, u8 pwr_val); 28 | #endif 29 | -------------------------------------------------------------------------------- /include/rtw_hwsim_intf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright(c) 2018 Realtek Corporation. All rights reserved. 3 | * 4 | * This program is free software; you can redistribute it and/or modify it 5 | * under the terms of version 2 of the GNU General Public License as 6 | * published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but WITHOUT 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 11 | * more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program; if not, write to the Free Software Foundation, Inc., 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 16 | */ 17 | 18 | #ifndef __RTW_HWSIM_INTF_H_ 19 | #define __RTW_HWSIM_INTF_H_ 20 | 21 | #include 22 | 23 | #include 24 | 25 | int rtw_hwsim_medium_tx(struct _ADAPTER *adapter, const void *tx_ctx, 26 | u8 *buf, size_t buflen); 27 | 28 | void rtw_hwsim_medium_pre_netif_rx(struct sk_buff *skb); 29 | 30 | 31 | #endif /* __RTW_HWSIM_INTF_H__ */ 32 | -------------------------------------------------------------------------------- /include/custom_gpio.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __CUSTOM_GPIO_H__ 16 | #define __CUSTOM_GPIO_H___ 17 | 18 | #include 19 | #include 20 | 21 | typedef enum cust_gpio_modes { 22 | WLAN_PWDN_ON, 23 | WLAN_PWDN_OFF, 24 | WLAN_POWER_ON, 25 | WLAN_POWER_OFF, 26 | WLAN_BT_PWDN_ON, 27 | WLAN_BT_PWDN_OFF 28 | } cust_gpio_modes_t; 29 | 30 | extern int rtw_wifi_gpio_init(void); 31 | extern int rtw_wifi_gpio_deinit(void); 32 | extern void rtw_wifi_gpio_wlan_ctrl(int onoff); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /phl/phl_version.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_VERSION_H_ 16 | #define _PHL_VERSION_H_ 17 | 18 | /* major-minor-hotfix-[branchid + hotfix] */ 19 | #define PHL_VERSION(a, b, c, d) (((a) << 48) + ((b) << 32) + ((c) << 16) + (d)) 20 | 21 | /* maximum 4 digits */ 22 | #define PHL_MAJOR_VER 1 23 | #define PHL_MINOR_VER 19 24 | #define PHL_HOTFIX_VER 42 25 | #define PHL_BRANCH_IDX 100 26 | 27 | #define PHL_VER_CODE PHL_VERSION(PHL_MAJOR_VER, PHL_MINOR_VER, PHL_HOTFIX_VER, PHL_BRANCH_IDX) 28 | 29 | #endif /*_PHL_VERSION_H_*/ 30 | -------------------------------------------------------------------------------- /include/pci_ops_linux.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __PCI_OPS_LINUX_H__ 16 | #define __PCI_OPS_LINUX_H__ 17 | 18 | u8 os_pci_read8(struct dvobj_priv *dvobj, u32 addr); 19 | u16 os_pci_read16(struct dvobj_priv *dvobj, u32 addr); 20 | u32 os_pci_read32(struct dvobj_priv *dvobj, u32 addr); 21 | int os_pci_write8(struct dvobj_priv *dvobj, u32 addr, u8 val); 22 | int os_pci_write16(struct dvobj_priv *dvobj, u32 addr, u16 val); 23 | int os_pci_write32(struct dvobj_priv *dvobj, u32 addr, u32 val); 24 | #endif /*__PCI_OPS_LINUX_H__*/ 25 | -------------------------------------------------------------------------------- /phl/phl_thermal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_THERMAL_H_ 16 | #define _PHL_THERMAL_H_ 17 | 18 | #define THERMAL_TX_DUTY_CTRL_DURATION 100 19 | #define THERMAL_NO_TX_DUTY_CTRL 100 20 | #define THERMAL_NO_SW_THRESHOLD 0xff 21 | 22 | void phl_thermal_protect_watchdog(struct phl_info_t *phl_info); 23 | 24 | void phl_thermal_protect_cfg_tx_duty( 25 | struct phl_info_t *phl_info, 26 | u16 tx_duty_interval, 27 | u8 ratio); 28 | 29 | void phl_thermal_protect_stop_tx_duty(struct phl_info_t *phl_info); 30 | #endif /*_PHL_THERMAL_H_*/ 31 | -------------------------------------------------------------------------------- /phl/phl_cmd_ser.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __PHL_CMD_SER_H__ 16 | #define __PHL_CMD_SER_H__ 17 | 18 | #ifndef CONFIG_FSM 19 | enum rtw_phl_status phl_fw_watchdog_timeout_notify(void *phl); 20 | enum rtw_phl_status rtw_phl_ser_dump_ple_buffer(void *phl); 21 | #endif 22 | 23 | enum rtw_phl_status phl_ser_send_msg(void *phl, enum RTW_PHL_SER_NOTIFY_EVENT notify); 24 | 25 | #ifdef CONFIG_PHL_CMD_SER 26 | enum rtw_phl_status 27 | phl_register_ser_module(struct phl_info_t *phl_info); 28 | #endif 29 | 30 | #endif /* __PHL_CMD_SER_H__ */ 31 | -------------------------------------------------------------------------------- /core/crypto/sha256.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA256 hash implementation and interface functions 3 | * Copyright (c) 2003-2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA256_H 10 | #define SHA256_H 11 | 12 | #define SHA256_MAC_LEN 32 13 | 14 | int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, 15 | const u8 *addr[], const size_t *len, u8 *mac); 16 | int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, 17 | size_t data_len, u8 *mac); 18 | int sha256_prf(const u8 *key, size_t key_len, const char *label, 19 | const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 20 | int sha256_prf_bits(const u8 *key, size_t key_len, const char *label, 21 | const u8 *data, size_t data_len, u8 *buf, 22 | size_t buf_len_bits); 23 | void tls_prf_sha256(const u8 *secret, size_t secret_len, 24 | const char *label, const u8 *seed, size_t seed_len, 25 | u8 *out, size_t outlen); 26 | int hmac_sha256_kdf(const u8 *secret, size_t secret_len, 27 | const char *label, const u8 *seed, size_t seed_len, 28 | u8 *out, size_t outlen); 29 | 30 | #endif /* SHA256_H */ 31 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/cmac_tx_8852b.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_CMAC_TX_8852B_H_ 18 | #define _MAC_AX_CMAC_TX_8852B_H_ 19 | 20 | #include "../../mac_def.h" 21 | #include "../mac_priv.h" 22 | #if MAC_AX_8852B_SUPPORT 23 | 24 | u32 macid_idle_ck_8852b(struct mac_ax_adapter *adapter, 25 | struct mac_role_tbl *role); 26 | u32 stop_sch_tx_8852b(struct mac_ax_adapter *adapter, enum sch_tx_sel sel, 27 | struct mac_ax_sch_tx_en_cfg *bak); 28 | #endif /* #if MAC_AX_8852B_SUPPORT */ 29 | #endif 30 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/phy_rpt_8852b.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_PHY_RPT_8852B_H_ 18 | #define _MAC_AX_PHY_RPT_8852B_H_ 19 | 20 | #include "../../mac_def.h" 21 | #if MAC_AX_8852B_SUPPORT 22 | 23 | u32 get_bbrpt_dle_cfg_8852b(struct mac_ax_adapter *adapter, 24 | u8 is2wlcpu, u32 *port_id, u32 *queue_id); 25 | 26 | u32 mac_cfg_per_pkt_phy_rpt_8852b(struct mac_ax_adapter *adapter, 27 | struct mac_ax_per_pkt_phy_rpt *rpt); 28 | 29 | #endif /* #if MAC_AX_8852B_SUPPORT */ 30 | #endif 31 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_com_i.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_COM_I_H_ 16 | #define _HAL_COM_I_H_ 17 | 18 | enum rtw_hal_status rtw_hal_ppdu_sts_cfg(void *hal, u8 band_idx, bool en); 19 | enum rtw_hal_status rtw_hal_ppdu_sts_init(void *hal, u8 band_idx, 20 | bool en, u8 appen_info, u8 filter); 21 | 22 | enum phl_band_idx rtw_hal_phy_idx_to_hw_band(enum phl_phy_idx p_idx); 23 | 24 | enum phl_phy_idx rtw_hal_hw_band_to_phy_idx(enum phl_band_idx band_idx); 25 | 26 | void rtw_hal_init_hw_band_info(void *hal, enum phl_band_idx band_idx); 27 | #endif /* _HAL_COM_I_H_ */ 28 | -------------------------------------------------------------------------------- /phl/phl_p2pps_def.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_P2PPS_DEF_H_ 16 | #define _PHL_P2PPS_DEF_H_ 17 | #ifdef RTW_WKARD_P2PPS_REFINE 18 | #ifdef CONFIG_PHL_P2PPS 19 | 20 | struct rtw_phl_noa_info { 21 | u8 en_desc_num; 22 | u8 paused; 23 | struct rtw_phl_noa_desc noa_desc[MAX_NOA_DESC]; 24 | struct rtw_phl_opps_desc opps_desc; 25 | }; 26 | 27 | struct rtw_phl_p2pps_info { 28 | struct phl_info_t *phl_info; 29 | struct rtw_phl_p2pps_ops ops; 30 | _os_lock p2pps_lock; 31 | struct rtw_phl_noa_info noa_info[MAX_WIFI_ROLE_NUMBER]; 32 | }; 33 | #endif 34 | #endif 35 | #endif 36 | -------------------------------------------------------------------------------- /phl/phl_acs_def.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_ACS_DEF_H_ 16 | #define _PHL_ACS_DEF_H_ 17 | 18 | /* size of phl_acs_chnl_tbl which include 2G/5G/6G channel */ 19 | #define MAX_ACS_INFO 102 20 | #define NHM_RPT_NUM 12 21 | 22 | struct acs_mntr_rpt { 23 | u8 clm_ratio; 24 | u8 nhm_ratio; 25 | u8 nhm_pwr; 26 | u8 nhm_rpt[NHM_RPT_NUM]; 27 | }; 28 | struct rtw_acs_info_parm { 29 | u8 idx; 30 | u8 ch; 31 | u8 band; 32 | struct acs_mntr_rpt rpt; 33 | }; 34 | 35 | struct acs_mntr_parm { 36 | u16 mntr_time; 37 | bool nhm_incld_cca; 38 | }; 39 | 40 | #endif /*_PHL_ACS_DEF_H_*/ -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_8852b/halrf_8852b_api_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALRF_8852B_API_EX_H__ 26 | #define __HALRF_8852B_API_EX_H__ 27 | #ifdef RF_8852B_SUPPORT 28 | 29 | #endif 30 | #endif /* __INC_PHYDM_API_H_8852B__ */ 31 | -------------------------------------------------------------------------------- /include/rtw_byteorder.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTL871X_BYTEORDER_H_ 16 | #define _RTL871X_BYTEORDER_H_ 17 | 18 | 19 | #if defined(CONFIG_LITTLE_ENDIAN) && defined (CONFIG_BIG_ENDIAN) 20 | #error "Shall be CONFIG_LITTLE_ENDIAN or CONFIG_BIG_ENDIAN, but not both!\n" 21 | #endif 22 | 23 | #if defined(CONFIG_LITTLE_ENDIAN) 24 | #ifndef CONFIG_PLATFORM_MSTAR389 25 | #include 26 | #endif 27 | #elif defined (CONFIG_BIG_ENDIAN) 28 | #include 29 | #else 30 | # error "Must be LITTLE/BIG Endian Host" 31 | #endif 32 | 33 | #endif /* _RTL871X_BYTEORDER_H_ */ 34 | -------------------------------------------------------------------------------- /include/rtw_trx.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 - 2021 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTW_TRX_H_ 16 | #define _RTW_TRX_H_ 17 | 18 | struct dvobj_priv; 19 | struct rtw_intf_ops { 20 | /*** xmit section ***/ 21 | s32(*init_xmit_priv)(_adapter *adapter); 22 | void(*free_xmit_priv)(_adapter *adapter); 23 | 24 | s32(*data_xmit)(_adapter *adapter, struct xmit_frame *pxmitframe); 25 | 26 | /*** recv section ***/ 27 | s32(*init_recv_priv)(struct dvobj_priv *dvobj); 28 | void(*free_recv_priv)(struct dvobj_priv *dvobj); 29 | 30 | }; 31 | 32 | s32 rtw_mgnt_xmit(_adapter *adapter, struct xmit_frame *pmgntframe); 33 | 34 | 35 | #endif /* _RTW_TRX_H_ */ 36 | -------------------------------------------------------------------------------- /platform/arm_rk.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_ARM_ROCKCHIP), y) 2 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ANDROID 3 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 4 | EXTRA_CFLAGS += -DCONFIG_RADIO_WORK 5 | EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 6 | ifeq ($(shell test $(CONFIG_RTW_ANDROID) -ge 11; echo $$?), 0) 7 | EXTRA_CFLAGS += -DCONFIG_IFACE_NUMBER=2 8 | #EXTRA_CFLAGS += -DCONFIG_PLATFORM_ROCKCHIPS 9 | endif 10 | 11 | ARCH := arm 12 | CROSS_COMPILE := /home/android_sdk/Rockchip/Rk3188/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- 13 | KSRC := /home/android_sdk/Rockchip/Rk3188/kernel 14 | 15 | ifeq ($(CONFIG_PCI_HCI), y) 16 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS 17 | _PLATFORM_FILES := platform/platform_linux_pc_pci.o \ 18 | platform/platform_ARM_RK_pci.o 19 | 20 | OBJS += $(_PLATFORM_FILES) 21 | # Core Config 22 | # CONFIG_RTKM - n/m/y for not support / standalone / built-in 23 | CONFIG_RTKM = m 24 | CONFIG_MSG_NUM = 128 25 | EXTRA_CFLAGS += -DCONFIG_MSG_NUM=$(CONFIG_MSG_NUM) 26 | EXTRA_CFLAGS += -DCONFIG_RXBUF_NUM_1024 27 | EXTRA_CFLAGS += -DCONFIG_TX_SKB_ORPHAN 28 | # PHL Config 29 | EXTRA_CFLAGS += -DRTW_WKARD_98D_RXTAG 30 | endif 31 | 32 | ifeq ($(CONFIG_SDIO_HCI), y) 33 | _PLATFORM_FILES = platform/platform_ARM_RK_sdio.c 34 | endif 35 | endif 36 | -------------------------------------------------------------------------------- /phl/hal_g6/test/mp/hal_test_mp.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _HAL_TEST_MP_C_ 16 | #include "../../hal_headers.h" 17 | #include "../../../test/mp/phl_test_mp_def.h" 18 | #include "hal_test_mp_api.h" 19 | 20 | 21 | #ifdef CONFIG_HAL_TEST_MP 22 | 23 | void rtw_hal_mp_cfg(struct rtw_phl_com_t *phl_com, void *hal) 24 | { 25 | struct hal_info_t *hal_info = (struct hal_info_t *)hal; 26 | struct hal_ops_t *hal_ops = hal_get_ops(hal_info); 27 | 28 | if (true == phl_is_mp_mode(phl_com)) 29 | hal_ops->hal_mp_init(phl_com, hal_info); 30 | else 31 | hal_ops->hal_mp_deinit(phl_com, hal_info); 32 | } 33 | 34 | #endif /* CONFIG_HAL_TEST_MP */ -------------------------------------------------------------------------------- /phl/hal_g6/btc/halbtc_dbg_cmd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALBTC_DBG_CMD_H_ 16 | #define _HALBTC_DBG_CMD_H_ 17 | 18 | void halbtc_cmd_parser(struct btc_t *btc, char input[][MAX_ARGV], 19 | u32 input_num, char *output, u32 out_len); 20 | s32 halbtc_cmd(struct btc_t *btc, char *input, char *output, u32 out_len); 21 | void _get_wl_nhm_dbm(struct btc_t *btc); 22 | void _get_wl_cn_report(struct btc_t *btc); 23 | void _get_wl_evm_report(struct btc_t *btc); 24 | void _bt_psd_setup(struct btc_t *btc, u8 start_idx, u8 auto_rpt_type); 25 | void _bt_psd_update(struct btc_t *btc, u8 *buf, u32 len); 26 | 27 | 28 | 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_8852b/halbb_hwimg_raw_data_8852b_gain.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | 26 | /*Image2HeaderVersion: R3 2.0.1.2*/ 27 | #ifndef _HALBB_HWIMG_RAW_DATA_8852B_GAIN_H 28 | #define _HALBB_HWIMG_RAW_DATA_8852B_GAIN_H 29 | 30 | 31 | #endif /* _HALBB_HWIMG_RAW_DATA_8852B_GAIN_H */ -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/usb/hal_trx_8852bu.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_TRX_8852BU_H_ 16 | #define _HAL_TRX_8852BU_H_ 17 | 18 | /* Release report size and format*/ 19 | #define RX_RP_PACKET_SIZE 4 20 | 21 | #define GET_RX_RP_PKT_POLLUTED(rppkt) LE_BITS_TO_4BYTE(rppkt + 0x00, 31, 1) 22 | #define GET_RX_RP_PKT_PCIE_SEQ(rppkt) LE_BITS_TO_4BYTE(rppkt + 0x00, 16, 15) 23 | #define GET_RX_RP_PKT_TX_STS(rppkt) LE_BITS_TO_4BYTE(rppkt + 0x00, 13, 3) 24 | #define GET_RX_RP_PKT_QSEL(rppkt) LE_BITS_TO_4BYTE(rppkt + 0x00, 8, 5) 25 | #define GET_RX_RP_PKT_MAC_ID(rppkt) LE_BITS_TO_4BYTE(rppkt + 0x00, 0, 8) 26 | 27 | 28 | #endif /*_HAL_TRX_8852BU_H_*/ 29 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_8852b/halbb_version_rtl8852b.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | /*RTL8852B BB Parameters*/ 26 | #ifndef _HALBB_VERSION_8852B_H_ 27 | #define _HALBB_VERSION_8852B_H_ 28 | #define BB_REG_RELEASE_DATE_8852B 20220530 29 | #define BB_REG_RELEASE_VERSION_8852B 29 30 | #endif 31 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_dack.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_DACK_H_ 16 | #define _HALRF_DACK_H_ 17 | 18 | /*@--------------------------Define Parameters-------------------------------*/ 19 | 20 | 21 | /*@-----------------------End Define Parameters-----------------------*/ 22 | 23 | struct halrf_dack_info { 24 | bool dack_done; 25 | u8 msbk_d[2][2][16]; 26 | u8 dadck_d[2][2]; /*path/IQ*/ 27 | u16 addck_d[2][2]; /*path/IQ*/ 28 | u16 biask_d[2][2]; /*path/IQ*/ 29 | u32 dack_cnt; 30 | u32 dack_time; 31 | bool addck_timeout[2]; 32 | bool dadck_timeout[2]; 33 | bool msbk_timeout[2]; 34 | bool dack_fail; 35 | }; 36 | 37 | 38 | #endif -------------------------------------------------------------------------------- /phl/test/verify/phl_test_verify_api.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_TEST_VERIFY_API_H_ 16 | #define _PHL_TEST_VERIFY_API_H_ 17 | 18 | #ifdef CONFIG_PHL_TEST_VERIFY 19 | /* verify command class */ 20 | enum verify_feature { 21 | VERIFY_FEATURES_NULL = 0, 22 | VERIFY_FEATURES_DBCC, 23 | VERIFY_FEATURES_MAX, 24 | }; 25 | 26 | #define VERIFY_CMD_HDR_SIZE (sizeof(struct verify_cmd_hdr)) 27 | #define VERIFY_GET_SUBUF(a) ((u8 *)(a) + VERIFY_CMD_HDR_SIZE) 28 | 29 | static inline enum rtw_phl_status func_null(void *priv) 30 | { 31 | return RTW_PHL_STATUS_SUCCESS; 32 | }; 33 | #endif /* CONFIG_PHL_TEST_VERIFY */ 34 | #endif /* _PHL_TEST_VERIFY_API_H_ */ 35 | -------------------------------------------------------------------------------- /core/rtw_mem.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2022 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | extern int rtkm_prealloc_init(void); 21 | extern void rtkm_prealloc_destroy(void); 22 | 23 | static int __init rtw_mem_init(void) 24 | { 25 | rtkm_prealloc_init(); 26 | return 0; 27 | } 28 | 29 | static void __exit rtw_mem_exit(void) 30 | { 31 | rtkm_prealloc_destroy(); 32 | } 33 | 34 | module_init(rtw_mem_init); 35 | module_exit(rtw_mem_exit); 36 | 37 | MODULE_LICENSE("GPL"); 38 | MODULE_DESCRIPTION("Realtek Wireless Lan Driver"); 39 | MODULE_AUTHOR("Realtek Semiconductor Corp."); 40 | MODULE_VERSION("DRIVERVERSION"); 41 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_acs.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _HAL_ACS_C_ 16 | #include "hal_headers.h" 17 | 18 | #ifdef CONFIG_RTW_ACS 19 | void rtw_hal_acs_mntr_trigger(void *hal, enum phl_band_idx band_idx, struct acs_mntr_parm *parm) 20 | { 21 | struct hal_info_t *hal_info = (struct hal_info_t *)hal; 22 | 23 | rtw_hal_bb_acs_mntr_trigger(hal_info, band_idx, parm); 24 | } 25 | 26 | enum rtw_hal_status rtw_hal_acs_mntr_result(void *hal, 27 | enum phl_band_idx band_idx, struct acs_mntr_rpt *rpt) 28 | { 29 | struct hal_info_t *hal_info = (struct hal_info_t *)hal; 30 | 31 | return rtw_hal_bb_acs_mntr_result(hal_info, band_idx, rpt); 32 | } 33 | #endif /* CONFIG_RTW_ACS */ -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_8852b/halbb_version_rtl8852bp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | /*RTL8852BP BB Parameters*/ 26 | #ifndef _HALBB_VERSION_8852BP_H_ 27 | #define _HALBB_VERSION_8852BP_H_ 28 | #define BB_REG_RELEASE_DATE_8852BP 20221026 29 | #define BB_REG_RELEASE_VERSION_8852BP 3 30 | #endif 31 | -------------------------------------------------------------------------------- /include/rtw_io.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTW_IO_H_ 16 | #define _RTW_IO_H_ 17 | 18 | #ifdef CONFIG_PCI_HCI 19 | #define MAX_CONTINUAL_IO_ERR 4 20 | #endif 21 | 22 | #ifdef CONFIG_USB_HCI 23 | #define MAX_CONTINUAL_IO_ERR 4 24 | #endif 25 | 26 | #ifdef CONFIG_SDIO_HCI 27 | #define SD_IO_TRY_CNT (8) 28 | #define MAX_CONTINUAL_IO_ERR SD_IO_TRY_CNT 29 | #endif 30 | 31 | #ifdef CONFIG_GSPI_HCI 32 | #define SD_IO_TRY_CNT (8) 33 | #define MAX_CONTINUAL_IO_ERR SD_IO_TRY_CNT 34 | #endif 35 | 36 | 37 | int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj); 38 | void rtw_reset_continual_io_error(struct dvobj_priv *dvobj); 39 | 40 | #endif /* _RTW_IO_H_ */ 41 | -------------------------------------------------------------------------------- /platform/arm_1619b.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_RTK16XXB), y) 2 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN 3 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 4 | EXTRA_CFLAGS += -DCONFIG_RADIO_WORK 5 | EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 6 | EXTRA_CFLAGS += -DRTK_1619B_PLATFORM 7 | 8 | # CONFIG_RTW_ANDROID - 0: no Android, 4/5/6/7/8/9/10/11 : Android version 9 | CONFIG_RTW_ANDROID = $(PLTFM_VER) 10 | 11 | ifeq ($(shell test $(CONFIG_RTW_ANDROID) -gt 0; echo $$?), 0) 12 | EXTRA_CFLAGS += -DCONFIG_RTW_ANDROID=$(CONFIG_RTW_ANDROID) 13 | endif 14 | 15 | ifeq ($(shell test $(CONFIG_RTW_ANDROID) -ge 11; echo $$?), 0) 16 | EXTRA_CFLAGS += -DCONFIG_IFACE_NUMBER=3 17 | endif 18 | 19 | ARCH ?= arm 20 | 21 | CROSS_COMPILE := $(CROSS) 22 | KSRC := $(LINUX_KERNEL_PATH) 23 | 24 | ifeq ($(CONFIG_PCI_HCI), y) 25 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS 26 | _PLATFORM_FILES := platform/platform_linux_pc_pci.o 27 | OBJS += $(_PLATFORM_FILES) 28 | # Core Config 29 | # CONFIG_RTKM - n/m/y for not support / standalone / built-in 30 | CONFIG_RTKM = m 31 | CONFIG_MSG_NUM = 128 32 | EXTRA_CFLAGS += -DCONFIG_MSG_NUM=$(CONFIG_MSG_NUM) 33 | EXTRA_CFLAGS += -DCONFIG_RXBUF_NUM_1024 34 | EXTRA_CFLAGS += -DCONFIG_TX_SKB_ORPHAN 35 | # PHL Config 36 | EXTRA_CFLAGS += -DRTW_WKARD_98D_RXTAG 37 | endif 38 | _PLATFORM_FILES += platform/platform_ops.o 39 | endif 40 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_types.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALBB_TYPES_H__ 26 | #define __HALBB_TYPES_H__ 27 | /*@--------------------------[Define] ---------------------------------------*/ 28 | #define HALBB_CONFIG_RUN_IN_DRV 29 | 30 | /*For FW API*/ 31 | #define __iram_func__ 32 | 33 | #endif /* __HALBB_TYPES_H__ */ 34 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_scanofld.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_SCANOFLD_H_ 16 | #define _HAL_SCANOFLD_H_ 17 | 18 | #ifdef CONFIG_PHL_SCANOFLD 19 | void rtw_hal_scan_ofld_leave_cur_chnl(void *hal, u8 hw_band, u8 ch_band, u8 ch); 20 | void rtw_hal_scan_ofld_cfg_en(void *hal, u8 en); 21 | enum rtw_hal_status 22 | rtw_hal_scan_ofld_add_ch(void *hal, u8 hw_band, struct scan_ofld_ch_info *cfg, 23 | bool ofld); 24 | enum rtw_hal_status 25 | rtw_hal_scan_ofld(void *hal, u16 mac_id, u8 hw_band, u8 hw_port, 26 | struct scan_ofld_info *cfg); 27 | enum rtw_hal_status 28 | rtw_hal_scan_ofld_fw_busy(void *hal, u8 hw_band); 29 | #endif /* CONFIG_PHL_SCANOFLD */ 30 | 31 | #endif /* _HAL_SCANOFLD_H_ */ 32 | 33 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/h2c_agg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _H2C_AGG_H_ 16 | #define _H2C_AGG_H_ 17 | 18 | #include "../type.h" 19 | #include "fwcmd.h" 20 | #include "../fw_ax/inc_hdr/fwcmd_intf.h" 21 | 22 | #define ALIGN_4_BYTE(len) ((len + 0x3) & ~(0x3)) 23 | #define H2C_AGG_SUB_HDR_LEN sizeof(u32) 24 | #define H2C_PKT_AGGREGATABLE(len) ((ALIGN_4_BYTE(len) + \ 25 | WD_BODY_LEN + FWCMD_HDR_LEN + \ 26 | H2C_AGG_SUB_HDR_LEN) \ 27 | < H2C_LONG_DATA_LEN) 28 | 29 | void mac_h2c_agg_flush(struct mac_ax_adapter *adapter); 30 | u32 mac_h2c_agg_tx(struct mac_ax_adapter *adapter); 31 | void mac_h2c_agg_enable(struct mac_ax_adapter *adapter, u8 enable); 32 | #endif 33 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/pwr_seq_8852b.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | #ifndef _MAC_AX_PWR_SEQ_8852B_H_ 17 | #define _MAC_AX_PWR_SEQ_8852B_H_ 18 | 19 | #include "../../mac_def.h" 20 | #if MAC_AX_8852B_SUPPORT 21 | //#define PWR_SEQ_VER_8852B 000 22 | 23 | extern struct mac_pwr_cfg *pwr_on_seq_8852b[]; 24 | extern struct mac_pwr_cfg *pwr_off_seq_8852b[]; 25 | #if MAC_AX_FEATURE_HV 26 | extern struct mac_pwr_cfg *card_disable_seq_8852b[]; 27 | extern struct mac_pwr_cfg *enter_lps_seq_8852b[]; 28 | extern struct mac_pwr_cfg *leave_lps_seq_8852b[]; 29 | extern struct mac_pwr_cfg *ips_seq_8852b[]; 30 | #endif 31 | #endif /* #if MAC_AX_8852B_SUPPORT */ 32 | #endif 33 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_init.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_INIT_H_ 16 | #define _HALRF_INIT_H_ 17 | #include "../../hal_headers_le.h" 18 | 19 | 20 | /*@--------------------------[Define] ---------------------------------------*/ 21 | 22 | /*@--------------------------[Enum]------------------------------------------*/ 23 | 24 | /*@--------------------------[Structure]-------------------------------------*/ 25 | 26 | /*@--------------------------[Prptotype]-------------------------------------*/ 27 | struct rf_info; 28 | void halrf_cmn_info_self_init(struct rf_info *rf); 29 | void halrf_rfability_init_mp(struct rf_info *rf); 30 | void halrf_rfability_init(struct rf_info *rf); 31 | void halrf_set_rfability(struct rf_info *rf); 32 | #endif 33 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_notify.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_NOTIFY_H_ 16 | #define _HAL_NOTIFY_H_ 17 | 18 | 19 | void rtw_hal_notification_ex(void *hal, enum phl_msg_evt_id event, 20 | bool to_bb, bool to_mac, bool to_rf, u8 hw_idx); 21 | 22 | void rtw_hal_notification(void *hal, enum phl_msg_evt_id event, u8 hw_idx); 23 | 24 | 25 | void rtw_hal_cmd_notification(void *hal, 26 | enum phl_msg_evt_id event, 27 | void *hal_cmd, 28 | u8 hw_idx); 29 | 30 | 31 | enum rtw_phl_status 32 | rtw_hal_cmd_notify(struct rtw_phl_com_t *phl_com, 33 | enum phl_msg_evt_id event, 34 | void *hal_cmd, 35 | u8 hw_idx); 36 | 37 | #endif /*_HAL_NOTIFY_H_*/ 38 | 39 | -------------------------------------------------------------------------------- /phl/phl_regulation_6g.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_REGULATION_6G_H_ 16 | #define _PHL_REGULATION_6G_H_ 17 | 18 | bool regu_set_domain_6g(void *phl, u8 domain, enum regulation_rsn reason); 19 | void regu_get_chnlplan_6g(struct rtw_regulation *rg, 20 | enum rtw_regulation_query type, 21 | struct rtw_regulation_chplan *plan); 22 | bool regu_valid_domain_6g(u8 domain); 23 | bool regu_query_domain_6g_channel(u8 domain, enum band_type band, u8 ch, 24 | enum ch_property *prop); 25 | u8 regu_get_domain_regulation_6g(u8 domain); 26 | void regu_convert_ch6g(u8 unii_6g, struct rtw_regulation *rg, 27 | u32 *ch_cnt, struct rtw_regulation_channel *rch, 28 | u32 ch, u32 passive, u8 max_num, u8 ch_start); 29 | 30 | #endif /* _PHL_REGULATION_6G_H_ */ 31 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_psd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_PSD_H_ 16 | #define _HALRF_PSD_H_ 17 | 18 | /*@--------------------------Define Parameters-------------------------------*/ 19 | #define PSD_RF_PATH_MAX 4 20 | #define PSD_RF_REG_NUM 10 21 | #define PSD_RF_DATA_NUM 400 22 | 23 | /*@-----------------------End Define Parameters-----------------------*/ 24 | struct halrf_psd_data { 25 | u8 path; 26 | u8 iq_path; 27 | u32 avg; 28 | u32 fft; 29 | u32 point; 30 | u32 start_point; 31 | u32 stop_point; 32 | u32 average; 33 | u32 buf_size; 34 | u32 psd_data[PSD_RF_DATA_NUM]; 35 | u32 psd_progress; 36 | u8 psd_result_running; 37 | u32 psd_reg_backup[100]; 38 | u32 rf_bkup[PSD_RF_PATH_MAX][PSD_RF_REG_NUM]; 39 | }; 40 | 41 | #endif /*_HALRF_PSD_H_*/ 42 | -------------------------------------------------------------------------------- /platform/plat_huanglong.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_HUANGLONG), y) 2 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -fno-pic 3 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 4 | EXTRA_CFLAGS += -DCONFIG_RADIO_WORK 5 | EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 6 | 7 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_HUANGLONG 8 | #EXTRA_CFLAGS += -Wno-error=date-time 9 | 10 | # CONFIG_RTW_ANDROID - 0: no Android, 4/5/6/7/8/9/10/11 : Android version 11 | CONFIG_RTW_ANDROID = 11 12 | 13 | ifeq ($(shell test $(CONFIG_RTW_ANDROID) -gt 0; echo $$?), 0) 14 | EXTRA_CFLAGS += -DCONFIG_RTW_ANDROID=$(CONFIG_RTW_ANDROID) 15 | endif 16 | 17 | ifeq ($(shell test $(CONFIG_RTW_ANDROID) -ge 11; echo $$?), 0) 18 | EXTRA_CFLAGS += -DCONFIG_IFACE_NUMBER=3 19 | endif 20 | 21 | KSRC := $(LINUX_DIR) 22 | ARCH := $(CFG_SOCT_CPU_ARCH) 23 | CROSS_CONPILE := $(SOCT_KERNEL_TOOLCHAINS_MAME)- 24 | 25 | 26 | ifeq ($(CONFIG_PCI_HCI), y) 27 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS 28 | _PLATFORM_FILES := platform/platform_linux_pc_pci.o 29 | OBJS += $(_PLATFORM_FILES) 30 | # Core Config 31 | # CONFIG_RTKM - n/m/y for not support / standalone / built-in 32 | CONFIG_RTKM = m 33 | CONFIG_MSG_NUM = 128 34 | EXTRA_CFLAGS += -DCONFIG_MSG_NUM=$(CONFIG_MSG_NUM) 35 | EXTRA_CFLAGS += -DCONFIG_RXBUF_NUM_1024 36 | EXTRA_CFLAGS += -DCONFIG_TX_SKB_ORPHAN 37 | # PHL Config 38 | EXTRA_CFLAGS += -DRTW_WKARD_98D_RXTAG 39 | endif 40 | _PLATFORM_FILES += platform/platform_ops.o 41 | endif 42 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_8852b/halbb_reg_cfg_8852b.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef _HALBB_REG_CFG_8852B_H_ 26 | #define _HALBB_REG_CFG_8852B_H_ 27 | 28 | #ifdef BB_8852B_SUPPORT 29 | 30 | void halbb_cfg_bb_phy_8852b(struct bb_info *bb, u32 addr, u32 data, 31 | enum phl_phy_idx phy_idx); 32 | void halbb_cfg_bb_gain_8852b(struct bb_info *bb, u32 addr, u32 data); 33 | #endif 34 | #endif /* RTL8852B_SUPPORT*/ 35 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_export_fun.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALRF_EXPORT_FUN_H__ 26 | #define __HALRF_EXPORT_FUN_H__ 27 | #if 1 28 | #include "halrf_ic_hw_info.h" 29 | #include "halrf_hw_cfg_ex.h" 30 | #include "halrf_init_ex.h" 31 | #include "halrf_ex.h" 32 | #include "halrf_dbg_cmd_ex.h" 33 | #ifdef RF_8852A_SUPPORT 34 | #include "halrf_8852a/halrf_8852a_api_ex.h" 35 | #endif 36 | #endif 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_dbg_cmd_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | 26 | #ifndef __HALBB_DBG_CMD_EX_H__ 27 | #define __HALBB_DBG_CMD_EX_H__ 28 | #define MAX_ARGV 16 29 | 30 | struct bb_info; 31 | 32 | s32 halbb_cmd(struct bb_info *bb, char *input, char *output, u32 out_len); 33 | 34 | 35 | void halbb_cmd_parser(struct bb_info *bb, char input[][MAX_ARGV], 36 | u32 input_num, char *output, u32 out_len); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_dbg_cmd_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | 26 | #ifndef __HALRF_DBG_CMD_EX_H__ 27 | #define __HALRF_DBG_CMD_EX_H__ 28 | #define RF_MAX_ARGV 16 29 | 30 | struct rf_info; 31 | 32 | s32 halrf_cmd(struct rf_info *rf, char *input, char *output, u32 out_len); 33 | 34 | void halrf_cmd_parser(struct rf_info *rf, char input[][RF_MAX_ARGV], 35 | u32 input_num, char *output, u32 out_len); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /phl/test/mp/phl_test_mp_api.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_TEST_MP_API_H_ 16 | #define _PHL_TEST_MP_API_H_ 17 | 18 | #ifdef CONFIG_PHL_TEST_MP 19 | enum rtw_phl_status mp_config(struct mp_context *mp, struct mp_config_arg *arg); 20 | enum rtw_phl_status mp_tx(struct mp_context *mp, struct mp_tx_arg *arg); 21 | enum rtw_phl_status mp_rx(struct mp_context *mp, struct mp_rx_arg *arg); 22 | enum rtw_phl_status mp_reg(struct mp_context *mp, struct mp_reg_arg *arg); 23 | enum rtw_phl_status mp_efuse(struct mp_context *mp, struct mp_efuse_arg *arg); 24 | enum rtw_phl_status mp_txpwr(struct mp_context *mp, struct mp_txpwr_arg *arg); 25 | enum rtw_phl_status mp_cal(struct mp_context *mp, struct mp_cal_arg *arg); 26 | #endif /* CONFIG_PHL_TEST_MP */ 27 | 28 | #endif /* _PHL_TEST_MP_API_H_ */ 29 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_8852b/halbb_8852b_api_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALBB_8852B_API_EX_H__ 26 | #define __HALBB_8852B_API_EX_H__ 27 | #ifdef BB_8852B_SUPPORT 28 | 29 | /*@--------------------------[Prptotype]-------------------------------------*/ 30 | struct bb_info; 31 | 32 | u16 halbb_cfg_cmac_tx_ant_8852b(struct bb_info *bb, enum rf_path tx_path); 33 | 34 | #endif 35 | #endif /* __INC_PHYDM_API_H_8852A__ */ 36 | -------------------------------------------------------------------------------- /include/rtw_sdio.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 - 2021 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTW_SDIO_H_ 16 | #define _RTW_SDIO_H_ 17 | 18 | #include /* struct dvobj_priv and etc. */ 19 | 20 | #define SDIO_ERR_VAL8 0xFF 21 | #define SDIO_ERR_VAL16 0xFFFF 22 | #define SDIO_ERR_VAL32 0xFFFFFFFF 23 | 24 | u8 rtw_sdio_read_cmd52(struct dvobj_priv *, u32 addr, void *buf, size_t len); 25 | u8 rtw_sdio_read_cmd53(struct dvobj_priv *, u32 addr, void *buf, size_t len); 26 | u8 rtw_sdio_write_cmd52(struct dvobj_priv *, u32 addr, void *buf, size_t len); 27 | u8 rtw_sdio_write_cmd53(struct dvobj_priv *, u32 addr, void *buf, size_t len); 28 | u8 rtw_sdio_f0_read(struct dvobj_priv *, u32 addr, void *buf, size_t len); 29 | size_t rtw_sdio_cmd53_align_size(struct dvobj_priv *d, size_t len); 30 | 31 | 32 | #endif /* _RTW_SDIO_H_ */ 33 | -------------------------------------------------------------------------------- /phl/hal_g6/btc/btc.mk: -------------------------------------------------------------------------------- 1 | # All needed files would be added to _HAL_INTFS_FILES, and it would include 2 | # hal_g6/btc and all related files in directory hal_g6/btc/. 3 | # Before include this makefile, be sure interface (CONFIG_*_HCI) and IC 4 | # (CONFIG_RTL*) setting are all ready! 5 | 6 | #HAL = hal_g6 7 | 8 | ifeq ($(CONFIG_PHL_ARCH), y) 9 | phl_path := phl/$(HAL) 10 | phl_path_d1 := $(src)/phl/$(HAL) 11 | else 12 | phl_path := $(HAL) 13 | phl_path_d1 := $(src)/$(HAL) 14 | endif 15 | 16 | # Base directory 17 | path_halbtc_d1 := $(phl_path)/btc 18 | 19 | halbtc-y += $(path_halbtc_d1)/hal_btc.o \ 20 | $(path_halbtc_d1)/halbtc_def.o \ 21 | $(path_halbtc_d1)/halbtc_action.o \ 22 | $(path_halbtc_d1)/halbtc_fw.o \ 23 | $(path_halbtc_d1)/halbtc_dbg_cmd.o 24 | 25 | ifeq ($(CONFIG_RTL8852A), y) 26 | ic := 8852a 27 | # Level 2 directory 28 | path_halbtc_8852a := $(path_halbtc_d1)/btc_$(ic) 29 | 30 | halbtc-y += $(path_halbtc_8852a)/btc_8852a.o 31 | 32 | endif 33 | 34 | # 8852B/8852BP Support 35 | ifneq ($(filter y,$(CONFIG_RTL8852B) $(CONFIG_RTL8852BP) $(CONFIG_RTL8851B)),) 36 | ic := 8852b 37 | # Level 2 directory 38 | path_halbtc_8852b := $(path_halbtc_d1)/btc_$(ic) 39 | 40 | halbtc-y += $(path_halbtc_8852b)/btc_8852b.o 41 | endif 42 | 43 | ifeq ($(CONFIG_RTL8852C), y) 44 | ic := 8852c 45 | # Level 2 directory 46 | path_halbtc_8852c := $(path_halbtc_d1)/btc_$(ic) 47 | 48 | halbtc-y += $(path_halbtc_8852c)/btc_8852c.o 49 | endif 50 | 51 | _BTC_FILES += $(halbtc-y) 52 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_twt.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #define _HAL_TWT_C_ 16 | #include "hal_headers.h" 17 | 18 | #ifdef CONFIG_PHL_TWT 19 | enum rtw_hal_status 20 | rtw_hal_twt_info_update(void *hal, 21 | struct rtw_phl_twt_info twt_info, 22 | struct rtw_wifi_role_link_t *rlink, 23 | u8 action) 24 | { 25 | return rtw_hal_mac_twt_info_update(hal, twt_info, rlink, action); 26 | } 27 | 28 | enum rtw_hal_status 29 | rtw_hal_twt_sta_update(void *hal, u8 macid, u8 twt_id, u8 action) 30 | { 31 | return rtw_hal_mac_twt_sta_update(hal, macid, twt_id, action); 32 | } 33 | 34 | enum rtw_hal_status 35 | rtw_hal_twt_sta_announce(void *hal, u8 macid) 36 | { 37 | return rtw_hal_mac_twt_sta_announce(hal, macid); 38 | } 39 | #endif /* CONFIG_PHL_TWT */ 40 | 41 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_physts_7.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALBB_PHYSTS_7_H__ 26 | #define __HALBB_PHYSTS_7_H__ 27 | 28 | struct bb_info; 29 | /*@--------------------------[Prptotype]-------------------------------------*/ 30 | bool halbb_7_physts_parsing(struct bb_info *bb_0, 31 | u8 *addr, 32 | u16 physts_total_length, 33 | struct physts_rxd *desc, 34 | struct physts_result *bb_rpt); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /phl/phl_country.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_COUNTRY_H_ 16 | #define _PHL_COUNTRY_H_ 17 | 18 | #define REGULATION_COUNTRY_VERSION 36 19 | 20 | #define MAX_COUNTRY_NUM 238 21 | enum TP_OVERWRITE { 22 | TPO_CHILE = 0, 23 | TPO_UK = 1, 24 | TPO_QATAR = 2, 25 | TPO_UKRAINE = 3, 26 | TPO_CN = 4, 27 | TPO_NA = 5 28 | }; 29 | 30 | #define COUNTRY_CODE_LEN 2 31 | struct country_domain_mapping { 32 | u8 domain_code; 33 | u8 domain_code_6g; 34 | char char2[COUNTRY_CODE_LEN]; 35 | u8 tpo; /* tx power overwrite */ 36 | 37 | /* 38 | * bit0: accept 11bgn 39 | * bit1: accept 11a 40 | * bit2: accept 11ac 41 | * bit3: accept 11ax 42 | */ 43 | u8 support; 44 | u8 country_property; 45 | }; 46 | 47 | 48 | #endif /* _PHL_COUNTRY_H_ */ 49 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_dbg_cmd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_DBG_CMD_H_ 16 | #define _HALRF_DBG_CMD_H_ 17 | /*@--------------------------[Define] ---------------------------------------*/ 18 | #define RF_MAX_ARGC 20 19 | #define RF_MAX_ARGV 16 20 | 21 | #define HALRF_SCAN halrf_scanf 22 | #define HALRF_DCMD_SCAN_LIMIT 10 23 | /*@--------------------------[Enum]------------------------------------------*/ 24 | enum rf_scanf_type 25 | { 26 | DCMD_DECIMAL = 1, 27 | DCMD_HEX = 2, 28 | DCMD_CHAR = 3, 29 | }; 30 | /*@--------------------------[Structure]-------------------------------------*/ 31 | 32 | struct rf_dbg_cmd_info { 33 | u8 cmd_size; 34 | }; 35 | 36 | /*@--------------------------[Prptotype]-------------------------------------*/ 37 | void halrf_cmd_parser_init(struct rf_info *rf); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/rtl8852b.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTL8852B_H_ 16 | #define _RTL8852B_H_ 17 | 18 | /*to communicate with upper-hal*/ 19 | #ifdef CONFIG_PCI_HCI 20 | void hal_set_ops_8852be(struct rtw_phl_com_t *phl_com, 21 | struct hal_info_t *hal); 22 | u32 hal_hook_trx_ops_8852be(struct rtw_phl_com_t *phl_com, 23 | struct hal_info_t *hal_info); 24 | #endif 25 | 26 | #ifdef CONFIG_USB_HCI 27 | void hal_set_ops_8852bu(struct rtw_phl_com_t *phl_com, 28 | struct hal_info_t *hal); 29 | u32 hal_hook_trx_ops_8852bu(struct hal_info_t *hal_info); 30 | 31 | #endif 32 | 33 | #ifdef CONFIG_SDIO_HCI 34 | void hal_set_ops_8852bs(struct rtw_phl_com_t *phl_com, 35 | struct hal_info_t *hal); 36 | u32 hal_hook_trx_ops_8852bs(struct hal_info_t *hal_info); 37 | 38 | #endif 39 | 40 | #endif /* _RTL8852B_H_ */ 41 | -------------------------------------------------------------------------------- /include/sdio_ops.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2021 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __SDIO_OPS_H__ 16 | #define __SDIO_OPS_H__ 17 | 18 | #include /* struct dvobj_priv, struct sdio_data and etc. */ 19 | 20 | int __must_check rtw_sdio_raw_read(struct dvobj_priv *d, unsigned int addr, 21 | void *buf, size_t len, bool fixed); 22 | int __must_check rtw_sdio_raw_write(struct dvobj_priv *d, unsigned int addr, 23 | void *buf, size_t len, bool fixed); 24 | 25 | void dump_sdio_card_info(void *sel, struct dvobj_priv *dvobj); 26 | 27 | u32 rtw_sdio_init(struct dvobj_priv *dvobj); 28 | void rtw_sdio_deinit(struct dvobj_priv *dvobj); 29 | int rtw_sdio_alloc_irq(struct dvobj_priv *dvobj); 30 | void rtw_sdio_free_irq(struct dvobj_priv *dvobj); 31 | u8 rtw_sdio_get_num_of_func(struct dvobj_priv *dvobj); 32 | 33 | #endif /* !__SDIO_OPS_H__ */ 34 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_8852b/halrf_reg_cfg_8852b.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef _HALRF_REG_CFG_8852B_H_ 26 | #define _HALRF_REG_CFG_8852B_H_ 27 | 28 | #ifdef RF_8852B_SUPPORT 29 | 30 | void halrf_cfg_rf_radio_a_8852b(struct rf_info *rf, u32 addr, u32 data); 31 | void halrf_cfg_rf_radio_b_8852b(struct rf_info *rf, u32 addr, u32 data); 32 | void halrf_cfg_rf_nctl_8852b(struct rf_info *rf, u32 addr, u32 mask, u32 data); 33 | 34 | #endif 35 | #endif /* RTL8822C_SUPPORT*/ 36 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_hwimg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef _HALRF_HWIMG_H_ 26 | #define _HALRF_HWIMG_H_ 27 | 28 | #define RADIO_TO_FW_PAGE_SIZE 6 29 | #define RADIO_TO_FW_DATA_SIZE 500 30 | 31 | struct halrf_radio_info { 32 | u32 write_times_a; 33 | u32 write_times_b; 34 | u32 radio_a_parameter[RADIO_TO_FW_PAGE_SIZE][RADIO_TO_FW_DATA_SIZE]; 35 | u32 radio_b_parameter[RADIO_TO_FW_PAGE_SIZE][RADIO_TO_FW_DATA_SIZE]; 36 | }; 37 | 38 | #endif /* _HALRF_HW_IMG_8852A_H_ */ 39 | -------------------------------------------------------------------------------- /phl/custom/phl_custom_api.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_CUSTOM_API_H_ 16 | #define _PHL_CUSTOM_API_H_ 17 | 18 | enum rtw_phl_status 19 | rtw_phl_custom_prepare_set_info_evt(u32 evt_id, 20 | u32 customer_id, 21 | struct rtw_custom_decrpt *inbuf, 22 | struct phl_module_op_info *op_info, 23 | u32 data_len); 24 | 25 | enum rtw_phl_status 26 | rtw_phl_custom_prepare_query_info_evt(u32 evt_id, 27 | u32 customer_id, 28 | struct rtw_custom_decrpt *inbuf, 29 | struct phl_module_op_info *op_info, 30 | u32 data_len); 31 | 32 | #endif /*_PHL_CUSTOM_API_H_*/ 33 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_8852b/halrf_dack_8852b.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALRF_DACK_8852B_H__ 26 | #define __HALRF_DACK_8852B_H__ 27 | #ifdef RF_8852B_SUPPORT 28 | 29 | #define DACK_VER_8852B 0x5 30 | 31 | void halrf_dack_recover_8852b(struct rf_info *rf, 32 | u8 offset, 33 | enum rf_path path, 34 | u32 val, 35 | bool reload); 36 | void halrf_dac_cal_8852b(struct rf_info *rf, bool force); 37 | #endif 38 | #endif /* __INC_PHYDM_API_H_8852A__ */ 39 | -------------------------------------------------------------------------------- /phl/phl_acs.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_ACS_H_ 16 | #define _PHL_ACS_H_ 17 | 18 | /* environment monitor time should be smaller than scan duration time */ 19 | #define ACS_ENV_MNTR_TIME(time) ((time) * 8 / 10) 20 | 21 | struct phl_acs_parm { 22 | u8 idx; /* idx of phl_acs_chnl_tbl */ 23 | u16 monitor_time; 24 | bool nhm_include_cca; 25 | }; 26 | 27 | struct phl_acs_info { 28 | struct acs_mntr_rpt rpt[MAX_ACS_INFO]; 29 | }; 30 | 31 | void phl_acs_mntr_trigger(struct phl_info_t *phl_i, enum phl_band_idx band_idx, 32 | struct phl_acs_parm *parm); 33 | 34 | void phl_acs_mntr_result(struct phl_info_t *phl_info, 35 | enum phl_band_idx band_idx, struct phl_acs_parm *parm); 36 | enum rtw_phl_status phl_acs_info_init(struct phl_info_t *phl_info); 37 | void phl_acs_info_deinit(struct phl_info_t *phl_info); 38 | 39 | #endif /*_PHL_ACS_H_*/ 40 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_chan.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c)2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_CHAN_H_ 16 | #define _HAL_CHAN_H_ 17 | 18 | enum rtw_hal_status rtw_hal_set_ch_bw(void *hal, u8 band_idx, 19 | struct rtw_chan_def *chdef, bool do_rfk, bool rd_enabled, bool frc_switch); 20 | 21 | void rtw_hal_get_cur_chdef(void *hal, u8 band_idx, 22 | struct rtw_chan_def *cur_chandef); 23 | 24 | #ifdef DBG_PHL_CHAN 25 | void phl_chan_dump_chandef(const char *caller, const int line, bool show_caller, 26 | struct rtw_chan_def *chandef); 27 | #define PHL_DUMP_CHAN_DEF(_chandef) phl_chan_dump_chandef(__FUNCTION__, __LINE__, false, _chandef); 28 | #define PHL_DUMP_CHAN_DEF_EX(_chandef) phl_chan_dump_chandef(__FUNCTION__, __LINE__, true, _chandef); 29 | #else 30 | #define PHL_DUMP_CHAN_DEF(_chandef) 31 | #define PHL_DUMP_CHAN_DEF_EX(_chandef) 32 | #endif 33 | 34 | #endif /* _HAL_CHAN_H_ */ 35 | 36 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/init_8852b.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_INIT_8852B_H_ 18 | #define _MAC_AX_INIT_8852B_H_ 19 | 20 | #include "../../type.h" 21 | #if MAC_AX_8852B_SUPPORT 22 | 23 | #ifdef CONFIG_NEW_HALMAC_INTERFACE 24 | struct mac_ax_adapter *get_mac_8852b_adapter(enum mac_ax_intf intf, 25 | u8 cv, void *phl_adapter, 26 | void *drv_adapter, 27 | struct mac_ax_pltfm_cb *pltfm_cb) 28 | #else 29 | struct mac_ax_adapter *get_mac_8852b_adapter(enum mac_ax_intf intf, 30 | u8 cv, void *drv_adapter, 31 | struct mac_ax_pltfm_cb *pltfm_cb); 32 | #endif 33 | 34 | u32 dmac_func_en_8852b(struct mac_ax_adapter *adapter); 35 | 36 | u32 dmac_func_pre_en_8852b(struct mac_ax_adapter *adapter); 37 | 38 | #endif /* #if MAC_AX_8852B_SUPPORT */ 39 | #endif 40 | -------------------------------------------------------------------------------- /phl/phl_dm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2021 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_DM_H_ 16 | #define _PHL_DM_H_ 17 | 18 | #ifdef CONFIG_PCI_HCI 19 | #ifdef RTW_WKARD_DYNAMIC_LTR 20 | enum rtw_phl_status 21 | phl_ltr_sw_trigger(struct rtw_phl_com_t *phl_com, void *hal, 22 | enum rtw_pcie_ltr_state state); 23 | enum rtw_phl_status 24 | phl_ltr_sw_ctrl(struct rtw_phl_com_t *phl_com, void *hal, bool enable); 25 | void 26 | phl_ltr_hw_ctrl(struct rtw_phl_com_t *phl_com, bool enable); 27 | void phl_ltr_sw_ctrl_ntfy(struct rtw_phl_com_t *phl_com, bool enable); 28 | u8 phl_ltr_get_cur_state(struct rtw_phl_com_t *phl_com); 29 | u32 phl_ltr_get_last_trigger_time(struct rtw_phl_com_t *phl_com); 30 | u32 phl_ltr_get_tri_cnt(struct rtw_phl_com_t *phl_com, 31 | enum rtw_pcie_ltr_state state); 32 | void phl_ltr_ctrl_watchdog(struct phl_info_t *phl_info); 33 | #endif 34 | #endif 35 | 36 | #endif /*_PHL_DM_H_*/ -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_la_mode_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALBB_LA_MODE_EX_H__ 26 | #define __HALBB_LA_MODE_EX_H__ 27 | 28 | /*@--------------------------[Define] ---------------------------------------*/ 29 | 30 | /*@--------------------------[Enum]------------------------------------------*/ 31 | 32 | /*@--------------------------[Structure]-------------------------------------*/ 33 | 34 | /*@--------------------------[Prptotype]-------------------------------------*/ 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_str_proc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #include "hal_headers.h" 16 | 17 | 18 | #define hal_getLinefrombuffer(buffer) _os_strsep(&buffer, "\r\n") 19 | 20 | bool hal_is_comment_string(char *szStr); 21 | 22 | bool hal_is_alpha(char ch_tmp); 23 | 24 | bool hal_ishexdigit(char chTmp); 25 | 26 | bool hal_get_hexvalue_fromstring(char *szStr, u32 *pu4bVal, u32 *pu4bMove); 27 | 28 | bool hal_get_fractionvalue_fromstring( 29 | char *szStr, 30 | u8 *pInteger, 31 | u8 *pFraction, 32 | u32 *pu4bMove); 33 | 34 | bool hal_is_allspace_tab(char *data, u8 size); 35 | 36 | u32 hal_mapchar_tohexdigit(char chTmp); 37 | 38 | bool hal_parse_fiedstring(char *in_str, u32 *start, char *out_str, char lqualifier, char rqualifier); 39 | 40 | bool hal_get_u1bint_fromstr_indec(char *str, u8 *pint); 41 | 42 | bool hal_get_s1bint_fromstr_indec(char *str, s8 *val); 43 | 44 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/halmac_wpp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2021 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALMAC_WPP_H__ 26 | #define __HALMAC_WPP_H__ 27 | 28 | #define HALMAC_WPP_CONTROL_GUIDS \ 29 | WPP_DEFINE_CONTROL_GUID( \ 30 | halMacGuid, (9f9d9e5b, 3854, 4b87, 8bc6, 4ce1f284d34b), \ 31 | WPP_DEFINE_BIT(COMP_HALMAC_MSG_INIT) \ 32 | WPP_DEFINE_BIT(COMP_HALMAC_MSG_EFUSE) \ 33 | WPP_DEFINE_BIT(COMP_HALMAC_MSG_FW) \ 34 | WPP_DEFINE_BIT(COMP_HALMAC_MSG_H2C) \ 35 | WPP_DEFINE_BIT(COMP_HALMAC_MSG_PWR) \ 36 | ) 37 | #endif /* __HALBB_TYPES_H__ */ 38 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_dyn_1r_cca_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALBB_DYN_1R_CCA_H__EX_H__ 26 | #define __HALBB_DYN_1R_CCA_H__EX_H__ 27 | 28 | /*@--------------------------[Define] ---------------------------------------*/ 29 | 30 | /*@--------------------------[Enum]------------------------------------------*/ 31 | 32 | /*@--------------------------[Structure]-------------------------------------*/ 33 | 34 | /*@--------------------------[Prptotype]-------------------------------------*/ 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/phy_rpt_8852b.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | ******************************************************************************/ 15 | 16 | #include "phy_rpt_8852b.h" 17 | 18 | #if MAC_AX_8852B_SUPPORT 19 | 20 | #define MAC_AX_DISP_QID_HOST 0x2 21 | #define MAC_AX_DISP_QID_WLCPU 0xB 22 | #define MAC_AX_DISP_PID_HOST 0x0 23 | #define MAC_AX_DISP_PID_WLCPU 0x0 24 | 25 | u32 get_bbrpt_dle_cfg_8852b(struct mac_ax_adapter *adapter, 26 | u8 is2wlcpu, u32 *port_id, u32 *queue_id) 27 | { 28 | if (is2wlcpu) { 29 | *port_id = MAC_AX_DISP_PID_WLCPU; 30 | *queue_id = MAC_AX_DISP_QID_WLCPU; 31 | } else { 32 | *port_id = MAC_AX_DISP_PID_HOST; 33 | *queue_id = MAC_AX_DISP_QID_HOST; 34 | } 35 | 36 | return MACSUCCESS; 37 | } 38 | 39 | u32 mac_cfg_per_pkt_phy_rpt_8852b(struct mac_ax_adapter *adapter, 40 | struct mac_ax_per_pkt_phy_rpt *rpt) 41 | { 42 | return MACNOTSUP; 43 | } 44 | 45 | #endif /* #if MAC_AX_8852B_SUPPORT */ 46 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_init.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALBB_INIT_H_ 16 | #define _HALBB_INIT_H_ 17 | #include "../../hal_headers_le.h" 18 | 19 | 20 | /*@--------------------------[Define] ---------------------------------------*/ 21 | 22 | /*@--------------------------[Enum]------------------------------------------*/ 23 | 24 | /*@--------------------------[Structure]-------------------------------------*/ 25 | 26 | /*@--------------------------[Prptotype]-------------------------------------*/ 27 | void halbb_cmn_info_self_init_per_phy(struct bb_info *bb); 28 | void halbb_timer_ctrl(struct bb_info *bb, enum bb_timer_cfg_t timer_state); 29 | void halbb_timer_init(struct bb_info *bb); 30 | void halbb_cr_cfg_init(struct bb_info *bb); 31 | enum rtw_hal_status halbb_dm_init_per_phy(struct bb_info *bb_0, enum phl_phy_idx phy_idx); 32 | void halbb_hw_init(struct bb_info *bb); 33 | #endif -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_statistics_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALBB_STATISTICS_EX_H__ 26 | #define __HALBB_STATISTICS_EX_H__ 27 | 28 | /*@--------------------------[Define] ---------------------------------------*/ 29 | 30 | /*@--------------------------[Enum]------------------------------------------*/ 31 | 32 | struct bb_info; 33 | /*@--------------------------[Prptotype]-------------------------------------*/ 34 | void halbb_pmac_statistics_ex(struct bb_info *bb_0, bool en, enum phl_phy_idx phy_idx); 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /include/rtw_cfg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _RTW_CFG_H_ 16 | #define _RTW_CFG_H_ 17 | 18 | enum rtw_pwr_by_rate_setting { 19 | RTW_PW_BY_RATE_ON = 0, 20 | RTW_PW_BY_RATE_ALL_SAME = 1 21 | }; 22 | 23 | enum rtw_pwr_limit_type { 24 | RTW_PWLMT_BY_EFUSE = 0, 25 | RTW_PWLMT_DISABLE = 1, 26 | RTW_PWBYRATE_AND_PWLMT = 2 27 | }; 28 | 29 | u8 rtw_load_dvobj_registry(struct dvobj_priv *dvobj); 30 | uint rtw_load_registry(_adapter *adapter); 31 | 32 | void rtw_core_update_default_setting (struct dvobj_priv *dvobj); 33 | 34 | #define RTW_ADAPTIVITY_EN_DISABLE 0 35 | #define RTW_ADAPTIVITY_EN_ENABLE 1 36 | #define RTW_ADAPTIVITY_EN_AUTO 2 37 | 38 | #define RTW_ADAPTIVITY_MODE_NORMAL 0 39 | #define RTW_ADAPTIVITY_MODE_CARRIER_SENSE 1 40 | 41 | void rtw_cfg_adaptivity_config_msg(void *sel, _adapter *adapter); 42 | bool rtw_cfg_adaptivity_needed(_adapter *adapter); 43 | 44 | #endif /*_RTW_CFG_H_*/ 45 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/trx_desc.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_TRX_DESC_H_ 18 | #define _MAC_AX_TRX_DESC_H_ 19 | 20 | #include "../type.h" 21 | #include "role.h" 22 | #if MAC_AX_8852A_SUPPORT 23 | #include "mac_8852a/trx_desc_8852a.h" 24 | #endif 25 | #if MAC_AX_8852B_SUPPORT 26 | #include "mac_8852b/trx_desc_8852b.h" 27 | #endif 28 | #if MAC_AX_8852C_SUPPORT 29 | #include "mac_8852c/trx_desc_8852c.h" 30 | #endif 31 | #if MAC_AX_8192XB_SUPPORT 32 | #include "mac_8192xb/trx_desc_8192xb.h" 33 | #endif 34 | #if MAC_AX_8851B_SUPPORT 35 | #include "mac_8851b/trx_desc_8851b.h" 36 | #endif 37 | #if MAC_AX_8851E_SUPPORT 38 | #include "mac_8851e/trx_desc_8851e.h" 39 | #endif 40 | #if MAC_AX_8852D_SUPPORT 41 | #include "mac_8852d/trx_desc_8852d.h" 42 | #endif 43 | #if MAC_AX_1115E_SUPPORT 44 | #include "mac_1115e/trx_desc_1115e.h" 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /platform/arm_1319.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_PLATFORM_RTK1319), y) 2 | EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN 3 | EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT 4 | EXTRA_CFLAGS += -DCONFIG_RADIO_WORK 5 | EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE 6 | ifeq ($(shell test $(CONFIG_RTW_ANDROID) -ge 11; echo $$?), 0) 7 | EXTRA_CFLAGS += -DCONFIG_IFACE_NUMBER=3 8 | endif 9 | 10 | EXTRA_CFLAGS += -DRTK_1319_PLATFORM -DCONFIG_RF4CE_COEXIST 11 | #EXTRA_CFLAGS += -Wno-error=date-time 12 | 13 | ARCH ?= arm 14 | # For Android 10 15 | #CROSS_COMPILE :=/sweethome/zhenrc/Workshop/1619/atv-9.0/phoenix/toolchain/asdk-6.4.1-a53-EL-4.9-g2.26-a32nut-180831/bin/arm-linux-gnueabi- 16 | #KSRC :=/sweethome/zhenrc/Workshop/1619/atv-9.0/hydra/linux-kernel-1319 17 | # For TV image 18 | CROSS_COMPILE :=/sweethome/zhenrc/Workshop/1619/atv-9.0/phoenix/toolchain/asdk-6.4.1-a53-EL-4.9-g2.26-a32nut-180831/bin/arm-linux-gnueabi- 19 | KSRC := /sweethome/zhenrc/Workshop/1319/q_tv_kernel_ax 20 | 21 | ifeq ($(CONFIG_PCI_HCI), y) 22 | EXTRA_CFLAGS += -DRTK_1319_PCIE_PORT=2 23 | EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS 24 | _PLATFORM_FILES := platform/platform_linux_pc_pci.o 25 | OBJS += $(_PLATFORM_FILES) 26 | # Core Config 27 | # CONFIG_RTKM - n/m/y for not support / standalone / built-in 28 | CONFIG_RTKM = m 29 | CONFIG_MSG_NUM = 128 30 | EXTRA_CFLAGS += -DCONFIG_MSG_NUM=$(CONFIG_MSG_NUM) 31 | EXTRA_CFLAGS += -DCONFIG_RXBUF_NUM_1024 32 | EXTRA_CFLAGS += -DCONFIG_TX_SKB_ORPHAN 33 | # PHL Config 34 | EXTRA_CFLAGS += -DRTW_WKARD_98D_RXTAG 35 | endif 36 | _PLATFORM_FILES += platform/platform_ops.o 37 | endif 38 | -------------------------------------------------------------------------------- /include/drv_types_gspi.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2017 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __DRV_TYPES_GSPI_H__ 16 | #define __DRV_TYPES_GSPI_H__ 17 | 18 | /* SPI Header Files */ 19 | #ifdef PLATFORM_LINUX 20 | #include 21 | #include 22 | #include 23 | /* #include */ 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #endif 32 | 33 | 34 | typedef struct gspi_data { 35 | u8 func_number; 36 | 37 | u8 tx_block_mode; 38 | u8 rx_block_mode; 39 | u32 block_transfer_len; 40 | 41 | #ifdef PLATFORM_LINUX 42 | struct spi_device *func; 43 | 44 | struct workqueue_struct *priv_wq; 45 | struct delayed_work irq_work; 46 | #endif 47 | } GSPI_DATA, *PGSPI_DATA; 48 | 49 | #endif /* #ifndef __DRV_TYPES_GSPI_H__ */ 50 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_math_lib_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALBB_MATH_LIB_EX_H__ 26 | #define __HALBB_MATH_LIB_EX_H__ 27 | 28 | /*@--------------------------[Define] ---------------------------------------*/ 29 | 30 | /*@--------------------------[Enum]------------------------------------------*/ 31 | 32 | /*@--------------------------[Structure]-------------------------------------*/ 33 | 34 | /*@--------------------------[Prptotype]-------------------------------------*/ 35 | struct bb_info; 36 | u32 halbb_convert_to_db(u64 val); 37 | u64 halbb_db_2_linear(u32 val); 38 | #endif 39 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_kfree.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_KFREE_H_ 16 | #define _HALRF_KFREE_H_ 17 | 18 | #if 0 19 | #define RX_GAIN_K_PATH_MAX 2 20 | #define RX_GAIN_K_OFFSET_MAX 5 21 | #define RX_GAIN_K_HIDE_OFFSET_MAX 4 22 | #endif 23 | 24 | enum BITMASK { 25 | LOW_MASK = 0, 26 | HIGH_MASK = 1 27 | }; 28 | 29 | struct halrf_kfree_info{ 30 | u8 efuse_content[100]; 31 | 32 | #if 0 33 | bool efuse_chenk; 34 | bool hide_efuse_chenk; 35 | s8 rx_gain_offset[RX_GAIN_K_PATH_MAX][RX_GAIN_K_OFFSET_MAX]; 36 | s8 rx_gain_cs[RX_GAIN_K_PATH_MAX][RX_GAIN_K_HIDE_OFFSET_MAX]; 37 | s8 rx_gain_cg[RX_GAIN_K_PATH_MAX][RX_GAIN_K_HIDE_OFFSET_MAX]; 38 | 39 | s8 rx_lna_err_2g[RX_GAIN_K_PATH_MAX][7]; 40 | s8 rx_lna_err_5g[RX_GAIN_K_PATH_MAX][7]; 41 | 42 | s8 rx_frontend_loss[RX_GAIN_K_PATH_MAX]; 43 | s8 rx_rpl_bias_comp[RX_GAIN_K_PATH_MAX]; 44 | s8 rx_rssi_bias_comp[RX_GAIN_K_PATH_MAX]; 45 | #endif 46 | }; 47 | 48 | #endif /*_HALRF_SET_PWR_TABLE_H_*/ 49 | -------------------------------------------------------------------------------- /phl/phl_ser_def.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef __PHL_SER_DEF_H__ 16 | #define __PHL_SER_DEF_H__ 17 | 18 | enum RTW_PHL_SER_CFG_STEP { 19 | RTW_PHL_SER_M1_PRE_CFG, 20 | RTW_PHL_SER_M1_POST_CFG, 21 | RTW_PHL_SER_M5_CFG 22 | }; 23 | 24 | enum RTW_PHL_SER_NOTIFY_EVENT { 25 | RTW_PHL_SER_L0_RESET, /* L0 notify only */ 26 | RTW_PHL_SER_PAUSE_TRX, /* M1 */ 27 | RTW_PHL_SER_DO_RECOVERY, /* M3 */ 28 | RTW_PHL_SER_READY, /* M5 */ 29 | RTW_PHL_SER_L2_RESET,/* M9 */ 30 | RTW_PHL_SER_L2_RESET_DONE, 31 | RTW_PHL_SER_EVENT_CHK, 32 | RTW_PHL_SER_DUMP_FW_LOG, 33 | RTW_PHL_SER_LOG_ONLY, 34 | RTW_PHL_SER_MAX = 9 35 | }; 36 | 37 | enum RTW_PHL_SER_RCVY_STEP { 38 | RTW_PHL_SER_L1_DISABLE_EN = 0x0001, 39 | RTW_PHL_SER_L1_RCVY_EN = 0x0002, 40 | RTW_PHL_SER_L0_CFG_NOTIFY = 0x0010, 41 | RTW_PHL_SER_L0_CFG_DIS_NOTIFY = 0x0011, 42 | RTW_PHL_SER_L0_CFG_HANDSHAKE = 0x0012, 43 | RTW_PHL_SER_L0_RCVY_EN = 0x0013, 44 | }; 45 | 46 | #endif /* __PHL_SER_DEF_H__ */ 47 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_8852b/halrf_psd_8852b.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_PSD_TSSI_8852B_H_ 16 | #define _HALRF_PSD_TSSI_8852B_H_ 17 | 18 | #ifdef RF_8852B_SUPPORT 19 | 20 | #define PSD_VER_8852B 0x1 21 | #define PSD_BACKUP_NUM_8852B 41 22 | 23 | /*@--------------------------Define Parameters-------------------------------*/ 24 | /*@-----------------------End Define Parameters-----------------------*/ 25 | 26 | void halrf_psd_init_8852b(struct rf_info *rf, enum phl_phy_idx phy, 27 | u8 path, u8 iq_path, u32 avg, u32 fft); 28 | 29 | void halrf_psd_restore_8852b(struct rf_info *rf, enum phl_phy_idx phy); 30 | 31 | u32 halrf_psd_get_point_data_8852b(struct rf_info *rf, 32 | enum phl_phy_idx phy, s32 point); 33 | 34 | void halrf_psd_query_8852b(struct rf_info *rf, enum phl_phy_idx phy, 35 | u32 point, u32 start_point, u32 stop_point, u32 *outbuf); 36 | 37 | #endif /*RF_8852B_SUPPORT*/ 38 | #endif /*_HALRF_PSD_TSSI_8852B_H_*/ 39 | 40 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_init_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HALRF_INIT_EX_H_ 16 | #define _HALRF_INIT_EX_H_ 17 | 18 | /*@--------------------------[Define] ---------------------------------------*/ 19 | 20 | /*@--------------------------[Enum]------------------------------------------*/ 21 | 22 | /*@--------------------------[Structure]-------------------------------------*/ 23 | 24 | /*@--------------------------[Prptotype]-------------------------------------*/ 25 | #if 0 26 | struct rf_info; 27 | void halrf_cmn_info_self_init(struct rf_info *rf); 28 | void halrf_rfability_init_mp(struct rf_info *rf); 29 | void halrf_rfability_init(struct rf_info *rf); 30 | void halrf_set_rfability(struct rf_info *rf); 31 | 32 | enum rtw_hal_status halrf_init(struct rtw_phl_com_t *phl_com, 33 | struct rtw_hal_com_t *hal_com, void **rf_out); 34 | void halrf_deinit(struct rtw_phl_com_t *phl_com, 35 | struct rtw_hal_com_t *hal_com, void *rf); 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/feature_cfg_drv.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_FEATURE_CFG_H_ 18 | #define _MAC_AX_FEATURE_CFG_H_ 19 | 20 | /* [Note] Modify MakeFile to reduce code size */ 21 | 22 | /* Debug package for debugging */ 23 | #define MAC_AX_FEATURE_DBGPKG 1 24 | 25 | /* Hadrware verification module */ 26 | #define MAC_AX_FEATURE_HV 0 27 | 28 | /* Debug package for debugging */ 29 | #define MAC_AX_FW_REG_OFLD 0 30 | 31 | /* Temp code for FPGA verification*/ 32 | #define MAC_AX_FPGA_TEST 0 33 | 34 | /* Temp code for lack of BTC driver*/ 35 | #define MAC_AX_ASIC_TEMP 1 36 | 37 | /* temp for h2c alloc move to phl layer*/ 38 | #define MAC_AX_PHL_H2C 1 39 | 40 | /* Debug command */ 41 | #define MAC_AX_FEATURE_DBGCMD 1 42 | 43 | /* Debug Log Decode */ 44 | #define MAC_AX_FEATURE_DBGDEC 1 45 | 46 | #ifdef CONFIG_BTCOEX 47 | #define MAC_AX_COEX_INIT_EN 0 48 | #else 49 | #define MAC_AX_COEX_INIT_EN 1 50 | #endif 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_ic_sw_info.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALRF_IC_SW_INFO_H__ 26 | #define __HALRF_IC_SW_INFO_H__ 27 | 28 | #define HLARF_CODE_BASE "HALRF_TRUNK" 29 | #define HALRF_RELEASE_DATE "20200106.0" 30 | 31 | 32 | /**************************************************************** 33 | * 1 ============================================================ 34 | * 1 enumeration 35 | * 1 ============================================================ 36 | ***************************************************************/ 37 | 38 | enum halrf_api_host { 39 | RUN_IN_FW = 0, 40 | RUN_IN_DRIVER = 1 41 | }; 42 | #endif 43 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/rf/halrf_hw_cfg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALRF_HW_CFG_H__ 26 | #define __HALRF_HW_CFG_H__ 27 | 28 | /*@--------------------------[Define] ---------------------------------------*/ 29 | 30 | /*@--------------------------[Enum]------------------------------------------*/ 31 | 32 | /*@--------------------------[Structure]-------------------------------------*/ 33 | 34 | /*@--------------------------[Prptotype]-------------------------------------*/ 35 | 36 | bool halrf_config_power_limit(void *rf_void, enum phl_phy_idx phy); 37 | 38 | bool halrf_config_power_limit_ru(void *rf_void, enum phl_phy_idx phy); 39 | 40 | #endif -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/fwcmd_8852b.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | ******************************************************************************/ 15 | 16 | #include "../../type.h" 17 | #include "../mac_priv.h" 18 | #if MAC_AX_8852B_SUPPORT 19 | 20 | static struct mac_ax_h2creg_offset h2creg_offset = { 21 | R_AX_H2CREG_DATA0, /* data0 */ 22 | R_AX_H2CREG_DATA1, /* data1 */ 23 | R_AX_H2CREG_DATA2, /* data2 */ 24 | R_AX_H2CREG_DATA3, /* data3 */ 25 | R_AX_H2CREG_CTRL, /* ctrl */ 26 | }; 27 | 28 | static struct mac_ax_c2hreg_offset c2hreg_offset = { 29 | R_AX_C2HREG_DATA0, /* data0 */ 30 | R_AX_C2HREG_DATA1, /* data1 */ 31 | R_AX_C2HREG_DATA2, /* data2 */ 32 | R_AX_C2HREG_DATA3, /* data3 */ 33 | R_AX_C2HREG_CTRL, /* ctrl */ 34 | }; 35 | 36 | struct mac_ax_h2creg_offset * 37 | get_h2creg_offset_8852b(struct mac_ax_adapter *adapter) 38 | { 39 | return &h2creg_offset; 40 | } 41 | 42 | struct mac_ax_c2hreg_offset * 43 | get_c2hreg_offset_8852b(struct mac_ax_adapter *adapter) 44 | { 45 | return &c2hreg_offset; 46 | } 47 | #endif /* #if MAC_AX_8852B_SUPPORT */ 48 | -------------------------------------------------------------------------------- /phl/phl_scan_instance.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_SCAN_INSTANCE_H_ 16 | #define _PHL_SCAN_INSTANCE_H_ 17 | 18 | #define MAX_SCAN_INSTANCE 160 19 | 20 | enum order_strategy { 21 | ORDER_5GHZ_PRIOR = BIT(0), 22 | ORDER_ACTIVE_PRIOR = BIT(1) 23 | }; 24 | 25 | enum skip_strategy { 26 | SKIP_2GHZ = BIT(0), 27 | SKIP_5GHZ = BIT(1), 28 | SKIP_PASSIVE = BIT(2), 29 | SKIP_DFS = BIT(3), 30 | SKIP_6GHZ = BIT(4), 31 | }; 32 | 33 | enum period_strategy { 34 | PERIOD_ALL_MAX = BIT(0), 35 | PERIOD_ALL_MIN = BIT(1), 36 | PERIOD_MIN_DFS = BIT(2) 37 | }; 38 | 39 | struct instance_strategy { 40 | u8 order; 41 | u8 skip; 42 | u8 period; 43 | }; 44 | 45 | struct instance_channel { 46 | enum band_type band; 47 | u8 channel; 48 | u8 property; 49 | u8 active; 50 | u8 period; 51 | u8 mode; 52 | u8 bw; 53 | u8 offset; 54 | }; 55 | 56 | struct instance { 57 | u32 cnt; /* channel cnt */ 58 | struct instance_channel ch[MAX_SCAN_INSTANCE]; 59 | }; 60 | 61 | 62 | #endif /* _PHL_SCAN_INSTANCE_H_ */ 63 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/hwamsdu_8852b.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | 17 | #ifndef _MAC_AX_HWAMSDU_8852B_H_ 18 | #define _MAC_AX_HWAMSDU_8852B_H_ 19 | 20 | #include "../hwamsdu.h" 21 | #include "../../type.h" 22 | #include "../../mac_ax.h" 23 | 24 | /** 25 | * @brief mac_enable_cut_hwamsdu 26 | * 27 | * @param *adapter 28 | * @param enable 29 | * @param aligned 30 | * @return Please Place Description here. 31 | * @retval u32 32 | */ 33 | u32 mac_enable_cut_hwamsdu_8852b(struct mac_ax_adapter *adapter, 34 | u8 enable, 35 | enum mac_ax_ex_shift aligned); 36 | 37 | /** 38 | * @brief mac_cut_hwamsdu_chk_mpdu_len_8852b 39 | * 40 | * @param *adapter 41 | * @param enable 42 | * @param low_th 43 | * @param high_th 44 | * @return Please Place Description here. 45 | * @retval u32 46 | */ 47 | u32 mac_cut_hwamsdu_chk_mpdu_len_en_8852b(struct mac_ax_adapter *adapter, 48 | u8 enable, 49 | u8 low_th, 50 | u16 high_th); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /phl/hal_g6/rtl8852b/rtl8852b.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_RTL8852B), y) 2 | EXTRA_CFLAGS += -DCONFIG_RTL8852B 3 | endif 4 | 5 | ifeq ($(CONFIG_RTL8852BP), y) 6 | EXTRA_CFLAGS += -DCONFIG_RTL8852BP 7 | endif 8 | 9 | IC_NAME := rtl8852b 10 | 11 | ifeq ($(CONFIG_MP_INCLUDED), y) 12 | ### 8852B Default Enable VHT MP HW TX MODE ### 13 | #EXTRA_CFLAGS += -DCONFIG_MP_VHT_HW_TX_MODE 14 | #CONFIG_MP_VHT_HW_TX_MODE = y 15 | endif 16 | 17 | ifeq ($(CONFIG_PHL_ARCH), y) 18 | HAL = phl/hal_g6 19 | else 20 | HAL = hal_g6 21 | endif 22 | 23 | ifeq ($(CONFIG_USB_HCI), y) 24 | FILE_NAME = rtl8852bu 25 | endif 26 | ifeq ($(CONFIG_PCI_HCI), y) 27 | FILE_NAME = rtl8852be 28 | endif 29 | ifeq ($(CONFIG_SDIO_HCI), y) 30 | FILE_NAME = rtl8852bs 31 | endif 32 | 33 | 34 | _HAL_IC_FILES += $(HAL)/$(IC_NAME)/$(IC_NAME)_halinit.o \ 35 | $(HAL)/$(IC_NAME)/$(IC_NAME)_mac.o \ 36 | $(HAL)/$(IC_NAME)/$(IC_NAME)_cmd.o \ 37 | $(HAL)/$(IC_NAME)/$(IC_NAME)_phy.o \ 38 | $(HAL)/$(IC_NAME)/$(IC_NAME)_ops.o \ 39 | $(HAL)/$(IC_NAME)/hal_trx_8852b.o 40 | 41 | _HAL_IC_FILES += $(HAL)/$(IC_NAME)/$(HCI_NAME)/$(FILE_NAME)_halinit.o \ 42 | $(HAL)/$(IC_NAME)/$(HCI_NAME)/$(FILE_NAME)_halmac.o \ 43 | $(HAL)/$(IC_NAME)/$(HCI_NAME)/$(FILE_NAME)_io.o \ 44 | $(HAL)/$(IC_NAME)/$(HCI_NAME)/$(FILE_NAME)_led.o \ 45 | $(HAL)/$(IC_NAME)/$(HCI_NAME)/$(FILE_NAME)_ops.o 46 | 47 | #ifeq ($(CONFIG_SDIO_HCI), y) 48 | #_HAL_IC_FILES += $(HAL)/$(IC_NAME)/$(HCI_NAME)/hal_trx_8852bs.o 49 | #endif 50 | 51 | ifeq ($(CONFIG_USB_HCI), y) 52 | _HAL_IC_FILES += $(HAL)/$(IC_NAME)/$(HCI_NAME)/hal_trx_8852bu.o 53 | endif 54 | 55 | ifeq ($(CONFIG_PCI_HCI), y) 56 | _HAL_IC_FILES += $(HAL)/$(IC_NAME)/$(HCI_NAME)/hal_trx_8852be.o 57 | endif 58 | -------------------------------------------------------------------------------- /phl/phl_rx_agg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_RX_AGG_H_ 16 | #define _PHL_RX_AGG_H_ 17 | 18 | /* 19 | * This value is used when removing a @phl_tid_ampdu_rx as a timeout value 20 | * wating for an event passed as an argument to _os_event_wait(). Note that the 21 | * timeout value 0 has a different meaning on Windows and Linux. See the 22 | * implementation of _os_event_wait(). 23 | */ 24 | #define PHL_REORDER_TIMER_SYNC_TO_MS 50 25 | 26 | void phl_tid_ampdu_rx_free(struct phl_tid_ampdu_rx *r); 27 | void phl_free_rx_reorder(struct phl_info_t *phl_info, struct rtw_phl_stainfo_t *sta); 28 | struct phl_tid_ampdu_rx *phl_tid_ampdu_rx_alloc(struct phl_info_t *phl_info, 29 | struct rtw_phl_stainfo_t *sta, 30 | u16 timeout, u16 ssn, u16 tid, 31 | u16 buf_size); 32 | void phl_notify_reorder_sleep(void *phl, struct rtw_phl_stainfo_t *sta); 33 | #endif /*_PHL_RX_AGG_H_*/ 34 | -------------------------------------------------------------------------------- /phl/phl_sw_cap.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_SW_CAP_H_ 16 | #define _PHL_SW_CAP_H_ 17 | 18 | enum rtw_phl_status 19 | phl_sw_cap_init(struct rtw_phl_com_t* phl_com); 20 | 21 | enum rtw_phl_status 22 | phl_sw_cap_deinit(struct rtw_phl_com_t* phl_com); 23 | 24 | enum rtw_phl_status 25 | phl_init_protocol_cap(struct phl_info_t *phl_info, 26 | struct rtw_wifi_role_t *wifi_role, 27 | struct rtw_wifi_role_link_t *rlink); 28 | 29 | enum rtw_phl_status 30 | phl_init_role_cap(struct phl_info_t *phl_info, 31 | struct rtw_wifi_role_t *wifi_role); 32 | 33 | enum rtw_phl_status 34 | phl_init_rlink_cap(struct phl_info_t *phl_info, 35 | struct rtw_wifi_role_link_t *rlink); 36 | 37 | void phl_init_proto_stbc_cap(struct rtw_wifi_role_link_t *rlink, 38 | struct phl_info_t *phl_info, 39 | struct protocol_cap_t *proto_role_cap); 40 | 41 | void rtw_phl_init_free_para_buf(struct rtw_phl_com_t *phl_com); 42 | 43 | #endif /*_PHL_SW_CAP_H_*/ 44 | -------------------------------------------------------------------------------- /phl/hal_g6/mac/mac_ax/mac_8852b/hdr_conv_rx_8852b.h: -------------------------------------------------------------------------------- 1 | /** @file */ 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | ******************************************************************************/ 16 | #ifndef _MAC_AX_HDR_CONV_RX_8852B_H_ 17 | #define _MAC_AX_HDR_CONV_RX_8852B_H_ 18 | 19 | #include "../../type.h" 20 | #include "../../mac_ax.h" 21 | #include "../../mac_def.h" 22 | 23 | /** 24 | * @brief enable/disable RX MAC Header Conversion 25 | * 26 | * @param adapter pointer of mac ax adapter. 27 | * @param cfg confihuration parameter. 28 | * @return result of configuration. 29 | * @retval u32 30 | */ 31 | u32 mac_hdr_conv_rx_en_8852b(struct mac_ax_adapter *adapter, 32 | struct mac_ax_rx_hdr_conv_cfg *cfg); 33 | /** 34 | * @brief enable/disable driver info of RX MAC Header Conversion 35 | * 36 | * @param adapter pointer of mac ax adapter. 37 | * @param cfg confihuration parameter. 38 | * @return result of configuration. 39 | * @retval u32 40 | */ 41 | u32 mac_hdr_conv_rx_en_driv_info_hdr_8852b(struct mac_ax_adapter *adapter, 42 | struct mac_ax_rx_driv_info_hdr_cfg *cfg); 43 | #endif 44 | -------------------------------------------------------------------------------- /phl/hal_g6/phy/bb/halbb_dyn_csi_rsp_ex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2020 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | * The full GNU General Public License is included in this distribution in the 15 | * file called LICENSE. 16 | * 17 | * Contact Information: 18 | * wlanfae 19 | * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 | * Hsinchu 300, Taiwan. 21 | * 22 | * Larry Finger 23 | * 24 | *****************************************************************************/ 25 | #ifndef __HALBB_DYN_CSI_RSP_EX_H__ 26 | #define __HALBB_DYN_CSI_RSP_EX_H__ 27 | 28 | /*@--------------------------[Define] ---------------------------------------*/ 29 | 30 | /*@--------------------------[Enum]------------------------------------------*/ 31 | 32 | /*@--------------------------[Structure]-------------------------------------*/ 33 | 34 | /*@--------------------------[Prptotype]-------------------------------------*/ 35 | bool halbb_dcr_en(struct bb_info *bb, bool en); 36 | bool halbb_dyn_csi_rsp_rlt_get(struct bb_info *bb); 37 | bool halbb_dcr_rssi_chk(struct bb_info * bb); 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /include/ethernet.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | /*! \file */ 16 | #ifndef __INC_ETHERNET_H 17 | #define __INC_ETHERNET_H 18 | 19 | #define ETHERNET_ADDRESS_LENGTH 6 /* !< Ethernet Address Length */ 20 | #define ETHERNET_HEADER_SIZE 14 /* !< Ethernet Header Length */ 21 | #define LLC_HEADER_SIZE 6 /* !< LLC Header Length */ 22 | #define TYPE_LENGTH_FIELD_SIZE 2 /* !< Type/Length Size */ 23 | #define MINIMUM_ETHERNET_PACKET_SIZE 60 /* !< Minimum Ethernet Packet Size */ 24 | #define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /* !< Maximum Ethernet Packet Size */ 25 | 26 | #define RT_ETH_IS_MULTICAST(_pAddr) ((((u8 *)(_pAddr))[0]&0x01) != 0) /* !< Is Multicast Address? */ 27 | #define RT_ETH_IS_BROADCAST(_pAddr) (\ 28 | ((u8 *)(_pAddr))[0] == 0xff && \ 29 | ((u8 *)(_pAddr))[1] == 0xff && \ 30 | ((u8 *)(_pAddr))[2] == 0xff && \ 31 | ((u8 *)(_pAddr))[3] == 0xff && \ 32 | ((u8 *)(_pAddr))[4] == 0xff && \ 33 | ((u8 *)(_pAddr))[5] == 0xff) /* !< Is Broadcast Address? */ 34 | 35 | 36 | #endif /* #ifndef __INC_ETHERNET_H */ 37 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_tx.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _HAL_TX_H_ 16 | #define _HAL_TX_H_ 17 | 18 | /** 19 | * this function will be used in read / write pointer mechanism and 20 | * return the number of available read pointer 21 | * @rptr: input, the read pointer 22 | * @wptr: input, the write pointer 23 | * @bndy: input, the boundary of read / write pointer mechanism 24 | */ 25 | u16 hal_calc_avail_rptr(u16 rptr, u16 wptr, u16 bndy); 26 | 27 | /** 28 | * this function will be used in read / write pointer mechanism and 29 | * return the number of available write pointer 30 | * @rptr: input, the read pointer 31 | * @wptr: input, the write pointer 32 | * @bndy: input, the boundary of read / write pointer mechanism 33 | */ 34 | u16 hal_calc_avail_wptr(u16 rptr, u16 wptr, u16 bndy); 35 | 36 | #ifdef CONFIG_PCI_HCI 37 | /** 38 | * rtw_hal_query_txch_num - query total hw tx dma channels number 39 | * 40 | * returns the number of hw tx dma channel 41 | */ 42 | u8 rtw_hal_query_txch_num(void *hal); 43 | #endif 44 | 45 | #endif /*_HAL_TX_H_*/ 46 | -------------------------------------------------------------------------------- /phl/hci/phl_trx_def_usb.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2019 Realtek Corporation. 4 | * 5 | * This program is free software; you can redistribute it and/or modify it 6 | * under the terms of version 2 of the GNU General Public License as 7 | * published by the Free Software Foundation. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 | * more details. 13 | * 14 | *****************************************************************************/ 15 | #ifndef _PHL_TRX_DEF_USB_H_ 16 | #define _PHL_TRX_DEF_USB_H_ 17 | 18 | /* Release report related format */ 19 | #define WP_TID_INDIC_RESERVED_BIT BIT(14) 20 | #define WP_RESERVED_SEQ 0xFFF 21 | #define WP_MAX_SEQ_NUMBER WP_RESERVED_SEQ 22 | #define TX_STATUS_TX_DONE 0 23 | #define TX_STATUS_TX_FAIL_REACH_RTY_LMT 1 24 | #define TX_STATUS_TX_FAIL_LIFETIME_DROP 2 25 | #define TX_STATUS_TX_FAIL_MACID_DROP 3 26 | #define TX_STATUS_TX_FAIL_SW_DROP 4 27 | #define TX_STATUS_TX_FAIL_FORCE_DROP_BY_STUCK 5 28 | 29 | #define WP_MAX_CNT 4096 30 | #define WP_USED_SEQ 0xFFFF 31 | 32 | /* for tx */ 33 | struct phl_usb_buf { 34 | _os_list list; 35 | u8 *buffer; 36 | u32 buf_len; 37 | u8 type; 38 | }; 39 | 40 | 41 | /* for rx */ 42 | struct rtw_rx_buf { 43 | _os_list list; 44 | u8 *buffer; 45 | u32 buf_len; 46 | u32 transfer_len; 47 | u8 pipe_idx; 48 | 49 | _os_lock lock; // using phl_queue?? 50 | int pktcnt; // for usb aggregation 51 | void *os_priv; 52 | }; 53 | 54 | #endif /* _PHL_TRX_DEF_USB_H_ */ 55 | -------------------------------------------------------------------------------- /phl/hal_g6/hal_rx.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * Copyright(c) 2019 Realtek Corporation. 5 | * 6 | * This program is free software; you can redistribute it and/or modify it 7 | * under the terms of version 2 of the GNU General Public License as 8 | * published by the Free Software Foundation. 9 | * 10 | * This program is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 | * more details. 14 | * 15 | *****************************************************************************/ 16 | #ifndef _HAL_RX_H_ 17 | #define _HAL_RX_H_ 18 | 19 | void 20 | hal_rx_ppdu_sts_normal_data(struct rtw_phl_com_t *phl_com, 21 | void *hdr, 22 | struct rtw_r_meta_data *meta); 23 | 24 | void 25 | hal_rx_ppdu_sts(struct rtw_phl_com_t *phl_com, 26 | struct rtw_phl_rx_pkt *phl_rx, 27 | struct hal_ppdu_sts *ppdu_sts); 28 | 29 | #ifdef CONFIG_PCI_HCI 30 | /** 31 | * rtw_hal_query_rxch_num - query total hw rx dma channels number 32 | * 33 | * returns the number of hw rx dma channel 34 | */ 35 | u8 rtw_hal_query_rxch_num(void *hal); 36 | #endif 37 | 38 | enum rtw_hal_status 39 | hal_usb_rx_agg_cfg(struct hal_info_t *hal, u8 mode, u8 agg_mode, u8 drv_define, 40 | u8 timeout, u8 size, u8 pkt_num); 41 | 42 | enum rtw_hal_status rtw_hal_set_rxfltr_opt_by_mode(void *hal, u8 band, 43 | enum rtw_rx_fltr_opt_mode mode); 44 | 45 | enum rtw_hal_status rtw_hal_set_rxfltr_type_by_mode(void *hal, u8 band, 46 | enum rtw_rxfltr_type_mode mode); 47 | 48 | #endif /*_HAL_RX_H_*/ 49 | --------------------------------------------------------------------------------