├── .gitignore ├── Android.mk ├── Makefile ├── README.md ├── alt_rtl8821ce ├── Kconfig ├── Makefile ├── clean ├── core │ ├── crypto │ │ ├── aes-ccm.c │ │ ├── aes-ctr.c │ │ ├── aes-gcm.c │ │ ├── aes-internal-enc.c │ │ ├── aes-internal.c │ │ ├── aes-omac1.c │ │ ├── aes-siv.c │ │ ├── aes.h │ │ ├── aes_i.h │ │ ├── aes_siv.h │ │ ├── aes_wrap.h │ │ ├── ccmp.c │ │ ├── gcmp.c │ │ ├── rtw_crypto_wrap.c │ │ ├── rtw_crypto_wrap.h │ │ ├── sha256-internal.c │ │ ├── sha256-prf.c │ │ ├── sha256.c │ │ ├── sha256.h │ │ ├── sha256_i.h │ │ └── wlancrypto_wrap.h │ ├── efuse │ │ └── rtw_efuse.c │ ├── mesh │ │ ├── rtw_mesh.c │ │ ├── rtw_mesh.h │ │ ├── rtw_mesh_hwmp.c │ │ ├── rtw_mesh_hwmp.h │ │ ├── rtw_mesh_pathtbl.c │ │ └── rtw_mesh_pathtbl.h │ ├── monitor │ │ ├── rtw_radiotap.c │ │ └── rtw_radiotap.h │ ├── rtw_ap.c │ ├── rtw_beamforming.c │ ├── rtw_br_ext.c │ ├── rtw_bt_mp.c │ ├── rtw_btcoex.c │ ├── rtw_btcoex_wifionly.c │ ├── rtw_chplan.c │ ├── rtw_chplan.h │ ├── rtw_cmd.c │ ├── rtw_debug.c │ ├── rtw_eeprom.c │ ├── rtw_ft.c │ ├── rtw_ieee80211.c │ ├── rtw_io.c │ ├── rtw_ioctl_query.c │ ├── rtw_ioctl_set.c │ ├── rtw_iol.c │ ├── rtw_mbo.c │ ├── rtw_mem.c │ ├── rtw_mi.c │ ├── rtw_mlme.c │ ├── rtw_mlme_ext.c │ ├── rtw_mp.c │ ├── rtw_odm.c │ ├── rtw_p2p.c │ ├── rtw_pwrctrl.c │ ├── rtw_recv.c │ ├── rtw_rf.c │ ├── rtw_rm.c │ ├── rtw_rm_fsm.c │ ├── rtw_rm_util.c │ ├── rtw_roch.c │ ├── rtw_rson.c │ ├── rtw_sdio.c │ ├── rtw_security.c │ ├── rtw_sreset.c │ ├── rtw_sta_mgt.c │ ├── rtw_swcrypto.c │ ├── rtw_tdls.c │ ├── rtw_vht.c │ ├── rtw_wapi.c │ ├── rtw_wapi_sms4.c │ ├── rtw_wlan_util.c │ ├── rtw_wnm.c │ ├── rtw_xmit.c │ └── wds │ │ ├── rtw_wds.c │ │ └── rtw_wds.h ├── hal │ ├── HalPwrSeqCmd.c │ ├── btc │ │ ├── btc_basic_types.h │ │ ├── halbtc8821c1ant.c │ │ ├── halbtc8821c1ant.h │ │ ├── halbtc8821c2ant.c │ │ ├── halbtc8821c2ant.h │ │ ├── halbtc8821cwifionly.c │ │ ├── halbtc8821cwifionly.h │ │ ├── halbtcoutsrc.h │ │ └── mp_precomp.h │ ├── efuse │ │ ├── efuse_mask.h │ │ └── rtl8821c │ │ │ ├── HalEfuseMask8821C_PCIE.c │ │ │ ├── HalEfuseMask8821C_PCIE.h │ │ │ ├── HalEfuseMask8821C_SDIO.c │ │ │ ├── HalEfuseMask8821C_SDIO.h │ │ │ ├── HalEfuseMask8821C_USB.c │ │ │ └── HalEfuseMask8821C_USB.h │ ├── hal_btcoex.c │ ├── hal_btcoex_wifionly.c │ ├── hal_com.c │ ├── hal_com_c2h.h │ ├── hal_com_phycfg.c │ ├── hal_dm.c │ ├── hal_dm.h │ ├── hal_dm_acs.c │ ├── hal_dm_acs.h │ ├── hal_halmac.c │ ├── hal_halmac.h │ ├── hal_hci │ │ └── hal_pci.c │ ├── hal_intf.c │ ├── hal_mcc.c │ ├── hal_mp.c │ ├── hal_phy.c │ ├── halmac │ │ ├── halmac_2_platform.h │ │ ├── halmac_88xx │ │ │ ├── halmac_8821c │ │ │ │ ├── halmac_8821c_cfg.h │ │ │ │ ├── halmac_cfg_wmac_8821c.c │ │ │ │ ├── halmac_cfg_wmac_8821c.h │ │ │ │ ├── halmac_common_8821c.c │ │ │ │ ├── halmac_common_8821c.h │ │ │ │ ├── halmac_gpio_8821c.c │ │ │ │ ├── halmac_gpio_8821c.h │ │ │ │ ├── halmac_init_8821c.c │ │ │ │ ├── halmac_init_8821c.h │ │ │ │ ├── halmac_pcie_8821c.c │ │ │ │ ├── halmac_pcie_8821c.h │ │ │ │ ├── halmac_phy_8821c.c │ │ │ │ ├── halmac_pwr_seq_8821c.c │ │ │ │ └── halmac_pwr_seq_8821c.h │ │ │ ├── halmac_88xx_cfg.h │ │ │ ├── halmac_bb_rf_88xx.c │ │ │ ├── halmac_bb_rf_88xx.h │ │ │ ├── halmac_cfg_wmac_88xx.c │ │ │ ├── halmac_cfg_wmac_88xx.h │ │ │ ├── halmac_common_88xx.c │ │ │ ├── halmac_common_88xx.h │ │ │ ├── halmac_efuse_88xx.c │ │ │ ├── halmac_efuse_88xx.h │ │ │ ├── halmac_flash_88xx.c │ │ │ ├── halmac_flash_88xx.h │ │ │ ├── halmac_fw_88xx.c │ │ │ ├── halmac_fw_88xx.h │ │ │ ├── halmac_gpio_88xx.c │ │ │ ├── halmac_gpio_88xx.h │ │ │ ├── halmac_init_88xx.c │ │ │ ├── halmac_init_88xx.h │ │ │ ├── halmac_mimo_88xx.c │ │ │ ├── halmac_mimo_88xx.h │ │ │ ├── halmac_pcie_88xx.c │ │ │ └── halmac_pcie_88xx.h │ │ ├── halmac_api.c │ │ ├── halmac_api.h │ │ ├── halmac_bit2.h │ │ ├── halmac_bit_8197f.h │ │ ├── halmac_bit_8812f.h │ │ ├── halmac_bit_8814b.h │ │ ├── halmac_bit_8821c.h │ │ ├── halmac_bit_8822b.h │ │ ├── halmac_bit_8822c.h │ │ ├── halmac_dbg.c │ │ ├── halmac_dbg.h │ │ ├── halmac_fw_info.h │ │ ├── halmac_fw_offload_c2h_ap.h │ │ ├── halmac_fw_offload_c2h_nic.h │ │ ├── halmac_fw_offload_h2c_ap.h │ │ ├── halmac_fw_offload_h2c_nic.h │ │ ├── halmac_gpio_cmd.h │ │ ├── halmac_h2c_extra_info_ap.h │ │ ├── halmac_h2c_extra_info_nic.h │ │ ├── halmac_hw_cfg.h │ │ ├── halmac_intf_phy_cmd.h │ │ ├── halmac_original_c2h_ap.h │ │ ├── halmac_original_c2h_nic.h │ │ ├── halmac_original_h2c_ap.h │ │ ├── halmac_original_h2c_nic.h │ │ ├── halmac_pcie_reg.h │ │ ├── halmac_pwr_seq_cmd.h │ │ ├── halmac_reg2.h │ │ ├── halmac_reg_8197f.h │ │ ├── halmac_reg_8812f.h │ │ ├── halmac_reg_8814b.h │ │ ├── halmac_reg_8821c.h │ │ ├── halmac_reg_8822b.h │ │ ├── halmac_reg_8822c.h │ │ ├── halmac_rx_bd_nic.h │ │ ├── halmac_rx_desc_ap.h │ │ ├── halmac_rx_desc_chip.h │ │ ├── halmac_rx_desc_nic.h │ │ ├── halmac_sdio_reg.h │ │ ├── halmac_state_machine.h │ │ ├── halmac_tx_bd_nic.h │ │ ├── halmac_tx_desc_ap.h │ │ ├── halmac_tx_desc_buffer_ap.h │ │ ├── halmac_tx_desc_buffer_chip.h │ │ ├── halmac_tx_desc_buffer_nic.h │ │ ├── halmac_tx_desc_chip.h │ │ ├── halmac_tx_desc_ie_ap.h │ │ ├── halmac_tx_desc_ie_chip.h │ │ ├── halmac_tx_desc_ie_nic.h │ │ ├── halmac_tx_desc_nic.h │ │ ├── halmac_type.h │ │ └── halmac_usb_reg.h │ ├── led │ │ ├── hal_led.c │ │ └── hal_pci_led.c │ ├── phydm │ │ ├── ap_makefile.mk │ │ ├── halhwimg.h │ │ ├── halrf │ │ │ ├── halphyrf_ap.c │ │ │ ├── halphyrf_ap.h │ │ │ ├── halphyrf_ce.c │ │ │ ├── halphyrf_ce.h │ │ │ ├── halphyrf_iot.c │ │ │ ├── halphyrf_iot.h │ │ │ ├── halphyrf_win.c │ │ │ ├── halphyrf_win.h │ │ │ ├── halrf.c │ │ │ ├── halrf.h │ │ │ ├── halrf_debug.c │ │ │ ├── halrf_debug.h │ │ │ ├── halrf_dpk.h │ │ │ ├── halrf_features.h │ │ │ ├── halrf_iqk.h │ │ │ ├── halrf_kfree.c │ │ │ ├── halrf_kfree.h │ │ │ ├── halrf_powertracking.c │ │ │ ├── halrf_powertracking.h │ │ │ ├── halrf_powertracking_ap.c │ │ │ ├── halrf_powertracking_ap.h │ │ │ ├── halrf_powertracking_ce.c │ │ │ ├── halrf_powertracking_ce.h │ │ │ ├── halrf_powertracking_iot.c │ │ │ ├── halrf_powertracking_iot.h │ │ │ ├── halrf_powertracking_win.c │ │ │ ├── halrf_powertracking_win.h │ │ │ ├── halrf_psd.c │ │ │ ├── halrf_psd.h │ │ │ ├── halrf_txgapcal.c │ │ │ ├── halrf_txgapcal.h │ │ │ └── rtl8821c │ │ │ │ ├── halhwimg8821c_rf.c │ │ │ │ ├── halhwimg8821c_rf.h │ │ │ │ ├── halrf_8821c.c │ │ │ │ ├── halrf_8821c.h │ │ │ │ ├── halrf_iqk_8821c.c │ │ │ │ ├── halrf_iqk_8821c.h │ │ │ │ └── version_rtl8821c_rf.h │ │ ├── mp_precomp.h │ │ ├── phydm.c │ │ ├── phydm.h │ │ ├── phydm.mk │ │ ├── phydm_adaptivity.c │ │ ├── phydm_adaptivity.h │ │ ├── phydm_adc_sampling.c │ │ ├── phydm_adc_sampling.h │ │ ├── phydm_antdect.c │ │ ├── phydm_antdect.h │ │ ├── phydm_antdiv.c │ │ ├── phydm_antdiv.h │ │ ├── phydm_api.c │ │ ├── phydm_api.h │ │ ├── phydm_auto_dbg.c │ │ ├── phydm_auto_dbg.h │ │ ├── phydm_beamforming.c │ │ ├── phydm_beamforming.h │ │ ├── phydm_cck_pd.c │ │ ├── phydm_cck_pd.h │ │ ├── phydm_cck_rx_pathdiv.c │ │ ├── phydm_cck_rx_pathdiv.h │ │ ├── phydm_ccx.c │ │ ├── phydm_ccx.h │ │ ├── phydm_cfotracking.c │ │ ├── phydm_cfotracking.h │ │ ├── phydm_debug.c │ │ ├── phydm_debug.h │ │ ├── phydm_dfs.c │ │ ├── phydm_dfs.h │ │ ├── phydm_dig.c │ │ ├── phydm_dig.h │ │ ├── phydm_direct_bf.c │ │ ├── phydm_direct_bf.h │ │ ├── phydm_dynamictxpower.c │ │ ├── phydm_dynamictxpower.h │ │ ├── phydm_features.h │ │ ├── phydm_features_ap.h │ │ ├── phydm_features_ce.h │ │ ├── phydm_features_ce2_kernel.h │ │ ├── phydm_features_iot.h │ │ ├── phydm_features_win.h │ │ ├── phydm_hwconfig.c │ │ ├── phydm_hwconfig.h │ │ ├── phydm_interface.c │ │ ├── phydm_interface.h │ │ ├── phydm_lna_sat.c │ │ ├── phydm_lna_sat.h │ │ ├── phydm_math_lib.c │ │ ├── phydm_math_lib.h │ │ ├── phydm_mp.c │ │ ├── phydm_mp.h │ │ ├── phydm_noisemonitor.c │ │ ├── phydm_noisemonitor.h │ │ ├── phydm_pathdiv.c │ │ ├── phydm_pathdiv.h │ │ ├── phydm_phystatus.c │ │ ├── phydm_phystatus.h │ │ ├── phydm_pmac_tx_setting.c │ │ ├── phydm_pmac_tx_setting.h │ │ ├── phydm_pow_train.c │ │ ├── phydm_pow_train.h │ │ ├── phydm_pre_define.h │ │ ├── phydm_precomp.h │ │ ├── phydm_primary_cca.c │ │ ├── phydm_primary_cca.h │ │ ├── phydm_psd.c │ │ ├── phydm_psd.h │ │ ├── phydm_rainfo.c │ │ ├── phydm_rainfo.h │ │ ├── phydm_reg.h │ │ ├── phydm_regdefine11ac.h │ │ ├── phydm_regdefine11n.h │ │ ├── phydm_regtable.h │ │ ├── phydm_rssi_monitor.c │ │ ├── phydm_rssi_monitor.h │ │ ├── phydm_smt_ant.c │ │ ├── phydm_smt_ant.h │ │ ├── phydm_soml.c │ │ ├── phydm_soml.h │ │ ├── phydm_types.h │ │ ├── rtl8821c │ │ │ ├── halhwimg8821c_bb.c │ │ │ ├── halhwimg8821c_bb.h │ │ │ ├── halhwimg8821c_mac.c │ │ │ ├── halhwimg8821c_mac.h │ │ │ ├── mp_precomp.h │ │ │ ├── phydm_hal_api8821c.c │ │ │ ├── phydm_hal_api8821c.h │ │ │ ├── phydm_regconfig8821c.c │ │ │ ├── phydm_regconfig8821c.h │ │ │ ├── phydm_rtl8821c.c │ │ │ ├── phydm_rtl8821c.h │ │ │ └── version_rtl8821c.h │ │ ├── sd4_phydm_2_kernel.mk │ │ └── txbf │ │ │ ├── halcomtxbf.c │ │ │ ├── halcomtxbf.h │ │ │ ├── haltxbf8192e.c │ │ │ ├── haltxbf8192e.h │ │ │ ├── haltxbf8814a.c │ │ │ ├── haltxbf8814a.h │ │ │ ├── haltxbf8822b.c │ │ │ ├── haltxbf8822b.h │ │ │ ├── haltxbfinterface.c │ │ │ ├── haltxbfinterface.h │ │ │ ├── haltxbfjaguar.c │ │ │ ├── haltxbfjaguar.h │ │ │ ├── phydm_hal_txbf_api.c │ │ │ └── phydm_hal_txbf_api.h │ └── rtl8821c │ │ ├── hal8821c_fw.c │ │ ├── hal8821c_fw.h │ │ ├── pci │ │ ├── rtl8821ce.h │ │ ├── rtl8821ce_halinit.c │ │ ├── rtl8821ce_halmac.c │ │ ├── rtl8821ce_io.c │ │ ├── rtl8821ce_led.c │ │ ├── rtl8821ce_ops.c │ │ ├── rtl8821ce_recv.c │ │ └── rtl8821ce_xmit.c │ │ ├── rtl8821c.h │ │ ├── rtl8821c_cmd.c │ │ ├── rtl8821c_dm.c │ │ ├── rtl8821c_halinit.c │ │ ├── rtl8821c_mac.c │ │ ├── rtl8821c_ops.c │ │ └── rtl8821c_phy.c ├── halmac.mk ├── ifcfg-wlan0 ├── include │ ├── Hal8188EPhyCfg.h │ ├── Hal8188EPhyReg.h │ ├── Hal8188EPwrSeq.h │ ├── Hal8188FPhyCfg.h │ ├── Hal8188FPhyReg.h │ ├── Hal8188FPwrSeq.h │ ├── Hal8192EPhyCfg.h │ ├── Hal8192EPhyReg.h │ ├── Hal8192EPwrSeq.h │ ├── Hal8192FPhyCfg.h │ ├── Hal8192FPhyReg.h │ ├── Hal8192FPwrSeq.h │ ├── Hal8703BPhyCfg.h │ ├── Hal8703BPhyReg.h │ ├── Hal8703BPwrSeq.h │ ├── Hal8710BPhyCfg.h │ ├── Hal8710BPhyReg.h │ ├── Hal8710BPwrSeq.h │ ├── Hal8723BPhyCfg.h │ ├── Hal8723BPhyReg.h │ ├── Hal8723BPwrSeq.h │ ├── Hal8723DPhyCfg.h │ ├── Hal8723DPhyReg.h │ ├── Hal8723DPwrSeq.h │ ├── Hal8723PwrSeq.h │ ├── Hal8812PhyCfg.h │ ├── Hal8812PhyReg.h │ ├── Hal8812PwrSeq.h │ ├── Hal8814PhyCfg.h │ ├── Hal8814PhyReg.h │ ├── Hal8814PwrSeq.h │ ├── Hal8821APwrSeq.h │ ├── HalPwrSeqCmd.h │ ├── HalVerDef.h │ ├── autoconf.h │ ├── basic_types.h │ ├── byteorder │ │ ├── big_endian.h │ │ ├── generic.h │ │ ├── little_endian.h │ │ ├── swab.h │ │ └── swabb.h │ ├── circ_buf.h │ ├── cmd_osdep.h │ ├── cmn_info │ │ └── rtw_sta_info.h │ ├── custom_gpio.h │ ├── drv_conf.h │ ├── drv_types.h │ ├── drv_types_ce.h │ ├── drv_types_gspi.h │ ├── drv_types_linux.h │ ├── drv_types_pci.h │ ├── drv_types_sdio.h │ ├── drv_types_xp.h │ ├── ethernet.h │ ├── gspi_hal.h │ ├── gspi_ops.h │ ├── gspi_ops_linux.h │ ├── gspi_osintf.h │ ├── h2clbk.h │ ├── hal_btcoex.h │ ├── hal_btcoex_wifionly.h │ ├── hal_com.h │ ├── hal_com_h2c.h │ ├── hal_com_led.h │ ├── hal_com_phycfg.h │ ├── hal_com_reg.h │ ├── hal_data.h │ ├── hal_gspi.h │ ├── hal_ic_cfg.h │ ├── hal_intf.h │ ├── hal_pg.h │ ├── hal_phy.h │ ├── hal_phy_reg.h │ ├── hal_sdio.h │ ├── hal_sdio_coex.h │ ├── ieee80211.h │ ├── ieee80211_ext.h │ ├── if_ether.h │ ├── ip.h │ ├── linux │ │ └── wireless.h │ ├── mlme_osdep.h │ ├── nic_spec.h │ ├── osdep_intf.h │ ├── osdep_service.h │ ├── osdep_service_bsd.h │ ├── osdep_service_ce.h │ ├── osdep_service_linux.h │ ├── osdep_service_xp.h │ ├── pci_hal.h │ ├── pci_ops.h │ ├── pci_osintf.h │ ├── recv_osdep.h │ ├── rtl8188e_cmd.h │ ├── rtl8188e_dm.h │ ├── rtl8188e_hal.h │ ├── rtl8188e_led.h │ ├── rtl8188e_recv.h │ ├── rtl8188e_rf.h │ ├── rtl8188e_spec.h │ ├── rtl8188e_sreset.h │ ├── rtl8188e_xmit.h │ ├── rtl8188f_cmd.h │ ├── rtl8188f_dm.h │ ├── rtl8188f_hal.h │ ├── rtl8188f_led.h │ ├── rtl8188f_recv.h │ ├── rtl8188f_rf.h │ ├── rtl8188f_spec.h │ ├── rtl8188f_sreset.h │ ├── rtl8188f_xmit.h │ ├── rtl8192e_cmd.h │ ├── rtl8192e_dm.h │ ├── rtl8192e_hal.h │ ├── rtl8192e_led.h │ ├── rtl8192e_recv.h │ ├── rtl8192e_rf.h │ ├── rtl8192e_spec.h │ ├── rtl8192e_sreset.h │ ├── rtl8192e_xmit.h │ ├── rtl8192f_cmd.h │ ├── rtl8192f_dm.h │ ├── rtl8192f_hal.h │ ├── rtl8192f_led.h │ ├── rtl8192f_recv.h │ ├── rtl8192f_rf.h │ ├── rtl8192f_spec.h │ ├── rtl8192f_sreset.h │ ├── rtl8192f_xmit.h │ ├── rtl8703b_cmd.h │ ├── rtl8703b_dm.h │ ├── rtl8703b_hal.h │ ├── rtl8703b_led.h │ ├── rtl8703b_recv.h │ ├── rtl8703b_rf.h │ ├── rtl8703b_spec.h │ ├── rtl8703b_sreset.h │ ├── rtl8703b_xmit.h │ ├── rtl8710b_cmd.h │ ├── rtl8710b_dm.h │ ├── rtl8710b_hal.h │ ├── rtl8710b_led.h │ ├── rtl8710b_lps_poff.h │ ├── rtl8710b_recv.h │ ├── rtl8710b_rf.h │ ├── rtl8710b_spec.h │ ├── rtl8710b_sreset.h │ ├── rtl8710b_xmit.h │ ├── rtl8723b_cmd.h │ ├── rtl8723b_dm.h │ ├── rtl8723b_hal.h │ ├── rtl8723b_led.h │ ├── rtl8723b_recv.h │ ├── rtl8723b_rf.h │ ├── rtl8723b_spec.h │ ├── rtl8723b_sreset.h │ ├── rtl8723b_xmit.h │ ├── rtl8723d_cmd.h │ ├── rtl8723d_dm.h │ ├── rtl8723d_hal.h │ ├── rtl8723d_led.h │ ├── rtl8723d_lps_poff.h │ ├── rtl8723d_recv.h │ ├── rtl8723d_rf.h │ ├── rtl8723d_spec.h │ ├── rtl8723d_sreset.h │ ├── rtl8723d_xmit.h │ ├── rtl8723f_hal.h │ ├── rtl8723fs_hal.h │ ├── rtl8723fu_hal.h │ ├── rtl8812a_cmd.h │ ├── rtl8812a_dm.h │ ├── rtl8812a_hal.h │ ├── rtl8812a_led.h │ ├── rtl8812a_recv.h │ ├── rtl8812a_rf.h │ ├── rtl8812a_spec.h │ ├── rtl8812a_sreset.h │ ├── rtl8812a_xmit.h │ ├── rtl8814a_cmd.h │ ├── rtl8814a_dm.h │ ├── rtl8814a_hal.h │ ├── rtl8814a_led.h │ ├── rtl8814a_recv.h │ ├── rtl8814a_rf.h │ ├── rtl8814a_spec.h │ ├── rtl8814a_sreset.h │ ├── rtl8814a_xmit.h │ ├── rtl8814b_hal.h │ ├── rtl8814be_hal.h │ ├── rtl8814bu_hal.h │ ├── rtl8821a_spec.h │ ├── rtl8821a_xmit.h │ ├── rtl8821c_dm.h │ ├── rtl8821c_hal.h │ ├── rtl8821c_spec.h │ ├── rtl8821ce_hal.h │ ├── rtl8821cs_hal.h │ ├── rtl8821cu_hal.h │ ├── rtl8822b_hal.h │ ├── rtl8822be_hal.h │ ├── rtl8822bs_hal.h │ ├── rtl8822bu_hal.h │ ├── rtl8822c_hal.h │ ├── rtl8822ce_hal.h │ ├── rtl8822cs_hal.h │ ├── rtl8822cu_hal.h │ ├── rtw_android.h │ ├── rtw_ap.h │ ├── rtw_beamforming.h │ ├── rtw_br_ext.h │ ├── rtw_bt_mp.h │ ├── rtw_btcoex.h │ ├── rtw_btcoex_wifionly.h │ ├── rtw_byteorder.h │ ├── rtw_cmd.h │ ├── rtw_debug.h │ ├── rtw_eeprom.h │ ├── rtw_efuse.h │ ├── rtw_event.h │ ├── rtw_ft.h │ ├── rtw_ht.h │ ├── rtw_io.h │ ├── rtw_ioctl.h │ ├── rtw_ioctl_query.h │ ├── rtw_ioctl_set.h │ ├── rtw_iol.h │ ├── rtw_mbo.h │ ├── rtw_mcc.h │ ├── rtw_mem.h │ ├── rtw_mi.h │ ├── rtw_mlme.h │ ├── rtw_mlme_ext.h │ ├── rtw_mp.h │ ├── rtw_mp_phy_regdef.h │ ├── rtw_odm.h │ ├── rtw_p2p.h │ ├── rtw_pwrctrl.h │ ├── rtw_qos.h │ ├── rtw_recv.h │ ├── rtw_rf.h │ ├── rtw_rm.h │ ├── rtw_rm_fsm.h │ ├── rtw_rm_util.h │ ├── rtw_roch.h │ ├── rtw_rson.h │ ├── rtw_sdio.h │ ├── rtw_security.h │ ├── rtw_sreset.h │ ├── rtw_swcrypto.h │ ├── rtw_tdls.h │ ├── rtw_version.h │ ├── rtw_vht.h │ ├── rtw_wapi.h │ ├── rtw_wnm.h │ ├── rtw_xmit.h │ ├── sdio_hal.h │ ├── sdio_ops.h │ ├── sdio_ops_ce.h │ ├── sdio_ops_linux.h │ ├── sdio_ops_xp.h │ ├── sdio_osintf.h │ ├── sta_info.h │ ├── usb_hal.h │ ├── usb_ops.h │ ├── usb_ops_linux.h │ ├── usb_osintf.h │ ├── usb_vendor_req.h │ ├── wifi.h │ ├── wlan_bssdef.h │ └── xmit_osdep.h ├── os_dep │ ├── linux │ │ ├── custom_gpio_linux.c │ │ ├── ioctl_cfg80211.c │ │ ├── ioctl_cfg80211.h │ │ ├── ioctl_linux.c │ │ ├── ioctl_mp.c │ │ ├── mlme_linux.c │ │ ├── nlrtw.c │ │ ├── nlrtw.h │ │ ├── os_intfs.c │ │ ├── pci_intf.c │ │ ├── pci_ops_linux.c │ │ ├── recv_linux.c │ │ ├── rhashtable.c │ │ ├── rhashtable.h │ │ ├── rtw_android.c │ │ ├── rtw_cfgvendor.c │ │ ├── rtw_cfgvendor.h │ │ ├── rtw_proc.c │ │ ├── rtw_proc.h │ │ ├── rtw_rhashtable.c │ │ ├── rtw_rhashtable.h │ │ ├── wifi_regd.c │ │ ├── wifi_regd.h │ │ └── xmit_linux.c │ └── osdep_service.c ├── platform │ ├── custom_country_chplan.h │ ├── platform_ARM_SUN50IW1P1_sdio.c │ ├── platform_ARM_SUNnI_sdio.c │ ├── platform_ARM_SUNxI_sdio.c │ ├── platform_ARM_SUNxI_usb.c │ ├── platform_ARM_WMT_sdio.c │ ├── platform_RTK_DMP_usb.c │ ├── platform_aml_s905_sdio.c │ ├── platform_aml_s905_sdio.h │ ├── platform_arm_act_sdio.c │ ├── platform_hisilicon_hi3798_sdio.c │ ├── platform_hisilicon_hi3798_sdio.h │ ├── platform_ops.c │ ├── platform_ops.h │ ├── platform_sprd_sdio.c │ ├── platform_zte_zx296716_sdio.c │ └── platform_zte_zx296716_sdio.h ├── rtl8821c.mk ├── runwpa └── wlan0dhcp ├── bf.c ├── bf.h ├── bitfield.h ├── certificate.p12 ├── certificate.pem ├── coex.c ├── coex.h ├── compiler.h ├── convert_firmware.c ├── convert_firmware.h ├── debug.c ├── debug.h ├── dkms.conf ├── dkms └── post_install.sh ├── efuse.c ├── efuse.h ├── firmware ├── rtw8703b_fw.bin ├── rtw8703b_wow_fw.bin ├── rtw8723d_fw.bin ├── rtw8812a_fw.bin ├── rtw8814a_fw.bin ├── rtw8821a_fw.bin ├── rtw8821c_fw.bin ├── rtw8822b_fw.bin ├── rtw8822c_fw.bin └── rtw8822c_wow_fw.bin ├── fw.c ├── fw.h ├── hci.h ├── kernel_key.pem ├── key.pem ├── led.c ├── led.h ├── mac.c ├── mac.h ├── mac80211.c ├── main.c ├── main.h ├── openssl.conf ├── pci.c ├── pci.h ├── phy.c ├── phy.h ├── ps.c ├── ps.h ├── reg.h ├── regd.c ├── regd.h ├── reload_rtw88.sh ├── rtw8703b.c ├── rtw8703b.h ├── rtw8703b_tables.c ├── rtw8703b_tables.h ├── rtw8723cs.c ├── rtw8723d.c ├── rtw8723d.h ├── rtw8723d_table.c ├── rtw8723d_table.h ├── rtw8723de.c ├── rtw8723ds.c ├── rtw8723du.c ├── rtw8723x.c ├── rtw8723x.h ├── rtw88.conf ├── rtw8812a.c ├── rtw8812a.h ├── rtw8812a_table.c ├── rtw8812a_table.h ├── rtw8812au.c ├── rtw8814a.c ├── rtw8814a.h ├── rtw8814a_table.c ├── rtw8814a_table.h ├── rtw8814ae.c ├── rtw8814au.c ├── rtw8821a.c ├── rtw8821a.h ├── rtw8821a_table.c ├── rtw8821a_table.h ├── rtw8821au.c ├── rtw8821c.c ├── rtw8821c.h ├── rtw8821c_table.c ├── rtw8821c_table.h ├── rtw8821ce.c ├── rtw8821cs.c ├── rtw8821cu.c ├── rtw8822b.c ├── rtw8822b.h ├── rtw8822b_table.c ├── rtw8822b_table.h ├── rtw8822be.c ├── rtw8822bs.c ├── rtw8822bu.c ├── rtw8822c.c ├── rtw8822c.h ├── rtw8822c_table.c ├── rtw8822c_table.h ├── rtw8822ce.c ├── rtw8822cs.c ├── rtw8822cu.c ├── rtw88xxa.c ├── rtw88xxa.h ├── rx.c ├── rx.h ├── sar.c ├── sar.h ├── sdio.c ├── sdio.h ├── sdio_ids.h ├── sec.c ├── sec.h ├── sign-file ├── suspend_rtw8723de ├── suspend_rtw8821ce ├── suspend_rtw8822be ├── suspend_rtw8822ce ├── tx.c ├── tx.h ├── usb.c ├── usb.h ├── util.c ├── util.h ├── wow.c └── wow.h /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE! Don't add files that are generated in specific 3 | # subdirectories here. Add them in the ".gitignore" file 4 | # in that subdirectory instead. 5 | # 6 | # NOTE! Please use 'git ls-files -i --exclude-standard' 7 | # command after changing this file, to see if there are 8 | # any tracked files which get ignored after the change. 9 | # 10 | # Normal rules 11 | # 12 | .* 13 | *.o 14 | *.o.* 15 | *.a 16 | *.s 17 | *.ko 18 | *.so 19 | *.so.dbg 20 | *.mod.c 21 | *.mod 22 | *.i 23 | *.lst 24 | *.symtypes 25 | *.order 26 | *.elf 27 | *.gz 28 | *.bz2 29 | *.lzma 30 | *.xz 31 | *.lz4 32 | *.lzo 33 | *.patch 34 | *.gcno 35 | modules.builtin 36 | Module.symvers 37 | 38 | # 39 | # Top-level generic files 40 | # 41 | /tags 42 | /TAGS 43 | /linux 44 | /vmlinux 45 | /vmlinuz 46 | /System.map 47 | /Module.markers 48 | 49 | # 50 | # Debian directory (make deb-pkg) 51 | # 52 | /debian/ 53 | 54 | # 55 | # git files that we don't want to ignore even it they are dot-files 56 | # 57 | !.gitignore 58 | !.mailmap 59 | 60 | # 61 | # Generated include files 62 | # 63 | include/config 64 | include/generated 65 | arch/*/include/generated 66 | 67 | # stgit generated dirs 68 | patches-* 69 | 70 | # quilt's files 71 | patches 72 | series 73 | 74 | # cscope files 75 | cscope.* 76 | ncscope.* 77 | 78 | # gnu global files 79 | GPATH 80 | GRTAGS 81 | GSYMS 82 | GTAGS 83 | 84 | *.orig 85 | *~ 86 | \#*# 87 | 88 | # 89 | # Leavings from module signing 90 | # 91 | extra_certificates 92 | signing_key.priv 93 | signing_key.x509 94 | x509.genkey 95 | 96 | # Kconfig presets 97 | all.config 98 | 99 | # Driver backups 100 | backup_drivers.tar 101 | 102 | -------------------------------------------------------------------------------- /Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2018 The Android-x86 Open Source Project 3 | # 4 | # Licensed under the GNU General Public License Version 2 or later. 5 | # You may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.gnu.org/licenses/gpl.html 9 | # 10 | 11 | LOCAL_PATH := $(my-dir) 12 | LOCAL_MODULE := $(notdir $(LOCAL_PATH)) 13 | EXTRA_KERNEL_MODULE_PATH_$(LOCAL_MODULE) := $(LOCAL_PATH) 14 | -------------------------------------------------------------------------------- /alt_rtl8821ce/Kconfig: -------------------------------------------------------------------------------- 1 | config RTL8821CE 2 | tristate "Realtek 8821C PCI WiFi" 3 | depends on PCI 4 | ---help--- 5 | Help message of RTL8821CE 6 | 7 | -------------------------------------------------------------------------------- /alt_rtl8821ce/clean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rmmod 8192cu 3 | rmmod 8192ce 4 | rmmod 8192du 5 | rmmod 8192de 6 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/core/crypto/rtw_crypto_wrap.c: -------------------------------------------------------------------------------- 1 | #include "rtw_crypto_wrap.h" 2 | 3 | #ifndef DEBUG_CRYPTO 4 | #define DEBUG_CRYPTO 0 5 | #endif /* DEBUG_CRYTO */ 6 | 7 | int os_memcmp(const void *s1, const void *s2, size_t n) 8 | { 9 | return _rtw_memcmp2(s1, s2, n); 10 | } 11 | 12 | int os_memcmp_const(const void *a, const void *b, size_t len) 13 | { 14 | const u8 *aa = a; 15 | const u8 *bb = b; 16 | size_t i; 17 | u8 res; 18 | 19 | for (res = 0, i = 0; i < len; i++) 20 | res |= aa[i] ^ bb[i]; 21 | 22 | return res; 23 | } 24 | 25 | void* os_memdup(const void *src, u32 sz) 26 | { 27 | void *r = rtw_malloc(sz); 28 | 29 | if (r && src) 30 | _rtw_memcpy(r, src, sz); 31 | return r; 32 | } 33 | 34 | size_t os_strlen(const char *s) 35 | { 36 | const char *p = s; 37 | while (*p) 38 | p++; 39 | return p - s; 40 | } 41 | 42 | 43 | void forced_memzero(void *ptr, size_t len) 44 | { 45 | _rtw_memset(ptr, 0, len); 46 | } 47 | 48 | void bin_clear_free(void *bin, size_t len) 49 | { 50 | if (bin) { 51 | forced_memzero(bin, len); 52 | rtw_mfree(bin, len); 53 | } 54 | } 55 | 56 | void wpa_printf(int level, const char *fmt, ...) 57 | { 58 | #if DEBUG_CRYPTO 59 | #define MSG_LEN 100 60 | va_list args; 61 | u8 buf[MSG_LEN] = { 0 }; 62 | int err; 63 | 64 | va_start(args, fmt); 65 | err = vsnprintf(buf, MSG_LEN, fmt, args); 66 | va_end(args); 67 | 68 | RTW_INFO("%s", buf); 69 | #undef MSG_LEN 70 | #endif /* DEBUG_CRYPTO */ 71 | } 72 | 73 | void wpa_hexdump(int level, const char *title, const void *buf, size_t len) 74 | { 75 | #if DEBUG_CRYPTO 76 | RTW_INFO_DUMP((u8 *)title, buf, len); 77 | #endif /* DEBUG_CRYPTO */ 78 | } 79 | 80 | void wpa_hexdump_key(int level, const char *title, const void *buf, size_t len) 81 | { 82 | #if DEBUG_CRYPTO 83 | RTW_INFO_DUMP((u8 *)title, buf, len); 84 | #endif /* DEBUG_CRYPTO */ 85 | } 86 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/core/crypto/wlancrypto_wrap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wlantest - IEEE 802.11 protocol monitoring and testing tool 3 | * Copyright (c) 2010-2013, 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 WLANCRYPTO_WRAP_H 10 | #define WLANCRYPTO_WRAP_H 11 | 12 | int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, 13 | u8 *mac); 14 | 15 | u8* ccmp_decrypt(_adapter *padapter, const u8 *tk, const struct ieee80211_hdr *hdr, 16 | const u8 *data, size_t data_len, size_t *decrypted_len); 17 | u8* ccmp_encrypt(_adapter *padapter, const u8 *tk, u8 *frame, size_t len, size_t hdrlen, u8 *qos, 18 | u8 *pn, int keyid, size_t *encrypted_len); 19 | u8* ccmp_encrypt_pv1(const u8 *tk, const u8 *a1, const u8 *a2, const u8 *a3, 20 | const u8 *frame, size_t len, 21 | size_t hdrlen, const u8 *pn, int keyid, 22 | size_t *encrypted_len); 23 | u8* ccmp_256_decrypt(_adapter *padapter, const u8 *tk, const struct ieee80211_hdr *hdr, 24 | const u8 *data, size_t data_len, size_t *decrypted_len); 25 | u8* ccmp_256_encrypt(_adapter *padapter, const u8 *tk, u8 *frame, size_t len, size_t hdrlen, 26 | u8 *qos, u8 *pn, int keyid, size_t *encrypted_len); 27 | 28 | u8* gcmp_decrypt(_adapter *padapter, const u8 *tk, size_t tk_len, const struct ieee80211_hdr *hdr, 29 | const u8 *data, size_t data_len, size_t *decrypted_len); 30 | u8* gcmp_encrypt(_adapter *padapter, const u8 *tk, size_t tk_len, const u8 *frame, size_t len, 31 | size_t hdrlen, const u8 *qos, 32 | const u8 *pn, int keyid, size_t *encrypted_len); 33 | 34 | #endif /* WLANCRYPTO_WRAP_H */ 35 | -------------------------------------------------------------------------------- /alt_rtl8821ce/core/monitor/rtw_radiotap.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 __RTW_RADIOTAP_H_ 16 | #define __RTW_RADIOTAP_H_ 17 | 18 | struct mon_reg_backup { 19 | /* flags */ 20 | u8 known_rcr:1; 21 | u8 known_drvinfo:1; 22 | u8 known_rxfilter:1; 23 | u8 known_misc0:1; 24 | /* data */ 25 | u8 drvinfo; 26 | u16 rxfilter0; 27 | u16 rxfilter1; 28 | u16 rxfilter2; 29 | u32 rcr; 30 | u32 misc0; 31 | }; 32 | 33 | struct moinfo { 34 | union { 35 | struct { 36 | u32 sgi:1; 37 | u32 ldpc:1; 38 | u32 stbc:2; 39 | u32 not_sounding:1; 40 | u32 ofdm_bw:2; 41 | u32 vht_group_id:2; 42 | u32 vht_nsts_aid:12; 43 | u32 vht_txop_not_allow:1; 44 | u32 vht_nsym_dis:1; 45 | u32 vht_ldpc_extra:1; 46 | u32 vht_su_mcs:12; 47 | u32 vht_beamformed:1; 48 | }snif_info; 49 | 50 | struct { 51 | u32 A; 52 | u32 B; 53 | u32 C; 54 | }plcp_info; 55 | }u; 56 | }; 57 | 58 | sint rtw_fill_radiotap_hdr(_adapter *padapter, struct rx_pkt_attrib *a, u8 *buf); 59 | 60 | void rx_query_moinfo(struct rx_pkt_attrib *a, u8 *desc); 61 | 62 | #endif /* __RTW_RADIOTAP_H_ */ 63 | 64 | -------------------------------------------------------------------------------- /alt_rtl8821ce/core/rtw_btcoex_wifionly.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 | #include 17 | #include 18 | 19 | void rtw_btcoex_wifionly_switchband_notify(PADAPTER padapter) 20 | { 21 | hal_btcoex_wifionly_switchband_notify(padapter); 22 | } 23 | 24 | void rtw_btcoex_wifionly_scan_notify(PADAPTER padapter) 25 | { 26 | hal_btcoex_wifionly_scan_notify(padapter); 27 | } 28 | 29 | void rtw_btcoex_wifionly_connect_notify(PADAPTER padapter) 30 | { 31 | hal_btcoex_wifionly_connect_notify(padapter); 32 | } 33 | 34 | void rtw_btcoex_wifionly_hw_config(PADAPTER padapter) 35 | { 36 | hal_btcoex_wifionly_hw_config(padapter); 37 | } 38 | 39 | void rtw_btcoex_wifionly_initialize(PADAPTER padapter) 40 | { 41 | hal_btcoex_wifionly_initlizevariables(padapter); 42 | } 43 | 44 | void rtw_btcoex_wifionly_AntInfoSetting(PADAPTER padapter) 45 | { 46 | hal_btcoex_wifionly_AntInfoSetting(padapter); 47 | } 48 | -------------------------------------------------------------------------------- /alt_rtl8821ce/core/rtw_ioctl_query.c: -------------------------------------------------------------------------------- 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 | #define _RTW_IOCTL_QUERY_C_ 16 | 17 | #include 18 | 19 | 20 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/btc/btc_basic_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 | *****************************************************************************/ 15 | #ifndef __BTC_BASIC_TYPES_H__ 16 | #define __BTC_BASIC_TYPES_H__ 17 | 18 | #define IN 19 | #define OUT 20 | #define VOID void 21 | typedef void *PVOID; 22 | 23 | #define u1Byte u8 24 | #define pu1Byte u8* 25 | 26 | #define u2Byte u16 27 | #define pu2Byte u16* 28 | 29 | #define u4Byte u32 30 | #define pu4Byte u32* 31 | 32 | #define u8Byte u64 33 | #define pu8Byte u64* 34 | 35 | #define s1Byte s8 36 | #define ps1Byte s8* 37 | 38 | #define s2Byte s16 39 | #define ps2Byte s16* 40 | 41 | #define s4Byte s32 42 | #define ps4Byte s32* 43 | 44 | #define s8Byte s64 45 | #define ps8Byte s64* 46 | 47 | #define UCHAR u8 48 | #define USHORT u16 49 | #define UINT u32 50 | #define ULONG u32 51 | #define PULONG u32* 52 | 53 | #endif /* __BTC_BASIC_TYPES_H__ */ 54 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/efuse/rtl8821c/HalEfuseMask8821C_PCIE.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 | 16 | 17 | 18 | /****************************************************************************** 19 | * MPCIE.TXT 20 | ******************************************************************************/ 21 | 22 | 23 | u16 24 | EFUSE_GetArrayLen_MP_8821C_MPCIE(void); 25 | 26 | void 27 | EFUSE_GetMaskArray_MP_8821C_MPCIE( 28 | u8 *Array 29 | ); 30 | 31 | BOOLEAN 32 | EFUSE_IsAddressMasked_MP_8821C_MPCIE(/* TC: Test Chip, MP: MP Chip */ 33 | u16 Offset 34 | ); 35 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/efuse/rtl8821c/HalEfuseMask8821C_SDIO.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 | 16 | 17 | 18 | /****************************************************************************** 19 | * MSDIO.TXT 20 | ******************************************************************************/ 21 | 22 | 23 | u16 24 | EFUSE_GetArrayLen_MP_8821C_MSDIO(void); 25 | 26 | void 27 | EFUSE_GetMaskArray_MP_8821C_MSDIO( 28 | u8 *Array 29 | ); 30 | 31 | BOOLEAN 32 | EFUSE_IsAddressMasked_MP_8821C_MSDIO(/* TC: Test Chip, MP: MP Chip */ 33 | u16 Offset 34 | ); 35 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/efuse/rtl8821c/HalEfuseMask8821C_USB.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 | 16 | 17 | 18 | /****************************************************************************** 19 | * MUSB.TXT 20 | ******************************************************************************/ 21 | 22 | 23 | u16 24 | EFUSE_GetArrayLen_MP_8821C_MUSB(void); 25 | 26 | void 27 | EFUSE_GetMaskArray_MP_8821C_MUSB( 28 | u8 *Array 29 | ); 30 | 31 | BOOLEAN 32 | EFUSE_IsAddressMasked_MP_8821C_MUSB(/* TC: Test Chip, MP: MP Chip */ 33 | u16 Offset 34 | ); 35 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/hal_hci/hal_pci.c: -------------------------------------------------------------------------------- 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 | #define _HAL_PCI_C_ 16 | 17 | #include 18 | #include 19 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_88xx/halmac_8821c/halmac_cfg_wmac_8821c.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2017 - 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 _HALMAC_CFG_WMAC_8821C_H_ 17 | #define _HALMAC_CFG_WMAC_8821C_H_ 18 | 19 | #include "../../halmac_api.h" 20 | 21 | #if HALMAC_8821C_SUPPORT 22 | 23 | enum halmac_ret_status 24 | cfg_drv_info_8821c(struct halmac_adapter *adapter, 25 | enum halmac_drv_info drv_info); 26 | 27 | enum halmac_ret_status 28 | init_low_pwr_8821c(struct halmac_adapter *adapter); 29 | 30 | void 31 | cfg_rx_ignore_8821c(struct halmac_adapter *adapter, 32 | struct halmac_mac_rx_ignore_cfg *cfg); 33 | 34 | enum halmac_ret_status 35 | cfg_ampdu_8821c(struct halmac_adapter *adapter, 36 | struct halmac_ampdu_config *cfg); 37 | 38 | #endif/* HALMAC_8821C_SUPPORT */ 39 | 40 | #endif/* _HALMAC_CFG_WMAC_8821C_H_ */ 41 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_88xx/halmac_8821c/halmac_common_8821c.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2017 - 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 _HALMAC_COMMON_8821C_H_ 17 | #define _HALMAC_COMMON_8821C_H_ 18 | 19 | #include "../../halmac_api.h" 20 | 21 | #if HALMAC_8821C_SUPPORT 22 | 23 | enum halmac_ret_status 24 | get_hw_value_8821c(struct halmac_adapter *adapter, enum halmac_hw_id hw_id, 25 | void *value); 26 | 27 | enum halmac_ret_status 28 | set_hw_value_8821c(struct halmac_adapter *adapter, enum halmac_hw_id hw_id, 29 | void *value); 30 | 31 | enum halmac_ret_status 32 | fill_txdesc_check_sum_8821c(struct halmac_adapter *adapter, u8 *txdesc); 33 | 34 | #endif/* HALMAC_8821C_SUPPORT */ 35 | 36 | #endif/* _HALMAC_COMMON_8821C_H_ */ 37 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_88xx/halmac_8821c/halmac_gpio_8821c.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 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 _HALMAC_GPIO_8821C_H_ 17 | #define _HALMAC_GPIO_8821C_H_ 18 | 19 | #include "../../halmac_api.h" 20 | 21 | #if HALMAC_8821C_SUPPORT 22 | 23 | enum halmac_ret_status 24 | pinmux_get_func_8821c(struct halmac_adapter *adapter, 25 | enum halmac_gpio_func gpio_func, u8 *enable); 26 | 27 | enum halmac_ret_status 28 | pinmux_set_func_8821c(struct halmac_adapter *adapter, 29 | enum halmac_gpio_func gpio_func); 30 | 31 | enum halmac_ret_status 32 | pinmux_free_func_8821c(struct halmac_adapter *adapter, 33 | enum halmac_gpio_func gpio_func); 34 | 35 | #endif /* HALMAC_8821C_SUPPORT */ 36 | 37 | #endif/* _HALMAC_GPIO_8821C_H_ */ 38 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_88xx/halmac_8821c/halmac_init_8821c.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 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 _HALMAC_INIT_8821C_H_ 17 | #define _HALMAC_INIT_8821C_H_ 18 | 19 | #include "../../halmac_api.h" 20 | 21 | #if HALMAC_8821C_SUPPORT 22 | 23 | enum halmac_ret_status 24 | mount_api_8821c(struct halmac_adapter *adapter); 25 | 26 | enum halmac_ret_status 27 | init_trx_cfg_8821c(struct halmac_adapter *adapter, enum halmac_trx_mode mode); 28 | 29 | enum halmac_ret_status 30 | init_system_cfg_8821c(struct halmac_adapter *adapter); 31 | 32 | enum halmac_ret_status 33 | init_protocol_cfg_8821c(struct halmac_adapter *adapter); 34 | 35 | enum halmac_ret_status 36 | init_h2c_8821c(struct halmac_adapter *adapter); 37 | 38 | enum halmac_ret_status 39 | init_edca_cfg_8821c(struct halmac_adapter *adapter); 40 | 41 | enum halmac_ret_status 42 | init_wmac_cfg_8821c(struct halmac_adapter *adapter); 43 | 44 | enum halmac_ret_status 45 | pre_init_system_cfg_8821c(struct halmac_adapter *adapter); 46 | 47 | #endif /* HALMAC_8821C_SUPPORT */ 48 | 49 | #endif/* _HALMAC_INIT_8821C_H_ */ 50 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_88xx/halmac_8821c/halmac_pwr_seq_8821c.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 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 HALMAC_POWER_SEQUENCE_8821C 17 | #define HALMAC_POWER_SEQUENCE_8821C 18 | 19 | #include "../../halmac_pwr_seq_cmd.h" 20 | #include "../../halmac_hw_cfg.h" 21 | 22 | #if HALMAC_8821C_SUPPORT 23 | 24 | #define HALMAC_8821C_PWR_SEQ_VER "V23" 25 | 26 | extern struct halmac_wlan_pwr_cfg *card_dis_flow_8821c[]; 27 | extern struct halmac_wlan_pwr_cfg *card_en_flow_8821c[]; 28 | extern struct halmac_wlan_pwr_cfg *suspend_flow_8821c[]; 29 | extern struct halmac_wlan_pwr_cfg *resume_flow_8821c[]; 30 | extern struct halmac_wlan_pwr_cfg *hwpdn_flow_8821c[]; 31 | extern struct halmac_wlan_pwr_cfg *enter_lps_flow_8821c[]; 32 | extern struct halmac_wlan_pwr_cfg *enter_dlps_flow_8821c[]; 33 | extern struct halmac_wlan_pwr_cfg *leave_lps_flow_8821c[]; 34 | 35 | #endif /* HALMAC_8821C_SUPPORT */ 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_88xx/halmac_88xx_cfg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 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 _HALMAC_88XX_CFG_H_ 17 | #define _HALMAC_88XX_CFG_H_ 18 | 19 | #include "../halmac_api.h" 20 | 21 | #if HALMAC_88XX_SUPPORT 22 | 23 | #define TX_PAGE_SIZE_88XX 128 24 | #define TX_PAGE_SIZE_SHIFT_88XX 7 /* 128 = 2^7 */ 25 | #define TX_ALIGN_SIZE_88XX 8 26 | #define SDIO_TX_MAX_SIZE_88XX 31744 27 | #define RX_BUF_FW_88XX 12288 28 | 29 | #define TX_DESC_SIZE_88XX 48 30 | #define RX_DESC_SIZE_88XX 24 31 | 32 | #define H2C_PKT_SIZE_88XX 32 /* Only support 32 byte packet now */ 33 | #define H2C_PKT_HDR_SIZE_88XX 8 34 | #define C2H_DATA_OFFSET_88XX 10 35 | #define C2H_PKT_BUF_88XX 256 36 | 37 | /* HW memory address */ 38 | #define OCPBASE_TXBUF_88XX 0x18780000 39 | #define OCPBASE_DMEM_88XX 0x00200000 40 | #define OCPBASE_EMEM_88XX 0x00100000 41 | 42 | #endif /* HALMAC_88XX_SUPPORT */ 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_88xx/halmac_flash_88xx.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2017 - 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 _HALMAC_FLASH_88XX_H_ 17 | #define _HALMAC_FLASH_88XX_H_ 18 | 19 | #include "../halmac_api.h" 20 | 21 | #if HALMAC_88XX_SUPPORT 22 | 23 | enum halmac_ret_status 24 | download_flash_88xx(struct halmac_adapter *adapter, u8 *fw_bin, u32 size, 25 | u32 rom_addr); 26 | 27 | enum halmac_ret_status 28 | read_flash_88xx(struct halmac_adapter *adapter, u32 addr, u32 length, u8 *data); 29 | 30 | enum halmac_ret_status 31 | erase_flash_88xx(struct halmac_adapter *adapter, u8 erase_cmd, u32 addr); 32 | 33 | enum halmac_ret_status 34 | check_flash_88xx(struct halmac_adapter *adapter, u8 *fw_bin, u32 size, 35 | u32 addr); 36 | 37 | #endif /* HALMAC_88XX_SUPPORT */ 38 | 39 | #endif/* _HALMAC_FLASH_88XX_H_ */ 40 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_88xx/halmac_gpio_88xx.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 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 _HALMAC_GPIO_88XX_H_ 17 | #define _HALMAC_GPIO_88XX_H_ 18 | 19 | #include "../halmac_api.h" 20 | #include "../halmac_gpio_cmd.h" 21 | 22 | #if HALMAC_88XX_SUPPORT 23 | 24 | enum halmac_ret_status 25 | pinmux_wl_led_mode_88xx(struct halmac_adapter *adapter, 26 | enum halmac_wlled_mode mode); 27 | 28 | void 29 | pinmux_wl_led_sw_ctrl_88xx(struct halmac_adapter *adapter, u8 on); 30 | 31 | void 32 | pinmux_sdio_int_polarity_88xx(struct halmac_adapter *adapter, u8 low_active); 33 | 34 | enum halmac_ret_status 35 | pinmux_gpio_mode_88xx(struct halmac_adapter *adapter, u8 gpio_id, u8 output); 36 | 37 | enum halmac_ret_status 38 | pinmux_gpio_output_88xx(struct halmac_adapter *adapter, u8 gpio_id, u8 high); 39 | 40 | enum halmac_ret_status 41 | pinmux_pin_status_88xx(struct halmac_adapter *adapter, u8 pin_id, u8 *high); 42 | 43 | enum halmac_ret_status 44 | pinmux_parser_88xx(struct halmac_adapter *adapter, 45 | const struct halmac_gpio_pimux_list *list, u32 size, 46 | u32 gpio_id, u32 *cur_func); 47 | 48 | #endif /* HALMAC_88XX_SUPPORT */ 49 | 50 | #endif/* _HALMAC_GPIO_88XX_H_ */ 51 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_dbg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2018 - 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 _HALMAC_DBG_H_ 17 | #define _HALMAC_DBG_H_ 18 | 19 | #include "halmac_api.h" 20 | 21 | #if HALMAC_DBG_MONITOR_IO 22 | enum halmac_ret_status 23 | mount_api_dbg(struct halmac_adapter *adapter); 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_intf_phy_cmd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 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 HALMAC_INTF_PHY_CMD 17 | #define HALMAC_INTF_PHY_CMD 18 | 19 | /* Cut mask */ 20 | enum halmac_intf_phy_cut { 21 | HALMAC_INTF_PHY_CUT_TESTCHIP = BIT(0), 22 | HALMAC_INTF_PHY_CUT_A = BIT(1), 23 | HALMAC_INTF_PHY_CUT_B = BIT(2), 24 | HALMAC_INTF_PHY_CUT_C = BIT(3), 25 | HALMAC_INTF_PHY_CUT_D = BIT(4), 26 | HALMAC_INTF_PHY_CUT_E = BIT(5), 27 | HALMAC_INTF_PHY_CUT_F = BIT(6), 28 | HALMAC_INTF_PHY_CUT_G = BIT(7), 29 | HALMAC_INTF_PHY_CUT_ALL = 0x7FFF, 30 | }; 31 | 32 | /* IP selection */ 33 | enum halmac_ip_sel { 34 | HALMAC_IP_INTF_PHY = 0, 35 | HALMAC_IP_SEL_MAC = 1, 36 | HALMAC_IP_PCIE_DBI = 2, 37 | HALMAC_IP_SEL_UNDEFINE = 0x7FFF, 38 | }; 39 | 40 | /* Platform mask */ 41 | enum halmac_intf_phy_platform { 42 | HALMAC_INTF_PHY_PLATFORM_ALL = BIT(0), 43 | HALMAC_INTF_PHY_PLATFORM_ASUS = BIT(1), 44 | HALMAC_INTF_PHY_PLATFORM_LENOVO_V540 = BIT(2), 45 | HALMAC_INTF_PHY_PLATFORM_DHC = BIT(3), 46 | HALMAC_INTF_PHY_PLATFORM_FOR_ALL = 0x7FFF, 47 | }; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_rx_bd_nic.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 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 _HALMAC_RX_BD_NIC_H_ 17 | #define _HALMAC_RX_BD_NIC_H_ 18 | #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 19 | HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||\ 20 | HALMAC_8192F_SUPPORT || HALMAC_8197G_SUPPORT || HALMAC_8814B_SUPPORT) 21 | 22 | /*TXBD_DW0*/ 23 | 24 | #define GET_RX_BD_RXFAIL(rxbd) LE_BITS_TO_4BYTE(rxbd + 0x00, 31, 1) 25 | #define GET_RX_BD_TOTALRXPKTSIZE(rxbd) LE_BITS_TO_4BYTE(rxbd + 0x00, 16, 13) 26 | #define GET_RX_BD_RXTAG(rxbd) LE_BITS_TO_4BYTE(rxbd + 0x00, 16, 13) 27 | #define GET_RX_BD_FS(rxbd) LE_BITS_TO_4BYTE(rxbd + 0x00, 15, 1) 28 | #define GET_RX_BD_LS(rxbd) LE_BITS_TO_4BYTE(rxbd + 0x00, 14, 1) 29 | #define GET_RX_BD_RXBUFFSIZE(rxbd) LE_BITS_TO_4BYTE(rxbd + 0x00, 0, 14) 30 | 31 | /*TXBD_DW1*/ 32 | 33 | #define GET_RX_BD_PHYSICAL_ADDR_LOW(rxbd) LE_BITS_TO_4BYTE(rxbd + 0x04, 0, 32) 34 | 35 | /*TXBD_DW2*/ 36 | 37 | #define GET_RX_BD_PHYSICAL_ADDR_HIGH(rxbd) LE_BITS_TO_4BYTE(rxbd + 0x08, 0, 32) 38 | 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/halmac/halmac_usb_reg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 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 __HALMAC_USB_REG_H__ 17 | #define __HALMAC_USB_REG_H__ 18 | 19 | #define USB_REG_PAGE 0xF4 20 | 21 | #endif/* __HALMAC_USB_REG_H__ */ 22 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/halrf/halrf_features.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 | 26 | #ifndef __HALRF_FEATURES_H__ 27 | #define __HALRF_FEATURES_H__ 28 | 29 | #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) 30 | 31 | #define CONFIG_HALRF_POWERTRACKING 1 32 | 33 | #elif (DM_ODM_SUPPORT_TYPE == ODM_AP) 34 | 35 | #define CONFIG_HALRF_POWERTRACKING 1 36 | 37 | #elif (DM_ODM_SUPPORT_TYPE == ODM_CE) 38 | 39 | #define CONFIG_HALRF_POWERTRACKING 1 40 | 41 | #endif 42 | 43 | #endif /*#ifndef __HALRF_FEATURES_H__*/ 44 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/halrf/halrf_powertracking.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 | 26 | #ifndef __HALRF_POWER_TRACKING_H__ 27 | #define __HALRF_POWER_TRACKING_H__ 28 | 29 | boolean 30 | odm_check_power_status(void *dm_void); 31 | 32 | #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE)) 33 | void halrf_update_pwr_track(void *dm_void, u8 rate); 34 | #endif 35 | 36 | #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) 37 | void halrf_update_init_rate_work_item_callback( 38 | void *context); 39 | #endif 40 | 41 | void halrf_set_pwr_track(void *dm_void, u8 enable); 42 | 43 | #endif /*#ifndef __HALRF_POWERTRACKING_H__*/ 44 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/halrf/halrf_psd.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 | 16 | #ifndef __HALRF_PSD_H__ 17 | #define __HALRF_PSD_H__ 18 | 19 | 20 | struct _halrf_psd_data { 21 | u32 point; 22 | u32 start_point; 23 | u32 stop_point; 24 | u32 average; 25 | u32 buf_size; 26 | u32 psd_data[256]; 27 | u32 psd_progress; 28 | }; 29 | 30 | u32 31 | halrf_psd_init( 32 | void *dm_void); 33 | 34 | u32 35 | halrf_psd_query( 36 | void *dm_void, 37 | u32 *outbuf, 38 | u32 buf_size); 39 | 40 | u32 41 | halrf_psd_init_query( 42 | void *dm_void, 43 | u32 *outbuf, 44 | u32 point, 45 | u32 start_point, 46 | u32 stop_point, 47 | u32 average, 48 | u32 buf_size); 49 | 50 | #endif /*#__HALRF_PSD_H__*/ 51 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/halrf/halrf_txgapcal.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 | 26 | #ifndef __HALRF_TXGAPCAL_H__ 27 | #define __HALRF_TXGAPCAL_H__ 28 | 29 | void odm_tx_gain_gap_calibration(void *dm_void); 30 | 31 | #endif /*__HALRF_TXGAPCAL_H__*/ 32 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/halrf/rtl8821c/version_rtl8821c_rf.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 | /*RTL8821C RF Parameters*/ 26 | #define RF_RELEASE_VERSION_8821C 1 27 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/mp_precomp.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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/phydm_direct_bf.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 | 26 | #ifndef __PHYDM_DIR_BF_H__ 27 | #define __PHYDM_DIR_BF_H__ 28 | 29 | #ifdef CONFIG_DIRECTIONAL_BF 30 | #define ANGLE_NUM 12 31 | 32 | /*@ 33 | * ============================================================ 34 | * function prototype 35 | * ============================================================ 36 | */ 37 | void phydm_iq_gen_en(void *dm_void); 38 | void phydm_dis_cdd(void *dm_void); 39 | void phydm_pathb_q_matrix_rotate_en(void *dm_void); 40 | void phydm_pathb_q_matrix_rotate(void *dm_void, u16 idx); 41 | void phydm_set_direct_bfer(void *dm_void, u16 phs_idx, u8 su_idx); 42 | void phydm_set_direct_bfer_txdesc_en(void *dm_void, u8 enable); 43 | #endif 44 | #endif 45 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/phydm_noisemonitor.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 __ODMNOISEMONITOR_H__ 26 | #define __ODMNOISEMONITOR_H__ 27 | 28 | #define VALID_CNT 5 29 | 30 | struct noise_level { 31 | u8 value[PHYDM_MAX_RF_PATH]; 32 | s8 sval[PHYDM_MAX_RF_PATH]; 33 | s32 sum[PHYDM_MAX_RF_PATH]; 34 | u8 valid[PHYDM_MAX_RF_PATH]; 35 | u8 valid_cnt[PHYDM_MAX_RF_PATH]; 36 | }; 37 | 38 | struct odm_noise_monitor { 39 | s8 noise[PHYDM_MAX_RF_PATH]; 40 | s16 noise_all; 41 | }; 42 | 43 | s16 odm_inband_noise_monitor(void *dm_void, u8 is_pause_dig, u8 igi_value, 44 | u32 max_time); 45 | 46 | void phydm_noisy_detection(void *dm_void); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/rtl8821c/halhwimg8821c_mac.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 | 26 | /*Image2HeaderVersion: R3 1.5.10.1*/ 27 | #if (RTL8821C_SUPPORT == 1) 28 | #ifndef __INC_MP_MAC_HW_IMG_8821C_H 29 | #define __INC_MP_MAC_HW_IMG_8821C_H 30 | 31 | /****************************************************************************** 32 | * mac_reg.TXT 33 | ******************************************************************************/ 34 | 35 | /* tc: Test Chip, mp: mp Chip*/ 36 | void 37 | odm_read_and_config_mp_8821c_mac_reg(struct dm_struct *dm); 38 | u32 odm_get_version_mp_8821c_mac_reg(void); 39 | 40 | #endif 41 | #endif /* end of HWIMG_SUPPORT*/ 42 | 43 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/rtl8821c/mp_precomp.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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/rtl8821c/phydm_rtl8821c.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 | #if (RTL8821C_SUPPORT) 26 | #ifndef __ODM_RTL8821C_H__ 27 | #define __ODM_RTL8821C_H__ 28 | 29 | void phydm_hwsetting_8821c(struct dm_struct *dm); 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/phydm/rtl8821c/version_rtl8821c.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 | /*RTL8821C PHY Parameters*/ 26 | /* 27 | [Caution] 28 | Since 01/Aug/2015, the commit rules will be simplified. 29 | You do not need to fill up the version.h anymore, 30 | only the maintenance supervisor fills it before formal release. 31 | */ 32 | #define RELEASE_DATE_8821C 20200908 33 | #define COMMIT_BY_8821C "WeiChi" 34 | #define RELEASE_VERSION_8821C 62 35 | -------------------------------------------------------------------------------- /alt_rtl8821ce/hal/rtl8821c/hal8821c_fw.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2012 - 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 | #ifdef CONFIG_RTL8821C 17 | 18 | #ifndef _FW_HEADER_8821C_H 19 | #define _FW_HEADER_8821C_H 20 | 21 | #ifdef LOAD_FW_HEADER_FROM_DRIVER 22 | #if (defined(CONFIG_AP_WOWLAN) || (DM_ODM_SUPPORT_TYPE & (ODM_AP))) 23 | extern u8 array_mp_8821c_fw_ap[115416]; 24 | extern u32 array_length_mp_8821c_fw_ap; 25 | #endif 26 | 27 | #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN)) || (DM_ODM_SUPPORT_TYPE & (ODM_CE)) 28 | extern u8 array_mp_8821c_fw_nic[138984]; 29 | extern u32 array_length_mp_8821c_fw_nic; 30 | extern u8 array_mp_8821c_fw_spic[73216]; 31 | extern u32 array_length_mp_8821c_fw_spic; 32 | #ifdef CONFIG_WOWLAN 33 | extern u8 array_mp_8821c_fw_wowlan[103304]; 34 | extern u32 array_length_mp_8821c_fw_wowlan; 35 | #endif /*CONFIG_WOWLAN*/ 36 | #endif 37 | #endif /* end of LOAD_FW_HEADER_FROM_DRIVER */ 38 | 39 | #endif 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /alt_rtl8821ce/ifcfg-wlan0: -------------------------------------------------------------------------------- 1 | #DHCP client 2 | DEVICE=wlan0 3 | BOOTPROTO=dhcp 4 | ONBOOT=yes -------------------------------------------------------------------------------- /alt_rtl8821ce/include/circ_buf.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 __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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/cmd_osdep.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 __CMD_OSDEP_H_ 16 | #define __CMD_OSDEP_H_ 17 | 18 | 19 | extern sint _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); 20 | extern sint _rtw_init_evt_priv(struct evt_priv *pevtpriv); 21 | extern void _rtw_free_evt_priv(struct evt_priv *pevtpriv); 22 | extern void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv); 23 | extern sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj, bool to_head); 24 | extern struct cmd_obj *_rtw_dequeue_cmd(_queue *queue); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/drv_types_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 __DRV_TYPES_LINUX_H__ 16 | #define __DRV_TYPES_LINUX_H__ 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/drv_types_pci.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_PCI_H__ 16 | #define __DRV_TYPES_PCI_H__ 17 | 18 | #ifdef PLATFORM_LINUX 19 | #include 20 | #endif 21 | 22 | #define INTEL_VENDOR_ID 0x8086 23 | #define SIS_VENDOR_ID 0x1039 24 | #define ATI_VENDOR_ID 0x1002 25 | #define ATI_DEVICE_ID 0x7914 26 | #define AMD_VENDOR_ID 0x1022 27 | 28 | #define PCI_VENDER_ID_REALTEK 0x10ec 29 | 30 | enum aspm_mode { 31 | ASPM_MODE_UND, 32 | ASPM_MODE_PERF, 33 | ASPM_MODE_PS, 34 | ASPM_MODE_DEF, 35 | }; 36 | 37 | struct pci_priv { 38 | BOOLEAN pci_clk_req; 39 | 40 | u8 pciehdr_offset; 41 | 42 | u8 linkctrl_reg; 43 | u8 pcibridge_linkctrlreg; 44 | 45 | u8 amd_l1_patch; 46 | 47 | #ifdef CONFIG_PCI_DYNAMIC_ASPM 48 | u8 aspm_mode; 49 | #endif 50 | }; 51 | 52 | typedef struct _RT_ISR_CONTENT { 53 | union { 54 | u32 IntArray[2]; 55 | u32 IntReg4Byte; 56 | u16 IntReg2Byte; 57 | }; 58 | } RT_ISR_CONTENT, *PRT_ISR_CONTENT; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/ethernet.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 | /*! \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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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(PADAPTER padapter, u32 sdio_hisr); 20 | u8 rtw_set_hal_ops(_adapter *padapter); 21 | 22 | #ifdef CONFIG_RTL8188E 23 | void rtl8188es_set_hal_ops(PADAPTER padapter); 24 | #endif 25 | 26 | #ifdef CONFIG_RTL8723B 27 | void rtl8723bs_set_hal_ops(PADAPTER padapter); 28 | #endif 29 | 30 | #endif /* __GSPI_HAL_H__ */ 31 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/gspi_osintf.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_OSINTF_H__ 16 | #define __SDIO_OSINTF_H__ 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/h2clbk.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 | 16 | 17 | #define _H2CLBK_H_ 18 | 19 | 20 | void _lbk_cmd(PADAPTER Adapter); 21 | 22 | void _lbk_rsp(PADAPTER Adapter); 23 | 24 | void _lbk_evt(PADAPTER Adapter); 25 | 26 | void h2c_event_callback(unsigned char *dev, unsigned char *pbuf); 27 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/hal_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 __HAL_GSPI_H_ 16 | #define __HAL_GSPI_H_ 17 | 18 | #define ffaddr2deviceId(pdvobj, addr) (pdvobj->Queue2Pipe[addr]) 19 | 20 | u8 rtw_hal_gspi_max_txoqt_free_space(_adapter *padapter); 21 | u8 rtw_hal_gspi_query_tx_freepage(_adapter *padapter, u8 PageIdx, u8 RequiredPageNum); 22 | void rtw_hal_gspi_update_tx_freepage(_adapter *padapter, u8 PageIdx, u8 RequiredPageNum); 23 | void rtw_hal_set_gspi_tx_max_length(PADAPTER padapter, u8 numHQ, u8 numNQ, u8 numLQ, u8 numPubQ); 24 | u32 rtw_hal_get_gspi_tx_max_length(PADAPTER padapter, u8 queue_idx); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/hal_sdio_coex.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2013 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 | * You should have received a copy of the GNU General Public License along with 15 | * this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 17 | * 18 | * 19 | ******************************************************************************/ 20 | #ifndef __HAL_SDIO_COEX_H__ 21 | #define __HAL_SDIO_COEX_H__ 22 | 23 | #include 24 | 25 | #ifdef CONFIG_SDIO_MULTI_FUNCTION_COEX 26 | 27 | enum { /* for sdio multi-func. coex */ 28 | SDIO_MULTI_WIFI = 0, 29 | SDIO_MULTI_BT, 30 | SDIO_MULTI_NUM 31 | }; 32 | 33 | bool ex_hal_sdio_multi_if_bus_available(PADAPTER adapter); 34 | 35 | #else 36 | 37 | #define ex_hal_sdio_multi_if_bus_available(adapter) TRUE 38 | 39 | #endif /* CONFIG_SDIO_MULTI_FUNCTION_COEX */ 40 | #endif /* !__HAL_SDIO_COEX_H__ */ 41 | 42 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/mlme_osdep.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 __MLME_OSDEP_H_ 16 | #define __MLME_OSDEP_H_ 17 | 18 | extern void rtw_os_indicate_disconnect(_adapter *adapter, u16 reason, u8 locally_generated); 19 | extern void rtw_os_indicate_connect(_adapter *adapter); 20 | void rtw_os_indicate_scan_done(_adapter *padapter, bool aborted); 21 | extern void rtw_report_sec_ie(_adapter *adapter, u8 authmode, u8 *sec_ie); 22 | 23 | void rtw_reset_securitypriv(_adapter *adapter); 24 | 25 | #endif /* _MLME_OSDEP_H_ */ 26 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/nic_spec.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 | 16 | 17 | #ifndef __NIC_SPEC_H__ 18 | #define __NIC_SPEC_H__ 19 | 20 | #include 21 | 22 | #define RTL8711_MCTRL_ (0x20000) 23 | #define RTL8711_UART_ (0x30000) 24 | #define RTL8711_TIMER_ (0x40000) 25 | #define RTL8711_FINT_ (0x50000) 26 | #define RTL8711_HINT_ (0x50000) 27 | #define RTL8711_GPIO_ (0x60000) 28 | #define RTL8711_WLANCTRL_ (0x200000) 29 | #define RTL8711_WLANFF_ (0xe00000) 30 | #define RTL8711_HCICTRL_ (0x600000) 31 | #define RTL8711_SYSCFG_ (0x620000) 32 | #define RTL8711_SYSCTRL_ (0x620000) 33 | #define RTL8711_MCCTRL_ (0x020000) 34 | 35 | 36 | #include 37 | 38 | #include 39 | 40 | 41 | #endif /* __RTL8711_SPEC_H__ */ 42 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/pci_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 __PCI_HAL_H__ 16 | #define __PCI_HAL_H__ 17 | 18 | #ifdef CONFIG_RTL8188E 19 | void rtl8188ee_set_hal_ops(_adapter *padapter); 20 | #endif 21 | 22 | #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) 23 | void rtl8812ae_set_hal_ops(_adapter *padapter); 24 | #endif 25 | 26 | #if defined(CONFIG_RTL8192E) 27 | void rtl8192ee_set_hal_ops(_adapter *padapter); 28 | #endif 29 | 30 | #if defined(CONFIG_RTL8192F) 31 | void rtl8192fe_set_hal_ops(_adapter *padapter); 32 | #endif 33 | 34 | #ifdef CONFIG_RTL8723B 35 | void rtl8723be_set_hal_ops(_adapter *padapter); 36 | #endif 37 | 38 | #ifdef CONFIG_RTL8723D 39 | void rtl8723de_set_hal_ops(_adapter *padapter); 40 | #endif 41 | 42 | #ifdef CONFIG_RTL8814A 43 | void rtl8814ae_set_hal_ops(_adapter *padapter); 44 | #endif 45 | 46 | #ifdef CONFIG_RTL8822B 47 | void rtl8822be_set_hal_ops(PADAPTER padapter); 48 | #endif 49 | 50 | #ifdef CONFIG_RTL8822C 51 | void rtl8822ce_set_hal_ops(PADAPTER padapter); 52 | #endif 53 | 54 | #ifdef CONFIG_RTL8814B 55 | void rtl8814be_set_hal_ops(PADAPTER padapter); 56 | #endif 57 | 58 | u8 rtw_set_hal_ops(_adapter *padapter); 59 | 60 | #endif /* __PCIE_HAL_H__ */ 61 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8188e_dm.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 __RTL8188E_DM_H__ 16 | #define __RTL8188E_DM_H__ 17 | 18 | void rtl8188e_init_dm_priv(PADAPTER Adapter); 19 | void rtl8188e_deinit_dm_priv(PADAPTER Adapter); 20 | void rtl8188e_InitHalDm(PADAPTER Adapter); 21 | void rtl8188e_HalDmWatchDog(PADAPTER Adapter); 22 | 23 | /* void rtl8192c_dm_CheckTXPowerTracking(PADAPTER Adapter); */ 24 | 25 | /* void rtl8192c_dm_RF_Saving(PADAPTER pAdapter, u8 bForceInNormal); */ 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8188e_led.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 __RTL8188E_LED_H__ 16 | #define __RTL8188E_LED_H__ 17 | 18 | #ifdef CONFIG_RTW_SW_LED 19 | 20 | /* ******************************************************************************** 21 | * Interface to manipulate LED objects. 22 | * ******************************************************************************** */ 23 | #ifdef CONFIG_USB_HCI 24 | void rtl8188eu_InitSwLeds(PADAPTER padapter); 25 | void rtl8188eu_DeInitSwLeds(PADAPTER padapter); 26 | #endif 27 | #ifdef CONFIG_PCI_HCI 28 | void rtl8188ee_InitSwLeds(PADAPTER padapter); 29 | void rtl8188ee_DeInitSwLeds(PADAPTER padapter); 30 | #endif 31 | #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) 32 | void rtl8188es_InitSwLeds(PADAPTER padapter); 33 | void rtl8188es_DeInitSwLeds(PADAPTER padapter); 34 | #endif 35 | 36 | #endif 37 | #endif /*CONFIG_RTW_SW_LED*/ 38 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8188e_rf.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 __RTL8188E_RF_H__ 16 | #define __RTL8188E_RF_H__ 17 | 18 | 19 | 20 | int PHY_RF6052_Config8188E(PADAPTER Adapter); 21 | void rtl8188e_RF_ChangeTxPath(PADAPTER Adapter, 22 | u16 DataRate); 23 | void rtl8188e_PHY_RF6052SetBandwidth( 24 | PADAPTER Adapter, 25 | enum channel_width Bandwidth); 26 | 27 | #endif/* __RTL8188E_RF_H__ */ 28 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8188e_sreset.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 _RTL8188E_SRESET_H_ 16 | #define _RTL8188E_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8188e_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8188e_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8188f_dm.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 __RTL8188F_DM_H__ 16 | #define __RTL8188F_DM_H__ 17 | /* ************************************************************ 18 | * Description: 19 | * 20 | * This file is for 8188F dynamic mechanism only 21 | * 22 | * 23 | * ************************************************************ */ 24 | 25 | /* ************************************************************ 26 | * structure and define 27 | * ************************************************************ */ 28 | 29 | /* ************************************************************ 30 | * function prototype 31 | * ************************************************************ */ 32 | 33 | void rtl8188f_init_dm_priv(PADAPTER padapter); 34 | void rtl8188f_deinit_dm_priv(PADAPTER padapter); 35 | 36 | void rtl8188f_InitHalDm(PADAPTER padapter); 37 | void rtl8188f_HalDmWatchDog(PADAPTER padapter); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8188f_led.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 __RTL8188F_LED_H__ 16 | #define __RTL8188F_LED_H__ 17 | #ifdef CONFIG_RTW_SW_LED 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | 24 | /* ******************************************************************************** 25 | * Interface to manipulate LED objects. 26 | * ******************************************************************************** */ 27 | #ifdef CONFIG_USB_HCI 28 | void rtl8188fu_InitSwLeds(PADAPTER padapter); 29 | void rtl8188fu_DeInitSwLeds(PADAPTER padapter); 30 | #endif 31 | #ifdef CONFIG_SDIO_HCI 32 | void rtl8188fs_InitSwLeds(PADAPTER padapter); 33 | void rtl8188fs_DeInitSwLeds(PADAPTER padapter); 34 | #endif 35 | #ifdef CONFIG_GSPI_HCI 36 | void rtl8188fs_InitSwLeds(PADAPTER padapter); 37 | void rtl8188fs_DeInitSwLeds(PADAPTER padapter); 38 | #endif 39 | #ifdef CONFIG_PCI_HCI 40 | void rtl8188fe_InitSwLeds(PADAPTER padapter); 41 | void rtl8188fe_DeInitSwLeds(PADAPTER padapter); 42 | #endif 43 | 44 | #endif 45 | #endif/*CONFIG_RTW_SW_LED*/ 46 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8188f_rf.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 __RTL8188F_RF_H__ 16 | #define __RTL8188F_RF_H__ 17 | 18 | int PHY_RF6052_Config8188F(PADAPTER Adapter); 19 | 20 | void 21 | PHY_RF6052SetBandwidth8188F( 22 | PADAPTER Adapter, 23 | enum channel_width Bandwidth); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8188f_sreset.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 _RTL8188F_SRESET_H_ 16 | #define _RTL8188F_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8188f_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8188f_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8192e_dm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2012 - 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 __RTL8192E_DM_H__ 16 | #define __RTL8192E_DM_H__ 17 | 18 | 19 | void rtl8192e_init_dm_priv(PADAPTER Adapter); 20 | void rtl8192e_deinit_dm_priv(PADAPTER Adapter); 21 | void rtl8192e_InitHalDm(PADAPTER Adapter); 22 | void rtl8192e_HalDmWatchDog(PADAPTER Adapter); 23 | 24 | /* void rtl8192c_dm_CheckTXPowerTracking(PADAPTER Adapter); */ 25 | 26 | /* void rtl8192c_dm_RF_Saving(PADAPTER pAdapter, u8 bForceInNormal); */ 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8192e_led.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2012 - 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 __RTL8192E_LED_H__ 16 | #define __RTL8192E_LED_H__ 17 | 18 | #ifdef CONFIG_RTW_SW_LED 19 | /* ******************************************************************************** 20 | * Interface to manipulate LED objects. 21 | * ******************************************************************************** */ 22 | #ifdef CONFIG_USB_HCI 23 | void rtl8192eu_InitSwLeds(PADAPTER padapter); 24 | void rtl8192eu_DeInitSwLeds(PADAPTER padapter); 25 | #endif 26 | #ifdef CONFIG_PCI_HCI 27 | void rtl8192ee_InitSwLeds(PADAPTER padapter); 28 | void rtl8192ee_DeInitSwLeds(PADAPTER padapter); 29 | #endif 30 | #ifdef CONFIG_SDIO_HCI 31 | void rtl8192es_InitSwLeds(PADAPTER padapter); 32 | void rtl8192es_DeInitSwLeds(PADAPTER padapter); 33 | #endif 34 | 35 | #endif 36 | #endif/*CONFIG_RTW_SW_LED*/ 37 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8192e_rf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2012 - 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 __RTL8192E_RF_H__ 16 | #define __RTL8192E_RF_H__ 17 | 18 | void 19 | PHY_RF6052SetBandwidth8192E( 20 | PADAPTER Adapter, 21 | enum channel_width Bandwidth); 22 | 23 | 24 | int 25 | PHY_RF6052_Config_8192E( 26 | PADAPTER Adapter); 27 | 28 | #endif/* __RTL8192E_RF_H__ */ 29 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8192e_sreset.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2012 - 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 _RTL88812A_SRESET_H_ 16 | #define _RTL8812A_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8192e_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8192e_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8192f_dm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2012 - 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 __RTL8192F_DM_H__ 16 | #define __RTL8192F_DM_H__ 17 | 18 | void rtl8192f_init_dm_priv(PADAPTER Adapter); 19 | void rtl8192f_deinit_dm_priv(PADAPTER Adapter); 20 | void rtl8192f_InitHalDm(PADAPTER Adapter); 21 | void rtl8192f_HalDmWatchDog(PADAPTER Adapter); 22 | 23 | /* void rtl8192c_dm_CheckTXPowerTracking(PADAPTER Adapter); */ 24 | 25 | /* void rtl8192c_dm_RF_Saving(PADAPTER pAdapter, u8 bForceInNormal); */ 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8192f_sreset.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 _RTL8192F_SRESET_H_ 16 | #define _RTL8192F_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8192f_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8192f_sreset_linked_status_check(_adapter *padapter); 23 | #endif /* DBG_CONFIG_ERROR_DETECT */ 24 | #endif /* _RTL8192F_SRESET_H_ */ -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8703b_dm.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 __RTL8703B_DM_H__ 16 | #define __RTL8703B_DM_H__ 17 | /* ************************************************************ 18 | * Description: 19 | * 20 | * This file is for 8703B dynamic mechanism only 21 | * 22 | * 23 | * ************************************************************ */ 24 | 25 | /* ************************************************************ 26 | * structure and define 27 | * ************************************************************ */ 28 | 29 | /* ************************************************************ 30 | * function prototype 31 | * ************************************************************ */ 32 | 33 | void rtl8703b_init_dm_priv(PADAPTER padapter); 34 | void rtl8703b_deinit_dm_priv(PADAPTER padapter); 35 | 36 | void rtl8703b_InitHalDm(PADAPTER padapter); 37 | void rtl8703b_HalDmWatchDog(PADAPTER padapter); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8703b_led.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 __RTL8703B_LED_H__ 16 | #define __RTL8703B_LED_H__ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #ifdef CONFIG_RTW_SW_LED 23 | /* ******************************************************************************** 24 | * Interface to manipulate LED objects. 25 | * ******************************************************************************** */ 26 | #ifdef CONFIG_USB_HCI 27 | void rtl8703bu_InitSwLeds(PADAPTER padapter); 28 | void rtl8703bu_DeInitSwLeds(PADAPTER padapter); 29 | #endif 30 | #ifdef CONFIG_SDIO_HCI 31 | void rtl8703bs_InitSwLeds(PADAPTER padapter); 32 | void rtl8703bs_DeInitSwLeds(PADAPTER padapter); 33 | #endif 34 | #ifdef CONFIG_GSPI_HCI 35 | void rtl8703bs_InitSwLeds(PADAPTER padapter); 36 | void rtl8703bs_DeInitSwLeds(PADAPTER padapter); 37 | #endif 38 | #ifdef CONFIG_PCI_HCI 39 | void rtl8703be_InitSwLeds(PADAPTER padapter); 40 | void rtl8703be_DeInitSwLeds(PADAPTER padapter); 41 | #endif 42 | 43 | #endif/*CONFIG_RTW_SW_LED*/ 44 | #endif /*__RTL8703B_LED_H__*/ 45 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8703b_rf.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 __RTL8703B_RF_H__ 16 | #define __RTL8703B_RF_H__ 17 | 18 | int PHY_RF6052_Config8703B(PADAPTER Adapter); 19 | 20 | void 21 | PHY_RF6052SetBandwidth8703B( 22 | PADAPTER Adapter, 23 | enum channel_width Bandwidth); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8703b_sreset.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 _RTL8703B_SRESET_H_ 16 | #define _RTL8703B_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8703b_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8703b_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8710b_dm.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 __RTL8710B_DM_H__ 16 | #define __RTL8710B_DM_H__ 17 | /* ************************************************************ 18 | * Description: 19 | * 20 | * This file is for 8710B dynamic mechanism only 21 | * 22 | * 23 | * ************************************************************ */ 24 | 25 | /* ************************************************************ 26 | * structure and define 27 | * ************************************************************ */ 28 | 29 | /* ************************************************************ 30 | * function prototype 31 | * ************************************************************ */ 32 | 33 | void rtl8710b_init_dm_priv(PADAPTER padapter); 34 | void rtl8710b_deinit_dm_priv(PADAPTER padapter); 35 | 36 | void rtl8710b_InitHalDm(PADAPTER padapter); 37 | void rtl8710b_HalDmWatchDog(PADAPTER padapter); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8710b_led.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 __RTL8710B_LED_H__ 16 | #define __RTL8710B_LED_H__ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #ifdef CONFIG_RTW_SW_LED 23 | /* ******************************************************************************** 24 | * Interface to manipulate LED objects. 25 | * ******************************************************************************** */ 26 | #ifdef CONFIG_USB_HCI 27 | void rtl8710bu_InitSwLeds(PADAPTER padapter); 28 | void rtl8710bu_DeInitSwLeds(PADAPTER padapter); 29 | #endif 30 | #ifdef CONFIG_SDIO_HCI 31 | void rtl8710bs_InitSwLeds(PADAPTER padapter); 32 | void rtl8710bs_DeInitSwLeds(PADAPTER padapter); 33 | #endif 34 | #ifdef CONFIG_GSPI_HCI 35 | void rtl8710bs_InitSwLeds(PADAPTER padapter); 36 | void rtl8710bs_DeInitSwLeds(PADAPTER padapter); 37 | #endif 38 | #ifdef CONFIG_PCI_HCI 39 | void rtl8710be_InitSwLeds(PADAPTER padapter); 40 | void rtl8710be_DeInitSwLeds(PADAPTER padapter); 41 | #endif 42 | 43 | #endif /*#ifdef CONFIG_RTW_SW_LED*/ 44 | #endif 45 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8710b_rf.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 __RTL8710B_RF_H__ 16 | #define __RTL8710B_RF_H__ 17 | 18 | int PHY_RF6052_Config8710B(PADAPTER pdapter); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8710b_sreset.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 _RTL8710B_SRESET_H_ 16 | #define _RTL8710B_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8710b_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8710b_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723b_dm.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 __RTL8723B_DM_H__ 16 | #define __RTL8723B_DM_H__ 17 | /* ************************************************************ 18 | * Description: 19 | * 20 | * This file is for 8723B dynamic mechanism only 21 | * 22 | * 23 | * ************************************************************ */ 24 | 25 | /* ************************************************************ 26 | * structure and define 27 | * ************************************************************ */ 28 | 29 | /* ************************************************************ 30 | * function prototype 31 | * ************************************************************ */ 32 | 33 | void rtl8723b_init_dm_priv(PADAPTER padapter); 34 | void rtl8723b_deinit_dm_priv(PADAPTER padapter); 35 | 36 | void rtl8723b_InitHalDm(PADAPTER padapter); 37 | void rtl8723b_HalDmWatchDog(PADAPTER padapter); 38 | #endif 39 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723b_led.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 __RTL8723B_LED_H__ 16 | #define __RTL8723B_LED_H__ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #ifdef CONFIG_RTW_SW_LED 23 | /* ******************************************************************************** 24 | * Interface to manipulate LED objects. 25 | * ******************************************************************************** */ 26 | #ifdef CONFIG_USB_HCI 27 | void rtl8723bu_InitSwLeds(PADAPTER padapter); 28 | void rtl8723bu_DeInitSwLeds(PADAPTER padapter); 29 | #endif 30 | #ifdef CONFIG_SDIO_HCI 31 | void rtl8723bs_InitSwLeds(PADAPTER padapter); 32 | void rtl8723bs_DeInitSwLeds(PADAPTER padapter); 33 | #endif 34 | #ifdef CONFIG_GSPI_HCI 35 | void rtl8723bs_InitSwLeds(PADAPTER padapter); 36 | void rtl8723bs_DeInitSwLeds(PADAPTER padapter); 37 | #endif 38 | #ifdef CONFIG_PCI_HCI 39 | void rtl8723be_InitSwLeds(PADAPTER padapter); 40 | void rtl8723be_DeInitSwLeds(PADAPTER padapter); 41 | #endif 42 | 43 | #endif 44 | #endif/*CONFIG_RTW_SW_LED*/ 45 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723b_rf.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 __RTL8723B_RF_H__ 16 | #define __RTL8723B_RF_H__ 17 | 18 | int PHY_RF6052_Config8723B(PADAPTER Adapter); 19 | 20 | void 21 | PHY_RF6052SetBandwidth8723B( 22 | PADAPTER Adapter, 23 | enum channel_width Bandwidth); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723b_sreset.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 _RTL8723B_SRESET_H_ 16 | #define _RTL8723B_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8723b_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8723b_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723d_dm.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 __RTL8723D_DM_H__ 16 | #define __RTL8723D_DM_H__ 17 | /* ************************************************************ 18 | * Description: 19 | * 20 | * This file is for 8723D dynamic mechanism only 21 | * 22 | * 23 | * ************************************************************ */ 24 | 25 | /* ************************************************************ 26 | * structure and define 27 | * ************************************************************ */ 28 | 29 | /* ************************************************************ 30 | * function prototype 31 | * ************************************************************ */ 32 | 33 | void rtl8723d_init_dm_priv(PADAPTER padapter); 34 | void rtl8723d_deinit_dm_priv(PADAPTER padapter); 35 | 36 | void rtl8723d_InitHalDm(PADAPTER padapter); 37 | void rtl8723d_HalDmWatchDog(PADAPTER padapter); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723d_led.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 __RTL8723D_LED_H__ 16 | #define __RTL8723D_LED_H__ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | #ifdef CONFIG_RTW_SW_LED 23 | /* ******************************************************************************** 24 | * Interface to manipulate LED objects. 25 | * ******************************************************************************** */ 26 | #ifdef CONFIG_USB_HCI 27 | void rtl8723du_InitSwLeds(PADAPTER padapter); 28 | void rtl8723du_DeInitSwLeds(PADAPTER padapter); 29 | #endif 30 | #ifdef CONFIG_SDIO_HCI 31 | void rtl8723ds_InitSwLeds(PADAPTER padapter); 32 | void rtl8723ds_DeInitSwLeds(PADAPTER padapter); 33 | #endif 34 | #ifdef CONFIG_GSPI_HCI 35 | void rtl8723ds_InitSwLeds(PADAPTER padapter); 36 | void rtl8723ds_DeInitSwLeds(PADAPTER padapter); 37 | #endif 38 | #ifdef CONFIG_PCI_HCI 39 | void rtl8723de_InitSwLeds(PADAPTER padapter); 40 | void rtl8723de_DeInitSwLeds(PADAPTER padapter); 41 | #endif 42 | 43 | #endif /*#ifdef CONFIG_RTW_SW_LED*/ 44 | #endif 45 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723d_rf.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 __RTL8723D_RF_H__ 16 | #define __RTL8723D_RF_H__ 17 | 18 | int PHY_RF6052_Config8723D(PADAPTER pdapter); 19 | 20 | void PHY_RF6052SetBandwidth8723D(PADAPTER Adapter, enum channel_width Bandwidth); 21 | #endif 22 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723d_sreset.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 _RTL8723D_SRESET_H_ 16 | #define _RTL8723D_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8723d_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8723d_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8723fs_hal.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 _RTL8723FS_HAL_H_ 16 | #define _RTL8723FS_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | /* rtl8723fs_ops.c */ 21 | void rtl8723fs_set_hal_ops(PADAPTER); 22 | 23 | #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) 24 | void rtl8723fs_disable_interrupt_but_cpwm2(PADAPTER adapter); 25 | #endif 26 | 27 | /* rtl8723fs_xmit.c */ 28 | s32 rtl8723fs_dequeue_writeport(PADAPTER); 29 | #define _dequeue_writeport(a) rtl8723fs_dequeue_writeport(a) 30 | 31 | #endif /* _RTL8723FS_HAL_H_ */ 32 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8812a_dm.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 __RTL8812A_DM_H__ 16 | #define __RTL8812A_DM_H__ 17 | 18 | void rtl8812_init_dm_priv(PADAPTER Adapter); 19 | void rtl8812_deinit_dm_priv(PADAPTER Adapter); 20 | void rtl8812_InitHalDm(PADAPTER Adapter); 21 | void rtl8812_HalDmWatchDog(PADAPTER Adapter); 22 | 23 | /* void rtl8192c_dm_CheckTXPowerTracking(PADAPTER Adapter); */ 24 | 25 | /* void rtl8192c_dm_RF_Saving(PADAPTER pAdapter, u8 bForceInNormal); */ 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8812a_led.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 __RTL8812A_LED_H__ 16 | #define __RTL8812A_LED_H__ 17 | #ifdef CONFIG_RTW_LED 18 | #ifdef CONFIG_RTW_SW_LED 19 | /* ******************************************************************************** 20 | * Interface to manipulate LED objects. 21 | * ******************************************************************************** */ 22 | #ifdef CONFIG_USB_HCI 23 | void rtl8812au_InitSwLeds(PADAPTER padapter); 24 | void rtl8812au_DeInitSwLeds(PADAPTER padapter); 25 | #endif 26 | #ifdef CONFIG_PCI_HCI 27 | void rtl8812ae_InitSwLeds(PADAPTER padapter); 28 | void rtl8812ae_DeInitSwLeds(PADAPTER padapter); 29 | #endif 30 | #ifdef CONFIG_SDIO_HCI 31 | void rtl8821as_InitSwLeds(PADAPTER padapter); 32 | void rtl8821as_DeInitSwLeds(PADAPTER padapter); 33 | #endif 34 | #endif/*CONFIG_RTW_SW_LED*/ 35 | #endif/*#ifdef CONFIG_RTW_LED*/ 36 | 37 | #ifdef CONFIG_SDIO_HCI 38 | void rtl8821as_init_led_circuit(PADAPTER adapter); 39 | #endif 40 | 41 | #endif /*__RTL8812A_LED_H__*/ 42 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8812a_rf.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 __RTL8812A_RF_H__ 16 | #define __RTL8812A_RF_H__ 17 | 18 | void 19 | PHY_RF6052SetBandwidth8812( 20 | PADAPTER Adapter, 21 | enum channel_width Bandwidth); 22 | 23 | 24 | int 25 | PHY_RF6052_Config_8812( 26 | PADAPTER Adapter); 27 | 28 | #endif/* __RTL8188E_RF_H__ */ 29 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8812a_sreset.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 _RTL88812A_SRESET_H_ 16 | #define _RTL8812A_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8812_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8812_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8814a_dm.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 __RTL8814A_DM_H__ 16 | #define __RTL8814A_DM_H__ 17 | 18 | void rtl8814_init_dm_priv(PADAPTER Adapter); 19 | void rtl8814_deinit_dm_priv(PADAPTER Adapter); 20 | void rtl8814_InitHalDm(PADAPTER Adapter); 21 | void rtl8814_HalDmWatchDog(PADAPTER Adapter); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8814a_led.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 __RTL8814A_LED_H__ 16 | #define __RTL8814A_LED_H__ 17 | 18 | #ifdef CONFIG_RTW_SW_LED 19 | /* ******************************************************************************** 20 | * Interface to manipulate LED objects. 21 | * ******************************************************************************** */ 22 | #ifdef CONFIG_USB_HCI 23 | void rtl8814au_InitSwLeds(PADAPTER padapter); 24 | void rtl8814au_DeInitSwLeds(PADAPTER padapter); 25 | #endif /* CONFIG_USB_HCI */ 26 | #ifdef CONFIG_PCI_HCI 27 | void rtl8814ae_InitSwLeds(PADAPTER padapter); 28 | void rtl8814ae_DeInitSwLeds(PADAPTER padapter); 29 | #endif /* CONFIG_PCI_HCI */ 30 | #ifdef CONFIG_SDIO_HCI 31 | void rtl8814s_InitSwLeds(PADAPTER padapter); 32 | void rtl8814s_DeInitSwLeds(PADAPTER padapter); 33 | #endif /* CONFIG_SDIO_HCI */ 34 | 35 | #endif /* __RTL8814A_LED_H__ */ 36 | #endif /*CONFIG_RTW_SW_LED*/ 37 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8814a_rf.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 __RTL8814A_RF_H__ 16 | #define __RTL8814A_RF_H__ 17 | 18 | void 19 | PHY_RF6052SetBandwidth8814A( 20 | PADAPTER Adapter, 21 | enum channel_width Bandwidth); 22 | 23 | 24 | int 25 | PHY_RF6052_Config_8814A( 26 | PADAPTER Adapter); 27 | 28 | #endif/* __RTL8188E_RF_H__ */ 29 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8814a_sreset.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 _RTL88814A_SRESET_H_ 16 | #define _RTL8814A_SRESET_H_ 17 | 18 | #include 19 | 20 | #ifdef DBG_CONFIG_ERROR_DETECT 21 | extern void rtl8814_sreset_xmit_status_check(_adapter *padapter); 22 | extern void rtl8814_sreset_linked_status_check(_adapter *padapter); 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8814be_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2015 - 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 _RTL8814BE_HAL_H_ 16 | #define _RTL8814BE_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | #define RT_BCN_INT_MASKS (BIT_BCNDMAINT0_MSK_8814B | \ 21 | BIT_TXBCN0OK_MSK_8814B | \ 22 | BIT_TXBCN0ERR_MSK_8814B | \ 23 | BIT_BCNDERR0_MSK_8814B) 24 | 25 | /* rtl8814be_ops.c */ 26 | void UpdateInterruptMask8814BE(PADAPTER, u32 AddMSR, u32 AddMSR1, u32 RemoveMSR, u32 RemoveMSR1); 27 | u16 get_txbd_rw_reg(u16 q_idx); 28 | 29 | 30 | #endif /* _RTL8814BE_HAL_H_ */ 31 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8821c_dm.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 __RTL8812C_DM_H__ 16 | #define __RTL8812C_DM_H__ 17 | 18 | void rtl8821c_phy_init_dm_priv(PADAPTER); 19 | void rtl8821c_phy_deinit_dm_priv(PADAPTER); 20 | void rtl8821c_phy_init_haldm(PADAPTER); 21 | void rtl8821c_phy_haldm_watchdog(PADAPTER); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8821ce_hal.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 _RTL8821CE_HAL_H_ 16 | #define _RTL8821CE_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | /* rtl8821ce_ops.c */ 21 | void rtl8821ce_set_hal_ops(PADAPTER); 22 | 23 | #endif /* _RTL8821CE_HAL_H_ */ 24 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8821cs_hal.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 _RTL8821CS_HAL_H_ 16 | #define _RTL8821CS_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | /* rtl8821cs_ops.c */ 21 | u8 rtl8821cs_set_hal_ops(PADAPTER); 22 | 23 | #endif /* _RTL8821CS_HAL_H_ */ 24 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8821cu_hal.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 _RTL8821CU_HAL_H_ 16 | #define _RTL8821CU_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | /* rtl8821cu_ops.c */ 21 | u8 rtl8821cu_set_hal_ops(PADAPTER); 22 | void rtl8821cu_set_hw_type(struct dvobj_priv *pdvobj); 23 | 24 | #endif /* _RTL8821CU_HAL_H_ */ 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8822be_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2015 - 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 _RTL8822BE_HAL_H_ 16 | #define _RTL8822BE_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | #define RT_BCN_INT_MASKS (BIT20 | BIT25 | BIT26 | BIT16) 21 | 22 | /* rtl8822be_ops.c */ 23 | void UpdateInterruptMask8822BE(PADAPTER, u32 AddMSR, u32 AddMSR1, u32 RemoveMSR, u32 RemoveMSR1); 24 | u16 get_txbd_rw_reg(u16 q_idx); 25 | 26 | 27 | #endif /* _RTL8822BE_HAL_H_ */ 28 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8822bs_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2015 - 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 _RTL8822BS_HAL_H_ 16 | #define _RTL8822BS_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | /* rtl8822bs_ops.c */ 21 | void rtl8822bs_set_hal_ops(PADAPTER); 22 | 23 | #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) 24 | void rtl8822bs_disable_interrupt_but_cpwm2(PADAPTER adapter); 25 | #endif 26 | 27 | /* rtl8822bs_xmit.c */ 28 | s32 rtl8822bs_dequeue_writeport(PADAPTER); 29 | #define _dequeue_writeport(a) rtl8822bs_dequeue_writeport(a) 30 | 31 | #endif /* _RTL8822BS_HAL_H_ */ 32 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8822ce_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2015 - 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 _RTL8822CE_HAL_H_ 16 | #define _RTL8822CE_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | #define RT_BCN_INT_MASKS (BIT20 | BIT25 | BIT26 | BIT16) 21 | 22 | /* rtl8822ce_ops.c */ 23 | void UpdateInterruptMask8822CE(PADAPTER, u32 AddMSR, u32 AddMSR1, u32 RemoveMSR, u32 RemoveMSR1); 24 | u16 get_txbd_rw_reg(u16 q_idx); 25 | 26 | 27 | #endif /* _RTL8822CE_HAL_H_ */ 28 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtl8822cs_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2015 - 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 _RTL8822CS_HAL_H_ 16 | #define _RTL8822CS_HAL_H_ 17 | 18 | #include /* PADAPTER */ 19 | 20 | /* rtl8822cs_ops.c */ 21 | void rtl8822cs_set_hal_ops(PADAPTER); 22 | 23 | #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) 24 | void rtl8822cs_disable_interrupt_but_cpwm2(PADAPTER adapter); 25 | #endif 26 | 27 | /* rtl8822cs_xmit.c */ 28 | s32 rtl8822cs_dequeue_writeport(PADAPTER); 29 | #define _dequeue_writeport(a) rtl8822cs_dequeue_writeport(a) 30 | 31 | #endif /* _RTL8822CS_HAL_H_ */ 32 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtw_btcoex_wifionly.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 | #ifndef __RTW_BTCOEX_WIFIONLY_H__ 16 | #define __RTW_BTCOEX_WIFIONLY_H__ 17 | 18 | void rtw_btcoex_wifionly_switchband_notify(PADAPTER padapter); 19 | void rtw_btcoex_wifionly_scan_notify(PADAPTER padapter); 20 | void rtw_btcoex_wifionly_connect_notify(PADAPTER padapter); 21 | void rtw_btcoex_wifionly_hw_config(PADAPTER padapter); 22 | void rtw_btcoex_wifionly_initialize(PADAPTER padapter); 23 | void rtw_btcoex_wifionly_AntInfoSetting(PADAPTER padapter); 24 | #endif 25 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtw_byteorder.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 _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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtw_ioctl.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 _RTW_IOCTL_H_ 16 | #define _RTW_IOCTL_H_ 17 | 18 | enum oid_type { 19 | QUERY_OID, 20 | SET_OID 21 | }; 22 | 23 | struct oid_par_priv { 24 | void *adapter_context; 25 | NDIS_OID oid; 26 | void *information_buf; 27 | u32 information_buf_len; 28 | u32 *bytes_rw; 29 | u32 *bytes_needed; 30 | enum oid_type type_of_oid; 31 | u32 dbg; 32 | }; 33 | 34 | #if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT) 35 | extern struct iw_handler_def rtw_handlers_def; 36 | #endif 37 | 38 | extern void rtw_request_wps_pbc_event(_adapter *padapter); 39 | 40 | #ifdef CONFIG_APPEND_VENDOR_IE_ENABLE 41 | extern int rtw_vendor_ie_get_raw_data(struct net_device *, u32, char *, u32); 42 | extern int rtw_vendor_ie_get_data(struct net_device*, int , char*); 43 | extern int rtw_vendor_ie_get(struct net_device *, struct iw_request_info *, union iwreq_data *, char *); 44 | extern int rtw_vendor_ie_set(struct net_device*, struct iw_request_info*, union iwreq_data*, char*); 45 | #endif 46 | 47 | #endif /* #ifndef __INC_CEINFO_ */ 48 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtw_ioctl_query.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 _RTW_IOCTL_QUERY_H_ 16 | #define _RTW_IOCTL_QUERY_H_ 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtw_mem.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_MEM_H__ 16 | #define __RTW_MEM_H__ 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | u16 rtw_rtkm_get_buff_size(void); 23 | u8 rtw_rtkm_get_nr_recv_skb(void); 24 | struct u8 *rtw_alloc_revcbuf_premem(void); 25 | struct sk_buff *rtw_alloc_skb_premem(u16 in_size); 26 | int rtw_free_skb_premem(struct sk_buff *pskb); 27 | 28 | 29 | #endif /* __RTW_MEM_H__ */ 30 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtw_sdio.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2015 - 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 _RTW_SDIO_H_ 16 | #define _RTW_SDIO_H_ 17 | 18 | #include /* struct dvobj_priv and etc. */ 19 | 20 | u8 rtw_sdio_read_cmd52(struct dvobj_priv *, u32 addr, void *buf, size_t len); 21 | u8 rtw_sdio_read_cmd53(struct dvobj_priv *, u32 addr, void *buf, size_t len); 22 | u8 rtw_sdio_write_cmd52(struct dvobj_priv *, u32 addr, void *buf, size_t len); 23 | u8 rtw_sdio_write_cmd53(struct dvobj_priv *, u32 addr, void *buf, size_t len); 24 | u8 rtw_sdio_f0_read(struct dvobj_priv *, u32 addr, void *buf, size_t len); 25 | 26 | #endif /* _RTW_SDIO_H_ */ 27 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/rtw_version.h: -------------------------------------------------------------------------------- 1 | #define DRIVERVERSION "v5.12.0.5-0-g5b27a3f.20220615_beta" 2 | #define BTCOEXVERSION "COEX20200730-5151" 3 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/sdio_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 __SDIO_HAL_H__ 16 | #define __SDIO_HAL_H__ 17 | 18 | void sd_int_dpc(PADAPTER padapter); 19 | u8 rtw_set_hal_ops(_adapter *padapter); 20 | 21 | #ifdef CONFIG_RTL8188E 22 | void rtl8188es_set_hal_ops(PADAPTER padapter); 23 | #endif 24 | 25 | #ifdef CONFIG_RTL8723B 26 | void rtl8723bs_set_hal_ops(PADAPTER padapter); 27 | #endif 28 | 29 | #ifdef CONFIG_RTL8821A 30 | void rtl8821as_set_hal_ops(PADAPTER padapter); 31 | #endif 32 | 33 | #ifdef CONFIG_RTL8192E 34 | void rtl8192es_set_hal_ops(PADAPTER padapter); 35 | #endif 36 | 37 | #ifdef CONFIG_RTL8703B 38 | void rtl8703bs_set_hal_ops(PADAPTER padapter); 39 | #endif 40 | 41 | #ifdef CONFIG_RTL8723D 42 | void rtl8723ds_set_hal_ops(PADAPTER padapter); 43 | #endif 44 | 45 | #ifdef CONFIG_RTL8188F 46 | void rtl8188fs_set_hal_ops(PADAPTER padapter); 47 | #endif 48 | 49 | #ifdef CONFIG_RTL8188GTV 50 | void rtl8188gtvs_set_hal_ops(PADAPTER padapter); 51 | #endif 52 | 53 | #ifdef CONFIG_RTL8192F 54 | void rtl8192fs_set_hal_ops(PADAPTER padapter); 55 | #endif 56 | 57 | #endif /* __SDIO_HAL_H__ */ 58 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/sdio_osintf.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_OSINTF_H__ 16 | #define __SDIO_OSINTF_H__ 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /alt_rtl8821ce/include/usb_osintf.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 __USB_OSINTF_H 16 | #define __USB_OSINTF_H 17 | 18 | #include 19 | 20 | #define USBD_HALTED(Status) ((u32)(Status) >> 30 == 3) 21 | 22 | 23 | u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, RT_USB_BREQUEST brequest, RT_USB_WVALUE wvalue, u8 windex, void *data, u8 datalen, u8 isdirectionin); 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /alt_rtl8821ce/os_dep/linux/pci_ops_linux.c: -------------------------------------------------------------------------------- 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 | #define _PCI_OPS_LINUX_C_ 16 | 17 | #include 18 | -------------------------------------------------------------------------------- /alt_rtl8821ce/os_dep/linux/wifi_regd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2009-2010 - 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 | #ifndef __WIFI_REGD_H__ 17 | #define __WIFI_REGD_H__ 18 | 19 | void rtw_regd_apply_flags(struct wiphy *wiphy); 20 | #ifdef CONFIG_REGD_SRC_FROM_OS 21 | struct _RT_CHANNEL_INFO; 22 | u8 rtw_os_init_channel_set(_adapter *padapter, struct _RT_CHANNEL_INFO *channel_set); 23 | s16 rtw_os_get_total_txpwr_regd_lmt_mbm(_adapter *adapter, u8 cch, enum channel_width bw); 24 | #endif 25 | int rtw_regd_init(struct wiphy *wiphy); 26 | 27 | #endif /* __WIFI_REGD_H__ */ 28 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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, 1), /* Taiwan */ 21 | }; 22 | 23 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_ARM_WMT_sdio.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 | #include 17 | #include 18 | 19 | extern void wmt_detect_sdio2(void); 20 | extern void force_remove_sdio2(void); 21 | 22 | int platform_wifi_power_on(void) 23 | { 24 | int err = 0; 25 | err = gpio_request(WMT_PIN_GP62_SUSGPIO1, "wifi_chip_en"); 26 | if (err < 0) { 27 | printk("request gpio for rtl8188eu failed!\n"); 28 | return err; 29 | } 30 | gpio_direction_output(WMT_PIN_GP62_SUSGPIO1, 0);/* pull sus_gpio1 to 0 to open vcc_wifi. */ 31 | printk("power on rtl8189.\n"); 32 | msleep(500); 33 | wmt_detect_sdio2(); 34 | printk("[rtl8189es] %s: new card, power on.\n", __FUNCTION__); 35 | return err; 36 | } 37 | 38 | void platform_wifi_power_off(void) 39 | { 40 | force_remove_sdio2(); 41 | 42 | gpio_direction_output(WMT_PIN_GP62_SUSGPIO1, 1);/* pull sus_gpio1 to 1 to close vcc_wifi. */ 43 | printk("power off rtl8189.\n"); 44 | gpio_free(WMT_PIN_GP62_SUSGPIO1); 45 | printk("[rtl8189es] %s: remove card, power off.\n", __FUNCTION__); 46 | } 47 | -------------------------------------------------------------------------------- /alt_rtl8821ce/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 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_aml_s905_sdio.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2018 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 /* pr_info(() */ 16 | #include /* msleep() */ 17 | #include "platform_aml_s905_sdio.h" /* sdio_reinit() and etc */ 18 | 19 | 20 | /* 21 | * Return: 22 | * 0: power on successfully 23 | * others: power on failed 24 | */ 25 | int platform_wifi_power_on(void) 26 | { 27 | int ret = 0; 28 | 29 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)) 30 | ret = wifi_setup_dt(); 31 | if (ret) { 32 | pr_err("%s: setup dt failed!!(%d)\n", __func__, ret); 33 | return -1; 34 | } 35 | #endif /* kernel < 3.14.0 */ 36 | 37 | #if 0 /* Seems redundancy? Already done before insert driver */ 38 | pr_info("######%s:\n", __func__); 39 | extern_wifi_set_enable(0); 40 | msleep(500); 41 | extern_wifi_set_enable(1); 42 | msleep(500); 43 | sdio_reinit(); 44 | #endif 45 | 46 | return ret; 47 | } 48 | 49 | void platform_wifi_power_off(void) 50 | { 51 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)) 52 | wifi_teardown_dt(); 53 | #endif /* kernel < 3.14.0 */ 54 | } 55 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_aml_s905_sdio.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2018 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 __PLATFORM_AML_S905_SDIO_H__ 16 | #define __PLATFORM_AML_S905_SDIO_H__ 17 | 18 | #include /* Linux vresion */ 19 | 20 | extern void sdio_reinit(void); 21 | extern void extern_wifi_set_enable(int is_on); 22 | 23 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)) 24 | extern void wifi_teardown_dt(void); 25 | extern int wifi_setup_dt(void); 26 | #endif /* kernel < 3.14.0 */ 27 | 28 | #endif /* __PLATFORM_AML_S905_SDIO_H__ */ 29 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_arm_act_sdio.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 | /* 16 | * Description: 17 | * This file can be applied to following platforms: 18 | * CONFIG_PLATFORM_ACTIONS_ATM703X 19 | */ 20 | #include 21 | 22 | #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X 23 | extern int acts_wifi_init(void); 24 | extern void acts_wifi_cleanup(void); 25 | #endif 26 | 27 | /* 28 | * Return: 29 | * 0: power on successfully 30 | * others: power on failed 31 | */ 32 | int platform_wifi_power_on(void) 33 | { 34 | int ret = 0; 35 | 36 | #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X 37 | ret = acts_wifi_init(); 38 | if (unlikely(ret < 0)) { 39 | pr_err("%s Failed to register the power control driver.\n", __FUNCTION__); 40 | goto exit; 41 | } 42 | #endif 43 | 44 | exit: 45 | return ret; 46 | } 47 | 48 | void platform_wifi_power_off(void) 49 | { 50 | #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X 51 | acts_wifi_cleanup(); 52 | #endif 53 | } 54 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_hisilicon_hi3798_sdio.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2017 - 2018 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 __PLATFORM_HISILICON_HI3798_SDIO_H__ 16 | #define __PLATFORM_HISILICON_HI3798_SDIO_H__ 17 | 18 | typedef unsigned int HI_U32; 19 | 20 | typedef int HI_S32; 21 | 22 | #define HI_SUCCESS 0 23 | #define HI_FAILURE (-1) 24 | 25 | extern HI_S32 HI_DRV_GPIO_SetDirBit(HI_U32 u32GpioNo, HI_U32 u32DirBit); 26 | extern HI_S32 HI_DRV_GPIO_WriteBit(HI_U32 u32GpioNo, HI_U32 u32BitValue); 27 | 28 | #endif /* __PLATFORM_HISILICON_HI3798_SDIO_H__ */ 29 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_ops.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 | #ifndef CONFIG_PLATFORM_OPS 16 | /* 17 | * Return: 18 | * 0: power on successfully 19 | * others: power on failed 20 | */ 21 | int platform_wifi_power_on(void) 22 | { 23 | int ret = 0; 24 | 25 | 26 | return ret; 27 | } 28 | 29 | void platform_wifi_power_off(void) 30 | { 31 | } 32 | #endif /* !CONFIG_PLATFORM_OPS */ 33 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_ops.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 | #ifndef __PLATFORM_OPS_H__ 16 | #define __PLATFORM_OPS_H__ 17 | 18 | /* 19 | * Return: 20 | * 0: power on successfully 21 | * others: power on failed 22 | */ 23 | int platform_wifi_power_on(void); 24 | void platform_wifi_power_off(void); 25 | 26 | #endif /* __PLATFORM_OPS_H__ */ 27 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_zte_zx296716_sdio.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2018 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 /* pr_info(() */ 16 | #include /* msleep() */ 17 | #include "platform_zte_zx296716_sdio.h" /* sdio_reinit() and etc */ 18 | 19 | 20 | /* 21 | * Return: 22 | * 0: power on successfully 23 | * others: power on failed 24 | */ 25 | int platform_wifi_power_on(void) 26 | { 27 | int ret = 0; 28 | 29 | pr_info("######%s: disable--1--\n", __func__); 30 | extern_wifi_set_enable(0); 31 | /*msleep(500);*/ /* add in function:extern_wifi_set_enable */ 32 | pr_info("######%s: enable--2---\n", __func__); 33 | extern_wifi_set_enable(1); 34 | /*msleep(500);*/ 35 | sdio_reinit(); 36 | 37 | return ret; 38 | } 39 | 40 | void platform_wifi_power_off(void) 41 | { 42 | int card_val; 43 | 44 | pr_info("######%s:\n", __func__); 45 | #ifdef CONFIG_A16T03_BOARD 46 | card_val = sdio_host_is_null(); 47 | if (card_val) 48 | remove_card(); 49 | #endif /* CONFIG_A16T03_BOARD */ 50 | extern_wifi_set_enable(0); 51 | 52 | /*msleep(500);*/ 53 | } 54 | -------------------------------------------------------------------------------- /alt_rtl8821ce/platform/platform_zte_zx296716_sdio.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2016 - 2018 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 __PLATFORM_ZTE_ZX296716_SDIO_H__ 16 | #define __PLATFORM_ZTE_ZX296716_SDIO_H__ 17 | 18 | extern void sdio_reinit(void); 19 | extern void extern_wifi_set_enable(int val); 20 | #ifdef CONFIG_A16T03_BOARD 21 | extern int sdio_host_is_null(void); 22 | extern void remove_card(void); 23 | #endif /* CONFIG_A16T03_BOARD */ 24 | 25 | #endif /* __PLATFORM_ZTE_ZX296716_SDIO_H__ */ 26 | -------------------------------------------------------------------------------- /alt_rtl8821ce/rtl8821c.mk: -------------------------------------------------------------------------------- 1 | EXTRA_CFLAGS += -DCONFIG_RTL8821C 2 | 3 | ifeq ($(CONFIG_USB_HCI), y) 4 | FILE_NAME = 8821cu 5 | endif 6 | ifeq ($(CONFIG_PCI_HCI), y) 7 | FILE_NAME = 8821ce 8 | endif 9 | ifeq ($(CONFIG_SDIO_HCI), y) 10 | FILE_NAME = 8821cs 11 | endif 12 | 13 | _HAL_INTFS_FILES += hal/rtl8821c/rtl8821c_halinit.o \ 14 | hal/rtl8821c/rtl8821c_mac.o \ 15 | hal/rtl8821c/rtl8821c_cmd.o \ 16 | hal/rtl8821c/rtl8821c_phy.o \ 17 | hal/rtl8821c/rtl8821c_dm.o \ 18 | hal/rtl8821c/rtl8821c_ops.o \ 19 | hal/rtl8821c/hal8821c_fw.o 20 | 21 | _HAL_INTFS_FILES += hal/rtl8821c/$(HCI_NAME)/rtl$(FILE_NAME)_halinit.o \ 22 | hal/rtl8821c/$(HCI_NAME)/rtl$(FILE_NAME)_halmac.o \ 23 | hal/rtl8821c/$(HCI_NAME)/rtl$(FILE_NAME)_io.o \ 24 | hal/rtl8821c/$(HCI_NAME)/rtl$(FILE_NAME)_xmit.o \ 25 | hal/rtl8821c/$(HCI_NAME)/rtl$(FILE_NAME)_recv.o \ 26 | hal/rtl8821c/$(HCI_NAME)/rtl$(FILE_NAME)_led.o \ 27 | hal/rtl8821c/$(HCI_NAME)/rtl$(FILE_NAME)_ops.o 28 | 29 | ifeq ($(CONFIG_SDIO_HCI), y) 30 | _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821C_SDIO.o 31 | endif 32 | ifeq ($(CONFIG_USB_HCI), y) 33 | _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821C_USB.o 34 | endif 35 | ifeq ($(CONFIG_PCI_HCI), y) 36 | _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821C_PCIE.o 37 | endif 38 | 39 | include $(src)/halmac.mk 40 | 41 | _BTC_FILES += hal/btc/halbtc8821cwifionly.o 42 | ifeq ($(CONFIG_BT_COEXIST), y) 43 | _BTC_FILES += hal/btc/halbtc8821c1ant.o \ 44 | hal/btc/halbtc8821c2ant.o 45 | endif -------------------------------------------------------------------------------- /alt_rtl8821ce/runwpa: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "`which iwconfig`" = "" ] ; then 4 | echo "WARNING:Wireless tool not exist!" 5 | echo " Please install it!" 6 | exit 7 | else 8 | if [ `uname -r | cut -d. -f2` -eq 4 ]; then 9 | wpa_supplicant -D ipw -c wpa1.conf -i wlan0 10 | else 11 | if [ `iwconfig -v |awk '{print $4}' | head -n 1` -lt 18 ] ; then 12 | wpa_supplicant -D ipw -c wpa1.conf -i wlan0 13 | else 14 | wpa_supplicant -D wext -c wpa1.conf -i wlan0 15 | fi 16 | 17 | fi 18 | fi 19 | 20 | 21 | -------------------------------------------------------------------------------- /alt_rtl8821ce/wlan0dhcp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | var0=`ps aux|awk '/dhclient wlan0/'|awk '$11!="awk"{print $2}'` 4 | 5 | kill $var0 6 | cp ifcfg-wlan0 /etc/sysconfig/network-scripts/ 7 | 8 | dhclient wlan0 9 | 10 | var1=`ifconfig wlan0 |awk '/inet/{print $2}'|awk -F: '{print $2}'` 11 | 12 | 13 | rm -f /etc/sysconfig/network-scripts/ifcfg-wlan0 14 | 15 | echo "get ip: $var1" 16 | 17 | -------------------------------------------------------------------------------- /certificate.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/certificate.p12 -------------------------------------------------------------------------------- /certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIID5DCCAsygAwIBAgIJAL/8duUfQ89vMA0GCSqGSIb3DQEBCwUAMIGGMQswCQYD 3 | VQQGEwJVUzELMAkGA1UECAwCTU8xEzARBgNVBAcMClNtaXRodmlsbGUxFDASBgNV 4 | BAoMC1JUTFdJRklfTkVXMRUwEwYDVQQDDAxMYXJyeSBGaW5nZXIxKDAmBgkqhkiG 5 | 9w0BCQEWGUxhcnJ5LkZpbmdlckBsd2Zpbmdlci5uZXQwHhcNMTgxMjI3MjA1OTMz 6 | WhcNMTkxMjI3MjA1OTMzWjCBhjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk1PMRMw 7 | EQYDVQQHDApTbWl0aHZpbGxlMRQwEgYDVQQKDAtSVExXSUZJX05FVzEVMBMGA1UE 8 | AwwMTGFycnkgRmluZ2VyMSgwJgYJKoZIhvcNAQkBFhlMYXJyeS5GaW5nZXJAbHdm 9 | aW5nZXIubmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsiYjh87v 10 | 5Nw1Qa+SckdAPjKhSrNWOdosx5AXFwrnGOqIBPH9gtQap8J4dY5C6GGB422aaMbo 11 | Di5VgE0rGhWOUziPu8/p5V+HtXCsRbsLqYx+B/tyHis4enwWI8YUeIJjS+8ZywPy 12 | gn+Iqu5yD0gMpIIEL5ObopKqhr2iKsY1oxnawroGIHAE9tF9wVQswni3azobpqGW 13 | UO3WUJi9RJLmXUrnU0WzDbjxUTH6VmipoUWR6ZdRzHXQfcXNpFaTGqA+A7V66Cpd 14 | lfdpbjPc5oZ5jOpKiBYgChzxn2u9vbIuQzwpmgBV2Gd8SupduEUW9qwmOD8DaQlR 15 | GXeTDOTux2+0SwIDAQABo1MwUTAdBgNVHQ4EFgQUY305xLCg2pTcuY1/pAMF0i7M 16 | ocwwHwYDVR0jBBgwFoAUY305xLCg2pTcuY1/pAMF0i7MocwwDwYDVR0TAQH/BAUw 17 | AwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAiMkjiWbBr11Ri8XS5DgZczcr6kStzTF7 18 | 6l3BnxOx+8iX8/N2y28ztHWzfll0kvegIlGN59c4FEwBGUUGdxJwzMt5FzaQzXhq 19 | NiDBPllqn2mWZXeyTp+0iLeqphqy4hbG+ARbAR1cbBFk32HfYX9jk+iWTxD8dnmn 20 | SJgcpv5uvZHera7PTCd3SZsVz2Cv78VD4wAbOKpwqn0Gk4UNKjcb22NLjYJs1uP7 21 | Ho2R03toAdBFZvEq6M4sqf9lX+b8DVvxTuhwrN5f8FINqn0bUTGwvONOyEu/p5JZ 22 | ErR0rz5wczj2beUcmaYDPSjYfKj7IoxOKihQiDzr6uyDJj2xDU+VLw== 23 | -----END CERTIFICATE----- 24 | -------------------------------------------------------------------------------- /convert_firmware.c: -------------------------------------------------------------------------------- 1 | /* Program to convert header into a binary file 2 | * Coded by Larry Finger 3 | * August 2015 4 | * 5 | * There is no Makefile, build with: 6 | * gcc -o convert_firmware convert_firmware.c 7 | */ 8 | 9 | #include 10 | #define u8 char 11 | #define u32 int 12 | 13 | /* Get the firmware data that has been copied from a vendor driver */ 14 | #include "convert_firmware.h" 15 | 16 | void output_bin(FILE *outb, const u8 *array, int len) 17 | { 18 | int i; 19 | for (i = 0; i < len; i++) 20 | fwrite(&array[i], 1, 1, outb); 21 | } 22 | 23 | int main(int argc, char **argv) 24 | { 25 | FILE *outb; 26 | int i; 27 | 28 | /* convert firmware */ 29 | outb = fopen("rtw8821c_fw.bin", "w"); 30 | if (!outb) { 31 | fprintf(stderr, "File open error\n"); 32 | return 1; 33 | } 34 | output_bin(outb, array_mp_8821c_fw_nic, 35 | array_length_mp_8821c_fw_nic); 36 | fclose(outb); 37 | 38 | return 0; 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /dkms/post_install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | install -D -m 644 -t /etc/modprobe.d rtw88.conf 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /efuse.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW_EFUSE_H__ 6 | #define __RTW_EFUSE_H__ 7 | 8 | #define EFUSE_HW_CAP_IGNORE 0 9 | #define EFUSE_HW_CAP_PTCL_VHT 3 10 | #define EFUSE_HW_CAP_SUPP_BW80 7 11 | #define EFUSE_HW_CAP_SUPP_BW40 6 12 | 13 | #define EFUSE_READ_FAIL 0xff 14 | 15 | #define GET_EFUSE_HW_CAP_HCI(hw_cap) \ 16 | le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(3, 0)) 17 | #define GET_EFUSE_HW_CAP_BW(hw_cap) \ 18 | le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(18, 16)) 19 | #define GET_EFUSE_HW_CAP_NSS(hw_cap) \ 20 | le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(20, 19)) 21 | #define GET_EFUSE_HW_CAP_ANT_NUM(hw_cap) \ 22 | le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(23, 21)) 23 | #define GET_EFUSE_HW_CAP_PTCL(hw_cap) \ 24 | le32_get_bits(*((__le32 *)(hw_cap) + 0x01), GENMASK(27, 26)) 25 | 26 | int rtw_parse_efuse_map(struct rtw_dev *rtwdev); 27 | int rtw_read8_physical_efuse(struct rtw_dev *rtwdev, u16 addr, u8 *data); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /firmware/rtw8703b_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8703b_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8703b_wow_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8703b_wow_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8723d_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8723d_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8812a_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8812a_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8814a_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8814a_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8821a_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8821a_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8821c_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8821c_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8822b_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8822b_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8822c_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8822c_fw.bin -------------------------------------------------------------------------------- /firmware/rtw8822c_wow_fw.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/firmware/rtw8822c_wow_fw.bin -------------------------------------------------------------------------------- /key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCyJiOHzu/k3DVB 3 | r5JyR0A+MqFKs1Y52izHkBcXCucY6ogE8f2C1Bqnwnh1jkLoYYHjbZpoxugOLlWA 4 | TSsaFY5TOI+7z+nlX4e1cKxFuwupjH4H+3IeKzh6fBYjxhR4gmNL7xnLA/KCf4iq 5 | 7nIPSAykggQvk5uikqqGvaIqxjWjGdrCugYgcAT20X3BVCzCeLdrOhumoZZQ7dZQ 6 | mL1EkuZdSudTRbMNuPFRMfpWaKmhRZHpl1HMddB9xc2kVpMaoD4DtXroKl2V92lu 7 | M9zmhnmM6kqIFiAKHPGfa729si5DPCmaAFXYZ3xK6l24RRb2rCY4PwNpCVEZd5MM 8 | 5O7Hb7RLAgMBAAECggEASCg8gfimoEs1YwqrRZBojAjT3b7v8PTW6GoLgDDRU/1C 9 | 5MXjigdBWKvjQLJDlX5RLv4o6cGPIpdP2GzpRWJvyHODfG4FbfuYqzwc+w189srK 10 | DY+iNGgLM0lpakoD5p/helM5XkqWApeHkryMBHaJcGSdL2wZQOspGPRcZ/jqpsnX 11 | ulwFlDNbsIIt+2no+IM6wRsS2hXK/7GFivZiQIbZC9OmoquVcfh9GQHOEPRGT3Fm 12 | oYU6mMEBX7ElNiJsuG0AX6kAGusKc6kRVHLATETBU9eKV6OMPg0jkgqEvs53QciJ 13 | nsImkwxaE1Kzk1xS4BCfb4XaU1CRJPUMZYsasmxSCQKBgQDkIb20efSpJdRHR4Tn 14 | dL4rXmAAfDMaODSrAdaz6owngJcCMW5WHSiWEoi6NbW1t1/J6uxLEo0dbXFbB3cc 15 | MzGwhkvMS3JO/CtXKW3k8uKFe3/W8TNkSceRyf79f1nqnrfoCyBbMGZb3fxAjpEX 16 | sTTP42hYBBpYauPhzP79o61HtwKBgQDH6U7zB+f657O2DPL/fwvS+oU4U+KKM3iD 17 | dXNNA8xiWbEfbVUXPLar35xdi1RXs+666xUb8XPe7Xiw18M/XZyzgArCKU7MgPCG 18 | mWiFSMvkocJEnJsKghFyFopNXuag2/FTansNK7uGU8B1z1l0/e6KudFvLO6K6yOu 19 | /LkQ69VwDQKBgEy4bCv9t6IK7tDp5HBSeoHrQy3mlukCbfP0slffUTMXs7ExHoIn 20 | XDbcFM9KsMlj2fr13nGA06RJ4g1S/WOmc9eB0ovp849MjubJMAQHCtcJKX0HsNjR 21 | VyRYYkCuS3bz2bVXyJHiPQo4JVUwnOry1Wf0emrfNlz11Z1ia36xRN0RAoGBAKN9 22 | dbiiBaEXrsw66Nv0rdncUekQCVwW3f88pZAdhCAG1CkshANd/tKvLDUAhni3SY0K 23 | Rpg0rhtpwGN4AVCoIUhXdfT2TWBILu0VNvqR31XayILORKmiV9wi/PZrn1d8qG8c 24 | zQendVRU2DhA3BsmtNg1QUeXynpH9UXdnwhspoBdAoGBANF8r5Bdw5bTPc90HXxj 25 | 7PBeeXiNRj6BkOMJHrDwRHou7GGtcPiv8cPp5CeFlf2/1sP4Ceu0rvsxqXmCLXYZ 26 | xVXhm+ytTvJRWrVMZzzJli3IYffTTIwYCfd2rmV1J84f2n16rRXVZzDiKlJSGtRZ 27 | ltBobFoTwM0rhisTv10ZwQT6 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /led.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2025 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW_LED_H 6 | #define __RTW_LED_H 7 | 8 | #ifdef CONFIG_RTW88_LEDS 9 | 10 | void rtw_led_init(struct rtw_dev *rtwdev); 11 | void rtw_led_deinit(struct rtw_dev *rtwdev); 12 | 13 | #else 14 | 15 | static inline void rtw_led_init(struct rtw_dev *rtwdev) 16 | { 17 | } 18 | 19 | static inline void rtw_led_deinit(struct rtw_dev *rtwdev) 20 | { 21 | } 22 | 23 | #endif 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /openssl.conf: -------------------------------------------------------------------------------- 1 | # This definition stops the following lines choking if HOME isn't defined. 2 | 3 | HOME = . 4 | RANDFILE = $ENV::HOME/.rnd 5 | [ req ] 6 | distinguished_name = req_distinguished_name 7 | x509_extensions = v3 8 | string_mask = utf8only 9 | prompt = no 10 | 11 | [ req_distinguished_name ] 12 | countryName = CA 13 | stateOrProvinceName = Quebec 14 | localityName = Montreal 15 | 0.organizationName = cyphermox 16 | commonName = Secure Boot Signing 17 | emailAddress = Larry.Finger@lwfinger.net 18 | 19 | [ v3 ] 20 | subjectKeyIdentifier = hash 21 | authorityKeyIdentifier = keyid:always,issuer 22 | basicConstraints = critical,CA:FALSE 23 | extendedKeyUsage = codeSigning,1.3.6.1.4.1.311.10.3.6,1.3.6.1.4.1.2312.16.1.2 24 | nsComment = "OpenSSL Generated Certificate"0` 25 | -------------------------------------------------------------------------------- /ps.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW_PS_H_ 6 | #define __RTW_PS_H_ 7 | 8 | #define RTW_LPS_THRESHOLD 50 9 | 10 | #define POWER_MODE_ACK BIT(6) 11 | #define POWER_MODE_PG BIT(4) 12 | #define POWER_TX_WAKE BIT(1) 13 | #define POWER_MODE_LCLK BIT(0) 14 | 15 | #define LEAVE_LPS_TRY_CNT 5 16 | #define LEAVE_LPS_TIMEOUT msecs_to_jiffies(100) 17 | 18 | int rtw_enter_ips(struct rtw_dev *rtwdev); 19 | int rtw_leave_ips(struct rtw_dev *rtwdev); 20 | 21 | void rtw_power_mode_change(struct rtw_dev *rtwdev, bool enter); 22 | void rtw_enter_lps(struct rtw_dev *rtwdev, u8 port_id); 23 | void rtw_leave_lps(struct rtw_dev *rtwdev); 24 | void rtw_leave_lps_deep(struct rtw_dev *rtwdev); 25 | enum rtw_lps_deep_mode rtw_get_lps_deep_mode(struct rtw_dev *rtwdev); 26 | void rtw_recalc_lps(struct rtw_dev *rtwdev, struct ieee80211_vif *new_vif); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /reload_rtw88.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Script to unload/reload the rtw88 driver on suspend/resume 4 | # 5 | 6 | # A full list of the rtw88 drivers 7 | FULLMOD="rtw_8723cs rtw_8723de rtw_8723ds rtw_8723du \ 8 | rtw_8812au rtw_8814ae rtw_8814au rtw_8821au rtw_8821ce rtw_8821cs rtw_8821cu \ 9 | rtw_8822be rtw_8822bs rtw_8822bu rtw_8822ce rtw_8822cs rtw_8822cu \ 10 | rtw_8703b rtw_8723d rtw_8821a rtw_8812a rtw_8814a rtw_8821c rtw_8822b rtw_8822c \ 11 | rtw_8723x rtw_88xxa rtw_pci rtw_sdio rtw_usb rtw_core" 12 | 13 | # Before sleep/hibernation, save a list of the loaded rtw88 drivers to /RTW88_LOADEDMOD 14 | # and unload all the rtw88 drivers. 15 | if [ "${1}" == "pre" ]; then 16 | LOADEDMOD=$(lsmod | grep "^rtw_.....[a-z]" | cut -d ' ' -f 1) 17 | if [ ! -z "$LOADEDMOD" -a "$LOADEDMOD" != " " ]; then 18 | echo $LOADEDMOD > /RTW88_LOADEDMOD 19 | fi 20 | 21 | for mod in $FULLMOD 22 | do 23 | rmmod -s $mod || true 24 | done 25 | 26 | # When Resuming, load the modules saved in /RTW88_LOADEDMOD and then remove /RTW88_LOADEDMOD 27 | # Not sure why Larry makes the system sleep for 15s before loading the modules. 28 | elif [ "${1}" == "post" ]; then 29 | if [ -r /RTW88_LOADEDMOD ]; then 30 | sleep 15 31 | LOADEDMOD=$(cat /RTW88_LOADEDMOD) 32 | for mod in $LOADEDMOD 33 | do 34 | modprobe $mod 35 | done 36 | rm -f /RTW88_LOADEDMOD 37 | fi 38 | 39 | else 40 | echo "Usage: ./reload_rtw88.sh [pre|post]" 41 | fi 42 | -------------------------------------------------------------------------------- /rtw8703b_tables.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright Fiona Klute */ 3 | 4 | #ifndef __RTW8703B_TABLES_H__ 5 | #define __RTW8703B_TABLES_H__ 6 | 7 | extern const struct rtw_table rtw8703b_bb_pg_tbl; 8 | extern const struct rtw_table rtw8703b_txpwr_lmt_tbl; 9 | extern const struct rtw_table rtw8703b_mac_tbl; 10 | extern const struct rtw_table rtw8703b_agc_tbl; 11 | extern const struct rtw_table rtw8703b_bb_tbl; 12 | extern const struct rtw_table rtw8703b_rf_a_tbl; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /rtw8723cs.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright Fiona Klute */ 3 | 4 | #include 5 | #include "sdio_ids.h" 6 | #include 7 | #include "main.h" 8 | #include "rtw8703b.h" 9 | #include "sdio.h" 10 | 11 | static const struct sdio_device_id rtw_8723cs_id_table[] = { 12 | { 13 | SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK, 14 | SDIO_DEVICE_ID_REALTEK_RTW8723CS), 15 | .driver_data = (kernel_ulong_t)&rtw8703b_hw_spec, 16 | }, 17 | {} 18 | }; 19 | MODULE_DEVICE_TABLE(sdio, rtw_8723cs_id_table); 20 | 21 | static struct sdio_driver rtw_8723cs_driver = { 22 | .name = "rtw8723cs", 23 | .id_table = rtw_8723cs_id_table, 24 | .probe = rtw_sdio_probe, 25 | .remove = rtw_sdio_remove, 26 | .drv = { 27 | .pm = &rtw_sdio_pm_ops, 28 | .shutdown = rtw_sdio_shutdown 29 | }}; 30 | module_sdio_driver(rtw_8723cs_driver); 31 | 32 | MODULE_AUTHOR("Fiona Klute "); 33 | MODULE_DESCRIPTION("Realtek 802.11n wireless 8723cs driver"); 34 | MODULE_LICENSE("Dual BSD/GPL"); 35 | -------------------------------------------------------------------------------- /rtw8723d.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8723D_H__ 6 | #define __RTW8723D_H__ 7 | 8 | #include "rtw8723x.h" 9 | 10 | extern const struct rtw_chip_info rtw8723d_hw_spec; 11 | 12 | /* phy status page0 */ 13 | #define GET_PHY_STAT_P0_PWDB(phy_stat) \ 14 | le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) 15 | 16 | /* phy status page1 */ 17 | #define GET_PHY_STAT_P1_PWDB_A(phy_stat) \ 18 | le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(15, 8)) 19 | #define GET_PHY_STAT_P1_PWDB_B(phy_stat) \ 20 | le32_get_bits(*((__le32 *)(phy_stat) + 0x00), GENMASK(23, 16)) 21 | #define GET_PHY_STAT_P1_RF_MODE(phy_stat) \ 22 | le32_get_bits(*((__le32 *)(phy_stat) + 0x03), GENMASK(29, 28)) 23 | #define GET_PHY_STAT_P1_L_RXSC(phy_stat) \ 24 | le32_get_bits(*((__le32 *)(phy_stat) + 0x01), GENMASK(11, 8)) 25 | #define GET_PHY_STAT_P1_HT_RXSC(phy_stat) \ 26 | le32_get_bits(*((__le32 *)(phy_stat) + 0x01), GENMASK(15, 12)) 27 | #define GET_PHY_STAT_P1_RXEVM_A(phy_stat) \ 28 | le32_get_bits(*((__le32 *)(phy_stat) + 0x04), GENMASK(7, 0)) 29 | #define GET_PHY_STAT_P1_CFO_TAIL_A(phy_stat) \ 30 | le32_get_bits(*((__le32 *)(phy_stat) + 0x05), GENMASK(7, 0)) 31 | #define GET_PHY_STAT_P1_RXSNR_A(phy_stat) \ 32 | le32_get_bits(*((__le32 *)(phy_stat) + 0x06), GENMASK(7, 0)) 33 | 34 | #define RTW_DEF_OFDM_SWING_INDEX 28 35 | #define RTW_DEF_CCK_SWING_INDEX 28 36 | 37 | #define CCK_DFIR_NR 3 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /rtw8723d_table.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8723D_TABLE_H__ 6 | #define __RTW8723D_TABLE_H__ 7 | 8 | extern const struct rtw_table rtw8723d_mac_tbl; 9 | extern const struct rtw_table rtw8723d_agc_tbl; 10 | extern const struct rtw_table rtw8723d_bb_tbl; 11 | extern const struct rtw_table rtw8723d_bb_pg_tbl; 12 | extern const struct rtw_table rtw8723d_rf_a_tbl; 13 | extern const struct rtw_table rtw8723d_txpwr_lmt_tbl; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /rtw8723de.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #include 6 | #include 7 | #include "pci.h" 8 | #include "rtw8723d.h" 9 | 10 | static const struct pci_device_id rtw_8723de_id_table[] = { 11 | { 12 | PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xD723), 13 | .driver_data = (kernel_ulong_t)&rtw8723d_hw_spec 14 | }, 15 | {} 16 | }; 17 | MODULE_DEVICE_TABLE(pci, rtw_8723de_id_table); 18 | 19 | static struct pci_driver rtw_8723de_driver = { 20 | .name = "rtw_8723de", 21 | .id_table = rtw_8723de_id_table, 22 | .probe = rtw_pci_probe, 23 | .remove = rtw_pci_remove, 24 | .driver.pm = &rtw_pm_ops, 25 | .shutdown = rtw_pci_shutdown, 26 | }; 27 | module_pci_driver(rtw_8723de_driver); 28 | 29 | MODULE_AUTHOR("Realtek Corporation"); 30 | MODULE_DESCRIPTION("Realtek 802.11n wireless 8723de driver"); 31 | MODULE_LICENSE("Dual BSD/GPL"); 32 | -------------------------------------------------------------------------------- /rtw8723ds.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) Martin Blumenstingl 3 | */ 4 | 5 | #include 6 | #include "sdio_ids.h" 7 | #include 8 | #include "main.h" 9 | #include "rtw8723d.h" 10 | #include "sdio.h" 11 | 12 | static const struct sdio_device_id rtw_8723ds_id_table[] = { 13 | { 14 | SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK, 15 | SDIO_DEVICE_ID_REALTEK_RTW8723DS_1ANT), 16 | .driver_data = (kernel_ulong_t)&rtw8723d_hw_spec, 17 | }, 18 | { 19 | SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK, 20 | SDIO_DEVICE_ID_REALTEK_RTW8723DS_2ANT), 21 | .driver_data = (kernel_ulong_t)&rtw8723d_hw_spec, 22 | }, 23 | {} 24 | }; 25 | MODULE_DEVICE_TABLE(sdio, rtw_8723ds_id_table); 26 | 27 | static struct sdio_driver rtw_8723ds_driver = { 28 | .name = "rtw_8723ds", 29 | .probe = rtw_sdio_probe, 30 | .remove = rtw_sdio_remove, 31 | .id_table = rtw_8723ds_id_table, 32 | .drv = { 33 | .pm = &rtw_sdio_pm_ops, 34 | .shutdown = rtw_sdio_shutdown, 35 | } 36 | }; 37 | module_sdio_driver(rtw_8723ds_driver); 38 | 39 | MODULE_AUTHOR("Martin Blumenstingl "); 40 | MODULE_DESCRIPTION("Realtek 802.11n wireless 8723ds driver"); 41 | MODULE_LICENSE("Dual BSD/GPL"); 42 | -------------------------------------------------------------------------------- /rtw8723du.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #include 6 | #include 7 | #include "main.h" 8 | #include "rtw8723d.h" 9 | #include "usb.h" 10 | 11 | static const struct usb_device_id rtw_8723du_id_table[] = { 12 | { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xd723, 0xff, 0xff, 0xff), 13 | .driver_info = (kernel_ulong_t)&(rtw8723d_hw_spec) }, /* 8723DU 1*1 */ 14 | { USB_DEVICE_AND_INTERFACE_INFO(0x7392, 0xd611, 0xff, 0xff, 0xff), 15 | .driver_info = (kernel_ulong_t)&(rtw8723d_hw_spec) }, /* Edimax EW-7611ULB V2 */ 16 | { }, 17 | }; 18 | MODULE_DEVICE_TABLE(usb, rtw_8723du_id_table); 19 | 20 | static int rtw8723du_probe(struct usb_interface *intf, 21 | const struct usb_device_id *id) 22 | { 23 | return rtw_usb_probe(intf, id); 24 | } 25 | 26 | static struct usb_driver rtw_8723du_driver = { 27 | .name = "rtw_8723du", 28 | .id_table = rtw_8723du_id_table, 29 | .probe = rtw8723du_probe, 30 | .disconnect = rtw_usb_disconnect, 31 | }; 32 | module_usb_driver(rtw_8723du_driver); 33 | 34 | MODULE_AUTHOR("Hans Ulli Kroll "); 35 | MODULE_DESCRIPTION("Realtek 802.11n wireless 8723du driver"); 36 | MODULE_LICENSE("Dual BSD/GPL"); 37 | -------------------------------------------------------------------------------- /rtw88.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Configuration file for the out-of-kernel rtw88 drivers 3 | # 4 | # Link: https://github.com/lwfinger/rtw88 5 | # 6 | 7 | options rtw_usb switch_usb_mode=y 8 | 9 | options rtw_pci disable_msi=n 10 | options rtw_pci disable_aspm=n 11 | 12 | options rtw_core debug_mask=0x80021 13 | options rtw_core disable_lps_deep=n 14 | options rtw_core support_bf=y 15 | 16 | # Blacklist the in-kernel rtw88 drivers 17 | blacklist rtw88_8703b 18 | blacklist rtw88_8723cs 19 | blacklist rtw88_8723d 20 | blacklist rtw88_8723de 21 | blacklist rtw88_8723ds 22 | blacklist rtw88_8723du 23 | blacklist rtw88_8723x 24 | blacklist rtw88_8812a 25 | blacklist rtw88_8812au 26 | blacklist rtw88_8814a 27 | blacklist rtw88_8814ae 28 | blacklist rtw88_8814au 29 | blacklist rtw88_8821a 30 | blacklist rtw88_8821au 31 | blacklist rtw88_8821c 32 | blacklist rtw88_8821ce 33 | blacklist rtw88_8821cs 34 | blacklist rtw88_8821cu 35 | blacklist rtw88_8822b 36 | blacklist rtw88_8822be 37 | blacklist rtw88_8822bs 38 | blacklist rtw88_8822bu 39 | blacklist rtw88_8822c 40 | blacklist rtw88_8822ce 41 | blacklist rtw88_8822cs 42 | blacklist rtw88_8822cu 43 | blacklist rtw88_88xxa 44 | blacklist rtw88_core 45 | blacklist rtw88_pci 46 | blacklist rtw88_sdio 47 | blacklist rtw88_usb 48 | -------------------------------------------------------------------------------- /rtw8812a.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2024 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8812A_H__ 6 | #define __RTW8812A_H__ 7 | 8 | extern const struct rtw_chip_info rtw8812a_hw_spec; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /rtw8812a_table.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2024 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8812A_TABLE_H__ 6 | #define __RTW8812A_TABLE_H__ 7 | 8 | extern const struct rtw_table rtw8812a_mac_tbl; 9 | extern const struct rtw_table rtw8812a_agc_tbl; 10 | extern const struct rtw_table rtw8812a_agc_diff_lb_tbl; 11 | extern const struct rtw_table rtw8812a_agc_diff_hb_tbl; 12 | extern const struct rtw_table rtw8812a_bb_tbl; 13 | extern const struct rtw_table rtw8812a_bb_pg_tbl; 14 | extern const struct rtw_table rtw8812a_bb_pg_rfe3_tbl; 15 | extern const struct rtw_table rtw8812a_rf_a_tbl; 16 | extern const struct rtw_table rtw8812a_rf_b_tbl; 17 | extern const struct rtw_table rtw8812a_txpwr_lmt_tbl; 18 | 19 | extern const struct rtw_pwr_seq_cmd * const card_enable_flow_8812a[]; 20 | extern const struct rtw_pwr_seq_cmd * const enter_lps_flow_8812a[]; 21 | extern const struct rtw_pwr_seq_cmd * const card_disable_flow_8812a[]; 22 | 23 | extern const struct rtw_pwr_track_tbl rtw8812a_rtw_pwr_track_tbl; 24 | extern const struct rtw_pwr_track_tbl rtw8812a_rtw_pwr_track_rfe3_tbl; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /rtw8814a.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2025 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8814A_H__ 6 | #define __RTW8814A_H__ 7 | 8 | struct rtw8814au_efuse { 9 | u8 vid[2]; /* 0xd0 */ 10 | u8 pid[2]; /* 0xd2 */ 11 | u8 res[4]; /* 0xd4 */ 12 | u8 mac_addr[ETH_ALEN]; /* 0xd8 */ 13 | } __packed; 14 | 15 | struct rtw8814ae_efuse { 16 | u8 mac_addr[ETH_ALEN]; /* 0xd0 */ 17 | u8 vid[2]; /* 0xd6 */ 18 | u8 did[2]; /* 0xd8 */ 19 | u8 svid[2]; /* 0xda */ 20 | u8 smid[2]; /* 0xdc */ 21 | } __packed; 22 | 23 | struct rtw8814a_efuse { 24 | __le16 rtl_id; 25 | u8 res0[0x0c]; 26 | u8 usb_mode; /* 0x0e */ 27 | u8 res1; 28 | 29 | /* power index for four RF paths */ 30 | struct rtw_txpwr_idx txpwr_idx_table[4]; 31 | 32 | u8 channel_plan; /* 0xb8 */ 33 | u8 xtal_k; /* 0xb9 */ 34 | u8 thermal_meter; /* 0xba */ 35 | u8 iqk_lck; /* 0xbb */ 36 | u8 pa_type; /* 0xbc */ 37 | u8 lna_type_2g[2]; /* 0xbd */ 38 | u8 lna_type_5g[2]; /* 0xbf */ 39 | u8 rf_board_option; /* 0xc1 */ 40 | u8 res2; 41 | u8 rf_bt_setting; /* 0xc3 */ 42 | u8 eeprom_version; /* 0xc4 */ 43 | u8 eeprom_customer_id; /* 0xc5 */ 44 | u8 tx_bb_swing_setting_2g; /* 0xc6 */ 45 | u8 tx_bb_swing_setting_5g; /* 0xc7 */ 46 | u8 res3; 47 | u8 trx_antenna_option; /* 0xc9 */ 48 | u8 rfe_option; /* 0xca */ 49 | u8 country_code[2]; /* 0xcb */ 50 | u8 res4[3]; 51 | union { 52 | struct rtw8814au_efuse u; 53 | struct rtw8814ae_efuse e; 54 | }; 55 | u8 res5[0x122]; /* 0xde */ 56 | } __packed; 57 | 58 | static_assert(sizeof(struct rtw8814a_efuse) == 512); 59 | 60 | extern const struct rtw_chip_info rtw8814a_hw_spec; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /rtw8814ae.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) 2025 Realtek Corporation 3 | */ 4 | 5 | #include 6 | #include 7 | #include "pci.h" 8 | #include "rtw8814a.h" 9 | 10 | static const struct pci_device_id rtw_8814ae_id_table[] = { 11 | { 12 | PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8813), 13 | .driver_data = (kernel_ulong_t)&rtw8814a_hw_spec 14 | }, 15 | {} 16 | }; 17 | MODULE_DEVICE_TABLE(pci, rtw_8814ae_id_table); 18 | 19 | static struct pci_driver rtw_8814ae_driver = { 20 | .name = "rtw_8814ae", 21 | .id_table = rtw_8814ae_id_table, 22 | .probe = rtw_pci_probe, 23 | .remove = rtw_pci_remove, 24 | .driver.pm = &rtw_pm_ops, 25 | .shutdown = rtw_pci_shutdown, 26 | }; 27 | module_pci_driver(rtw_8814ae_driver); 28 | 29 | MODULE_AUTHOR("Bitterblue Smith "); 30 | MODULE_DESCRIPTION("Realtek 802.11ac wireless 8814ae driver"); 31 | MODULE_LICENSE("Dual BSD/GPL"); 32 | -------------------------------------------------------------------------------- /rtw8821a.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2024 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8821A_H__ 6 | #define __RTW8821A_H__ 7 | 8 | extern const struct rtw_chip_info rtw8821a_hw_spec; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /rtw8821a_table.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2024 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8821A_TABLE_H__ 6 | #define __RTW8821A_TABLE_H__ 7 | 8 | extern const struct rtw_table rtw8821a_mac_tbl; 9 | extern const struct rtw_table rtw8821a_agc_tbl; 10 | extern const struct rtw_table rtw8821a_bb_tbl; 11 | extern const struct rtw_table rtw8821a_bb_pg_tbl; 12 | extern const struct rtw_table rtw8821a_rf_a_tbl; 13 | extern const struct rtw_table rtw8821a_txpwr_lmt_tbl; 14 | 15 | extern const struct rtw_pwr_seq_cmd * const card_enable_flow_8821a[]; 16 | extern const struct rtw_pwr_seq_cmd * const enter_lps_flow_8821a[]; 17 | extern const struct rtw_pwr_seq_cmd * const card_disable_flow_8821a[]; 18 | 19 | extern const struct rtw_pwr_track_tbl rtw8821a_rtw_pwr_track_tbl; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /rtw8821c_table.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8821C_TABLE_H__ 6 | #define __RTW8821C_TABLE_H__ 7 | 8 | extern const struct rtw_table rtw8821c_mac_tbl; 9 | extern const struct rtw_table rtw8821c_agc_tbl; 10 | extern const struct rtw_table rtw8821c_agc_btg_type2_tbl; 11 | extern const struct rtw_table rtw8821c_bb_tbl; 12 | extern const struct rtw_table rtw8821c_bb_pg_type0_tbl; 13 | extern const struct rtw_table rtw8821c_rf_a_tbl; 14 | extern const struct rtw_table rtw8821c_txpwr_lmt_type0_tbl; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /rtw8821ce.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #include 6 | #include 7 | #include "pci.h" 8 | #include "rtw8821c.h" 9 | 10 | static const struct pci_device_id rtw_8821ce_id_table[] = { 11 | { 12 | PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xB821), 13 | .driver_data = (kernel_ulong_t)&rtw8821c_hw_spec 14 | }, 15 | { 16 | PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xC821), 17 | .driver_data = (kernel_ulong_t)&rtw8821c_hw_spec 18 | }, 19 | {} 20 | }; 21 | MODULE_DEVICE_TABLE(pci, rtw_8821ce_id_table); 22 | 23 | static struct pci_driver rtw_8821ce_driver = { 24 | .name = "rtw_8821ce", 25 | .id_table = rtw_8821ce_id_table, 26 | .probe = rtw_pci_probe, 27 | .remove = rtw_pci_remove, 28 | .driver.pm = &rtw_pm_ops, 29 | .shutdown = rtw_pci_shutdown, 30 | }; 31 | module_pci_driver(rtw_8821ce_driver); 32 | 33 | MODULE_AUTHOR("Realtek Corporation"); 34 | MODULE_DESCRIPTION("Realtek 802.11ac wireless 8821ce driver"); 35 | MODULE_LICENSE("Dual BSD/GPL"); 36 | -------------------------------------------------------------------------------- /rtw8821cs.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) Martin Blumenstingl 3 | */ 4 | 5 | #include 6 | #include "sdio_ids.h" 7 | #include 8 | #include "main.h" 9 | #include "rtw8821c.h" 10 | #include "sdio.h" 11 | 12 | static const struct sdio_device_id rtw_8821cs_id_table[] = { 13 | { 14 | SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK, 15 | SDIO_DEVICE_ID_REALTEK_RTW8821CS), 16 | .driver_data = (kernel_ulong_t)&rtw8821c_hw_spec, 17 | }, 18 | {} 19 | }; 20 | MODULE_DEVICE_TABLE(sdio, rtw_8821cs_id_table); 21 | 22 | static struct sdio_driver rtw_8821cs_driver = { 23 | .name = "rtw_8821cs", 24 | .probe = rtw_sdio_probe, 25 | .remove = rtw_sdio_remove, 26 | .id_table = rtw_8821cs_id_table, 27 | .drv = { 28 | .pm = &rtw_sdio_pm_ops, 29 | .shutdown = rtw_sdio_shutdown, 30 | } 31 | }; 32 | module_sdio_driver(rtw_8821cs_driver); 33 | 34 | MODULE_AUTHOR("Martin Blumenstingl "); 35 | MODULE_DESCRIPTION("Realtek 802.11ac wireless 8821cs driver"); 36 | MODULE_LICENSE("Dual BSD/GPL"); 37 | -------------------------------------------------------------------------------- /rtw8822b_table.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8822B_TABLE_H__ 6 | #define __RTW8822B_TABLE_H__ 7 | 8 | extern const struct rtw_table rtw8822b_mac_tbl; 9 | extern const struct rtw_table rtw8822b_agc_tbl; 10 | extern const struct rtw_table rtw8822b_bb_tbl; 11 | extern const struct rtw_table rtw8822b_bb_pg_type2_tbl; 12 | extern const struct rtw_table rtw8822b_bb_pg_type3_tbl; 13 | extern const struct rtw_table rtw8822b_bb_pg_type5_tbl; 14 | extern const struct rtw_table rtw8822b_rf_a_tbl; 15 | extern const struct rtw_table rtw8822b_rf_b_tbl; 16 | extern const struct rtw_table rtw8822b_txpwr_lmt_type0_tbl; 17 | extern const struct rtw_table rtw8822b_txpwr_lmt_type2_tbl; 18 | extern const struct rtw_table rtw8822b_txpwr_lmt_type5_tbl; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /rtw8822be.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #include 6 | #include 7 | #include "pci.h" 8 | #include "rtw8822b.h" 9 | 10 | static const struct pci_device_id rtw_8822be_id_table[] = { 11 | { 12 | PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xB822), 13 | .driver_data = (kernel_ulong_t)&rtw8822b_hw_spec 14 | }, 15 | {} 16 | }; 17 | MODULE_DEVICE_TABLE(pci, rtw_8822be_id_table); 18 | 19 | static struct pci_driver rtw_8822be_driver = { 20 | .name = "rtw_8822be", 21 | .id_table = rtw_8822be_id_table, 22 | .probe = rtw_pci_probe, 23 | .remove = rtw_pci_remove, 24 | .driver.pm = &rtw_pm_ops, 25 | .shutdown = rtw_pci_shutdown, 26 | }; 27 | module_pci_driver(rtw_8822be_driver); 28 | 29 | MODULE_AUTHOR("Realtek Corporation"); 30 | MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822be driver"); 31 | MODULE_LICENSE("Dual BSD/GPL"); 32 | -------------------------------------------------------------------------------- /rtw8822bs.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) Jernej Skrabec 3 | */ 4 | 5 | #include 6 | #include "sdio_ids.h" 7 | #include 8 | #include "main.h" 9 | #include "rtw8822b.h" 10 | #include "sdio.h" 11 | 12 | static const struct sdio_device_id rtw_8822bs_id_table[] = { 13 | { 14 | SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK, 15 | SDIO_DEVICE_ID_REALTEK_RTW8822BS), 16 | .driver_data = (kernel_ulong_t)&rtw8822b_hw_spec, 17 | }, 18 | {} 19 | }; 20 | MODULE_DEVICE_TABLE(sdio, rtw_8822bs_id_table); 21 | 22 | static struct sdio_driver rtw_8822bs_driver = { 23 | .name = "rtw_8822bs", 24 | .probe = rtw_sdio_probe, 25 | .remove = rtw_sdio_remove, 26 | .id_table = rtw_8822bs_id_table, 27 | .drv = { 28 | .pm = &rtw_sdio_pm_ops, 29 | .shutdown = rtw_sdio_shutdown, 30 | } 31 | }; 32 | module_sdio_driver(rtw_8822bs_driver); 33 | 34 | MODULE_AUTHOR("Jernej Skrabec "); 35 | MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822bs driver"); 36 | MODULE_LICENSE("Dual BSD/GPL"); 37 | -------------------------------------------------------------------------------- /rtw8822c_table.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW8822C_TABLE_H__ 6 | #define __RTW8822C_TABLE_H__ 7 | 8 | extern const struct rtw_table rtw8822c_mac_tbl; 9 | extern const struct rtw_table rtw8822c_agc_tbl; 10 | extern const struct rtw_table rtw8822c_bb_tbl; 11 | extern const struct rtw_table rtw8822c_bb_pg_type0_tbl; 12 | extern const struct rtw_table rtw8822c_rf_a_tbl; 13 | extern const struct rtw_table rtw8822c_rf_b_tbl; 14 | extern const struct rtw_table rtw8822c_txpwr_lmt_type0_tbl; 15 | extern const struct rtw_table rtw8822c_txpwr_lmt_type5_tbl; 16 | extern const struct rtw_table rtw8822c_dpk_afe_no_dpk_tbl; 17 | extern const struct rtw_table rtw8822c_dpk_afe_is_dpk_tbl; 18 | extern const struct rtw_table rtw8822c_dpk_mac_bb_tbl; 19 | extern const struct rtw_table rtw8822c_array_mp_cal_init_tbl; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /rtw8822ce.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #include 6 | #include 7 | #include "pci.h" 8 | #include "rtw8822c.h" 9 | 10 | static const struct pci_device_id rtw_8822ce_id_table[] = { 11 | { 12 | PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xC822), 13 | .driver_data = (kernel_ulong_t)&rtw8822c_hw_spec 14 | }, 15 | { 16 | PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0xC82F), 17 | .driver_data = (kernel_ulong_t)&rtw8822c_hw_spec 18 | }, 19 | {} 20 | }; 21 | MODULE_DEVICE_TABLE(pci, rtw_8822ce_id_table); 22 | 23 | static struct pci_driver rtw_8822ce_driver = { 24 | .name = "rtw_8822ce", 25 | .id_table = rtw_8822ce_id_table, 26 | .probe = rtw_pci_probe, 27 | .remove = rtw_pci_remove, 28 | .driver.pm = &rtw_pm_ops, 29 | .shutdown = rtw_pci_shutdown, 30 | }; 31 | module_pci_driver(rtw_8822ce_driver); 32 | 33 | MODULE_AUTHOR("Realtek Corporation"); 34 | MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822ce driver"); 35 | MODULE_LICENSE("Dual BSD/GPL"); 36 | -------------------------------------------------------------------------------- /rtw8822cs.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) Martin Blumenstingl 3 | */ 4 | 5 | #include 6 | #include "sdio_ids.h" 7 | #include 8 | #include "main.h" 9 | #include "rtw8822c.h" 10 | #include "sdio.h" 11 | 12 | static const struct sdio_device_id rtw_8822cs_id_table[] = { 13 | { 14 | SDIO_DEVICE(SDIO_VENDOR_ID_REALTEK, 15 | SDIO_DEVICE_ID_REALTEK_RTW8822CS), 16 | .driver_data = (kernel_ulong_t)&rtw8822c_hw_spec, 17 | }, 18 | {} 19 | }; 20 | MODULE_DEVICE_TABLE(sdio, rtw_8822cs_id_table); 21 | 22 | static struct sdio_driver rtw_8822cs_driver = { 23 | .name = "rtw_8822cs", 24 | .probe = rtw_sdio_probe, 25 | .remove = rtw_sdio_remove, 26 | .id_table = rtw_8822cs_id_table, 27 | .drv = { 28 | .pm = &rtw_sdio_pm_ops, 29 | .shutdown = rtw_sdio_shutdown, 30 | } 31 | }; 32 | module_sdio_driver(rtw_8822cs_driver); 33 | 34 | MODULE_AUTHOR("Martin Blumenstingl "); 35 | MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822cs driver"); 36 | MODULE_LICENSE("Dual BSD/GPL"); 37 | -------------------------------------------------------------------------------- /rtw8822cu.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #include 6 | #include 7 | #include "main.h" 8 | #include "rtw8822c.h" 9 | #include "usb.h" 10 | 11 | static const struct usb_device_id rtw_8822cu_id_table[] = { 12 | { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82c, 0xff, 0xff, 0xff), 13 | .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, 14 | { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc812, 0xff, 0xff, 0xff), 15 | .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, 16 | { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xc82e, 0xff, 0xff, 0xff), 17 | .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, 18 | { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xd820, 0xff, 0xff, 0xff), 19 | .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, 20 | { USB_DEVICE_AND_INTERFACE_INFO(RTW_USB_VENDOR_ID_REALTEK, 0xd82b, 0xff, 0xff, 0xff), 21 | .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, 22 | { USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff), 23 | .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, /* Alpha - Alpha */ 24 | {}, 25 | }; 26 | MODULE_DEVICE_TABLE(usb, rtw_8822cu_id_table); 27 | 28 | static int rtw8822cu_probe(struct usb_interface *intf, 29 | const struct usb_device_id *id) 30 | { 31 | return rtw_usb_probe(intf, id); 32 | } 33 | 34 | static struct usb_driver rtw_8822cu_driver = { 35 | .name = "rtw_8822cu", 36 | .id_table = rtw_8822cu_id_table, 37 | .probe = rtw8822cu_probe, 38 | .disconnect = rtw_usb_disconnect, 39 | }; 40 | module_usb_driver(rtw_8822cu_driver); 41 | 42 | MODULE_AUTHOR("Realtek Corporation"); 43 | MODULE_DESCRIPTION("Realtek 802.11ac wireless 8822cu driver"); 44 | MODULE_LICENSE("Dual BSD/GPL"); 45 | -------------------------------------------------------------------------------- /sar.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2021 Realtek Corporation 3 | */ 4 | 5 | #include "main.h" 6 | 7 | /* NL80211_SAR_TYPE_POWER means unit is in 0.25 dBm, 8 | * where 0.25 = 1/4 = 2^(-2), so make factor 2. 9 | */ 10 | #define RTW_COMMON_SAR_FCT 2 11 | 12 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) 13 | struct rtw_sar_arg { 14 | u8 sar_band; 15 | u8 path; 16 | u8 rs; 17 | }; 18 | 19 | extern const struct cfg80211_sar_capa rtw_sar_capa; 20 | 21 | s8 rtw_query_sar(struct rtw_dev *rtwdev, const struct rtw_sar_arg *arg); 22 | int rtw_set_sar_specs(struct rtw_dev *rtwdev, 23 | const struct cfg80211_sar_specs *sar); 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /sdio_ids.h: -------------------------------------------------------------------------------- 1 | #define SDIO_VENDOR_ID_REALTEK 0x024c 2 | #define SDIO_DEVICE_ID_REALTEK_RTW8723BS 0xb723 3 | #define SDIO_DEVICE_ID_REALTEK_RTW8723DS_2ANT 0xd723 4 | #define SDIO_DEVICE_ID_REALTEK_RTW8723DS_1ANT 0xd724 5 | #define SDIO_DEVICE_ID_REALTEK_RTW8821BS 0xb821 6 | #define SDIO_DEVICE_ID_REALTEK_RTW8821CS 0xc821 7 | #define SDIO_DEVICE_ID_REALTEK_RTW8821DS 0xd821 8 | #define SDIO_DEVICE_ID_REALTEK_RTW8822BS 0xb822 9 | #define SDIO_DEVICE_ID_REALTEK_RTW8822CS 0xc822 10 | #define SDIO_DEVICE_ID_REALTEK_RTW8723CS 0xb703 11 | 12 | -------------------------------------------------------------------------------- /sec.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW_SEC_H_ 6 | #define __RTW_SEC_H_ 7 | 8 | #define RTW_SEC_CMD_REG 0x670 9 | #define RTW_SEC_WRITE_REG 0x674 10 | #define RTW_SEC_READ_REG 0x678 11 | #define RTW_SEC_CONFIG 0x680 12 | 13 | #define RTW_SEC_CAM_ENTRY_SHIFT 3 14 | #define RTW_SEC_DEFAULT_KEY_NUM 4 15 | #define RTW_SEC_CMD_WRITE_ENABLE BIT(16) 16 | #define RTW_SEC_CMD_CLEAR BIT(30) 17 | #define RTW_SEC_CMD_POLLING BIT(31) 18 | 19 | #define RTW_SEC_TX_UNI_USE_DK BIT(0) 20 | #define RTW_SEC_RX_UNI_USE_DK BIT(1) 21 | #define RTW_SEC_TX_DEC_EN BIT(2) 22 | #define RTW_SEC_RX_DEC_EN BIT(3) 23 | #define RTW_SEC_TX_BC_USE_DK BIT(6) 24 | #define RTW_SEC_RX_BC_USE_DK BIT(7) 25 | 26 | #define RTW_SEC_ENGINE_EN BIT(9) 27 | 28 | int rtw_sec_get_free_cam(struct rtw_sec_desc *sec); 29 | void rtw_sec_write_cam(struct rtw_dev *rtwdev, 30 | struct rtw_sec_desc *sec, 31 | struct ieee80211_sta *sta, 32 | struct ieee80211_key_conf *key, 33 | u8 hw_key_type, u8 hw_key_idx); 34 | void rtw_sec_clear_cam(struct rtw_dev *rtwdev, 35 | struct rtw_sec_desc *sec, 36 | u8 hw_key_idx); 37 | u8 rtw_sec_cam_pg_backup(struct rtw_dev *rtwdev, u8 *used_cam); 38 | void rtw_sec_enable_sec_engine(struct rtw_dev *rtwdev); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /sign-file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lwfinger/rtw88/461b696b51317ba4ca585a4ddb32f2e72cd4efc9/sign-file -------------------------------------------------------------------------------- /suspend_rtw8723de: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Script to unload/reload driver for rtw8723de on suspend/resume 4 | # 5 | 6 | if [ "${1}" == "pre" ]; then 7 | # shutting down - isolate name of driver, if any 8 | MODNAME=$(lsmod | grep 8723de | awk '{split($0,a," "); print a[1]}' | grep 8723de) 9 | if [ ! -z "$MODNAME" -a "$MODNAME" != " " ]; then 10 | # here if rtw88_8723de or rtw_8873 is currently loaded - actual name in MODNAME 11 | # Save name in file 12 | echo $MODNAME > /root/module_name 13 | # unload the module 14 | modprobe -rv $MODNAME 15 | fi 16 | elif [ "${1}" == "post" ]; then 17 | # Resuming - check if file saving name exists 18 | if [ -f /root/module_name ]; then 19 | # it does - sleep a while, recover MODNAME, load the driver, and delete the file that saved MODNAME 20 | sleep 15 21 | MODNAME=$(cat /root/module_name) 22 | modprobe -v $MODNAME 23 | rm /root/module_name 24 | fi 25 | fi 26 | 27 | -------------------------------------------------------------------------------- /suspend_rtw8821ce: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "${1}" == "pre" ]; then 3 | modprobe -rv rtw_8821ce 4 | elif [ "${1}" == "post" ]; then 5 | modprobe -v rtw_8821ce 6 | fi 7 | -------------------------------------------------------------------------------- /suspend_rtw8822be: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "${1}" == "pre" ]; then 3 | modprobe -rv rtw_8822be 4 | elif [ "${1}" == "post" ]; then 5 | modprobe -v rtw_8822be 6 | fi 7 | -------------------------------------------------------------------------------- /suspend_rtw8822ce: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "${1}" == "pre" ]; then 3 | modprobe -rv rtw_8822ce 4 | elif [ "${1}" == "post" ]; then 5 | modprobe -v rtw_8822ce 6 | fi 7 | -------------------------------------------------------------------------------- /util.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW_UTIL_H__ 6 | #define __RTW_UTIL_H__ 7 | 8 | struct rtw_dev; 9 | 10 | #define rtw_iterate_vifs_atomic(rtwdev, iterator, data) \ 11 | ieee80211_iterate_active_interfaces_atomic(rtwdev->hw, \ 12 | IEEE80211_IFACE_ITER_NORMAL, iterator, data) 13 | #define rtw_iterate_stas_atomic(rtwdev, iterator, data) \ 14 | ieee80211_iterate_stations_atomic(rtwdev->hw, iterator, data) 15 | #define rtw_iterate_keys(rtwdev, vif, iterator, data) \ 16 | ieee80211_iter_keys(rtwdev->hw, vif, iterator, data) 17 | #define rtw_iterate_keys_rcu(rtwdev, vif, iterator, data) \ 18 | ieee80211_iter_keys_rcu((rtwdev)->hw, vif, iterator, data) 19 | 20 | void rtw_iterate_vifs(struct rtw_dev *rtwdev, 21 | void (*iterator)(void *data, struct ieee80211_vif *vif), 22 | void *data); 23 | void rtw_iterate_stas(struct rtw_dev *rtwdev, 24 | void (*iterator)(void *data, 25 | struct ieee80211_sta *sta), 26 | void *data); 27 | 28 | static inline u8 *get_hdr_bssid(struct ieee80211_hdr *hdr) 29 | { 30 | __le16 fc = hdr->frame_control; 31 | u8 *bssid; 32 | 33 | if (ieee80211_has_tods(fc)) 34 | bssid = hdr->addr1; 35 | else if (ieee80211_has_fromds(fc)) 36 | bssid = hdr->addr2; 37 | else 38 | bssid = hdr->addr3; 39 | 40 | return bssid; 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /wow.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 | /* Copyright(c) 2018-2019 Realtek Corporation 3 | */ 4 | 5 | #ifndef __RTW_WOW_H__ 6 | #define __RTW_WOW_H__ 7 | 8 | #define PNO_CHECK_BYTE 4 9 | 10 | enum rtw_wow_pattern_type { 11 | RTW_PATTERN_BROADCAST = 0, 12 | RTW_PATTERN_MULTICAST, 13 | RTW_PATTERN_UNICAST, 14 | RTW_PATTERN_VALID, 15 | RTW_PATTERN_INVALID, 16 | }; 17 | 18 | enum rtw_wake_reason { 19 | RTW_WOW_RSN_RX_PTK_REKEY = 0x1, 20 | RTW_WOW_RSN_RX_GTK_REKEY = 0x2, 21 | RTW_WOW_RSN_RX_DEAUTH = 0x8, 22 | RTW_WOW_RSN_DISCONNECT = 0x10, 23 | RTW_WOW_RSN_RX_MAGIC_PKT = 0x21, 24 | RTW_WOW_RSN_RX_PATTERN_MATCH = 0x23, 25 | RTW_WOW_RSN_RX_NLO = 0x55, 26 | }; 27 | 28 | struct rtw_fw_media_status_iter_data { 29 | struct rtw_dev *rtwdev; 30 | u8 connect; 31 | }; 32 | 33 | struct rtw_fw_key_type_iter_data { 34 | struct rtw_dev *rtwdev; 35 | u8 group_key_type; 36 | u8 pairwise_key_type; 37 | }; 38 | 39 | static inline bool rtw_wow_mgd_linked(struct rtw_dev *rtwdev) 40 | { 41 | struct ieee80211_vif *wow_vif = rtwdev->wow.wow_vif; 42 | struct rtw_vif *rtwvif = (struct rtw_vif *)wow_vif->drv_priv; 43 | 44 | return (rtwvif->net_type == RTW_NET_MGD_LINKED); 45 | } 46 | 47 | static inline bool rtw_wow_no_link(struct rtw_dev *rtwdev) 48 | { 49 | struct ieee80211_vif *wow_vif = rtwdev->wow.wow_vif; 50 | struct rtw_vif *rtwvif = (struct rtw_vif *)wow_vif->drv_priv; 51 | 52 | return (rtwvif->net_type == RTW_NET_NO_LINK); 53 | } 54 | 55 | int rtw_wow_suspend(struct rtw_dev *rtwdev, struct cfg80211_wowlan *wowlan); 56 | int rtw_wow_resume(struct rtw_dev *rtwdev); 57 | 58 | #endif 59 | --------------------------------------------------------------------------------