├── .gitignore ├── Kconfig ├── Makefile ├── README.md ├── clean ├── core ├── efuse │ └── rtw_efuse.c ├── rtw_ap.c ├── rtw_beamforming.c ├── rtw_br_ext.c ├── rtw_bt_mp.c ├── rtw_btcoex.c ├── rtw_cmd.c ├── rtw_debug.c ├── rtw_eeprom.c ├── rtw_ieee80211.c ├── rtw_io.c ├── rtw_ioctl_query.c ├── rtw_ioctl_rtl.c ├── rtw_ioctl_set.c ├── rtw_iol.c ├── rtw_mem.c ├── rtw_mlme.c ├── rtw_mlme_ext.c ├── rtw_mp.c ├── rtw_mp_ioctl.c ├── rtw_odm.c ├── rtw_p2p.c ├── rtw_pwrctrl.c ├── rtw_recv.c ├── rtw_rf.c ├── rtw_security.c ├── rtw_sreset.c ├── rtw_sta_mgt.c ├── rtw_tdls.c ├── rtw_vht.c ├── rtw_wapi.c ├── rtw_wapi_sms4.c ├── rtw_wlan_util.c └── rtw_xmit.c ├── hal ├── HalPwrSeqCmd.c ├── efuse │ ├── efuse_mask.h │ └── rtl8812a │ │ ├── HalEfuseMask8812A_PCIE.c │ │ ├── HalEfuseMask8812A_PCIE.h │ │ ├── HalEfuseMask8812A_USB.c │ │ ├── HalEfuseMask8812A_USB.h │ │ ├── HalEfuseMask8821A_PCIE.c │ │ ├── HalEfuseMask8821A_PCIE.h │ │ ├── HalEfuseMask8821A_USB.c │ │ └── HalEfuseMask8821A_USB.h ├── hal_btcoex.c ├── hal_com.c ├── hal_com_c2h.h ├── hal_com_phycfg.c ├── hal_dm.c ├── hal_dm.h ├── hal_hci │ └── hal_usb.c ├── hal_intf.c ├── hal_mp.c ├── hal_phy.c ├── led │ └── hal_usb_led.c ├── phydm │ ├── halhwimg.h │ ├── halphyrf_ap.c │ ├── halphyrf_ap.h │ ├── halphyrf_ce.c │ ├── halphyrf_ce.h │ ├── halphyrf_win.c │ ├── halphyrf_win.h │ ├── mp_precomp.h │ ├── phydm.c │ ├── phydm.h │ ├── phydm_acs.c │ ├── phydm_acs.h │ ├── phydm_adaptivity.c │ ├── phydm_adaptivity.h │ ├── phydm_antdect.c │ ├── phydm_antdect.h │ ├── phydm_antdiv.c │ ├── phydm_antdiv.h │ ├── phydm_beamforming.c │ ├── phydm_beamforming.h │ ├── phydm_cfotracking.c │ ├── phydm_cfotracking.h │ ├── phydm_debug.c │ ├── phydm_debug.h │ ├── phydm_dig.c │ ├── phydm_dig.h │ ├── phydm_dynamicbbpowersaving.c │ ├── phydm_dynamicbbpowersaving.h │ ├── phydm_dynamictxpower.c │ ├── phydm_dynamictxpower.h │ ├── phydm_edcaturbocheck.c │ ├── phydm_edcaturbocheck.h │ ├── phydm_hwconfig.c │ ├── phydm_hwconfig.h │ ├── phydm_interface.c │ ├── phydm_interface.h │ ├── phydm_noisemonitor.c │ ├── phydm_noisemonitor.h │ ├── phydm_pathdiv.c │ ├── phydm_pathdiv.h │ ├── phydm_powertracking_ap.c │ ├── phydm_powertracking_ap.h │ ├── phydm_powertracking_ce.c │ ├── phydm_powertracking_ce.h │ ├── phydm_powertracking_win.c │ ├── phydm_powertracking_win.h │ ├── phydm_pre_define.h │ ├── phydm_precomp.h │ ├── phydm_rainfo.c │ ├── phydm_rainfo.h │ ├── phydm_reg.h │ ├── phydm_regdefine11ac.h │ ├── phydm_regdefine11n.h │ ├── phydm_rxhp.c │ ├── phydm_rxhp.h │ ├── phydm_types.h │ ├── rtchnlplan.c │ ├── rtchnlplan.h │ ├── rtl8812a │ │ ├── halhwimg8812a_bb.c │ │ ├── halhwimg8812a_bb.h │ │ ├── halhwimg8812a_fw.c │ │ ├── halhwimg8812a_fw.h │ │ ├── halhwimg8812a_mac.c │ │ ├── halhwimg8812a_mac.h │ │ ├── halhwimg8812a_rf.c │ │ ├── halhwimg8812a_rf.h │ │ ├── halphyrf_8812a_ap.c │ │ ├── halphyrf_8812a_ap.h │ │ ├── halphyrf_8812a_ce.c │ │ ├── halphyrf_8812a_ce.h │ │ ├── halphyrf_8812a_win.c │ │ ├── halphyrf_8812a_win.h │ │ ├── phydm_regconfig8812a.c │ │ ├── phydm_regconfig8812a.h │ │ ├── phydm_rtl8812a.c │ │ ├── phydm_rtl8812a.h │ │ └── version_rtl8812a.h │ ├── rtl8821a │ │ ├── halhwimg8821a_bb.c │ │ ├── halhwimg8821a_bb.h │ │ ├── halhwimg8821a_fw.c │ │ ├── halhwimg8821a_fw.h │ │ ├── halhwimg8821a_mac.c │ │ ├── halhwimg8821a_mac.h │ │ ├── halhwimg8821a_rf.c │ │ ├── halhwimg8821a_rf.h │ │ ├── halphyrf_8821a_ce.c │ │ ├── halphyrf_8821a_ce.h │ │ ├── halphyrf_8821a_win.c │ │ ├── halphyrf_8821a_win.h │ │ ├── phydm_iqk_8821a_ap.c │ │ ├── phydm_iqk_8821a_ap.h │ │ ├── phydm_iqk_8821a_ce.c │ │ ├── phydm_iqk_8821a_ce.h │ │ ├── phydm_iqk_8821a_win.c │ │ ├── phydm_iqk_8821a_win.h │ │ ├── phydm_regconfig8821a.c │ │ ├── phydm_regconfig8821a.h │ │ ├── phydm_rtl8821a.c │ │ ├── phydm_rtl8821a.h │ │ └── version_rtl8821a.h │ └── txbf │ │ ├── halcomtxbf.c │ │ ├── halcomtxbf.h │ │ ├── haltxbf8192e.c │ │ ├── haltxbf8192e.h │ │ ├── haltxbf8814a.c │ │ ├── haltxbf8814a.h │ │ ├── haltxbf8821b.c │ │ ├── haltxbf8821b.h │ │ ├── haltxbf8822b.c │ │ ├── haltxbf8822b.h │ │ ├── haltxbfinterface.c │ │ ├── haltxbfinterface.h │ │ ├── haltxbfjaguar.c │ │ └── haltxbfjaguar.h └── rtl8812a │ ├── Hal8812PwrSeq.c │ ├── Hal8821APwrSeq.c │ ├── rtl8812a_cmd.c │ ├── rtl8812a_dm.c │ ├── rtl8812a_hal_init.c │ ├── rtl8812a_phycfg.c │ ├── rtl8812a_rf6052.c │ ├── rtl8812a_rxdesc.c │ ├── rtl8812a_sreset.c │ ├── rtl8812a_xmit.c │ └── usb │ ├── rtl8812au_led.c │ ├── rtl8812au_recv.c │ ├── rtl8812au_xmit.c │ ├── usb_halinit.c │ └── usb_ops_linux.c ├── ifcfg-wlan0 ├── include ├── 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 ├── 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_com.h ├── hal_com_h2c.h ├── hal_com_led.h ├── hal_com_phycfg.h ├── hal_com_reg.h ├── hal_data.h ├── hal_data.h.edited ├── hal_gspi.h ├── hal_ic_cfg.h ├── hal_intf.h ├── hal_pg.h ├── hal_phy.h ├── hal_phy_reg.h ├── hal_sdio.h ├── ieee80211.h ├── ieee80211_ext.h ├── if_ether.h ├── ip.h ├── linux │ └── wireless.h ├── mlme_osdep.h ├── mp_custom_oid.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 ├── 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 ├── rtl8821a_spec.h ├── rtl8821a_xmit.h ├── rtw_android.h ├── rtw_ap.h ├── rtw_beamforming.h ├── rtw_br_ext.h ├── rtw_bt_mp.h ├── rtw_btcoex.h ├── rtw_byteorder.h ├── rtw_cmd.h ├── rtw_debug.h ├── rtw_eeprom.h ├── rtw_efuse.h ├── rtw_event.h ├── rtw_ht.h ├── rtw_io.h ├── rtw_ioctl.h ├── rtw_ioctl_query.h ├── rtw_ioctl_rtl.h ├── rtw_ioctl_set.h ├── rtw_iol.h ├── rtw_mem.h ├── rtw_mlme.h ├── rtw_mlme_ext.h ├── rtw_mp.h ├── rtw_mp_ioctl.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_security.h ├── rtw_sreset.h ├── rtw_tdls.h ├── rtw_version.h ├── rtw_vht.h ├── rtw_wapi.h ├── rtw_wifi_regd.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 │ ├── os_intfs.c │ ├── recv_linux.c │ ├── rtw_android.c │ ├── rtw_cfgvendor.c │ ├── rtw_cfgvendor.h │ ├── rtw_proc.c │ ├── rtw_proc.h │ ├── rtw_radiotap.c │ ├── usb_intf.c │ ├── usb_ops_linux.c │ ├── wifi_regd.c │ └── xmit_linux.c └── osdep_service.c ├── platform ├── platform_RTK_DMP_usb.c ├── platform_ops.c ├── platform_ops.h └── platform_sprd_sdio.c ├── runwpa └── wlan0dhcp /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.cmd 3 | *.ko 4 | *.cm 5 | Module.symvers 6 | modules.order 7 | rtl8821au.mod.c 8 | .tmp_versions 9 | -------------------------------------------------------------------------------- /Kconfig: -------------------------------------------------------------------------------- 1 | config RTL8821AU 2 | tristate "Realtek 8821A USB WiFi" 3 | depends on USB 4 | ---help--- 5 | Help message of RTL8821AU 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RTL8812AU/21AU and RTL8814AU linux driver with monitor mode and frame injection 2 | The master branch is based on https://github.com/ulli-kroll/rtl8821au branch v4.3.22-beta/rework. 3 | According to rtw_version.c the real driver version is 4.3.20. 4 | 5 | The branch v4.3.21 may be built for RTL8814AU or RTL8812AU/RTL8821AU chipset. 6 | 7 | for building RTL8812AU/RTL8821AU driver type: 8 | 9 | `$ make` 10 | 11 | 12 | for building RTL8814 driver type: 13 | 14 | `$ make RTL8814=1` 15 | 16 | 17 | for building driver with debug output type: 18 | 19 | `$ make DEBUG=1` 20 | 21 | or 22 | 23 | `$ make RTL8814=1 DEBUG=1` 24 | 25 | for setting monitor mode 26 | 27 | 1. Set interface down 28 | 29 | `$ sudo ip link set wlan0 down` 30 | 31 | 2. Set monitor mode 32 | 33 | `$ sudo iwconfig wlan0 mode monitor` 34 | 35 | 3. Set interface up 36 | 37 | `$ sudo ip link set wlan0 up` 38 | 39 | for switching channels (interface must be up) 40 | 41 | Set channel 6, width 40 MHz: 42 | ``` 43 | $ sudo iw wlan0 set channel 6 HT40- 44 | ``` 45 | 46 | Set channel 149, width 80 MHz: 47 | ``` 48 | $ sudo iw wlan0 set freq 5745 80 5775 49 | ``` 50 | 51 | for setting TX power (v4.3.21 branch only): 52 | ``` 53 | $ sudo iwconfig wlan0 txpower 30 54 | ``` 55 | or 56 | ``` 57 | $ sudo iw wlan0 set txpower fixed 3000 58 | ``` 59 | 60 | to inject frames with b/g rates use the Rate field in the radiotap header 61 | 62 | to inject frames with n rates use the MCS field in the radiotap header 63 | 64 | to inject frames with ac rates use the VHT field in the radiotap header 65 | 66 | -------------------------------------------------------------------------------- /clean: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rmmod 8192cu 3 | rmmod 8192ce 4 | rmmod 8192du 5 | rmmod 8192de 6 | -------------------------------------------------------------------------------- /core/rtw_mem.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | MODULE_LICENSE("GPL"); 6 | MODULE_DESCRIPTION("Realtek Wireless Lan Driver"); 7 | MODULE_AUTHOR("Realtek Semiconductor Corp."); 8 | MODULE_VERSION("DRIVERVERSION"); 9 | 10 | struct sk_buff_head rtk_skb_mem_q; 11 | struct u8* rtk_buf_mem[NR_RECVBUFF]; 12 | 13 | struct u8 * rtw_get_buf_premem(int index) 14 | { 15 | printk("%s, rtk_buf_mem index : %d\n", __func__, index); 16 | return rtk_buf_mem[index]; 17 | } 18 | 19 | u16 rtw_rtkm_get_buff_size(void) 20 | { 21 | return MAX_RTKM_RECVBUF_SZ; 22 | } 23 | EXPORT_SYMBOL(rtw_rtkm_get_buff_size); 24 | 25 | u8 rtw_rtkm_get_nr_recv_skb(void) 26 | { 27 | return MAX_RTKM_NR_PREALLOC_RECV_SKB; 28 | } 29 | EXPORT_SYMBOL(rtw_rtkm_get_nr_recv_skb); 30 | 31 | struct sk_buff *rtw_alloc_skb_premem(u16 in_size) 32 | { 33 | struct sk_buff *skb = NULL; 34 | 35 | if (in_size > MAX_RTKM_RECVBUF_SZ) { 36 | pr_info("warning %s: driver buffer size(%d) > rtkm buffer size(%d)\n", __func__, in_size, MAX_RTKM_RECVBUF_SZ); 37 | WARN_ON(1); 38 | return skb; 39 | } 40 | 41 | skb = skb_dequeue(&rtk_skb_mem_q); 42 | 43 | printk("%s, rtk_skb_mem_q len : %d\n", __func__, skb_queue_len(&rtk_skb_mem_q)); 44 | 45 | return skb; 46 | } 47 | EXPORT_SYMBOL(rtw_alloc_skb_premem); 48 | 49 | int rtw_free_skb_premem(struct sk_buff *pskb) 50 | { 51 | if(!pskb) 52 | return -1; 53 | 54 | if (skb_queue_len(&rtk_skb_mem_q) >= MAX_RTKM_NR_PREALLOC_RECV_SKB) 55 | return -1; 56 | 57 | skb_queue_tail(&rtk_skb_mem_q, pskb); 58 | 59 | printk("%s, rtk_skb_mem_q len : %d\n", __func__, skb_queue_len(&rtk_skb_mem_q)); 60 | 61 | return 0; 62 | } 63 | EXPORT_SYMBOL(rtw_free_skb_premem); 64 | 65 | static int __init rtw_mem_init(void) 66 | { 67 | int i; 68 | SIZE_PTR tmpaddr=0; 69 | SIZE_PTR alignment=0; 70 | struct sk_buff *pskb=NULL; 71 | 72 | printk("%s\n", __func__); 73 | pr_info("MAX_RTKM_NR_PREALLOC_RECV_SKB: %d\n", MAX_RTKM_NR_PREALLOC_RECV_SKB); 74 | pr_info("MAX_RTKM_RECVBUF_SZ: %d\n", MAX_RTKM_RECVBUF_SZ); 75 | 76 | #ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX 77 | for(i=0; idata; 91 | alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1); 92 | skb_reserve(pskb, (RECVBUFF_ALIGN_SZ - alignment)); 93 | 94 | skb_queue_tail(&rtk_skb_mem_q, pskb); 95 | } 96 | else 97 | { 98 | printk("%s, alloc skb memory fail!\n", __func__); 99 | } 100 | 101 | pskb=NULL; 102 | } 103 | 104 | printk("%s, rtk_skb_mem_q len : %d\n", __func__, skb_queue_len(&rtk_skb_mem_q)); 105 | 106 | return 0; 107 | 108 | } 109 | 110 | static void __exit rtw_mem_exit(void) 111 | { 112 | if (skb_queue_len(&rtk_skb_mem_q)) { 113 | printk("%s, rtk_skb_mem_q len : %d\n", __func__, skb_queue_len(&rtk_skb_mem_q)); 114 | } 115 | 116 | skb_queue_purge(&rtk_skb_mem_q); 117 | 118 | printk("%s\n", __func__); 119 | } 120 | 121 | module_init(rtw_mem_init); 122 | module_exit(rtw_mem_exit); 123 | -------------------------------------------------------------------------------- /hal/efuse/efuse_mask.h: -------------------------------------------------------------------------------- 1 | 2 | #if DEV_BUS_TYPE == RT_USB_INTERFACE 3 | 4 | #if defined(CONFIG_RTL8188E) 5 | #include "rtl8188e/HalEfuseMask8188E_USB.h" 6 | #endif 7 | 8 | #if defined(CONFIG_RTL8812A) 9 | #include "rtl8812a/HalEfuseMask8812A_USB.h" 10 | #endif 11 | 12 | #if defined(CONFIG_RTL8821A) 13 | #include "rtl8812a/HalEfuseMask8821A_USB.h" 14 | #endif 15 | 16 | #if defined(CONFIG_RTL8192E) 17 | #include "rtl8192e/HalEfuseMask8192E_USB.h" 18 | #endif 19 | 20 | #if defined(CONFIG_RTL8723B) 21 | #include "rtl8723b/HalEfuseMask8723B_USB.h" 22 | #endif 23 | 24 | #if defined(CONFIG_RTL8814A) 25 | #include "rtl8814a/HalEfuseMask8814A_USB.h" 26 | #endif 27 | 28 | #if defined(CONFIG_RTL8703B) 29 | #include "rtl8703b/HalEfuseMask8703B_USB.h" 30 | #endif 31 | 32 | #if defined(CONFIG_RTL8188F) 33 | #include "rtl8188f/HalEfuseMask8188F_USB.h" 34 | #endif 35 | 36 | #elif DEV_BUS_TYPE == RT_PCI_INTERFACE 37 | 38 | #if defined(CONFIG_RTL8188E) 39 | #include "rtl8188e/HalEfuseMask8188E_PCIE.h" 40 | #endif 41 | 42 | #if defined(CONFIG_RTL8812A) 43 | #include "rtl8812a/HalEfuseMask8812A_PCIE.h" 44 | #endif 45 | 46 | #if defined(CONFIG_RTL8821A) 47 | #include "rtl8812a/HalEfuseMask8821A_PCIE.h" 48 | #endif 49 | 50 | #if defined(CONFIG_RTL8192E) 51 | #include "rtl8192e/HalEfuseMask8192E_PCIE.h" 52 | #endif 53 | 54 | #if defined(CONFIG_RTL8723B) 55 | #include "rtl8723b/HalEfuseMask8723B_PCIE.h" 56 | #endif 57 | 58 | #if defined(CONFIG_RTL8814A) 59 | #include "rtl8814a/HalEfuseMask8814A_PCIE.h" 60 | #endif 61 | 62 | #if defined(CONFIG_RTL8703B) 63 | #include "rtl8703b/HalEfuseMask8703B_PCIE.h" 64 | #endif 65 | 66 | #elif DEV_BUS_TYPE == RT_SDIO_INTERFACE 67 | 68 | #if defined(CONFIG_RTL8188E) 69 | #include "rtl8188e/HalEfuseMask8188E_SDIO.h" 70 | #endif 71 | 72 | #if defined(CONFIG_RTL8703B) 73 | #include "rtl8703b/HalEfuseMask8703B_SDIO.h" 74 | #endif 75 | 76 | #if defined(CONFIG_RTL8188F) 77 | #include "rtl8188f/HalEfuseMask8188F_SDIO.h" 78 | #endif 79 | 80 | #endif -------------------------------------------------------------------------------- /hal/efuse/rtl8812a/HalEfuseMask8812A_PCIE.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | //#include "Mp_Precomp.h" 22 | //#include "../odm_precomp.h" 23 | 24 | #include 25 | 26 | #include "HalEfuseMask8812A_PCIE.h" 27 | 28 | /****************************************************************************** 29 | * MPCIE.TXT 30 | ******************************************************************************/ 31 | 32 | u1Byte Array_MP_8812A_MPCIE[] = { 33 | 0xFF, 34 | 0xF7, 35 | 0xEF, 36 | 0xDE, 37 | 0xFD, 38 | 0xFB, 39 | 0x10, 40 | 0x00, 41 | 0x00, 42 | 0x00, 43 | 0x00, 44 | 0x0F, 45 | 0xF3, 46 | 0xFF, 47 | 0xFF, 48 | 0x7C, 49 | 0x00, 50 | 0x00, 51 | 0x00, 52 | 0x00, 53 | 0x00, 54 | 0x00, 55 | 0x00, 56 | 0x00, 57 | 0x00, 58 | 0x00, 59 | 0x00, 60 | 0x00, 61 | 0x00, 62 | 0x00, 63 | 0x00, 64 | 0x00, 65 | 66 | }; 67 | 68 | u2Byte 69 | EFUSE_GetArrayLen_MP_8812A_MPCIE(VOID) 70 | { 71 | return sizeof(Array_MP_8812A_MPCIE)/sizeof(u1Byte); 72 | } 73 | 74 | VOID 75 | EFUSE_GetMaskArray_MP_8812A_MPCIE( 76 | IN OUT pu1Byte Array 77 | ) 78 | { 79 | u2Byte len = EFUSE_GetArrayLen_MP_8812A_MPCIE(), i = 0; 80 | 81 | for (i = 0; i < len; ++i) 82 | Array[i] = Array_MP_8812A_MPCIE[i]; 83 | } 84 | BOOLEAN 85 | EFUSE_IsAddressMasked_MP_8812A_MPCIE( 86 | IN u2Byte Offset 87 | ) 88 | { 89 | int r = Offset/16; 90 | int c = (Offset%16) / 2; 91 | int result = 0; 92 | 93 | if (c < 4) // Upper double word 94 | result = (Array_MP_8812A_MPCIE[r] & (0x10 << c)); 95 | else 96 | result = (Array_MP_8812A_MPCIE[r] & (0x01 << (c-4))); 97 | 98 | return (result > 0) ? 0 : 1; 99 | } 100 | 101 | -------------------------------------------------------------------------------- /hal/efuse/rtl8812a/HalEfuseMask8812A_PCIE.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | 22 | /****************************************************************************** 23 | * MPCIE.TXT 24 | ******************************************************************************/ 25 | 26 | 27 | u2Byte 28 | EFUSE_GetArrayLen_MP_8812A_MPCIE(VOID); 29 | 30 | VOID 31 | EFUSE_GetMaskArray_MP_8812A_MPCIE( 32 | IN OUT pu1Byte Array 33 | ); 34 | 35 | BOOLEAN 36 | EFUSE_IsAddressMasked_MP_8812A_MPCIE( // TC: Test Chip, MP: MP Chip 37 | IN u2Byte Offset 38 | ); 39 | 40 | 41 | -------------------------------------------------------------------------------- /hal/efuse/rtl8812a/HalEfuseMask8812A_USB.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | //#include "Mp_Precomp.h" 22 | //#include "../odm_precomp.h" 23 | 24 | #include 25 | 26 | #include "HalEfuseMask8812A_USB.h" 27 | 28 | /****************************************************************************** 29 | * MUSB.TXT 30 | ******************************************************************************/ 31 | 32 | u1Byte Array_MP_8812A_MUSB[] = { 33 | 0xFF, 34 | 0xF7, 35 | 0xEF, 36 | 0xDE, 37 | 0xFC, 38 | 0xFB, 39 | 0x10, 40 | 0x00, 41 | 0x00, 42 | 0x00, 43 | 0x00, 44 | 0x0F, 45 | 0xF3, 46 | 0xFF, 47 | 0xFF, 48 | 0xFF, 49 | 0xFF, 50 | 0xF7, 51 | 0x00, 52 | 0xFF, 53 | 0xFF, 54 | 0xF3, 55 | 0x0F, 56 | 0xFF, 57 | 0xF3, 58 | 0x00, 59 | 0x00, 60 | 0x00, 61 | 0x00, 62 | 0x00, 63 | 0x00, 64 | 0x00, 65 | 66 | }; 67 | 68 | u2Byte 69 | EFUSE_GetArrayLen_MP_8812A_MUSB(VOID) 70 | { 71 | return sizeof(Array_MP_8812A_MUSB)/sizeof(u1Byte); 72 | } 73 | 74 | VOID 75 | EFUSE_GetMaskArray_MP_8812A_MUSB( 76 | IN OUT pu1Byte Array 77 | ) 78 | { 79 | u2Byte len = EFUSE_GetArrayLen_MP_8812A_MUSB(), i = 0; 80 | 81 | for (i = 0; i < len; ++i) 82 | Array[i] = Array_MP_8812A_MUSB[i]; 83 | } 84 | BOOLEAN 85 | EFUSE_IsAddressMasked_MP_8812A_MUSB( 86 | IN u2Byte Offset 87 | ) 88 | { 89 | int r = Offset/16; 90 | int c = (Offset%16) / 2; 91 | int result = 0; 92 | 93 | if (c < 4) // Upper double word 94 | result = (Array_MP_8812A_MUSB[r] & (0x10 << c)); 95 | else 96 | result = (Array_MP_8812A_MUSB[r] & (0x01 << (c-4))); 97 | 98 | return (result > 0) ? 0 : 1; 99 | } 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /hal/efuse/rtl8812a/HalEfuseMask8812A_USB.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | 22 | 23 | /****************************************************************************** 24 | * MUSB.TXT 25 | ******************************************************************************/ 26 | 27 | 28 | u2Byte 29 | EFUSE_GetArrayLen_MP_8812A_MUSB(VOID); 30 | 31 | VOID 32 | EFUSE_GetMaskArray_MP_8812A_MUSB( 33 | IN OUT pu1Byte Array 34 | ); 35 | 36 | BOOLEAN 37 | EFUSE_IsAddressMasked_MP_8812A_MUSB( // TC: Test Chip, MP: MP Chip 38 | IN u2Byte Offset 39 | ); 40 | 41 | -------------------------------------------------------------------------------- /hal/efuse/rtl8812a/HalEfuseMask8821A_PCIE.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | //#include "Mp_Precomp.h" 22 | //#include "../odm_precomp.h" 23 | 24 | #include 25 | 26 | #include "HalEfuseMask8821A_PCIE.h" 27 | 28 | /****************************************************************************** 29 | * MPCIE.TXT 30 | ******************************************************************************/ 31 | 32 | u1Byte Array_MP_8821A_MPCIE[] = { 33 | 0xFF, 34 | 0xF3, 35 | 0xEF, 36 | 0x90, 37 | 0x00, 38 | 0x00, 39 | 0x00, 40 | 0x00, 41 | 0x00, 42 | 0x00, 43 | 0x00, 44 | 0x0F, 45 | 0xF1, 46 | 0xFF, 47 | 0xFF, 48 | 0xFF, 49 | 0xFF, 50 | 0xFF, 51 | 0xF1, 52 | 0x00, 53 | 0x80, 54 | 0x00, 55 | 0x00, 56 | 0x00, 57 | 0x00, 58 | 0x00, 59 | 0x00, 60 | 0x00, 61 | 0x00, 62 | 0x00, 63 | 0x00, 64 | 0x00, 65 | 66 | }; 67 | 68 | u2Byte 69 | EFUSE_GetArrayLen_MP_8821A_MPCIE(VOID) 70 | { 71 | return sizeof(Array_MP_8821A_MPCIE)/sizeof(u1Byte); 72 | } 73 | 74 | VOID 75 | EFUSE_GetMaskArray_MP_8821A_MPCIE( 76 | IN OUT pu1Byte Array 77 | ) 78 | { 79 | u2Byte len = EFUSE_GetArrayLen_MP_8821A_MPCIE(), i = 0; 80 | 81 | for (i = 0; i < len; ++i) 82 | Array[i] = Array_MP_8821A_MPCIE[i]; 83 | } 84 | BOOLEAN 85 | EFUSE_IsAddressMasked_MP_8821A_MPCIE( 86 | IN u2Byte Offset 87 | ) 88 | { 89 | int r = Offset/16; 90 | int c = (Offset%16) / 2; 91 | int result = 0; 92 | 93 | if (c < 4) // Upper double word 94 | result = (Array_MP_8821A_MPCIE[r] & (0x10 << c)); 95 | else 96 | result = (Array_MP_8821A_MPCIE[r] & (0x01 << (c-4))); 97 | 98 | return (result > 0) ? 0 : 1; 99 | } 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /hal/efuse/rtl8812a/HalEfuseMask8821A_PCIE.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | 22 | /****************************************************************************** 23 | * MPCIE.TXT 24 | ******************************************************************************/ 25 | 26 | 27 | u2Byte 28 | EFUSE_GetArrayLen_MP_8821A_MPCIE(VOID); 29 | 30 | VOID 31 | EFUSE_GetMaskArray_MP_8821A_MPCIE( 32 | IN OUT pu1Byte Array 33 | ); 34 | 35 | BOOLEAN 36 | EFUSE_IsAddressMasked_MP_8821A_MPCIE( // TC: Test Chip, MP: MP Chip 37 | IN u2Byte Offset 38 | ); 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /hal/efuse/rtl8812a/HalEfuseMask8821A_USB.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | //#include "Mp_Precomp.h" 22 | //#include "../odm_precomp.h" 23 | 24 | #include 25 | 26 | #include "HalEfuseMask8821A_USB.h" 27 | 28 | 29 | /****************************************************************************** 30 | * MUSB.TXT 31 | ******************************************************************************/ 32 | 33 | 34 | u1Byte Array_MP_8821A_MUSB[] = { 35 | 0xFF, 36 | 0xF3, 37 | 0xEF, 38 | 0x90, 39 | 0x00, 40 | 0x00, 41 | 0x00, 42 | 0x00, 43 | 0x00, 44 | 0x00, 45 | 0x00, 46 | 0x0F, 47 | 0xF1, 48 | 0x00, 49 | 0x00, 50 | 0x00, 51 | 0xBF, 52 | 0xFF, 53 | 0xFF, 54 | 0xFF, 55 | 0xB0, 56 | 0x00, 57 | 0x00, 58 | 0x00, 59 | 0x00, 60 | 0x00, 61 | 0x00, 62 | 0x00, 63 | 0x00, 64 | 0x00, 65 | 0x00, 66 | 0x00, 67 | 68 | }; 69 | 70 | u2Byte 71 | EFUSE_GetArrayLen_MP_8821A_MUSB(VOID) 72 | { 73 | return sizeof(Array_MP_8821A_MUSB)/sizeof(u1Byte); 74 | } 75 | 76 | VOID 77 | EFUSE_GetMaskArray_MP_8821A_MUSB( 78 | IN OUT pu1Byte Array 79 | ) 80 | { 81 | u2Byte len = EFUSE_GetArrayLen_MP_8821A_MUSB(), i = 0; 82 | 83 | for (i = 0; i < len; ++i) 84 | Array[i] = Array_MP_8821A_MUSB[i]; 85 | } 86 | BOOLEAN 87 | EFUSE_IsAddressMasked_MP_8821A_MUSB( 88 | IN u2Byte Offset 89 | ) 90 | { 91 | int r = Offset/16; 92 | int c = (Offset%16) / 2; 93 | int result = 0; 94 | 95 | if (c < 4) // Upper double word 96 | result = (Array_MP_8821A_MUSB[r] & (0x10 << c)); 97 | else 98 | result = (Array_MP_8821A_MUSB[r] & (0x01 << (c-4))); 99 | 100 | return (result > 0) ? 0 : 1; 101 | } 102 | 103 | -------------------------------------------------------------------------------- /hal/efuse/rtl8812a/HalEfuseMask8821A_USB.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | /****************************************************************************** 22 | * MUSB.TXT 23 | ******************************************************************************/ 24 | 25 | u2Byte 26 | EFUSE_GetArrayLen_MP_8821A_MUSB(VOID); 27 | 28 | VOID 29 | EFUSE_GetMaskArray_MP_8821A_MUSB( 30 | IN OUT pu1Byte Array 31 | ); 32 | 33 | BOOLEAN 34 | EFUSE_IsAddressMasked_MP_8821A_MUSB( // TC: Test Chip, MP: MP Chip 35 | IN u2Byte Offset 36 | ); 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /hal/hal_com_c2h.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2012 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 __COMMON_C2H_H__ 21 | #define __COMMON_C2H_H__ 22 | 23 | typedef enum _C2H_EVT { 24 | C2H_DBG = 0x00, 25 | C2H_LB = 0x01, 26 | C2H_TXBF = 0x02, 27 | C2H_CCX_TX_RPT = 0x03, 28 | C2H_BT_INFO = 0x09, 29 | C2H_BT_MP_INFO = 0x0B, 30 | C2H_RA_RPT = 0x0C, 31 | C2H_RA_PARA_RPT = 0x0E, 32 | C2H_FW_SWCHNL = 0x10, 33 | C2H_IQK_FINISH = 0x11, 34 | C2H_MAILBOX_STATUS = 0x15, 35 | C2H_P2P_RPORT = 0x16, 36 | C2H_EXTEND = 0xff, 37 | } C2H_EVT; 38 | 39 | typedef enum _EXTEND_C2H_EVT { 40 | EXTEND_C2H_DBG_PRINT = 0 41 | } EXTEND_C2H_EVT; 42 | 43 | #endif /* __COMMON_C2H_H__ */ 44 | 45 | -------------------------------------------------------------------------------- /hal/hal_dm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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_DM_H__ 21 | #define __HAL_DM_H__ 22 | 23 | void Init_ODM_ComInfo(_adapter *adapter); 24 | 25 | #endif /* __HAL_DM_H__ */ 26 | 27 | -------------------------------------------------------------------------------- /hal/phydm/halphyrf_ce.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __HAL_PHY_RF_H__ 22 | #define __HAL_PHY_RF_H__ 23 | 24 | /*#include "phydm_kfree.h"*/ 25 | #if (RTL8814A_SUPPORT == 1) 26 | #include "rtl8814a/phydm_iqk_8814a.h" 27 | #endif 28 | 29 | #if (RTL8822B_SUPPORT == 1) 30 | #include "rtl8822b/phydm_iqk_8822b.h" 31 | #endif 32 | #include "phydm_powertracking_ce.h" 33 | 34 | 35 | typedef enum _SPUR_CAL_METHOD { 36 | PLL_RESET, 37 | AFE_PHASE_SEL 38 | } SPUR_CAL_METHOD; 39 | 40 | typedef enum _PWRTRACK_CONTROL_METHOD { 41 | BBSWING, 42 | TXAGC, 43 | MIX_MODE, 44 | TSSI_MODE 45 | } PWRTRACK_METHOD; 46 | 47 | typedef VOID (*FuncSetPwr)(PVOID, PWRTRACK_METHOD, u1Byte, u1Byte); 48 | typedef VOID(*FuncIQK)(PVOID, u1Byte, u1Byte, u1Byte); 49 | typedef VOID (*FuncLCK)(PVOID); 50 | typedef VOID (*FuncSwing)(PVOID, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); 51 | typedef VOID (*FuncSwing8814only)(PVOID, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); 52 | 53 | typedef struct _TXPWRTRACK_CFG { 54 | u1Byte SwingTableSize_CCK; 55 | u1Byte SwingTableSize_OFDM; 56 | u1Byte Threshold_IQK; 57 | u1Byte Threshold_DPK; 58 | u1Byte AverageThermalNum; 59 | u1Byte RfPathCount; 60 | u4Byte ThermalRegAddr; 61 | FuncSetPwr ODM_TxPwrTrackSetPwr; 62 | FuncIQK DoIQK; 63 | FuncLCK PHY_LCCalibrate; 64 | FuncSwing GetDeltaSwingTable; 65 | FuncSwing8814only GetDeltaSwingTable8814only; 66 | } TXPWRTRACK_CFG, *PTXPWRTRACK_CFG; 67 | 68 | void ConfigureTxpowerTrack( 69 | IN PVOID pDM_VOID, 70 | OUT PTXPWRTRACK_CFG pConfig 71 | ); 72 | 73 | 74 | VOID 75 | ODM_ClearTxPowerTrackingState( 76 | IN PVOID pDM_VOID 77 | ); 78 | 79 | VOID 80 | ODM_TXPowerTrackingCallback_ThermalMeter( 81 | #if (DM_ODM_SUPPORT_TYPE & ODM_AP) 82 | IN PVOID pDM_VOID 83 | #else 84 | IN PADAPTER Adapter 85 | #endif 86 | ); 87 | 88 | 89 | 90 | #define ODM_TARGET_CHNL_NUM_2G_5G 59 91 | 92 | 93 | VOID 94 | ODM_ResetIQKResult( 95 | IN PVOID pDM_VOID 96 | ); 97 | u1Byte 98 | ODM_GetRightChnlPlaceforIQK( 99 | IN u1Byte chnl 100 | ); 101 | 102 | void phydm_rf_init( IN PVOID pDM_VOID); 103 | void phydm_rf_watchdog( IN PVOID pDM_VOID); 104 | 105 | #endif // #ifndef __HAL_PHY_RF_H__ 106 | 107 | -------------------------------------------------------------------------------- /hal/phydm/halphyrf_win.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __HAL_PHY_RF_H__ 22 | #define __HAL_PHY_RF_H__ 23 | 24 | #include "phydm_kfree.h" 25 | #if (RTL8814A_SUPPORT == 1) 26 | #include "rtl8814a/phydm_iqk_8814a.h" 27 | #endif 28 | 29 | #if (RTL8822B_SUPPORT == 1) 30 | #include "rtl8822b/phydm_iqk_8822b.h" 31 | #endif 32 | #include "phydm_powertracking_win.h" 33 | 34 | typedef enum _SPUR_CAL_METHOD { 35 | PLL_RESET, 36 | AFE_PHASE_SEL 37 | } SPUR_CAL_METHOD; 38 | 39 | typedef enum _PWRTRACK_CONTROL_METHOD { 40 | BBSWING, 41 | TXAGC, 42 | MIX_MODE, 43 | TSSI_MODE 44 | } PWRTRACK_METHOD; 45 | 46 | typedef VOID (*FuncSetPwr)(PDM_ODM_T, PWRTRACK_METHOD, u1Byte, u1Byte); 47 | typedef VOID(*FuncIQK)(PVOID, u1Byte, u1Byte, u1Byte); 48 | typedef VOID (*FuncLCK)(PDM_ODM_T); 49 | //refine by YuChen for 8814A 50 | typedef VOID (*FuncSwing)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); 51 | typedef VOID (*FuncSwing8814only)(PDM_ODM_T, pu1Byte*, pu1Byte*, pu1Byte*, pu1Byte*); 52 | 53 | typedef struct _TXPWRTRACK_CFG { 54 | u1Byte SwingTableSize_CCK; 55 | u1Byte SwingTableSize_OFDM; 56 | u1Byte Threshold_IQK; 57 | u1Byte Threshold_DPK; 58 | u1Byte AverageThermalNum; 59 | u1Byte RfPathCount; 60 | u4Byte ThermalRegAddr; 61 | FuncSetPwr ODM_TxPwrTrackSetPwr; 62 | FuncIQK DoIQK; 63 | FuncLCK PHY_LCCalibrate; 64 | FuncSwing GetDeltaSwingTable; 65 | FuncSwing8814only GetDeltaSwingTable8814only; 66 | } TXPWRTRACK_CFG, *PTXPWRTRACK_CFG; 67 | 68 | VOID 69 | ConfigureTxpowerTrack( 70 | IN PDM_ODM_T pDM_Odm, 71 | OUT PTXPWRTRACK_CFG pConfig 72 | ); 73 | 74 | 75 | VOID 76 | ODM_ClearTxPowerTrackingState( 77 | IN PDM_ODM_T pDM_Odm 78 | ); 79 | 80 | VOID 81 | ODM_TXPowerTrackingCallback_ThermalMeter( 82 | #if (DM_ODM_SUPPORT_TYPE & ODM_AP) 83 | IN PDM_ODM_T pDM_Odm 84 | #else 85 | IN PADAPTER Adapter 86 | #endif 87 | ); 88 | 89 | 90 | 91 | #define ODM_TARGET_CHNL_NUM_2G_5G 59 92 | 93 | 94 | VOID 95 | ODM_ResetIQKResult( 96 | IN PDM_ODM_T pDM_Odm 97 | ); 98 | u1Byte 99 | ODM_GetRightChnlPlaceforIQK( 100 | IN u1Byte chnl 101 | ); 102 | 103 | VOID odm_IQCalibrate(IN PDM_ODM_T pDM_Odm); 104 | VOID phydm_rf_init( IN PDM_ODM_T pDM_Odm); 105 | VOID phydm_rf_watchdog( IN PDM_ODM_T pDM_Odm); 106 | 107 | #endif // #ifndef __HAL_PHY_RF_H__ 108 | 109 | -------------------------------------------------------------------------------- /hal/phydm/mp_precomp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | -------------------------------------------------------------------------------- /hal/phydm/phydm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/phydm.h -------------------------------------------------------------------------------- /hal/phydm/phydm_antdect.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __PHYDMANTDECT_H__ 22 | #define __PHYDMANTDECT_H__ 23 | 24 | #define ANTDECT_VERSION "2.0" //2014.11.04 25 | 26 | #if(defined(CONFIG_ANT_DETECTION)) 27 | //#if( DM_ODM_SUPPORT_TYPE & (ODM_WIN |ODM_CE)) 28 | //ANT Test 29 | #define ANTTESTALL 0x00 /*Ant A or B will be Testing*/ 30 | #define ANTTESTA 0x01 /*Ant A will be Testing*/ 31 | #define ANTTESTB 0x02 /*Ant B will be testing*/ 32 | 33 | #define MAX_ANTENNA_DETECTION_CNT 10 34 | 35 | 36 | typedef struct _ANT_DETECTED_INFO{ 37 | BOOLEAN bAntDetected; 38 | u4Byte dBForAntA; 39 | u4Byte dBForAntB; 40 | u4Byte dBForAntO; 41 | }ANT_DETECTED_INFO, *PANT_DETECTED_INFO; 42 | 43 | 44 | typedef enum tag_SW_Antenna_Switch_Definition 45 | { 46 | Antenna_A = 1, 47 | Antenna_B = 2, 48 | Antenna_MAX = 3, 49 | }DM_SWAS_E; 50 | 51 | 52 | 53 | //1 [1. Single Tone Method] =================================================== 54 | 55 | 56 | 57 | VOID 58 | ODM_SingleDualAntennaDefaultSetting( 59 | IN PVOID pDM_VOID 60 | ); 61 | 62 | BOOLEAN 63 | ODM_SingleDualAntennaDetection( 64 | IN PVOID pDM_VOID, 65 | IN u1Byte mode 66 | ); 67 | 68 | //1 [2. Scan AP RSSI Method] ================================================== 69 | 70 | #define SwAntDivCheckBeforeLink ODM_SwAntDivCheckBeforeLink 71 | 72 | BOOLEAN 73 | ODM_SwAntDivCheckBeforeLink( 74 | IN PVOID pDM_VOID 75 | ); 76 | 77 | 78 | 79 | 80 | //1 [3. PSD Method] ========================================================== 81 | 82 | 83 | VOID 84 | ODM_SingleDualAntennaDetection_PSD( 85 | IN PVOID pDM_VOID 86 | ); 87 | 88 | #endif 89 | 90 | VOID 91 | odm_SwAntDetectInit( 92 | IN PVOID pDM_VOID 93 | ); 94 | 95 | 96 | #endif 97 | 98 | 99 | -------------------------------------------------------------------------------- /hal/phydm/phydm_beamforming.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/phydm_beamforming.c -------------------------------------------------------------------------------- /hal/phydm/phydm_cfotracking.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __PHYDMCFOTRACK_H__ 22 | #define __PHYDMCFOTRACK_H__ 23 | 24 | #define CFO_TRACKING_VERSION "1.2" /*2015.06.17*/ 25 | 26 | #define CFO_TH_XTAL_HIGH 20 // kHz 27 | #define CFO_TH_XTAL_LOW 10 // kHz 28 | #define CFO_TH_ATC 80 // kHz 29 | 30 | typedef struct _CFO_TRACKING_ 31 | { 32 | BOOLEAN bATCStatus; 33 | BOOLEAN largeCFOHit; 34 | BOOLEAN bAdjust; 35 | u1Byte CrystalCap; 36 | u1Byte DefXCap; 37 | int CFO_tail[2]; 38 | int CFO_ave_pre; 39 | u4Byte packetCount; 40 | u4Byte packetCount_pre; 41 | 42 | BOOLEAN bForceXtalCap; 43 | BOOLEAN bReset; 44 | }CFO_TRACKING, *PCFO_TRACKING; 45 | 46 | VOID 47 | ODM_CfoTrackingReset( 48 | IN PVOID pDM_VOID 49 | ); 50 | 51 | VOID 52 | ODM_CfoTrackingInit( 53 | IN PVOID pDM_VOID 54 | ); 55 | 56 | VOID 57 | ODM_CfoTracking( 58 | IN PVOID pDM_VOID 59 | ); 60 | 61 | VOID 62 | ODM_ParsingCFO( 63 | IN PVOID pDM_VOID, 64 | IN PVOID pPktinfo_VOID, 65 | IN s1Byte* pcfotail 66 | ); 67 | 68 | #endif -------------------------------------------------------------------------------- /hal/phydm/phydm_dynamicbbpowersaving.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __PHYDMDYNAMICBBPOWERSAVING_H__ 22 | #define __PHYDMDYNAMICBBPOWERSAVING_H__ 23 | 24 | #define DYNAMIC_BBPWRSAV_VERSION "1.0" 25 | 26 | typedef struct _Dynamic_Power_Saving_ 27 | { 28 | u1Byte PreCCAState; 29 | u1Byte CurCCAState; 30 | 31 | u1Byte PreRFState; 32 | u1Byte CurRFState; 33 | 34 | int Rssi_val_min; 35 | 36 | u1Byte initialize; 37 | u4Byte Reg874,RegC70,Reg85C,RegA74; 38 | 39 | }PS_T,*pPS_T; 40 | 41 | #define dm_RF_Saving ODM_RF_Saving 42 | 43 | void ODM_RF_Saving( 44 | IN PVOID pDM_VOID, 45 | IN u1Byte bForceInNormal 46 | ); 47 | 48 | VOID 49 | odm_DynamicBBPowerSavingInit( 50 | IN PVOID pDM_VOID 51 | ); 52 | 53 | VOID 54 | odm_DynamicBBPowerSaving( 55 | IN PVOID pDM_VOID 56 | ); 57 | 58 | VOID 59 | odm_1R_CCA( 60 | IN PVOID pDM_VOID 61 | ); 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /hal/phydm/phydm_dynamictxpower.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __PHYDMDYNAMICTXPOWER_H__ 22 | #define __PHYDMDYNAMICTXPOWER_H__ 23 | 24 | /*#define DYNAMIC_TXPWR_VERSION "1.0"*/ 25 | #define DYNAMIC_TXPWR_VERSION "1.1" /*2015.01.13*/ 26 | 27 | #define TX_POWER_NEAR_FIELD_THRESH_LVL2 74 28 | #define TX_POWER_NEAR_FIELD_THRESH_LVL1 67 29 | #define TX_POWER_NEAR_FIELD_THRESH_AP 0x3F 30 | #define TX_POWER_NEAR_FIELD_THRESH_8812 60 31 | 32 | #define TxHighPwrLevel_Normal 0 33 | #define TxHighPwrLevel_Level1 1 34 | #define TxHighPwrLevel_Level2 2 35 | #define TxHighPwrLevel_BT1 3 36 | #define TxHighPwrLevel_BT2 4 37 | #define TxHighPwrLevel_15 5 38 | #define TxHighPwrLevel_35 6 39 | #define TxHighPwrLevel_50 7 40 | #define TxHighPwrLevel_70 8 41 | #define TxHighPwrLevel_100 9 42 | 43 | VOID 44 | odm_DynamicTxPowerInit( 45 | IN PVOID pDM_VOID 46 | ); 47 | 48 | VOID 49 | odm_DynamicTxPowerRestorePowerIndex( 50 | IN PVOID pDM_VOID 51 | ); 52 | 53 | VOID 54 | odm_DynamicTxPowerNIC( 55 | IN PVOID pDM_VOID 56 | ); 57 | 58 | #if(DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) 59 | VOID 60 | odm_DynamicTxPowerSavePowerIndex( 61 | IN PVOID pDM_VOID 62 | ); 63 | 64 | VOID 65 | odm_DynamicTxPowerWritePowerIndex( 66 | IN PVOID pDM_VOID, 67 | IN u1Byte Value); 68 | 69 | VOID 70 | odm_DynamicTxPower_92C( 71 | IN PVOID pDM_VOID 72 | ); 73 | 74 | VOID 75 | odm_DynamicTxPower_92D( 76 | IN PVOID pDM_VOID 77 | ); 78 | 79 | VOID 80 | odm_DynamicTxPower_8821( 81 | IN PVOID pDM_VOID, 82 | IN pu1Byte pDesc, 83 | IN u1Byte macId 84 | ); 85 | 86 | #endif 87 | 88 | VOID 89 | odm_DynamicTxPower( 90 | IN PVOID pDM_VOID 91 | ); 92 | 93 | VOID 94 | odm_DynamicTxPowerAP( 95 | IN PVOID pDM_VOID 96 | ); 97 | 98 | #endif 99 | -------------------------------------------------------------------------------- /hal/phydm/phydm_edcaturbocheck.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __PHYDMEDCATURBOCHECK_H__ 22 | #define __PHYDMEDCATURBOCHECK_H__ 23 | 24 | /*#define EDCATURBO_VERSION "2.1"*/ 25 | #define EDCATURBO_VERSION "2.2" /*2015.01.13*/ 26 | 27 | typedef struct _EDCA_TURBO_ 28 | { 29 | BOOLEAN bCurrentTurboEDCA; 30 | BOOLEAN bIsCurRDLState; 31 | 32 | #if(DM_ODM_SUPPORT_TYPE == ODM_CE ) 33 | u4Byte prv_traffic_idx; // edca turbo 34 | #endif 35 | 36 | }EDCA_T,*pEDCA_T; 37 | 38 | #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN|ODM_CE)) 39 | static u4Byte edca_setting_UL[HT_IOT_PEER_MAX] = 40 | // UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU MARVELL 92U_AP SELF_AP(DownLink/Tx) 41 | { 0x5e4322, 0xa44f, 0x5e4322, 0x5ea32b, 0x5ea422, 0x5ea322, 0x3ea430, 0x5ea42b, 0x5ea44f, 0x5e4322, 0x5e4322}; 42 | 43 | 44 | static u4Byte edca_setting_DL[HT_IOT_PEER_MAX] = 45 | // UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU, MARVELL 92U_AP SELF_AP(UpLink/Rx) 46 | { 0xa44f, 0x5ea44f, 0x5e4322, 0x5ea42b, 0xa44f, 0xa630, 0x5ea630, 0x5ea42b, 0xa44f, 0xa42b, 0xa42b}; 47 | 48 | static u4Byte edca_setting_DL_GMode[HT_IOT_PEER_MAX] = 49 | // UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU, MARVELL 92U_AP SELF_AP 50 | { 0x4322, 0xa44f, 0x5e4322, 0xa42b, 0x5e4322, 0x4322, 0xa42b, 0x5ea42b, 0xa44f, 0x5e4322, 0x5ea42b}; 51 | 52 | #endif 53 | 54 | 55 | 56 | VOID 57 | odm_EdcaTurboCheck( 58 | IN PVOID pDM_VOID 59 | ); 60 | VOID 61 | ODM_EdcaTurboInit( 62 | IN PVOID pDM_VOID 63 | ); 64 | 65 | #if(DM_ODM_SUPPORT_TYPE==ODM_WIN) 66 | VOID 67 | odm_EdcaTurboCheckMP( 68 | IN PVOID pDM_VOID 69 | ); 70 | 71 | //check if edca turbo is disabled 72 | BOOLEAN 73 | odm_IsEdcaTurboDisable( 74 | IN PVOID pDM_VOID 75 | ); 76 | //choose edca paramter for special IOT case 77 | VOID 78 | ODM_EdcaParaSelByIot( 79 | IN PVOID pDM_VOID, 80 | OUT u4Byte *EDCA_BE_UL, 81 | OUT u4Byte *EDCA_BE_DL 82 | ); 83 | //check if it is UL or DL 84 | VOID 85 | odm_EdcaChooseTrafficIdx( 86 | IN PVOID pDM_VOID, 87 | IN u8Byte cur_tx_bytes, 88 | IN u8Byte cur_rx_bytes, 89 | IN BOOLEAN bBiasOnRx, 90 | OUT BOOLEAN *pbIsCurRDLState 91 | ); 92 | 93 | #elif (DM_ODM_SUPPORT_TYPE==ODM_CE) 94 | VOID 95 | odm_EdcaTurboCheckCE( 96 | IN PVOID pDM_VOID 97 | ); 98 | #endif 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /hal/phydm/phydm_noisemonitor.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __ODMNOISEMONITOR_H__ 21 | #define __ODMNOISEMONITOR_H__ 22 | 23 | #define ODM_MAX_CHANNEL_NUM 38//14+24 24 | struct noise_level 25 | { 26 | //u1Byte value_a, value_b; 27 | u1Byte value[MAX_RF_PATH]; 28 | //s1Byte sval_a, sval_b; 29 | s1Byte sval[MAX_RF_PATH]; 30 | 31 | //s4Byte noise_a=0, noise_b=0,sum_a=0, sum_b=0; 32 | //s4Byte noise[ODM_RF_PATH_MAX]; 33 | s4Byte sum[MAX_RF_PATH]; 34 | //u1Byte valid_cnt_a=0, valid_cnt_b=0, 35 | u1Byte valid[MAX_RF_PATH]; 36 | u1Byte valid_cnt[MAX_RF_PATH]; 37 | 38 | }; 39 | 40 | 41 | typedef struct _ODM_NOISE_MONITOR_ 42 | { 43 | s1Byte noise[MAX_RF_PATH]; 44 | s2Byte noise_all; 45 | }ODM_NOISE_MONITOR; 46 | 47 | s2Byte ODM_InbandNoise_Monitor(PVOID pDM_VOID,u8 bPauseDIG,u8 IGIValue,u32 max_time); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /hal/phydm/phydm_regdefine11ac.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __ODM_REGDEFINE11AC_H__ 22 | #define __ODM_REGDEFINE11AC_H__ 23 | 24 | //2 RF REG LIST 25 | 26 | 27 | 28 | //2 BB REG LIST 29 | //PAGE 8 30 | #define ODM_REG_CCK_RPT_FORMAT_11AC 0x804 31 | #define ODM_REG_BB_RX_PATH_11AC 0x808 32 | #define ODM_REG_BB_TX_PATH_11AC 0x80c 33 | #define ODM_REG_BB_ATC_11AC 0x860 34 | #define ODM_REG_EDCCA_POWER_CAL 0x8dc 35 | #define ODM_REG_DBG_RPT_11AC 0x8fc 36 | //PAGE 9 37 | #define ODM_REG_EDCCA_DOWN_OPT 0x900 38 | #define ODM_REG_ACBB_EDCCA_ENHANCE 0x944 39 | #define ODM_REG_OFDM_FA_RST_11AC 0x9A4 40 | #define ODM_REG_NHM_TIMER_11AC 0x990 41 | #define ODM_REG_CLM_TIME_PERIOD_11AC 0x990 42 | #define ODM_REG_NHM_TH9_TH10_11AC 0x994 43 | #define ODM_REG_CLM_11AC 0x994 44 | #define ODM_REG_NHM_TH3_TO_TH0_11AC 0x998 45 | #define ODM_REG_NHM_TH7_TO_TH4_11AC 0x99c 46 | #define ODM_REG_NHM_TH8_11AC 0x9a0 47 | #define ODM_REG_NHM_9E8_11AC 0x9e8 48 | #define ODM_REG_CSI_CONTENT_VALUE 0x9b4 49 | //PAGE A 50 | #define ODM_REG_CCK_CCA_11AC 0xA0A 51 | #define ODM_REG_CCK_FA_RST_11AC 0xA2C 52 | #define ODM_REG_CCK_FA_11AC 0xA5C 53 | //PAGE B 54 | #define ODM_REG_RST_RPT_11AC 0xB58 55 | //PAGE C 56 | #define ODM_REG_TRMUX_11AC 0xC08 57 | #define ODM_REG_IGI_A_11AC 0xC50 58 | //PAGE E 59 | #define ODM_REG_IGI_B_11AC 0xE50 60 | #define ODM_REG_TRMUX_11AC_B 0xE08 61 | //PAGE F 62 | #define ODM_REG_CCK_CCA_CNT_11AC 0xF08 63 | #define ODM_REG_OFDM_FA_11AC 0xF48 64 | #define ODM_REG_RPT_11AC 0xfa0 65 | #define ODM_REG_CLM_RESULT_11AC 0xfa4 66 | #define ODM_REG_NHM_CNT_11AC 0xfa8 67 | #define ODM_REG_NHM_DUR_READY_11AC 0xfb4 68 | 69 | #define ODM_REG_NHM_CNT7_TO_CNT4_11AC 0xfac 70 | #define ODM_REG_NHM_CNT11_TO_CNT8_11AC 0xfb0 71 | #define ODM_REG_OFDM_FA_TYPE2_11AC 0xFD0 72 | //PAGE 18 73 | #define ODM_REG_IGI_C_11AC 0x1850 74 | //PAGE 1A 75 | #define ODM_REG_IGI_D_11AC 0x1A50 76 | 77 | //2 MAC REG LIST 78 | #define ODM_REG_RESP_TX_11AC 0x6D8 79 | 80 | 81 | 82 | //DIG Related 83 | #define ODM_BIT_IGI_11AC 0xFFFFFFFF 84 | #define ODM_BIT_CCK_RPT_FORMAT_11AC BIT16 85 | #define ODM_BIT_BB_RX_PATH_11AC 0xF 86 | #define ODM_BIT_BB_TX_PATH_11AC 0xF 87 | #define ODM_BIT_BB_ATC_11AC BIT14 88 | 89 | #endif 90 | 91 | -------------------------------------------------------------------------------- /hal/phydm/phydm_rxhp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __PHYDMRXHP_H__ 21 | #define __PHYDMRXHP_H__ 22 | 23 | #define RXHP_VERSION "1.0" 24 | 25 | #if (DM_ODM_SUPPORT_TYPE == ODM_WIN) 26 | 27 | #define AFH_PSD 1 //0:normal PSD scan, 1: only do 20 pts PSD 28 | #define MODE_40M 0 //0:20M, 1:40M 29 | #define PSD_TH2 3 30 | #define PSD_CHMIN 20 // Minimum channel number for BT AFH 31 | #define SIR_STEP_SIZE 3 32 | #define Smooth_Size_1 5 33 | #define Smooth_TH_1 3 34 | #define Smooth_Size_2 10 35 | #define Smooth_TH_2 4 36 | #define Smooth_Size_3 20 37 | #define Smooth_TH_3 4 38 | #define Smooth_Step_Size 5 39 | #define Adaptive_SIR 1 40 | #define PSD_RESCAN 4 41 | #define PSD_SCAN_INTERVAL 700 //ms 42 | 43 | typedef struct _RX_High_Power_ 44 | { 45 | u1Byte RXHP_flag; 46 | u1Byte PSD_func_trigger; 47 | u1Byte PSD_bitmap_RXHP[80]; 48 | u1Byte Pre_IGI; 49 | u1Byte Cur_IGI; 50 | u1Byte Pre_pw_th; 51 | u1Byte Cur_pw_th; 52 | BOOLEAN First_time_enter; 53 | BOOLEAN RXHP_enable; 54 | u1Byte TP_Mode; 55 | RT_TIMER PSDTimer; 56 | #if USE_WORKITEM 57 | RT_WORK_ITEM PSDTimeWorkitem; 58 | #endif 59 | }RXHP_T, *pRXHP_T; 60 | 61 | #define dm_PSDMonitorCallback odm_PSDMonitorCallback 62 | VOID odm_PSDMonitorCallback(PRT_TIMER pTimer); 63 | 64 | VOID 65 | odm_PSDMonitorInit( 66 | IN PVOID pDM_VOID 67 | ); 68 | 69 | void odm_RXHPInit( 70 | IN PVOID pDM_VOID); 71 | 72 | void odm_RXHP( 73 | IN PVOID pDM_VOID); 74 | 75 | VOID 76 | odm_PSD_RXHPCallback( 77 | PRT_TIMER pTimer 78 | ); 79 | 80 | VOID 81 | ODM_PSDDbgControl( 82 | IN PADAPTER Adapter, 83 | IN u4Byte mode, 84 | IN u4Byte btRssi 85 | ); 86 | 87 | VOID 88 | odm_PSD_RXHPCallback( 89 | PRT_TIMER pTimer 90 | ); 91 | 92 | VOID 93 | odm_PSD_RXHPWorkitemCallback( 94 | IN PVOID pContext 95 | ); 96 | 97 | VOID 98 | odm_PSDMonitorWorkItemCallback( 99 | IN PVOID pContext 100 | ); 101 | 102 | #endif 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /hal/phydm/rtchnlplan.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtchnlplan.c -------------------------------------------------------------------------------- /hal/phydm/rtchnlplan.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtchnlplan.h -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/halhwimg8812a_fw.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | /*Image2HeaderVersion: 2.11*/ 22 | #if (RTL8812A_SUPPORT == 1) 23 | #ifndef __INC_MP_FW_HW_IMG_8812A_H 24 | #define __INC_MP_FW_HW_IMG_8812A_H 25 | 26 | 27 | /****************************************************************************** 28 | * FW_AP.TXT 29 | ******************************************************************************/ 30 | 31 | void 32 | ODM_ReadFirmware_MP_8812A_FW_AP( 33 | IN PDM_ODM_T pDM_Odm, 34 | OUT u1Byte *pFirmware, 35 | OUT u4Byte *pFirmwareSize 36 | ); 37 | 38 | /****************************************************************************** 39 | * FW_NIC.TXT 40 | ******************************************************************************/ 41 | 42 | void 43 | ODM_ReadFirmware_MP_8812A_FW_NIC( 44 | IN PDM_ODM_T pDM_Odm, 45 | OUT u1Byte *pFirmware, 46 | OUT u4Byte *pFirmwareSize 47 | ); 48 | 49 | /****************************************************************************** 50 | * FW_NIC_BT.TXT 51 | ******************************************************************************/ 52 | 53 | void 54 | ODM_ReadFirmware_MP_8812A_FW_NIC_BT( 55 | IN PDM_ODM_T pDM_Odm, 56 | OUT u1Byte *pFirmware, 57 | OUT u4Byte *pFirmwareSize 58 | ); 59 | 60 | /****************************************************************************** 61 | * FW_WoWLAN.TXT 62 | ******************************************************************************/ 63 | 64 | void 65 | ODM_ReadFirmware_MP_8812A_FW_WoWLAN( 66 | IN PDM_ODM_T pDM_Odm, 67 | OUT u1Byte *pFirmware, 68 | OUT u4Byte *pFirmwareSize 69 | ); 70 | 71 | #endif 72 | #endif /* end of HWIMG_SUPPORT*/ 73 | 74 | -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/halhwimg8812a_mac.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | /*Image2HeaderVersion: 2.14*/ 22 | #if (RTL8812A_SUPPORT == 1) 23 | #ifndef __INC_MP_MAC_HW_IMG_8812A_H 24 | #define __INC_MP_MAC_HW_IMG_8812A_H 25 | 26 | 27 | /****************************************************************************** 28 | * MAC_REG.TXT 29 | ******************************************************************************/ 30 | 31 | void 32 | ODM_ReadAndConfig_MP_8812A_MAC_REG(/* TC: Test Chip, MP: MP Chip*/ 33 | IN PDM_ODM_T pDM_Odm 34 | ); 35 | u4Byte ODM_GetVersion_MP_8812A_MAC_REG(void); 36 | 37 | #endif 38 | #endif /* end of HWIMG_SUPPORT*/ 39 | 40 | -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/halphyrf_8812a_ap.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtl8812a/halphyrf_8812a_ap.c -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/halphyrf_8812a_ce.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtl8812a/halphyrf_8812a_ce.c -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/halphyrf_8812a_ce.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __HAL_PHY_RF_8812A_H__ 22 | #define __HAL_PHY_RF_8812A_H__ 23 | 24 | /*--------------------------Define Parameters-------------------------------*/ 25 | #define IQK_DELAY_TIME_8812A 10 //ms 26 | #define IQK_DEFERRED_TIME_8812A 4 //sec 27 | #define index_mapping_NUM_8812A 15 28 | #define AVG_THERMAL_NUM_8812A 4 29 | #define RF_T_METER_8812A 0x42 30 | 31 | 32 | void ConfigureTxpowerTrack_8812A( 33 | PTXPWRTRACK_CFG pConfig 34 | ); 35 | 36 | VOID 37 | GetDeltaSwingTable_8812A( 38 | IN PVOID pDM_VOID, 39 | OUT pu1Byte *TemperatureUP_A, 40 | OUT pu1Byte *TemperatureDOWN_A, 41 | OUT pu1Byte *TemperatureUP_B, 42 | OUT pu1Byte *TemperatureDOWN_B 43 | ); 44 | 45 | void DoIQK_8812A( 46 | PVOID pDM_VOID, 47 | u1Byte DeltaThermalIndex, 48 | u1Byte ThermalValue, 49 | u1Byte Threshold 50 | ); 51 | 52 | VOID 53 | ODM_TxPwrTrackSetPwr8812A( 54 | PVOID pDM_VOID, 55 | PWRTRACK_METHOD Method, 56 | u1Byte RFPath, 57 | u1Byte ChannelMappedIndex 58 | ); 59 | 60 | //1 7. IQK 61 | 62 | void 63 | PHY_IQCalibrate_8812A( 64 | IN PADAPTER pAdapter, 65 | IN BOOLEAN bReCovery 66 | ); 67 | 68 | 69 | // 70 | // LC calibrate 71 | // 72 | void 73 | PHY_LCCalibrate_8812A( 74 | PVOID pDM_VOID 75 | ); 76 | 77 | // 78 | // AP calibrate 79 | // 80 | void 81 | PHY_APCalibrate_8812A( 82 | #if (DM_ODM_SUPPORT_TYPE & ODM_AP) 83 | IN PDM_ODM_T pDM_Odm, 84 | #else 85 | IN PADAPTER pAdapter, 86 | #endif 87 | IN s1Byte delta); 88 | void 89 | PHY_DigitalPredistortion_8812A( IN PADAPTER pAdapter); 90 | 91 | VOID 92 | PHY_DPCalibrate_8812A( 93 | IN PDM_ODM_T pDM_Odm 94 | ); 95 | VOID PHY_SetRFPathSwitch_8812A( 96 | #if (DM_ODM_SUPPORT_TYPE & ODM_AP) 97 | IN PDM_ODM_T pDM_Odm, 98 | #else 99 | IN PADAPTER pAdapter, 100 | #endif 101 | IN BOOLEAN bMain 102 | ); 103 | 104 | 105 | #endif // #ifndef __HAL_PHY_RF_8812A_H__ 106 | 107 | -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/halphyrf_8812a_win.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtl8812a/halphyrf_8812a_win.c -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/halphyrf_8812a_win.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __HAL_PHY_RF_8812A_H__ 22 | #define __HAL_PHY_RF_8812A_H__ 23 | 24 | /*--------------------------Define Parameters-------------------------------*/ 25 | #define IQK_DELAY_TIME_8812A 10 //ms 26 | #define IQK_DEFERRED_TIME_8812A 4 //sec 27 | #define index_mapping_NUM_8812A 15 28 | #define AVG_THERMAL_NUM_8812A 4 29 | #define RF_T_METER_8812A 0x42 30 | 31 | 32 | void ConfigureTxpowerTrack_8812A( 33 | PTXPWRTRACK_CFG pConfig 34 | ); 35 | 36 | VOID 37 | GetDeltaSwingTable_8812A( 38 | IN PDM_ODM_T pDM_Odm, 39 | OUT pu1Byte *TemperatureUP_A, 40 | OUT pu1Byte *TemperatureDOWN_A, 41 | OUT pu1Byte *TemperatureUP_B, 42 | OUT pu1Byte *TemperatureDOWN_B 43 | ); 44 | 45 | void DoIQK_8812A( 46 | PVOID pDM_VOID, 47 | u1Byte DeltaThermalIndex, 48 | u1Byte ThermalValue, 49 | u1Byte Threshold 50 | ); 51 | 52 | VOID 53 | ODM_TxPwrTrackSetPwr8812A( 54 | PDM_ODM_T pDM_Odm, 55 | PWRTRACK_METHOD Method, 56 | u1Byte RFPath, 57 | u1Byte ChannelMappedIndex 58 | ); 59 | 60 | //1 7. IQK 61 | 62 | void 63 | PHY_IQCalibrate_8812A( 64 | IN PADAPTER pAdapter, 65 | IN BOOLEAN bReCovery 66 | ); 67 | 68 | 69 | // 70 | // LC calibrate 71 | // 72 | void 73 | PHY_LCCalibrate_8812A( 74 | IN PDM_ODM_T pDM_Odm 75 | ); 76 | 77 | // 78 | // AP calibrate 79 | // 80 | void 81 | PHY_APCalibrate_8812A( 82 | #if (DM_ODM_SUPPORT_TYPE & ODM_AP) 83 | IN PDM_ODM_T pDM_Odm, 84 | #else 85 | IN PADAPTER pAdapter, 86 | #endif 87 | IN s1Byte delta); 88 | void 89 | PHY_DigitalPredistortion_8812A( IN PADAPTER pAdapter); 90 | 91 | VOID 92 | PHY_DPCalibrate_8812A( 93 | IN PDM_ODM_T pDM_Odm 94 | ); 95 | VOID PHY_SetRFPathSwitch_8812A( 96 | #if (DM_ODM_SUPPORT_TYPE & ODM_AP) 97 | IN PDM_ODM_T pDM_Odm, 98 | #else 99 | IN PADAPTER pAdapter, 100 | #endif 101 | IN BOOLEAN bMain 102 | ); 103 | 104 | 105 | #endif // #ifndef __HAL_PHY_RF_8812A_H__ 106 | 107 | -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/phydm_regconfig8812a.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __INC_ODM_REGCONFIG_H_8812A 21 | #define __INC_ODM_REGCONFIG_H_8812A 22 | 23 | #if (RTL8812A_SUPPORT == 1) 24 | 25 | void 26 | odm_ConfigRFReg_8812A( 27 | IN PDM_ODM_T pDM_Odm, 28 | IN u4Byte Addr, 29 | IN u4Byte Data, 30 | IN ODM_RF_RADIO_PATH_E RF_PATH, 31 | IN u4Byte RegAddr 32 | ); 33 | 34 | void 35 | odm_ConfigRF_RadioA_8812A( 36 | IN PDM_ODM_T pDM_Odm, 37 | IN u4Byte Addr, 38 | IN u4Byte Data 39 | ); 40 | 41 | void 42 | odm_ConfigRF_RadioB_8812A( 43 | IN PDM_ODM_T pDM_Odm, 44 | IN u4Byte Addr, 45 | IN u4Byte Data 46 | ); 47 | 48 | void 49 | odm_ConfigMAC_8812A( 50 | IN PDM_ODM_T pDM_Odm, 51 | IN u4Byte Addr, 52 | IN u1Byte Data 53 | ); 54 | 55 | void 56 | odm_ConfigBB_AGC_8812A( 57 | IN PDM_ODM_T pDM_Odm, 58 | IN u4Byte Addr, 59 | IN u4Byte Bitmask, 60 | IN u4Byte Data 61 | ); 62 | 63 | void 64 | odm_ConfigBB_PHY_REG_PG_8812A( 65 | IN PDM_ODM_T pDM_Odm, 66 | IN u4Byte Band, 67 | IN u4Byte RfPath, 68 | IN u4Byte TxNum, 69 | IN u4Byte Addr, 70 | IN u4Byte Bitmask, 71 | IN u4Byte Data 72 | ); 73 | 74 | void 75 | odm_ConfigBB_PHY_8812A( 76 | IN PDM_ODM_T pDM_Odm, 77 | IN u4Byte Addr, 78 | IN u4Byte Bitmask, 79 | IN u4Byte Data 80 | ); 81 | 82 | void 83 | odm_ConfigBB_TXPWR_LMT_8812A( 84 | IN PDM_ODM_T pDM_Odm, 85 | IN pu1Byte Regulation, 86 | IN pu1Byte Band, 87 | IN pu1Byte Bandwidth, 88 | IN pu1Byte RateSection, 89 | IN pu1Byte RfPath, 90 | IN pu1Byte Channel, 91 | IN pu1Byte PowerLimit 92 | ); 93 | 94 | #endif 95 | #endif // end of SUPPORT 96 | 97 | -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/phydm_rtl8812a.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __ODM_RTL8812A_H__ 22 | #define __ODM_RTL8812A_H__ 23 | #if(defined(CONFIG_PATH_DIVERSITY)) 24 | 25 | VOID 26 | ODM_PathStatistics_8812A( 27 | IN PDM_ODM_T pDM_Odm, 28 | IN u4Byte MacId, 29 | IN u4Byte RSSI_A, 30 | IN u4Byte RSSI_B 31 | ); 32 | 33 | VOID 34 | ODM_PathDiversityInit_8812A( IN PDM_ODM_T pDM_Odm); 35 | 36 | VOID 37 | ODM_PathDiversity_8812A( IN PDM_ODM_T pDM_Odm); 38 | 39 | VOID 40 | ODM_SetTxPathByTxInfo_8812A( 41 | IN PDM_ODM_T pDM_Odm, 42 | IN pu1Byte pDesc, 43 | IN u1Byte macId 44 | ); 45 | #endif 46 | #endif -------------------------------------------------------------------------------- /hal/phydm/rtl8812a/version_rtl8812a.h: -------------------------------------------------------------------------------- 1 | /*RTL8812A PHY Parameters*/ 2 | #define RELEASE_DATE_8812A 20150602 3 | #define COMMIT_BY_8192E "BB_Jeffery" 4 | #define RELEASE_VERSION_8812A 55 5 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/halhwimg8821a_bb.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | /*Image2HeaderVersion: 2.15*/ 22 | #if (RTL8821A_SUPPORT == 1) 23 | #ifndef __INC_MP_BB_HW_IMG_8821A_H 24 | #define __INC_MP_BB_HW_IMG_8821A_H 25 | 26 | 27 | /****************************************************************************** 28 | * AGC_TAB.TXT 29 | ******************************************************************************/ 30 | 31 | void 32 | ODM_ReadAndConfig_MP_8821A_AGC_TAB(/* TC: Test Chip, MP: MP Chip*/ 33 | IN PDM_ODM_T pDM_Odm 34 | ); 35 | u4Byte ODM_GetVersion_MP_8821A_AGC_TAB(void); 36 | 37 | /****************************************************************************** 38 | * PHY_REG.TXT 39 | ******************************************************************************/ 40 | 41 | void 42 | ODM_ReadAndConfig_MP_8821A_PHY_REG(/* TC: Test Chip, MP: MP Chip*/ 43 | IN PDM_ODM_T pDM_Odm 44 | ); 45 | u4Byte ODM_GetVersion_MP_8821A_PHY_REG(void); 46 | 47 | /****************************************************************************** 48 | * PHY_REG_PG.TXT 49 | ******************************************************************************/ 50 | 51 | void 52 | ODM_ReadAndConfig_MP_8821A_PHY_REG_PG(/* TC: Test Chip, MP: MP Chip*/ 53 | IN PDM_ODM_T pDM_Odm 54 | ); 55 | u4Byte ODM_GetVersion_MP_8821A_PHY_REG_PG(void); 56 | 57 | /****************************************************************************** 58 | * PHY_REG_PG_E202SA.TXT 59 | ******************************************************************************/ 60 | 61 | void 62 | ODM_ReadAndConfig_MP_8821A_PHY_REG_PG_E202SA(/* TC: Test Chip, MP: MP Chip*/ 63 | IN PDM_ODM_T pDM_Odm 64 | ); 65 | u4Byte ODM_GetVersion_MP_8821A_PHY_REG_PG_E202SA(void); 66 | 67 | #endif 68 | #endif /* end of HWIMG_SUPPORT*/ 69 | 70 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/halhwimg8821a_fw.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | /*Image2HeaderVersion: 2.11*/ 22 | #if (RTL8821A_SUPPORT == 1) 23 | #ifndef __INC_MP_FW_HW_IMG_8821A_H 24 | #define __INC_MP_FW_HW_IMG_8821A_H 25 | 26 | 27 | /****************************************************************************** 28 | * FW_AP.TXT 29 | ******************************************************************************/ 30 | 31 | void 32 | ODM_ReadFirmware_MP_8821A_FW_AP( 33 | IN PDM_ODM_T pDM_Odm, 34 | OUT u1Byte *pFirmware, 35 | OUT u4Byte *pFirmwareSize 36 | ); 37 | 38 | /****************************************************************************** 39 | * FW_NIC.TXT 40 | ******************************************************************************/ 41 | 42 | void 43 | ODM_ReadFirmware_MP_8821A_FW_NIC( 44 | IN PDM_ODM_T pDM_Odm, 45 | OUT u1Byte *pFirmware, 46 | OUT u4Byte *pFirmwareSize 47 | ); 48 | 49 | /****************************************************************************** 50 | * FW_NIC_BT.TXT 51 | ******************************************************************************/ 52 | 53 | void 54 | ODM_ReadFirmware_MP_8821A_FW_NIC_BT( 55 | IN PDM_ODM_T pDM_Odm, 56 | OUT u1Byte *pFirmware, 57 | OUT u4Byte *pFirmwareSize 58 | ); 59 | 60 | /****************************************************************************** 61 | * FW_WoWLAN.TXT 62 | ******************************************************************************/ 63 | 64 | void 65 | ODM_ReadFirmware_MP_8821A_FW_WoWLAN( 66 | IN PDM_ODM_T pDM_Odm, 67 | OUT u1Byte *pFirmware, 68 | OUT u4Byte *pFirmwareSize 69 | ); 70 | 71 | #endif 72 | #endif /* end of HWIMG_SUPPORT*/ 73 | 74 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/halhwimg8821a_mac.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | /*Image2HeaderVersion: 2.15*/ 22 | #if (RTL8821A_SUPPORT == 1) 23 | #ifndef __INC_MP_MAC_HW_IMG_8821A_H 24 | #define __INC_MP_MAC_HW_IMG_8821A_H 25 | 26 | 27 | /****************************************************************************** 28 | * MAC_REG.TXT 29 | ******************************************************************************/ 30 | 31 | void 32 | ODM_ReadAndConfig_MP_8821A_MAC_REG(/* TC: Test Chip, MP: MP Chip*/ 33 | IN PDM_ODM_T pDM_Odm 34 | ); 35 | u4Byte ODM_GetVersion_MP_8821A_MAC_REG(void); 36 | 37 | #endif 38 | #endif /* end of HWIMG_SUPPORT*/ 39 | 40 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/halphyrf_8821a_ce.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __HAL_PHY_RF_8821A_H__ 22 | #define __HAL_PHY_RF_8821A_H__ 23 | 24 | /*--------------------------Define Parameters-------------------------------*/ 25 | 26 | void ConfigureTxpowerTrack_8821A( 27 | PTXPWRTRACK_CFG pConfig 28 | ); 29 | 30 | VOID 31 | ODM_TxPwrTrackSetPwr8821A( 32 | IN PVOID pDM_VOID, 33 | PWRTRACK_METHOD Method, 34 | u1Byte RFPath, 35 | u1Byte ChannelMappedIndex 36 | ); 37 | 38 | VOID 39 | PHY_LCCalibrate_8821A( 40 | IN PVOID pDM_VOID 41 | ); 42 | 43 | VOID 44 | GetDeltaSwingTable_8821A( 45 | IN PVOID pDM_VOID, 46 | OUT pu1Byte *TemperatureUP_A, 47 | OUT pu1Byte *TemperatureDOWN_A, 48 | OUT pu1Byte *TemperatureUP_B, 49 | OUT pu1Byte *TemperatureDOWN_B 50 | ); 51 | #endif // #ifndef __HAL_PHY_RF_8821A_H__ 52 | 53 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/halphyrf_8821a_win.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtl8821a/halphyrf_8821a_win.c -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/halphyrf_8821a_win.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __HAL_PHY_RF_8821A_H__ 22 | #define __HAL_PHY_RF_8821A_H__ 23 | 24 | /*--------------------------Define Parameters-------------------------------*/ 25 | #define IQK_DELAY_TIME_8821A 10 //ms 26 | #define index_mapping_NUM_8821A 15 27 | #define AVG_THERMAL_NUM_8821A 4 28 | #define RF_T_METER_8821A 0x42 29 | 30 | 31 | void ConfigureTxpowerTrack_8821A( 32 | PTXPWRTRACK_CFG pConfig 33 | ); 34 | 35 | void DoIQK_8821A( 36 | PDM_ODM_T pDM_Odm, 37 | u1Byte DeltaThermalIndex, 38 | u1Byte ThermalValue, 39 | u1Byte Threshold 40 | ); 41 | 42 | VOID 43 | ODM_TxPwrTrackSetPwr8821A( 44 | PDM_ODM_T pDM_Odm, 45 | PWRTRACK_METHOD Method, 46 | u1Byte RFPath, 47 | u1Byte ChannelMappedIndex 48 | ); 49 | 50 | //1 7. IQK 51 | 52 | void 53 | PHY_IQCalibrate_8821A( 54 | IN PADAPTER pAdapter, 55 | IN BOOLEAN bReCovery 56 | ); 57 | 58 | VOID 59 | PHY_LCCalibrate_8821A( 60 | IN PDM_ODM_T pDM_Odm 61 | ); 62 | 63 | VOID 64 | GetDeltaSwingTable_8821A( 65 | IN PDM_ODM_T pDM_Odm, 66 | OUT pu1Byte *TemperatureUP_A, 67 | OUT pu1Byte *TemperatureDOWN_A, 68 | OUT pu1Byte *TemperatureUP_B, 69 | OUT pu1Byte *TemperatureDOWN_B 70 | ); 71 | #endif // #ifndef __HAL_PHY_RF_8821A_H__ 72 | 73 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_iqk_8821a_ap.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtl8821a/phydm_iqk_8821a_ap.c -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_iqk_8821a_ap.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __PHYDM_IQK_8821A_H__ 22 | #define __PHYDM_IQK_8821A_H__ 23 | 24 | /*--------------------------Define Parameters-------------------------------*/ 25 | 26 | 27 | /*---------------------------End Define Parameters-------------------------------*/ 28 | #if !(DM_ODM_SUPPORT_TYPE & ODM_AP) 29 | void 30 | DoIQK_8821A( 31 | PDM_ODM_T pDM_Odm, 32 | u1Byte DeltaThermalIndex, 33 | u1Byte ThermalValue, 34 | u1Byte Threshold 35 | ); 36 | void 37 | PHY_IQCalibrate_8821A( 38 | IN PDM_ODM_T pDM_Odm, 39 | IN BOOLEAN bReCovery 40 | ); 41 | #else 42 | VOID 43 | phy_IQCalibrate_8821A( 44 | IN PDM_ODM_T pDM_Odm 45 | ); 46 | #endif 47 | #endif // #ifndef __PHYDM_IQK_8821A_H__ 48 | 49 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_iqk_8821a_ce.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtl8821a/phydm_iqk_8821a_ce.c -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_iqk_8821a_ce.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __PHYDM_IQK_8821A_H__ 22 | #define __PHYDM_IQK_8821A_H__ 23 | 24 | /*--------------------------Define Parameters-------------------------------*/ 25 | 26 | 27 | /*---------------------------End Define Parameters-------------------------------*/ 28 | #if !(DM_ODM_SUPPORT_TYPE & ODM_AP) 29 | void 30 | DoIQK_8821A( 31 | PVOID pDM_VOID, 32 | u1Byte DeltaThermalIndex, 33 | u1Byte ThermalValue, 34 | u1Byte Threshold 35 | ); 36 | void 37 | PHY_IQCalibrate_8821A( 38 | IN PDM_ODM_T pDM_Odm, 39 | IN BOOLEAN bReCovery 40 | ); 41 | #else 42 | VOID 43 | phy_IQCalibrate_8821A( 44 | IN PDM_ODM_T pDM_Odm 45 | ); 46 | #endif 47 | #endif // #ifndef __PHYDM_IQK_8821A_H__ 48 | 49 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_iqk_8821a_win.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/hal/phydm/rtl8821a/phydm_iqk_8821a_win.c -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_iqk_8821a_win.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef __PHYDM_IQK_8821A_H__ 22 | #define __PHYDM_IQK_8821A_H__ 23 | 24 | /*--------------------------Define Parameters-------------------------------*/ 25 | 26 | 27 | /*---------------------------End Define Parameters-------------------------------*/ 28 | #if !(DM_ODM_SUPPORT_TYPE & ODM_AP) 29 | void 30 | DoIQK_8821A( 31 | PDM_ODM_T pDM_Odm, 32 | u1Byte DeltaThermalIndex, 33 | u1Byte ThermalValue, 34 | u1Byte Threshold 35 | ); 36 | void 37 | PHY_IQCalibrate_8821A( 38 | IN PDM_ODM_T pDM_Odm, 39 | IN BOOLEAN bReCovery 40 | ); 41 | #else 42 | VOID 43 | phy_IQCalibrate_8821A( 44 | IN PDM_ODM_T pDM_Odm 45 | ); 46 | #endif 47 | #endif // #ifndef __PHYDM_IQK_8821A_H__ 48 | 49 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_regconfig8821a.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __INC_ODM_REGCONFIG_H_8821A 21 | #define __INC_ODM_REGCONFIG_H_8821A 22 | 23 | #if (RTL8821A_SUPPORT == 1) 24 | 25 | void 26 | odm_ConfigRFReg_8821A( 27 | IN PDM_ODM_T pDM_Odm, 28 | IN u4Byte Addr, 29 | IN u4Byte Data, 30 | IN ODM_RF_RADIO_PATH_E RF_PATH, 31 | IN u4Byte RegAddr 32 | ); 33 | 34 | void 35 | odm_ConfigRF_RadioA_8821A( 36 | IN PDM_ODM_T pDM_Odm, 37 | IN u4Byte Addr, 38 | IN u4Byte Data 39 | ); 40 | 41 | void 42 | odm_ConfigRF_RadioB_8821A( 43 | IN PDM_ODM_T pDM_Odm, 44 | IN u4Byte Addr, 45 | IN u4Byte Data 46 | ); 47 | 48 | void 49 | odm_ConfigMAC_8821A( 50 | IN PDM_ODM_T pDM_Odm, 51 | IN u4Byte Addr, 52 | IN u1Byte Data 53 | ); 54 | 55 | void 56 | odm_ConfigBB_AGC_8821A( 57 | IN PDM_ODM_T pDM_Odm, 58 | IN u4Byte Addr, 59 | IN u4Byte Bitmask, 60 | IN u4Byte Data 61 | ); 62 | 63 | void 64 | odm_ConfigBB_PHY_REG_PG_8821A( 65 | IN PDM_ODM_T pDM_Odm, 66 | IN u4Byte Band, 67 | IN u4Byte RfPath, 68 | IN u4Byte TxNum, 69 | IN u4Byte Addr, 70 | IN u4Byte Bitmask, 71 | IN u4Byte Data 72 | ); 73 | 74 | void 75 | odm_ConfigBB_PHY_8821A( 76 | IN PDM_ODM_T pDM_Odm, 77 | IN u4Byte Addr, 78 | IN u4Byte Bitmask, 79 | IN u4Byte Data 80 | ); 81 | 82 | void 83 | odm_ConfigBB_TXPWR_LMT_8821A( 84 | IN PDM_ODM_T pDM_Odm, 85 | IN pu1Byte Regulation, 86 | IN pu1Byte Band, 87 | IN pu1Byte Bandwidth, 88 | IN pu1Byte RateSection, 89 | IN pu1Byte RfPath, 90 | IN pu1Byte Channel, 91 | IN pu1Byte PowerLimit 92 | ); 93 | 94 | #endif 95 | #endif // end of SUPPORT 96 | 97 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_rtl8821a.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | //============================================================ 22 | // include files 23 | //============================================================ 24 | 25 | #include "mp_precomp.h" 26 | 27 | #include "../phydm_precomp.h" 28 | 29 | #if (RTL8821A_SUPPORT == 1) 30 | 31 | VOID 32 | odm_DynamicTryStateAgg_8821A( 33 | IN PDM_ODM_T pDM_Odm 34 | ) 35 | { 36 | if ((pDM_Odm->SupportICType & ODM_RTL8821) && (pDM_Odm->SupportInterface == ODM_ITRF_USB)) { 37 | if(pDM_Odm->RSSI_Min > 25) 38 | ODM_Write1Byte(pDM_Odm, 0x4CF, 0x02); 39 | else if(pDM_Odm->RSSI_Min < 20) 40 | ODM_Write1Byte(pDM_Odm, 0x4CF, 0x00); 41 | } 42 | } 43 | 44 | VOID 45 | odm_DynamicPacketdetectionTH_8821A( 46 | IN PDM_ODM_T pDM_Odm 47 | ) 48 | { 49 | if (pDM_Odm->SupportICType & ODM_RTL8821) { 50 | if (pDM_Odm->RSSI_Min <= 25) { 51 | ODM_SetBBReg(pDM_Odm, rPwed_TH_Jaguar, bMaskDWord, 0x2aaaf1a8); 52 | ODM_SetBBReg(pDM_Odm, rBWIndication_Jaguar, BIT26, 1); 53 | } else if (pDM_Odm->RSSI_Min >= 30) { 54 | ODM_SetBBReg(pDM_Odm, rPwed_TH_Jaguar, bMaskDWord, 0x2aaaeec8); 55 | ODM_SetBBReg(pDM_Odm, rBWIndication_Jaguar, BIT26, 0); 56 | } 57 | } 58 | } 59 | 60 | VOID 61 | odm_HWSetting_8821A( 62 | IN PDM_ODM_T pDM_Odm 63 | ) 64 | { 65 | odm_DynamicTryStateAgg_8821A(pDM_Odm); 66 | odm_DynamicPacketdetectionTH_8821A(pDM_Odm); 67 | } 68 | 69 | #endif //#if (RTL8821A_SUPPORT == 1) 70 | 71 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/phydm_rtl8821a.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __ODM_RTL8821A_H__ 21 | #define __ODM_RTL8821A_H__ 22 | 23 | VOID 24 | odm_HWSetting_8821A( 25 | IN PDM_ODM_T pDM_Odm 26 | ); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /hal/phydm/rtl8821a/version_rtl8821a.h: -------------------------------------------------------------------------------- 1 | /*RTL8821A PHY Parameters*/ 2 | #define SVN_COMMIT_VERSION_8821A 62 3 | #define RELEASE_DATE_8821A 20150727 4 | #define COMMIT_BY_8821A "BB_YUCHEN" 5 | #define RELEASE_VERSION_8821A 56 6 | -------------------------------------------------------------------------------- /hal/phydm/txbf/haltxbf8192e.h: -------------------------------------------------------------------------------- 1 | #ifndef __HAL_TXBF_8192E_H__ 2 | #define __HAL_TXBF_8192E_H__ 3 | 4 | #if (BEAMFORMING_SUPPORT == 1) 5 | #if (RTL8192E_SUPPORT == 1) 6 | VOID 7 | HalTxbf8192E_setNDPArate( 8 | IN PVOID pDM_VOID, 9 | IN u1Byte BW, 10 | IN u1Byte Rate 11 | ); 12 | 13 | VOID 14 | HalTxbf8192E_Enter( 15 | IN PVOID pDM_VOID, 16 | IN u1Byte Idx 17 | ); 18 | 19 | 20 | VOID 21 | HalTxbf8192E_Leave( 22 | IN PVOID pDM_VOID, 23 | IN u1Byte Idx 24 | ); 25 | 26 | 27 | VOID 28 | HalTxbf8192E_Status( 29 | IN PVOID pDM_VOID, 30 | IN u1Byte Idx 31 | ); 32 | 33 | 34 | VOID 35 | HalTxbf8192E_FwTxBF( 36 | IN PVOID pDM_VOID, 37 | IN u1Byte Idx 38 | ); 39 | #else 40 | 41 | #define HalTxbf8192E_setNDPArate(pDM_VOID, BW, Rate) 42 | #define HalTxbf8192E_Enter(pDM_VOID, Idx) 43 | #define HalTxbf8192E_Leave(pDM_VOID, Idx) 44 | #define HalTxbf8192E_Status(pDM_VOID, Idx) 45 | #define HalTxbf8192E_FwTxBF(pDM_VOID, Idx) 46 | 47 | #endif 48 | 49 | #endif 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /hal/phydm/txbf/haltxbf8814a.h: -------------------------------------------------------------------------------- 1 | #ifndef __HAL_TXBF_8814A_H__ 2 | #define __HAL_TXBF_8814A_H__ 3 | 4 | #if (BEAMFORMING_SUPPORT == 1) 5 | #if (RTL8814A_SUPPORT == 1) 6 | VOID 7 | HalTxbf8814A_setNDPArate( 8 | IN PVOID pDM_VOID, 9 | IN u1Byte BW, 10 | IN u1Byte Rate 11 | ); 12 | 13 | u1Byte 14 | halTxbf8814A_GetNtx( 15 | IN PVOID pDM_VOID 16 | ); 17 | 18 | VOID 19 | HalTxbf8814A_Enter( 20 | IN PVOID pDM_VOID, 21 | IN u1Byte Idx 22 | ); 23 | 24 | 25 | VOID 26 | HalTxbf8814A_Leave( 27 | IN PVOID pDM_VOID, 28 | IN u1Byte Idx 29 | ); 30 | 31 | 32 | VOID 33 | HalTxbf8814A_Status( 34 | IN PVOID pDM_VOID, 35 | IN u1Byte Idx 36 | ); 37 | 38 | VOID 39 | HalTxbf8814A_ResetTxPath( 40 | IN PVOID pDM_VOID, 41 | IN u1Byte Idx 42 | ); 43 | 44 | 45 | VOID 46 | HalTxbf8814A_GetTxRate( 47 | IN PVOID pDM_VOID 48 | ); 49 | 50 | VOID 51 | HalTxbf8814A_FwTxBF( 52 | IN PVOID pDM_VOID, 53 | IN u1Byte Idx 54 | ); 55 | #else 56 | 57 | #define HalTxbf8814A_setNDPArate(pDM_VOID, BW, Rate) 58 | #define halTxbf8814A_GetNtx(pDM_VOID) 0 59 | #define HalTxbf8814A_Enter(pDM_VOID, Idx) 60 | #define HalTxbf8814A_Leave(pDM_VOID, Idx) 61 | #define HalTxbf8814A_Status(pDM_VOID, Idx) 62 | #define HalTxbf8814A_ResetTxPath(pDM_VOID, Idx) 63 | #define HalTxbf8814A_GetTxRate(pDM_VOID) 64 | #define HalTxbf8814A_FwTxBF(pDM_VOID, Idx) 65 | #endif 66 | 67 | #endif 68 | 69 | #endif 70 | 71 | -------------------------------------------------------------------------------- /hal/phydm/txbf/haltxbf8821b.h: -------------------------------------------------------------------------------- 1 | #ifndef __HAL_TXBF_8821B_H__ 2 | #define __HAL_TXBF_8821B_H__ 3 | #if (BEAMFORMING_SUPPORT == 1) 4 | #if (RTL8821B_SUPPORT == 1) 5 | VOID 6 | HalTxbf8821B_Enter( 7 | IN PVOID pDM_VOID, 8 | IN u1Byte Idx 9 | ); 10 | 11 | 12 | VOID 13 | HalTxbf8821B_Leave( 14 | IN PVOID pDM_VOID, 15 | IN u1Byte Idx 16 | ); 17 | 18 | 19 | VOID 20 | HalTxbf8821B_Status( 21 | IN PVOID pDM_VOID, 22 | IN u1Byte Idx 23 | ); 24 | 25 | 26 | VOID 27 | HalTxbf8821B_FwTxBF( 28 | IN PVOID pDM_VOID, 29 | IN u1Byte Idx 30 | ); 31 | 32 | #else 33 | #define HalTxbf8821B_Enter(pDM_VOID, Idx) 34 | #define HalTxbf8821B_Leave(pDM_VOID, Idx) 35 | #define HalTxbf8821B_Status(pDM_VOID, Idx) 36 | #define HalTxbf8821B_FwTxBF(pDM_VOID, Idx) 37 | #endif 38 | 39 | 40 | #endif 41 | 42 | #endif // #ifndef __HAL_TXBF_8821B_H__ 43 | 44 | -------------------------------------------------------------------------------- /hal/phydm/txbf/haltxbf8822b.h: -------------------------------------------------------------------------------- 1 | #ifndef __HAL_TXBF_8822B_H__ 2 | #define __HAL_TXBF_8822B_H__ 3 | #if (BEAMFORMING_SUPPORT == 1) 4 | #if (RTL8822B_SUPPORT == 1) 5 | 6 | VOID 7 | HalTxbf8822B_Init( 8 | IN PVOID pDM_VOID 9 | ); 10 | 11 | VOID 12 | HalTxbf8822B_Enter( 13 | IN PVOID pDM_VOID, 14 | IN u1Byte Idx 15 | ); 16 | 17 | 18 | VOID 19 | HalTxbf8822B_Leave( 20 | IN PVOID pDM_VOID, 21 | IN u1Byte Idx 22 | ); 23 | 24 | 25 | VOID 26 | HalTxbf8822B_Status( 27 | IN PVOID pDM_VOID, 28 | IN u1Byte Idx 29 | ); 30 | 31 | VOID 32 | HalTxbf8822B_ConfigGtab( 33 | IN PVOID pDM_VOID 34 | ); 35 | 36 | VOID 37 | HalTxbf8822B_FwTxBF( 38 | IN PVOID pDM_VOID, 39 | IN u1Byte Idx 40 | ); 41 | #else 42 | #define HalTxbf8822B_Init(pDM_VOID) 43 | #define HalTxbf8822B_Enter(pDM_VOID, Idx) 44 | #define HalTxbf8822B_Leave(pDM_VOID, Idx) 45 | #define HalTxbf8822B_Status(pDM_VOID, Idx) 46 | #define HalTxbf8822B_FwTxBF(pDM_VOID, Idx) 47 | #define HalTxbf8822B_ConfigGtab(pDM_VOID) 48 | #endif 49 | 50 | 51 | #endif 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /hal/phydm/txbf/haltxbfjaguar.h: -------------------------------------------------------------------------------- 1 | #ifndef __HAL_TXBF_JAGUAR_H__ 2 | #define __HAL_TXBF_JAGUAR_H__ 3 | 4 | #if (BEAMFORMING_SUPPORT == 1) 5 | #if ((RTL8812A_SUPPORT == 1) || (RTL8821A_SUPPORT == 1)) 6 | VOID 7 | HalTxbf8812A_setNDPArate( 8 | IN PVOID pDM_VOID, 9 | IN u1Byte BW, 10 | IN u1Byte Rate 11 | ); 12 | 13 | 14 | VOID 15 | HalTxbfJaguar_Enter( 16 | IN PVOID pDM_VOID, 17 | IN u1Byte Idx 18 | ); 19 | 20 | 21 | VOID 22 | HalTxbfJaguar_Leave( 23 | IN PVOID pDM_VOID, 24 | IN u1Byte Idx 25 | ); 26 | 27 | 28 | VOID 29 | HalTxbfJaguar_Status( 30 | IN PVOID pDM_VOID, 31 | IN u1Byte Idx 32 | ); 33 | 34 | 35 | VOID 36 | HalTxbfJaguar_FwTxBF( 37 | IN PVOID pDM_VOID, 38 | IN u1Byte Idx 39 | ); 40 | 41 | 42 | VOID 43 | HalTxbfJaguar_Patch( 44 | IN PVOID pDM_VOID, 45 | IN u1Byte Operation 46 | ); 47 | 48 | 49 | VOID 50 | HalTxbfJaguar_Clk_8812A( 51 | IN PVOID pDM_VOID 52 | ); 53 | 54 | #else 55 | 56 | #define HalTxbf8812A_setNDPArate(pDM_VOID, BW, Rate) 57 | #define HalTxbfJaguar_Enter(pDM_VOID, Idx) 58 | #define HalTxbfJaguar_Leave(pDM_VOID, Idx) 59 | #define HalTxbfJaguar_Status(pDM_VOID, Idx) 60 | #define HalTxbfJaguar_FwTxBF(pDM_VOID, Idx) 61 | #define HalTxbfJaguar_Patch(pDM_VOID, Operation) 62 | #define HalTxbfJaguar_Clk_8812A(pDM_VOID) 63 | #endif 64 | 65 | #endif 66 | #endif // #ifndef __HAL_TXBF_JAGUAR_H__ 67 | 68 | -------------------------------------------------------------------------------- /hal/rtl8812a/Hal8812PwrSeq.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #include "Hal8812PwrSeq.h" 22 | #include 23 | 24 | /* 25 | drivers should parse below arrays and do the corresponding actions 26 | */ 27 | //3 Power on Array 28 | WLAN_PWR_CFG rtl8812_power_on_flow[RTL8812_TRANS_CARDEMU_TO_ACT_STEPS+RTL8812_TRANS_END_STEPS]= 29 | { 30 | RTL8812_TRANS_CARDEMU_TO_ACT 31 | RTL8812_TRANS_END 32 | }; 33 | 34 | //3Radio off GPIO Array 35 | WLAN_PWR_CFG rtl8812_radio_off_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS+RTL8812_TRANS_END_STEPS]= 36 | { 37 | RTL8812_TRANS_ACT_TO_CARDEMU 38 | RTL8812_TRANS_END 39 | }; 40 | 41 | //3Card Disable Array 42 | WLAN_PWR_CFG rtl8812_card_disable_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS+RTL8812_TRANS_CARDEMU_TO_PDN_STEPS+RTL8812_TRANS_END_STEPS]= 43 | { 44 | RTL8812_TRANS_ACT_TO_CARDEMU 45 | RTL8812_TRANS_CARDEMU_TO_CARDDIS 46 | RTL8812_TRANS_END 47 | }; 48 | 49 | //3 Card Enable Array 50 | WLAN_PWR_CFG rtl8812_card_enable_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS+RTL8812_TRANS_CARDEMU_TO_PDN_STEPS+RTL8812_TRANS_END_STEPS]= 51 | { 52 | RTL8812_TRANS_CARDDIS_TO_CARDEMU 53 | RTL8812_TRANS_CARDEMU_TO_ACT 54 | RTL8812_TRANS_END 55 | }; 56 | 57 | //3Suspend Array 58 | WLAN_PWR_CFG rtl8812_suspend_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS+RTL8812_TRANS_CARDEMU_TO_SUS_STEPS+RTL8812_TRANS_END_STEPS]= 59 | { 60 | RTL8812_TRANS_ACT_TO_CARDEMU 61 | RTL8812_TRANS_CARDEMU_TO_SUS 62 | RTL8812_TRANS_END 63 | }; 64 | 65 | //3 Resume Array 66 | WLAN_PWR_CFG rtl8812_resume_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS+RTL8812_TRANS_CARDEMU_TO_SUS_STEPS+RTL8812_TRANS_END_STEPS]= 67 | { 68 | RTL8812_TRANS_SUS_TO_CARDEMU 69 | RTL8812_TRANS_CARDEMU_TO_ACT 70 | RTL8812_TRANS_END 71 | }; 72 | 73 | 74 | 75 | //3HWPDN Array 76 | WLAN_PWR_CFG rtl8812_hwpdn_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS+RTL8812_TRANS_CARDEMU_TO_PDN_STEPS+RTL8812_TRANS_END_STEPS]= 77 | { 78 | RTL8812_TRANS_ACT_TO_CARDEMU 79 | RTL8812_TRANS_CARDEMU_TO_PDN 80 | RTL8812_TRANS_END 81 | }; 82 | 83 | //3 Enter LPS 84 | WLAN_PWR_CFG rtl8812_enter_lps_flow[RTL8812_TRANS_ACT_TO_LPS_STEPS+RTL8812_TRANS_END_STEPS]= 85 | { 86 | //FW behavior 87 | RTL8812_TRANS_ACT_TO_LPS 88 | RTL8812_TRANS_END 89 | }; 90 | 91 | //3 Leave LPS 92 | WLAN_PWR_CFG rtl8812_leave_lps_flow[RTL8812_TRANS_LPS_TO_ACT_STEPS+RTL8812_TRANS_END_STEPS]= 93 | { 94 | //FW behavior 95 | RTL8812_TRANS_LPS_TO_ACT 96 | RTL8812_TRANS_END 97 | }; 98 | 99 | -------------------------------------------------------------------------------- /hal/rtl8812a/Hal8821APwrSeq.c: -------------------------------------------------------------------------------- 1 | 2 | /*++ 3 | Copyright (c) Realtek Semiconductor Corp. All rights reserved. 4 | 5 | Module Name: 6 | Hal8821PwrSeq.c 7 | 8 | Abstract: 9 | This file includes all kinds of Power Action event for RTL8821A and corresponding hardware configurtions which are released from HW SD. 10 | 11 | Major Change History: 12 | When Who What 13 | ---------- --------------- ------------------------------- 14 | 2011-08-08 Roger Create. 15 | 16 | --*/ 17 | 18 | 19 | #include "Hal8821APwrSeq.h" 20 | #include 21 | 22 | 23 | /* 24 | drivers should parse below arrays and do the corresponding actions 25 | */ 26 | //3 Power on Array 27 | WLAN_PWR_CFG rtl8821A_power_on_flow[RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS+RTL8821A_TRANS_END_STEPS]= 28 | { 29 | RTL8821A_TRANS_CARDEMU_TO_ACT 30 | RTL8821A_TRANS_END 31 | }; 32 | 33 | //3Radio off GPIO Array 34 | WLAN_PWR_CFG rtl8821A_radio_off_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8821A_TRANS_END_STEPS]= 35 | { 36 | RTL8821A_TRANS_ACT_TO_CARDEMU 37 | RTL8821A_TRANS_END 38 | }; 39 | 40 | //3Card Disable Array 41 | WLAN_PWR_CFG rtl8821A_card_disable_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS+RTL8821A_TRANS_END_STEPS]= 42 | { 43 | RTL8821A_TRANS_ACT_TO_CARDEMU 44 | RTL8821A_TRANS_CARDEMU_TO_CARDDIS 45 | RTL8821A_TRANS_END 46 | }; 47 | 48 | //3 Card Enable Array 49 | WLAN_PWR_CFG rtl8821A_card_enable_flow[RTL8821A_TRANS_CARDDIS_TO_CARDEMU_STEPS+RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS+RTL8821A_TRANS_END_STEPS]= 50 | { 51 | RTL8821A_TRANS_CARDDIS_TO_CARDEMU 52 | RTL8821A_TRANS_CARDEMU_TO_ACT 53 | RTL8821A_TRANS_END 54 | }; 55 | 56 | //3Suspend Array 57 | WLAN_PWR_CFG rtl8821A_suspend_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS+RTL8821A_TRANS_END_STEPS]= 58 | { 59 | RTL8821A_TRANS_ACT_TO_CARDEMU 60 | RTL8821A_TRANS_CARDEMU_TO_SUS 61 | RTL8821A_TRANS_END 62 | }; 63 | 64 | //3 Resume Array 65 | WLAN_PWR_CFG rtl8821A_resume_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS+RTL8821A_TRANS_END_STEPS]= 66 | { 67 | RTL8821A_TRANS_SUS_TO_CARDEMU 68 | RTL8821A_TRANS_CARDEMU_TO_ACT 69 | RTL8821A_TRANS_END 70 | }; 71 | 72 | 73 | 74 | //3HWPDN Array 75 | WLAN_PWR_CFG rtl8821A_hwpdn_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS+RTL8821A_TRANS_END_STEPS]= 76 | { 77 | RTL8821A_TRANS_ACT_TO_CARDEMU 78 | RTL8821A_TRANS_CARDEMU_TO_PDN 79 | RTL8821A_TRANS_END 80 | }; 81 | 82 | //3 Enter LPS 83 | WLAN_PWR_CFG rtl8821A_enter_lps_flow[RTL8821A_TRANS_ACT_TO_LPS_STEPS+RTL8821A_TRANS_END_STEPS]= 84 | { 85 | //FW behavior 86 | RTL8821A_TRANS_ACT_TO_LPS 87 | RTL8821A_TRANS_END 88 | }; 89 | 90 | //3 Leave LPS 91 | WLAN_PWR_CFG rtl8821A_leave_lps_flow[RTL8821A_TRANS_LPS_TO_ACT_STEPS+RTL8821A_TRANS_END_STEPS]= 92 | { 93 | //FW behavior 94 | RTL8821A_TRANS_LPS_TO_ACT 95 | RTL8821A_TRANS_END 96 | }; 97 | -------------------------------------------------------------------------------- /hal/rtl8812a/rtl8812a_rxdesc.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | #define _RTL8812A_RXDESC_C_ 21 | 22 | //#include 23 | #include 24 | 25 | void rtl8812_query_rx_desc_status(union recv_frame *precvframe, u8 *pdesc) 26 | { 27 | struct rx_pkt_attrib *pattrib = &precvframe->u.hdr.attrib; 28 | 29 | _rtw_memset(pattrib, 0, sizeof(struct rx_pkt_attrib)); 30 | 31 | //Offset 0 32 | pattrib->pkt_len = (u16)GET_RX_STATUS_DESC_PKT_LEN_8812(pdesc);//(le32_to_cpu(pdesc->rxdw0)&0x00003fff) 33 | pattrib->crc_err = (u8)GET_RX_STATUS_DESC_CRC32_8812(pdesc);//((le32_to_cpu(pdesc->rxdw0) >> 14) & 0x1); 34 | pattrib->icv_err = (u8)GET_RX_STATUS_DESC_ICV_8812(pdesc);//((le32_to_cpu(pdesc->rxdw0) >> 15) & 0x1); 35 | pattrib->drvinfo_sz = (u8)GET_RX_STATUS_DESC_DRVINFO_SIZE_8812(pdesc) * 8;//((le32_to_cpu(pdesc->rxdw0) >> 16) & 0xf) * 8;//uint 2^3 = 8 bytes 36 | pattrib->encrypt = (u8)GET_RX_STATUS_DESC_SECURITY_8812(pdesc);//((le32_to_cpu(pdesc->rxdw0) >> 20) & 0x7); 37 | pattrib->qos = (u8)GET_RX_STATUS_DESC_QOS_8812(pdesc);//(( le32_to_cpu( pdesc->rxdw0 ) >> 23) & 0x1);// Qos data, wireless lan header length is 26 38 | pattrib->shift_sz = (u8)GET_RX_STATUS_DESC_SHIFT_8812(pdesc);//((le32_to_cpu(pdesc->rxdw0) >> 24) & 0x3); 39 | pattrib->physt = (u8)GET_RX_STATUS_DESC_PHY_STATUS_8812(pdesc);//((le32_to_cpu(pdesc->rxdw0) >> 26) & 0x1); 40 | pattrib->bdecrypted = !GET_RX_STATUS_DESC_SWDEC_8812(pdesc);//(le32_to_cpu(pdesc->rxdw0) & BIT(27))? 0:1; 41 | 42 | //Offset 4 43 | pattrib->priority = (u8)GET_RX_STATUS_DESC_TID_8812(pdesc);//((le32_to_cpu(pdesc->rxdw1) >> 8) & 0xf); 44 | pattrib->mdata = (u8)GET_RX_STATUS_DESC_MORE_DATA_8812(pdesc);//((le32_to_cpu(pdesc->rxdw1) >> 26) & 0x1); 45 | pattrib->mfrag = (u8)GET_RX_STATUS_DESC_MORE_FRAG_8812(pdesc);//((le32_to_cpu(pdesc->rxdw1) >> 27) & 0x1);//more fragment bit 46 | 47 | //Offset 8 48 | pattrib->seq_num = (u16)GET_RX_STATUS_DESC_SEQ_8812(pdesc);//(le32_to_cpu(pdesc->rxdw2) & 0x00000fff); 49 | pattrib->frag_num = (u8)GET_RX_STATUS_DESC_FRAG_8812(pdesc);//((le32_to_cpu(pdesc->rxdw2) >> 12) & 0xf);//fragmentation number 50 | 51 | if (GET_RX_STATUS_DESC_RPT_SEL_8812(pdesc)) 52 | pattrib->pkt_rpt_type = C2H_PACKET; 53 | else 54 | pattrib->pkt_rpt_type = NORMAL_RX; 55 | 56 | //Offset 12 57 | pattrib->data_rate=(u8)GET_RX_STATUS_DESC_RX_RATE_8812(pdesc);//((le32_to_cpu(pdesc->rxdw3))&0x7f); 58 | 59 | /* Offset 16 */ 60 | pattrib->sgi = (u8)GET_RX_STATUS_DESC_SPLCP_8812(pdesc); 61 | pattrib->ldpc = (u8)GET_RX_STATUS_DESC_LDPC_8812(pdesc); 62 | pattrib->stbc = (u8)GET_RX_STATUS_DESC_STBC_8812(pdesc); 63 | pattrib->bw = (u8)GET_RX_STATUS_DESC_BW_8812(pdesc); 64 | 65 | /* Offset 20 */ 66 | /* pattrib->tsfl=(u8)GET_RX_STATUS_DESC_TSFL_8812(pdesc); */ 67 | } 68 | 69 | -------------------------------------------------------------------------------- /hal/rtl8812a/usb/rtl8812au_recv.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | #define _RTL8812AU_RECV_C_ 21 | 22 | //#include 23 | #include 24 | 25 | int rtl8812au_init_recv_priv(_adapter *padapter) 26 | { 27 | return usb_init_recv_priv(padapter, INTERRUPT_MSG_FORMAT_LEN); 28 | } 29 | 30 | void rtl8812au_free_recv_priv(_adapter *padapter) 31 | { 32 | usb_free_recv_priv(padapter, INTERRUPT_MSG_FORMAT_LEN); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /ifcfg-wlan0: -------------------------------------------------------------------------------- 1 | #DHCP client 2 | DEVICE=wlan0 3 | BOOTPROTO=dhcp 4 | ONBOOT=yes -------------------------------------------------------------------------------- /include/Hal8821APwrSeq.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/astsam/rtl8812au/86fe67d40ea7f4f60a8f85adb166f7cc0c6b7169/include/Hal8821APwrSeq.h -------------------------------------------------------------------------------- /include/circ_buf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __CIRC_BUF_H_ 21 | #define __CIRC_BUF_H_ 1 22 | 23 | #define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1)) 24 | 25 | #define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size)) 26 | 27 | #endif //_CIRC_BUF_H_ 28 | 29 | -------------------------------------------------------------------------------- /include/cmd_osdep.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __CMD_OSDEP_H_ 21 | #define __CMD_OSDEP_H_ 22 | 23 | 24 | extern sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv); 25 | extern sint _rtw_init_evt_priv(struct evt_priv *pevtpriv); 26 | extern void _rtw_free_evt_priv (struct evt_priv *pevtpriv); 27 | extern void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv); 28 | extern sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj); 29 | extern struct cmd_obj *_rtw_dequeue_cmd(_queue *queue); 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /include/custom_gpio.h: -------------------------------------------------------------------------------- 1 | #ifndef __CUSTOM_GPIO_H__ 2 | #define __CUSTOM_GPIO_H___ 3 | 4 | #include 5 | #include 6 | 7 | #ifdef PLATFORM_OS_XP 8 | #include 9 | #endif 10 | 11 | #ifdef PLATFORM_OS_CE 12 | #include 13 | #endif 14 | 15 | #ifdef PLATFORM_LINUX 16 | #include 17 | #endif 18 | 19 | typedef enum cust_gpio_modes { 20 | WLAN_PWDN_ON, 21 | WLAN_PWDN_OFF, 22 | WLAN_POWER_ON, 23 | WLAN_POWER_OFF, 24 | WLAN_BT_PWDN_ON, 25 | WLAN_BT_PWDN_OFF 26 | } cust_gpio_modes_t; 27 | 28 | extern int rtw_wifi_gpio_init(void); 29 | extern int rtw_wifi_gpio_deinit(void); 30 | extern void rtw_wifi_gpio_wlan_ctrl(int onoff); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/drv_types_ce.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __DRV_TYPES_CE_H__ 21 | #define __DRV_TYPES_CE_H__ 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | #define MAX_ACTIVE_REG_PATH 256 29 | 30 | #define MAX_MCAST_LIST_NUM 32 31 | 32 | 33 | 34 | //for ioctl 35 | #define MAKE_DRIVER_VERSION(_MainVer,_MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer) 36 | 37 | #define NIC_HEADER_SIZE 14 //!< can be moved to typedef.h 38 | #define NIC_MAX_PACKET_SIZE 1514 //!< can be moved to typedef.h 39 | #define NIC_MAX_SEND_PACKETS 10 // max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h 40 | #define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0,001) //!< can be moved to typedef.h 41 | #define NIC_MAX_PACKET_SIZE 1514 //!< can be moved to typedef.h 42 | 43 | typedef struct _MP_REG_ENTRY 44 | { 45 | 46 | NDIS_STRING RegName; // variable name text 47 | BOOLEAN bRequired; // 1 -> required, 0 -> optional 48 | 49 | u8 Type; // NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString 50 | uint FieldOffset; // offset to MP_ADAPTER field 51 | uint FieldSize; // size (in bytes) of the field 52 | 53 | #ifdef UNDER_AMD64 54 | u64 Default; 55 | #else 56 | u32 Default; // default value to use 57 | #endif 58 | 59 | u32 Min; // minimum value allowed 60 | u32 Max; // maximum value allowed 61 | } MP_REG_ENTRY, *PMP_REG_ENTRY; 62 | 63 | #ifdef CONFIG_USB_HCI 64 | typedef struct _USB_EXTENSION { 65 | LPCUSB_FUNCS _lpUsbFuncs; 66 | USB_HANDLE _hDevice; 67 | PVOID pAdapter; 68 | 69 | #if 0 70 | USB_ENDPOINT_DESCRIPTOR _endpACLIn; 71 | USB_ENDPOINT_DESCRIPTOR _endpACLOutHigh; 72 | USB_ENDPOINT_DESCRIPTOR _endpACLOutNormal; 73 | 74 | USB_PIPE pPipeIn; 75 | USB_PIPE pPipeOutNormal; 76 | USB_PIPE pPipeOutHigh; 77 | #endif 78 | 79 | } USB_EXTENSION, *PUSB_EXTENSION; 80 | #endif 81 | 82 | 83 | typedef struct _OCTET_STRING{ 84 | u8 *Octet; 85 | u16 Length; 86 | } OCTET_STRING, *POCTET_STRING; 87 | 88 | 89 | 90 | 91 | 92 | #endif 93 | 94 | -------------------------------------------------------------------------------- /include/drv_types_gspi.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2012 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 __DRV_TYPES_GSPI_H__ 21 | #define __DRV_TYPES_GSPI_H__ 22 | 23 | // SPI Header Files 24 | #ifdef PLATFORM_LINUX 25 | #include 26 | #include 27 | #include 28 | //#include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #endif 37 | 38 | 39 | typedef struct gspi_data 40 | { 41 | u8 func_number; 42 | 43 | u8 tx_block_mode; 44 | u8 rx_block_mode; 45 | u32 block_transfer_len; 46 | 47 | #ifdef PLATFORM_LINUX 48 | struct spi_device *func; 49 | 50 | struct workqueue_struct *priv_wq; 51 | struct delayed_work irq_work; 52 | #endif 53 | } GSPI_DATA, *PGSPI_DATA; 54 | 55 | #endif // #ifndef __DRV_TYPES_GSPI_H__ 56 | 57 | -------------------------------------------------------------------------------- /include/drv_types_linux.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __DRV_TYPES_LINUX_H__ 21 | #define __DRV_TYPES_LINUX_H__ 22 | 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /include/drv_types_sdio.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __DRV_TYPES_SDIO_H__ 21 | #define __DRV_TYPES_SDIO_H__ 22 | 23 | // SDIO Header Files 24 | #ifdef PLATFORM_LINUX 25 | #include 26 | #include 27 | 28 | #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN) || defined(CONFIG_PLATFORM_SPRD) 29 | #include 30 | #include 31 | #endif 32 | 33 | #ifdef CONFIG_PLATFORM_SPRD 34 | #include 35 | #include 36 | #endif // CONFIG_PLATFORM_SPRD 37 | #endif 38 | 39 | #ifdef PLATFORM_OS_XP 40 | #include 41 | #include 42 | #endif 43 | 44 | #ifdef PLATFORM_OS_CE 45 | #include 46 | #endif 47 | 48 | 49 | typedef struct sdio_data 50 | { 51 | u8 func_number; 52 | 53 | u8 tx_block_mode; 54 | u8 rx_block_mode; 55 | u32 block_transfer_len; 56 | 57 | #ifdef PLATFORM_LINUX 58 | struct sdio_func *func; 59 | _thread_hdl_ sys_sdio_irq_thd; 60 | #endif 61 | 62 | #ifdef PLATFORM_OS_XP 63 | PDEVICE_OBJECT pphysdevobj; 64 | PDEVICE_OBJECT pfuncdevobj; 65 | PDEVICE_OBJECT pnextdevobj; 66 | SDBUS_INTERFACE_STANDARD sdbusinft; 67 | u8 nextdevstacksz; 68 | #endif 69 | 70 | #ifdef PLATFORM_OS_CE 71 | SD_DEVICE_HANDLE hDevice; 72 | SD_CARD_RCA sd_rca; 73 | SD_CARD_INTERFACE card_intf; 74 | BOOLEAN enableIsarWithStatus; 75 | WCHAR active_path[MAX_ACTIVE_REG_PATH]; 76 | SD_HOST_BLOCK_CAPABILITY sd_host_blk_cap; 77 | #endif 78 | } SDIO_DATA, *PSDIO_DATA; 79 | 80 | #endif 81 | 82 | -------------------------------------------------------------------------------- /include/drv_types_xp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __DRV_TYPES_XP_H__ 21 | #define __DRV_TYPES_XP_H__ 22 | 23 | #include 24 | #include 25 | 26 | 27 | 28 | #define MAX_MCAST_LIST_NUM 32 29 | 30 | 31 | 32 | //for ioctl 33 | #define MAKE_DRIVER_VERSION(_MainVer,_MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer) 34 | 35 | #define NIC_HEADER_SIZE 14 //!< can be moved to typedef.h 36 | #define NIC_MAX_PACKET_SIZE 1514 //!< can be moved to typedef.h 37 | #define NIC_MAX_SEND_PACKETS 10 // max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h 38 | #define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0,001) //!< can be moved to typedef.h 39 | #define NIC_MAX_PACKET_SIZE 1514 //!< can be moved to typedef.h 40 | 41 | 42 | #undef ON_VISTA 43 | //added by Jackson 44 | #ifndef ON_VISTA 45 | // 46 | // Bus driver versions 47 | // 48 | 49 | #define SDBUS_DRIVER_VERSION_1 0x100 50 | #define SDBUS_DRIVER_VERSION_2 0x200 51 | 52 | #define SDP_FUNCTION_TYPE 4 53 | #define SDP_BUS_DRIVER_VERSION 5 54 | #define SDP_BUS_WIDTH 6 55 | #define SDP_BUS_CLOCK 7 56 | #define SDP_BUS_INTERFACE_CONTROL 8 57 | #define SDP_HOST_BLOCK_LENGTH 9 58 | #define SDP_FUNCTION_BLOCK_LENGTH 10 59 | #define SDP_FN0_BLOCK_LENGTH 11 60 | #define SDP_FUNCTION_INT_ENABLE 12 61 | #endif 62 | 63 | 64 | typedef struct _MP_REG_ENTRY 65 | { 66 | 67 | NDIS_STRING RegName; // variable name text 68 | BOOLEAN bRequired; // 1 -> required, 0 -> optional 69 | 70 | u8 Type; // NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString 71 | uint FieldOffset; // offset to MP_ADAPTER field 72 | uint FieldSize; // size (in bytes) of the field 73 | 74 | #ifdef UNDER_AMD64 75 | u64 Default; 76 | #else 77 | u32 Default; // default value to use 78 | #endif 79 | 80 | u32 Min; // minimum value allowed 81 | u32 Max; // maximum value allowed 82 | } MP_REG_ENTRY, *PMP_REG_ENTRY; 83 | 84 | 85 | typedef struct _OCTET_STRING{ 86 | u8 *Octet; 87 | u16 Length; 88 | } OCTET_STRING, *POCTET_STRING; 89 | 90 | 91 | 92 | 93 | 94 | #endif 95 | 96 | -------------------------------------------------------------------------------- /include/ethernet.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | /*! \file */ 21 | #ifndef __INC_ETHERNET_H 22 | #define __INC_ETHERNET_H 23 | 24 | #define ETHERNET_ADDRESS_LENGTH 6 //!< Ethernet Address Length 25 | #define ETHERNET_HEADER_SIZE 14 //!< Ethernet Header Length 26 | #define LLC_HEADER_SIZE 6 //!< LLC Header Length 27 | #define TYPE_LENGTH_FIELD_SIZE 2 //!< Type/Length Size 28 | #define MINIMUM_ETHERNET_PACKET_SIZE 60 //!< Minimum Ethernet Packet Size 29 | #define MAXIMUM_ETHERNET_PACKET_SIZE 1514 //!< Maximum Ethernet Packet Size 30 | 31 | #define RT_ETH_IS_MULTICAST(_pAddr) ((((UCHAR *)(_pAddr))[0]&0x01)!=0) //!< Is Multicast Address? 32 | #define RT_ETH_IS_BROADCAST(_pAddr) ( \ 33 | ((UCHAR *)(_pAddr))[0]==0xff && \ 34 | ((UCHAR *)(_pAddr))[1]==0xff && \ 35 | ((UCHAR *)(_pAddr))[2]==0xff && \ 36 | ((UCHAR *)(_pAddr))[3]==0xff && \ 37 | ((UCHAR *)(_pAddr))[4]==0xff && \ 38 | ((UCHAR *)(_pAddr))[5]==0xff ) //!< Is Broadcast Address? 39 | 40 | 41 | #endif // #ifndef __INC_ETHERNET_H 42 | 43 | -------------------------------------------------------------------------------- /include/gspi_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2012 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 __GSPI_HAL_H__ 21 | #define __GSPI_HAL_H__ 22 | 23 | 24 | void spi_int_dpc(PADAPTER padapter, u32 sdio_hisr); 25 | u8 rtw_set_hal_ops(_adapter *padapter); 26 | 27 | #ifdef CONFIG_RTL8188E 28 | void rtl8188es_set_hal_ops(PADAPTER padapter); 29 | #endif 30 | 31 | #ifdef CONFIG_RTL8723B 32 | void rtl8723bs_set_hal_ops(PADAPTER padapter); 33 | #endif 34 | 35 | #endif //__GSPI_HAL_H__ 36 | 37 | -------------------------------------------------------------------------------- /include/gspi_ops_linux.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __SDIO_OPS_LINUX_H__ 21 | #define __SDIO_OPS_LINUX_H__ 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /include/gspi_osintf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __SDIO_OSINTF_H__ 21 | #define __SDIO_OSINTF_H__ 22 | 23 | 24 | #ifdef PLATFORM_OS_CE 25 | extern NDIS_STATUS ce_sd_get_dev_hdl(PADAPTER padapter); 26 | SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, PADAPTER padapter); 27 | extern void sd_setup_irs(PADAPTER padapter); 28 | #endif 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /include/h2clbk.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | 22 | #define _H2CLBK_H_ 23 | 24 | 25 | void _lbk_cmd(PADAPTER Adapter); 26 | 27 | void _lbk_rsp(PADAPTER Adapter); 28 | 29 | void _lbk_evt(IN PADAPTER Adapter); 30 | 31 | void h2c_event_callback(unsigned char *dev, unsigned char *pbuf); 32 | 33 | -------------------------------------------------------------------------------- /include/hal_gspi.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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_GSPI_H_ 21 | #define __HAL_GSPI_H_ 22 | 23 | #define ffaddr2deviceId(pdvobj, addr) (pdvobj->Queue2Pipe[addr]) 24 | 25 | u8 rtw_hal_gspi_max_txoqt_free_space(_adapter *padapter); 26 | u8 rtw_hal_gspi_query_tx_freepage(_adapter *padapter, u8 PageIdx, u8 RequiredPageNum); 27 | void rtw_hal_gspi_update_tx_freepage(_adapter *padapter, u8 PageIdx, u8 RequiredPageNum); 28 | void rtw_hal_set_gspi_tx_max_length(PADAPTER padapter, u8 numHQ, u8 numNQ, u8 numLQ, u8 numPubQ); 29 | u32 rtw_hal_get_gspi_tx_max_length(PADAPTER padapter, u8 queue_idx); 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /include/hal_ic_cfg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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_IC_CFG_H__ 21 | #define __HAL_IC_CFG_H__ 22 | 23 | #define RTL8188E_SUPPORT 0 24 | #define RTL8812A_SUPPORT 0 25 | #define RTL8821A_SUPPORT 0 26 | #define RTL8723B_SUPPORT 0 27 | #define RTL8192E_SUPPORT 0 28 | #define RTL8814A_SUPPORT 0 29 | #define RTL8195A_SUPPORT 0 30 | #define RTL8703B_SUPPORT 0 31 | #define RTL8188F_SUPPORT 0 32 | #define RTL8822B_SUPPORT 0 33 | #define RTL8821B_SUPPORT 0 34 | 35 | /*#if (RTL8188E_SUPPORT==1)*/ 36 | #define RATE_ADAPTIVE_SUPPORT 0 37 | #define POWER_TRAINING_ACTIVE 0 38 | 39 | #ifdef CONFIG_MULTIDRV 40 | #endif 41 | 42 | #ifdef CONFIG_RTL8188E 43 | #undef RTL8188E_SUPPORT 44 | #undef RATE_ADAPTIVE_SUPPORT 45 | #undef POWER_TRAINING_ACTIVE 46 | 47 | #define RTL8188E_SUPPORT 1 48 | #define RATE_ADAPTIVE_SUPPORT 1 49 | #define POWER_TRAINING_ACTIVE 1 50 | #endif 51 | 52 | #ifdef CONFIG_RTL8812A 53 | #undef RTL8812A_SUPPORT 54 | #define RTL8812A_SUPPORT 1 55 | #endif 56 | 57 | #ifdef CONFIG_RTL8821A 58 | #undef RTL8821A_SUPPORT 59 | #define RTL8821A_SUPPORT 1 60 | #endif 61 | 62 | #ifdef CONFIG_RTL8192E 63 | #undef RTL8192E_SUPPORT 64 | #define RTL8192E_SUPPORT 1 65 | #endif 66 | 67 | #ifdef CONFIG_RTL8723B 68 | #undef RTL8723B_SUPPORT 69 | #define RTL8723B_SUPPORT 1 70 | #endif 71 | 72 | #ifdef CONFIG_RTL8814A 73 | #undef RTL8814A_SUPPORT 74 | #define RTL8814A_SUPPORT 1 75 | #endif 76 | 77 | #ifdef CONFIG_RTL8703B 78 | #undef RTL8703B_SUPPORT 79 | #define RTL8703B_SUPPORT 1 80 | #endif 81 | 82 | #ifdef CONFIG_RTL8188F 83 | #undef RTL8188F_SUPPORT 84 | #define RTL8188F_SUPPORT 1 85 | #endif 86 | 87 | #ifdef CONFIG_RTL8822B 88 | #undef RTL8822B_SUPPORT 89 | #define RTL8822B_SUPPORT 1 90 | #endif 91 | 92 | #endif /*__HAL_IC_CFG_H__*/ 93 | 94 | -------------------------------------------------------------------------------- /include/hal_phy_reg.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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_PHY_REG_H__ 21 | #define __HAL_PHY_REG_H__ 22 | 23 | //for PutRFRegsetting & GetRFRegSetting BitMask 24 | //#if (RTL92SE_FPGA_VERIFY == 1) 25 | //#define bRFRegOffsetMask 0xfff 26 | //#else 27 | #define bRFRegOffsetMask 0xfffff 28 | //#endif 29 | 30 | #endif //__HAL_PHY_REG_H__ 31 | 32 | -------------------------------------------------------------------------------- /include/hal_sdio.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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_H_ 21 | #define __HAL_SDIO_H_ 22 | 23 | #define ffaddr2deviceId(pdvobj, addr) (pdvobj->Queue2Pipe[addr]) 24 | 25 | u8 rtw_hal_sdio_max_txoqt_free_space(_adapter *padapter); 26 | u8 rtw_hal_sdio_query_tx_freepage(_adapter *padapter, u8 PageIdx, u8 RequiredPageNum); 27 | void rtw_hal_sdio_update_tx_freepage(_adapter *padapter, u8 PageIdx, u8 RequiredPageNum); 28 | void rtw_hal_set_sdio_tx_max_length(PADAPTER padapter, u8 numHQ, u8 numNQ, u8 numLQ, u8 numPubQ); 29 | u32 rtw_hal_get_sdio_tx_max_length(PADAPTER padapter, u8 queue_idx); 30 | 31 | #endif //__RTW_LED_H_ 32 | 33 | -------------------------------------------------------------------------------- /include/linux/wireless.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | #ifndef _LINUX_WIRELESS_H 22 | #define _LINUX_WIRELESS_H 23 | 24 | /***************************** INCLUDES *****************************/ 25 | 26 | #if 0 27 | #include /* for __u* and __s* typedefs */ 28 | #include /* for "struct sockaddr" et al */ 29 | #include /* for IFNAMSIZ and co... */ 30 | #else 31 | #define __user 32 | //typedef uint16_t __u16; 33 | #include /* for "struct sockaddr" et al */ 34 | #include /* for IFNAMSIZ and co... */ 35 | #endif 36 | 37 | /****************************** TYPES ******************************/ 38 | #ifdef CONFIG_COMPAT 39 | struct compat_iw_point { 40 | compat_caddr_t pointer; 41 | __u16 length; 42 | __u16 flags; 43 | }; 44 | #endif 45 | /* --------------------------- SUBTYPES --------------------------- */ 46 | /* 47 | * For all data larger than 16 octets, we need to use a 48 | * pointer to memory allocated in user space. 49 | */ 50 | struct iw_point 51 | { 52 | void __user *pointer; /* Pointer to the data (in user space) */ 53 | __u16 length; /* number of fields or size in bytes */ 54 | __u16 flags; /* Optional params */ 55 | }; 56 | 57 | 58 | /* ------------------------ IOCTL REQUEST ------------------------ */ 59 | /* 60 | * This structure defines the payload of an ioctl, and is used 61 | * below. 62 | * 63 | * Note that this structure should fit on the memory footprint 64 | * of iwreq (which is the same as ifreq), which mean a max size of 65 | * 16 octets = 128 bits. Warning, pointers might be 64 bits wide... 66 | * You should check this when increasing the structures defined 67 | * above in this file... 68 | */ 69 | union iwreq_data 70 | { 71 | /* Config - generic */ 72 | char name[IFNAMSIZ]; 73 | /* Name : used to verify the presence of wireless extensions. 74 | * Name of the protocol/provider... */ 75 | 76 | struct iw_point data; /* Other large parameters */ 77 | }; 78 | 79 | /* 80 | * The structure to exchange data for ioctl. 81 | * This structure is the same as 'struct ifreq', but (re)defined for 82 | * convenience... 83 | * Do I need to remind you about structure size (32 octets) ? 84 | */ 85 | struct iwreq 86 | { 87 | union 88 | { 89 | char ifrn_name[IFNAMSIZ]; /* if name, e.g. "eth0" */ 90 | } ifr_ifrn; 91 | 92 | /* Data part (defined just above) */ 93 | union iwreq_data u; 94 | }; 95 | 96 | #endif /* _LINUX_WIRELESS_H */ 97 | 98 | -------------------------------------------------------------------------------- /include/mlme_osdep.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __MLME_OSDEP_H_ 21 | #define __MLME_OSDEP_H_ 22 | 23 | 24 | #if defined(PLATFORM_WINDOWS) || defined(PLATFORM_MPIXEL) 25 | extern int time_after(u32 now, u32 old); 26 | #endif 27 | 28 | extern void rtw_init_mlme_timer(_adapter *padapter); 29 | extern void rtw_os_indicate_disconnect( _adapter *adapter ); 30 | extern void rtw_os_indicate_connect( _adapter *adapter ); 31 | void rtw_os_indicate_scan_done( _adapter *padapter, bool aborted); 32 | extern void rtw_report_sec_ie(_adapter *adapter,u8 authmode,u8 *sec_ie); 33 | 34 | void rtw_reset_securitypriv( _adapter *adapter ); 35 | 36 | #endif //_MLME_OSDEP_H_ 37 | 38 | -------------------------------------------------------------------------------- /include/nic_spec.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | 22 | #ifndef __NIC_SPEC_H__ 23 | #define __NIC_SPEC_H__ 24 | 25 | #include 26 | 27 | #define RTL8711_MCTRL_ (0x20000) 28 | #define RTL8711_UART_ (0x30000) 29 | #define RTL8711_TIMER_ (0x40000) 30 | #define RTL8711_FINT_ (0x50000) 31 | #define RTL8711_HINT_ (0x50000) 32 | #define RTL8711_GPIO_ (0x60000) 33 | #define RTL8711_WLANCTRL_ (0x200000) 34 | #define RTL8711_WLANFF_ (0xe00000) 35 | #define RTL8711_HCICTRL_ (0x600000) 36 | #define RTL8711_SYSCFG_ (0x620000) 37 | #define RTL8711_SYSCTRL_ (0x620000) 38 | #define RTL8711_MCCTRL_ (0x020000) 39 | 40 | 41 | #include 42 | 43 | #include 44 | 45 | 46 | #endif // __RTL8711_SPEC_H__ 47 | 48 | -------------------------------------------------------------------------------- /include/pci_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __PCI_HAL_H__ 21 | #define __PCI_HAL_H__ 22 | 23 | #ifdef CONFIG_RTL8188E 24 | void rtl8188ee_set_hal_ops(_adapter *padapter); 25 | #endif 26 | 27 | #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) 28 | void rtl8812ae_set_hal_ops(_adapter *padapter); 29 | #endif 30 | 31 | #if defined(CONFIG_RTL8192E) 32 | void rtl8192ee_set_hal_ops(_adapter *padapter); 33 | #endif 34 | 35 | #ifdef CONFIG_RTL8723B 36 | void rtl8723be_set_hal_ops(_adapter *padapter); 37 | #endif 38 | 39 | #ifdef CONFIG_RTL8814A 40 | void rtl8814ae_set_hal_ops(_adapter *padapter); 41 | #endif 42 | 43 | u8 rtw_set_hal_ops(_adapter *padapter); 44 | 45 | #endif //__PCIE_HAL_H__ 46 | 47 | -------------------------------------------------------------------------------- /include/pci_ops.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __PCI_OPS_H_ 21 | #define __PCI_OPS_H_ 22 | 23 | 24 | #ifdef CONFIG_RTL8188E 25 | u32 rtl8188ee_init_desc_ring(_adapter *padapter); 26 | u32 rtl8188ee_free_desc_ring(_adapter *padapter); 27 | void rtl8188ee_reset_desc_ring(_adapter *padapter); 28 | int rtl8188ee_interrupt(PADAPTER Adapter); 29 | void rtl8188ee_xmit_tasklet(void *priv); 30 | void rtl8188ee_recv_tasklet(void *priv); 31 | void rtl8188ee_prepare_bcn_tasklet(void *priv); 32 | void rtl8188ee_set_intf_ops(struct _io_ops *pops); 33 | #endif 34 | 35 | #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) 36 | u32 rtl8812ae_init_desc_ring(_adapter *padapter); 37 | u32 rtl8812ae_free_desc_ring(_adapter *padapter); 38 | void rtl8812ae_reset_desc_ring(_adapter *padapter); 39 | int rtl8812ae_interrupt(PADAPTER Adapter); 40 | void rtl8812ae_xmit_tasklet(void *priv); 41 | void rtl8812ae_recv_tasklet(void *priv); 42 | void rtl8812ae_prepare_bcn_tasklet(void *priv); 43 | void rtl8812ae_set_intf_ops(struct _io_ops *pops); 44 | #endif 45 | 46 | #ifdef CONFIG_RTL8192E 47 | u32 rtl8192ee_init_desc_ring(_adapter *padapter); 48 | u32 rtl8192ee_free_desc_ring(_adapter *padapter); 49 | void rtl8192ee_reset_desc_ring(_adapter *padapter); 50 | void rtl8192ee_recv_tasklet(void *priv); 51 | void rtl8192ee_prepare_bcn_tasklet(void *priv); 52 | int rtl8192ee_interrupt(PADAPTER Adapter); 53 | void rtl8192ee_set_intf_ops(struct _io_ops *pops); 54 | #endif 55 | 56 | #ifdef CONFIG_RTL8723B 57 | u32 rtl8723be_init_desc_ring(_adapter *padapter); 58 | u32 rtl8723be_free_desc_ring(_adapter *padapter); 59 | void rtl8723be_reset_desc_ring(_adapter *padapter); 60 | int rtl8723be_interrupt(PADAPTER Adapter); 61 | void rtl8723be_recv_tasklet(void *priv); 62 | void rtl8723be_prepare_bcn_tasklet(void *priv); 63 | void rtl8723be_set_intf_ops(struct _io_ops *pops); 64 | #endif 65 | 66 | #ifdef CONFIG_RTL8814A 67 | u32 rtl8814ae_init_desc_ring(_adapter *padapter); 68 | u32 rtl8814ae_free_desc_ring(_adapter *padapter); 69 | void rtl8814ae_reset_desc_ring(_adapter *padapter); 70 | int rtl8814ae_interrupt(PADAPTER Adapter); 71 | void rtl8814ae_xmit_tasklet(void *priv); 72 | void rtl8814ae_recv_tasklet(void *priv); 73 | void rtl8814ae_prepare_bcn_tasklet(void *priv); 74 | void rtl8814ae_set_intf_ops(struct _io_ops *pops); 75 | #endif 76 | 77 | #endif 78 | 79 | -------------------------------------------------------------------------------- /include/pci_osintf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __PCI_OSINTF_H 21 | #define __PCI_OSINTF_H 22 | 23 | 24 | void rtw_pci_disable_aspm(_adapter *padapter); 25 | void rtw_pci_enable_aspm(_adapter *padapter); 26 | void PlatformClearPciPMEStatus(PADAPTER Adapter); 27 | #ifdef CONFIG_64BIT_DMA 28 | u8 PlatformEnableDMA64(PADAPTER Adapter); 29 | #endif 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /include/recv_osdep.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RECV_OSDEP_H_ 21 | #define __RECV_OSDEP_H_ 22 | 23 | 24 | extern sint _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter); 25 | extern void _rtw_free_recv_priv (struct recv_priv *precvpriv); 26 | 27 | 28 | extern s32 rtw_recv_entry(union recv_frame *precv_frame); 29 | extern int rtw_recv_indicatepkt(_adapter *adapter, union recv_frame *precv_frame); 30 | extern void rtw_recv_returnpacket(IN _nic_hdl cnxt, IN _pkt *preturnedpkt); 31 | 32 | extern int rtw_recv_monitor(_adapter *padapter, union recv_frame *precv_frame); 33 | 34 | extern void rtw_hostapd_mlme_rx(_adapter *padapter, union recv_frame *precv_frame); 35 | 36 | struct sta_info; 37 | extern void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, u8 bgroup); 38 | 39 | 40 | int rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter); 41 | void rtw_free_recv_priv (struct recv_priv *precvpriv); 42 | 43 | 44 | int rtw_os_recv_resource_init(struct recv_priv *precvpriv, _adapter *padapter); 45 | int rtw_os_recv_resource_alloc(_adapter *padapter, union recv_frame *precvframe); 46 | void rtw_os_recv_resource_free(struct recv_priv *precvpriv); 47 | 48 | 49 | int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8 *pdata, _pkt *pskb); 50 | void rtw_os_free_recvframe(union recv_frame *precvframe); 51 | 52 | 53 | int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf); 54 | int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf); 55 | 56 | _pkt *rtw_os_alloc_msdu_pkt(union recv_frame *prframe, u16 nSubframe_Length, u8 *pdata); 57 | void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attrib *pattrib); 58 | 59 | void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf); 60 | 61 | void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl); 62 | 63 | 64 | #endif // 65 | 66 | -------------------------------------------------------------------------------- /include/rtl8812a_dm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RTL8812A_DM_H__ 21 | #define __RTL8812A_DM_H__ 22 | 23 | void rtl8812_init_dm_priv(IN PADAPTER Adapter); 24 | void rtl8812_deinit_dm_priv(IN PADAPTER Adapter); 25 | void rtl8812_InitHalDm(IN PADAPTER Adapter); 26 | void rtl8812_HalDmWatchDog(IN PADAPTER Adapter); 27 | 28 | //VOID rtl8192c_dm_CheckTXPowerTracking(IN PADAPTER Adapter); 29 | 30 | //void rtl8192c_dm_RF_Saving(IN PADAPTER pAdapter, IN u8 bForceInNormal); 31 | 32 | #ifdef CONFIG_ANTENNA_DIVERSITY 33 | void AntDivCompare8812(PADAPTER Adapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src); 34 | u8 AntDivBeforeLink8812(PADAPTER Adapter ); 35 | #endif 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /include/rtl8812a_led.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RTL8812A_LED_H__ 21 | #define __RTL8812A_LED_H__ 22 | 23 | 24 | //================================================================================ 25 | // Interface to manipulate LED objects. 26 | //================================================================================ 27 | #ifdef CONFIG_USB_HCI 28 | void rtl8812au_InitSwLeds(PADAPTER padapter); 29 | void rtl8812au_DeInitSwLeds(PADAPTER padapter); 30 | #endif 31 | #ifdef CONFIG_PCI_HCI 32 | void rtl8812ae_InitSwLeds(PADAPTER padapter); 33 | void rtl8812ae_DeInitSwLeds(PADAPTER padapter); 34 | #endif 35 | #ifdef CONFIG_SDIO_HCI 36 | void rtl8821as_InitSwLeds(PADAPTER padapter); 37 | void rtl8821as_DeInitSwLeds(PADAPTER padapter); 38 | #endif 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /include/rtl8812a_rf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RTL8812A_RF_H__ 21 | #define __RTL8812A_RF_H__ 22 | 23 | VOID 24 | PHY_RF6052SetBandwidth8812( 25 | IN PADAPTER Adapter, 26 | IN CHANNEL_WIDTH Bandwidth); 27 | 28 | 29 | int 30 | PHY_RF6052_Config_8812( 31 | IN PADAPTER Adapter ); 32 | 33 | #endif//__RTL8188E_RF_H__ 34 | 35 | -------------------------------------------------------------------------------- /include/rtl8812a_sreset.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _RTL88812A_SRESET_H_ 21 | #define _RTL8812A_SRESET_H_ 22 | 23 | #include 24 | 25 | #ifdef DBG_CONFIG_ERROR_DETECT 26 | extern void rtl8812_sreset_xmit_status_check(_adapter *padapter); 27 | extern void rtl8812_sreset_linked_status_check(_adapter *padapter); 28 | #endif 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /include/rtl8814a_dm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RTL8814A_DM_H__ 21 | #define __RTL8814A_DM_H__ 22 | 23 | void rtl8814_init_dm_priv(IN PADAPTER Adapter); 24 | void rtl8814_deinit_dm_priv(IN PADAPTER Adapter); 25 | void rtl8814_InitHalDm(IN PADAPTER Adapter); 26 | void rtl8814_HalDmWatchDog(IN PADAPTER Adapter); 27 | 28 | #ifdef CONFIG_ANTENNA_DIVERSITY 29 | void AntDivCompare8814(PADAPTER Adapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src); 30 | u8 AntDivBeforeLink8814(PADAPTER Adapter ); 31 | #endif //CONFIG_ANTENNA_DIVERSITY 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /include/rtl8814a_led.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RTL8814A_LED_H__ 21 | #define __RTL8814A_LED_H__ 22 | 23 | 24 | //================================================================================ 25 | // Interface to manipulate LED objects. 26 | //================================================================================ 27 | #ifdef CONFIG_USB_HCI 28 | void rtl8814au_InitSwLeds(PADAPTER padapter); 29 | void rtl8814au_DeInitSwLeds(PADAPTER padapter); 30 | #endif //CONFIG_USB_HCI 31 | #ifdef CONFIG_PCI_HCI 32 | void rtl8814ae_InitSwLeds(PADAPTER padapter); 33 | void rtl8814ae_DeInitSwLeds(PADAPTER padapter); 34 | #endif //CONFIG_PCI_HCI 35 | #ifdef CONFIG_SDIO_HCI 36 | void rtl8814s_InitSwLeds(PADAPTER padapter); 37 | void rtl8814s_DeInitSwLeds(PADAPTER padapter); 38 | #endif //CONFIG_SDIO_HCI 39 | 40 | #endif //__RTL8814A_LED_H__ 41 | 42 | -------------------------------------------------------------------------------- /include/rtl8814a_rf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RTL8814A_RF_H__ 21 | #define __RTL8814A_RF_H__ 22 | 23 | VOID 24 | PHY_RF6052SetBandwidth8814A( 25 | IN PADAPTER Adapter, 26 | IN CHANNEL_WIDTH Bandwidth); 27 | 28 | 29 | int 30 | PHY_RF6052_Config_8814A( 31 | IN PADAPTER Adapter ); 32 | 33 | #endif//__RTL8188E_RF_H__ 34 | 35 | -------------------------------------------------------------------------------- /include/rtl8814a_sreset.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _RTL88814A_SRESET_H_ 21 | #define _RTL8814A_SRESET_H_ 22 | 23 | #include 24 | 25 | #ifdef DBG_CONFIG_ERROR_DETECT 26 | extern void rtl8814_sreset_xmit_status_check(_adapter *padapter); 27 | extern void rtl8814_sreset_linked_status_check(_adapter *padapter); 28 | #endif 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /include/rtw_br_ext.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _RTW_BR_EXT_H_ 21 | #define _RTW_BR_EXT_H_ 22 | 23 | #if 1 // rtw_wifi_driver 24 | #define CL_IPV6_PASS 1 25 | #define MACADDRLEN 6 26 | #define _DEBUG_ERR DBG_8192C 27 | #define _DEBUG_INFO //DBG_8192C 28 | #define DEBUG_WARN DBG_8192C 29 | #define DEBUG_INFO //DBG_8192C 30 | #define DEBUG_ERR DBG_8192C 31 | //#define GET_MY_HWADDR ((GET_MIB(priv))->dot11OperationEntry.hwaddr) 32 | #define GET_MY_HWADDR(padapter) (adapter_mac_addr(padapter)) 33 | #endif // rtw_wifi_driver 34 | 35 | #define NAT25_HASH_BITS 4 36 | #define NAT25_HASH_SIZE (1 << NAT25_HASH_BITS) 37 | #define NAT25_AGEING_TIME 300 38 | 39 | #ifdef CL_IPV6_PASS 40 | #define MAX_NETWORK_ADDR_LEN 17 41 | #else 42 | #define MAX_NETWORK_ADDR_LEN 11 43 | #endif 44 | 45 | struct nat25_network_db_entry 46 | { 47 | struct nat25_network_db_entry *next_hash; 48 | struct nat25_network_db_entry **pprev_hash; 49 | atomic_t use_count; 50 | unsigned char macAddr[6]; 51 | unsigned long ageing_timer; 52 | unsigned char networkAddr[MAX_NETWORK_ADDR_LEN]; 53 | }; 54 | 55 | enum NAT25_METHOD { 56 | NAT25_MIN, 57 | NAT25_CHECK, 58 | NAT25_INSERT, 59 | NAT25_LOOKUP, 60 | NAT25_PARSE, 61 | NAT25_MAX 62 | }; 63 | 64 | struct br_ext_info { 65 | unsigned int nat25_disable; 66 | unsigned int macclone_enable; 67 | unsigned int dhcp_bcst_disable; 68 | int addPPPoETag; // 1: Add PPPoE relay-SID, 0: disable 69 | unsigned char nat25_dmzMac[MACADDRLEN]; 70 | unsigned int nat25sc_disable; 71 | }; 72 | 73 | void nat25_db_cleanup(_adapter *priv); 74 | 75 | #endif // _RTW_BR_EXT_H_ 76 | 77 | -------------------------------------------------------------------------------- /include/rtw_byteorder.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _RTL871X_BYTEORDER_H_ 21 | #define _RTL871X_BYTEORDER_H_ 22 | 23 | 24 | #if defined (CONFIG_LITTLE_ENDIAN) && defined (CONFIG_BIG_ENDIAN) 25 | #error "Shall be CONFIG_LITTLE_ENDIAN or CONFIG_BIG_ENDIAN, but not both!\n" 26 | #endif 27 | 28 | #if defined (CONFIG_LITTLE_ENDIAN) 29 | #ifndef CONFIG_PLATFORM_MSTAR389 30 | # include 31 | #endif 32 | #elif defined (CONFIG_BIG_ENDIAN) 33 | # include 34 | #else 35 | # error "Must be LITTLE/BIG Endian Host" 36 | #endif 37 | 38 | #endif /* _RTL871X_BYTEORDER_H_ */ 39 | 40 | -------------------------------------------------------------------------------- /include/rtw_event.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _RTW_EVENT_H_ 21 | #define _RTW_EVENT_H_ 22 | 23 | #ifdef CONFIG_H2CLBK 24 | #include 25 | #endif 26 | 27 | /* 28 | Used to report a bss has been scanned 29 | 30 | */ 31 | struct survey_event { 32 | WLAN_BSSID_EX bss; 33 | }; 34 | 35 | /* 36 | Used to report that the requested site survey has been done. 37 | 38 | bss_cnt indicates the number of bss that has been reported. 39 | 40 | 41 | */ 42 | struct surveydone_event { 43 | unsigned int bss_cnt; 44 | 45 | }; 46 | 47 | /* 48 | Used to report the link result of joinning the given bss 49 | 50 | 51 | join_res: 52 | -1: authentication fail 53 | -2: association fail 54 | > 0: TID 55 | 56 | */ 57 | struct joinbss_event { 58 | struct wlan_network network; 59 | }; 60 | 61 | /* 62 | Used to report a given STA has joinned the created BSS. 63 | It is used in AP/Ad-HoC(M) mode. 64 | 65 | 66 | */ 67 | struct stassoc_event { 68 | unsigned char macaddr[6]; 69 | unsigned char rsvd[2]; 70 | int cam_id; 71 | 72 | }; 73 | 74 | struct stadel_event { 75 | unsigned char macaddr[6]; 76 | unsigned char rsvd[2]; //for reason 77 | int mac_id; 78 | }; 79 | 80 | struct addba_event 81 | { 82 | unsigned int tid; 83 | }; 84 | 85 | struct wmm_event 86 | { 87 | unsigned char wmm; 88 | }; 89 | 90 | #ifdef CONFIG_H2CLBK 91 | struct c2hlbk_event{ 92 | unsigned char mac[6]; 93 | unsigned short s0; 94 | unsigned short s1; 95 | unsigned int w0; 96 | unsigned char b0; 97 | unsigned short s2; 98 | unsigned char b1; 99 | unsigned int w1; 100 | }; 101 | #endif//CONFIG_H2CLBK 102 | 103 | #define GEN_EVT_CODE(event) event ## _EVT_ 104 | 105 | 106 | 107 | struct fwevent { 108 | u32 parmsize; 109 | void (*event_callback)(_adapter *dev, u8 *pbuf); 110 | }; 111 | 112 | 113 | #define C2HEVENT_SZ 32 114 | 115 | struct event_node{ 116 | unsigned char *node; 117 | unsigned char evt_code; 118 | unsigned short evt_sz; 119 | volatile int *caller_ff_tail; 120 | int caller_ff_sz; 121 | }; 122 | 123 | struct c2hevent_queue { 124 | volatile int head; 125 | volatile int tail; 126 | struct event_node nodes[C2HEVENT_SZ]; 127 | unsigned char seq; 128 | }; 129 | 130 | #define NETWORK_QUEUE_SZ 4 131 | 132 | struct network_queue { 133 | volatile int head; 134 | volatile int tail; 135 | WLAN_BSSID_EX networks[NETWORK_QUEUE_SZ]; 136 | }; 137 | 138 | 139 | #endif // _WLANEVENT_H_ 140 | 141 | -------------------------------------------------------------------------------- /include/rtw_ioctl_query.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _RTW_IOCTL_QUERY_H_ 21 | #define _RTW_IOCTL_QUERY_H_ 22 | 23 | 24 | #ifdef PLATFORM_WINDOWS 25 | 26 | u8 query_802_11_capability(_adapter* padapter,u8* pucBuf,u32 * pulOutLen); 27 | u8 query_802_11_association_information (_adapter * padapter, PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo); 28 | 29 | #endif 30 | 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /include/rtw_ioctl_set.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RTW_IOCTL_SET_H_ 21 | #define __RTW_IOCTL_SET_H_ 22 | 23 | 24 | typedef u8 NDIS_802_11_PMKID_VALUE[16]; 25 | 26 | typedef struct _BSSIDInfo { 27 | NDIS_802_11_MAC_ADDRESS BSSID; 28 | NDIS_802_11_PMKID_VALUE PMKID; 29 | } BSSIDInfo, *PBSSIDInfo; 30 | 31 | 32 | #ifdef PLATFORM_OS_XP 33 | typedef struct _NDIS_802_11_PMKID { 34 | u32 Length; 35 | u32 BSSIDInfoCount; 36 | BSSIDInfo BSSIDInfo[1]; 37 | } NDIS_802_11_PMKID, *PNDIS_802_11_PMKID; 38 | #endif 39 | 40 | 41 | #ifdef PLATFORM_WINDOWS 42 | u8 rtw_set_802_11_reload_defaults(_adapter * padapter, NDIS_802_11_RELOAD_DEFAULTS reloadDefaults); 43 | u8 rtw_set_802_11_test(_adapter * padapter, NDIS_802_11_TEST * test); 44 | u8 rtw_set_802_11_pmkid(_adapter *pdapter, NDIS_802_11_PMKID *pmkid); 45 | 46 | u8 rtw_pnp_set_power_sleep(_adapter* padapter); 47 | u8 rtw_pnp_set_power_wakeup(_adapter* padapter); 48 | 49 | void rtw_pnp_resume_wk(void *context); 50 | void rtw_pnp_sleep_wk(void * context); 51 | 52 | #endif 53 | 54 | u8 rtw_set_802_11_add_key(_adapter * padapter, NDIS_802_11_KEY * key); 55 | u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode); 56 | u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid); 57 | u8 rtw_set_802_11_add_wep(_adapter * padapter, NDIS_802_11_WEP * wep); 58 | u8 rtw_set_802_11_disassociate(_adapter * padapter); 59 | u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, NDIS_802_11_SSID *pssid, int ssid_max_num); 60 | u8 rtw_set_802_11_infrastructure_mode(_adapter * padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype); 61 | u8 rtw_set_802_11_remove_wep(_adapter * padapter, u32 keyindex); 62 | u8 rtw_set_802_11_ssid(_adapter * padapter, NDIS_802_11_SSID * ssid); 63 | u8 rtw_set_802_11_connect(_adapter* padapter, u8 *bssid, NDIS_802_11_SSID *ssid); 64 | u8 rtw_set_802_11_remove_key(_adapter * padapter, NDIS_802_11_REMOVE_KEY * key); 65 | 66 | u8 rtw_validate_bssid(u8 *bssid); 67 | u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid); 68 | 69 | u16 rtw_get_cur_max_rate(_adapter *adapter); 70 | int rtw_set_scan_mode(_adapter *adapter, RT_SCAN_TYPE scan_mode); 71 | int rtw_set_channel_plan(_adapter *adapter, u8 channel_plan); 72 | int rtw_set_country(_adapter *adapter, const char *country_code); 73 | int rtw_set_band(_adapter *adapter, u8 band); 74 | 75 | #endif 76 | 77 | -------------------------------------------------------------------------------- /include/rtw_mem.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __RTW_MEM_H__ 21 | #define __RTW_MEM_H__ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #ifdef CONFIG_PLATFORM_MSTAR_HIGH 28 | #define MAX_RTKM_RECVBUF_SZ (31744) /* 31k */ 29 | #else 30 | #define MAX_RTKM_RECVBUF_SZ (15360) /* 15k */ 31 | #endif /* CONFIG_PLATFORM_MSTAR_HIGH */ 32 | #define MAX_RTKM_NR_PREALLOC_RECV_SKB 16 33 | 34 | u16 rtw_rtkm_get_buff_size(void); 35 | u8 rtw_rtkm_get_nr_recv_skb(void); 36 | struct u8* rtw_alloc_revcbuf_premem(void); 37 | struct sk_buff *rtw_alloc_skb_premem(u16 in_size); 38 | int rtw_free_skb_premem(struct sk_buff *pskb); 39 | 40 | 41 | #endif //__RTW_MEM_H__ 42 | 43 | -------------------------------------------------------------------------------- /include/rtw_odm.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 __RTW_ODM_H__ 21 | #define __RTW_ODM_H__ 22 | 23 | #include 24 | #include "../hal/phydm/phydm_types.h" 25 | /* 26 | * This file provides utilities/wrappers for rtw driver to use ODM 27 | */ 28 | 29 | void rtw_odm_dbg_comp_msg(void *sel,_adapter *adapter); 30 | void rtw_odm_dbg_comp_set(_adapter *adapter, u64 comps); 31 | void rtw_odm_dbg_level_msg(void *sel,_adapter *adapter); 32 | void rtw_odm_dbg_level_set(_adapter *adapter, u32 level); 33 | 34 | void rtw_odm_ability_msg(void *sel, _adapter *adapter); 35 | void rtw_odm_ability_set(_adapter *adapter, u32 ability); 36 | 37 | void rtw_odm_adaptivity_config_msg(void *sel, _adapter *adapter); 38 | 39 | bool rtw_odm_adaptivity_needed(_adapter *adapter); 40 | void rtw_odm_adaptivity_parm_msg(void *sel,_adapter *adapter); 41 | void rtw_odm_adaptivity_parm_set(_adapter *adapter, s8 TH_L2H_ini, s8 TH_EDCCA_HL_diff, s8 TH_L2H_ini_mode2, s8 TH_EDCCA_HL_diff_mode2, u8 EDCCA_enable); 42 | void rtw_odm_get_perpkt_rssi(void *sel, _adapter *adapter); 43 | void rtw_odm_acquirespinlock(_adapter *adapter, RT_SPINLOCK_TYPE type); 44 | void rtw_odm_releasespinlock(_adapter *adapter, RT_SPINLOCK_TYPE type); 45 | 46 | #ifdef CONFIG_DFS_MASTER 47 | VOID rtw_odm_radar_detect_reset(_adapter *adapter); 48 | VOID rtw_odm_radar_detect_disable(_adapter *adapter); 49 | VOID rtw_odm_radar_detect_enable(_adapter *adapter); 50 | BOOLEAN rtw_odm_radar_detect(_adapter *adapter); 51 | #endif /* CONFIG_DFS_MASTER */ 52 | #endif // __RTW_ODM_H__ 53 | 54 | -------------------------------------------------------------------------------- /include/rtw_qos.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 | 21 | 22 | #ifndef _RTW_QOS_H_ 23 | #define _RTW_QOS_H_ 24 | 25 | 26 | 27 | struct qos_priv { 28 | 29 | unsigned int qos_option; //bit mask option: u-apsd, s-apsd, ts, block ack... 30 | 31 | }; 32 | 33 | 34 | #endif //_RTL871X_QOS_H_ 35 | 36 | -------------------------------------------------------------------------------- /include/rtw_sreset.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2012 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 _RTW_SRESET_H_ 21 | #define _RTW_SRESET_H_ 22 | 23 | //#include 24 | 25 | enum { 26 | SRESET_TGP_NULL = 0, 27 | SRESET_TGP_XMIT_STATUS = 1, 28 | SRESET_TGP_LINK_STATUS = 2, 29 | }; 30 | 31 | struct sreset_priv { 32 | _mutex silentreset_mutex; 33 | u8 silent_reset_inprogress; 34 | u8 Wifi_Error_Status; 35 | unsigned long last_tx_time; 36 | unsigned long last_tx_complete_time; 37 | 38 | s32 dbg_trigger_point; 39 | }; 40 | 41 | 42 | 43 | #define WIFI_STATUS_SUCCESS 0 44 | #define USB_VEN_REQ_CMD_FAIL BIT0 45 | #define USB_READ_PORT_FAIL BIT1 46 | #define USB_WRITE_PORT_FAIL BIT2 47 | #define WIFI_MAC_TXDMA_ERROR BIT3 48 | #define WIFI_TX_HANG BIT4 49 | #define WIFI_RX_HANG BIT5 50 | #define WIFI_IF_NOT_EXIST BIT6 51 | 52 | void sreset_init_value(_adapter *padapter); 53 | void sreset_reset_value(_adapter *padapter); 54 | u8 sreset_get_wifi_status(_adapter *padapter); 55 | void sreset_set_wifi_error_status(_adapter *padapter, u32 status); 56 | void sreset_set_trigger_point(_adapter *padapter, s32 tgp); 57 | bool sreset_inprogress(_adapter *padapter); 58 | void sreset_reset(_adapter *padapter); 59 | 60 | #endif 61 | 62 | -------------------------------------------------------------------------------- /include/rtw_version.h: -------------------------------------------------------------------------------- 1 | #define DRIVERVERSION "v4.3.20_14803.20150724_beta" 2 | -------------------------------------------------------------------------------- /include/rtw_wifi_regd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2009-2010 Realtek Corporation. 4 | * 5 | *****************************************************************************/ 6 | 7 | #ifndef __RTW_WIFI_REGD_H__ 8 | #define __RTW_WIFI_REGD_H__ 9 | 10 | struct country_code_to_enum_rd { 11 | u16 countrycode; 12 | const char *iso_name; 13 | }; 14 | 15 | enum country_code_type_t { 16 | COUNTRY_CODE_USER = 0, 17 | 18 | /*add new channel plan above this line */ 19 | COUNTRY_CODE_MAX 20 | }; 21 | 22 | int rtw_regd_init(_adapter *padapter); 23 | void rtw_reg_notify_by_driver(_adapter *adapter); 24 | 25 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)) 26 | #define ieee80211_band nl80211_band 27 | #define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ 28 | #define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ 29 | #define IEEE80211_NUM_BANDS NUM_NL80211_BANDS 30 | #endif 31 | 32 | #endif /* __RTW_WIFI_REGD_H__ */ 33 | 34 | -------------------------------------------------------------------------------- /include/sdio_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __SDIO_HAL_H__ 21 | #define __SDIO_HAL_H__ 22 | 23 | 24 | extern u8 sd_hal_bus_init(PADAPTER padapter); 25 | extern u8 sd_hal_bus_deinit(PADAPTER padapter); 26 | 27 | u8 sd_int_isr(PADAPTER padapter); 28 | void sd_int_dpc(PADAPTER padapter); 29 | u8 rtw_set_hal_ops(_adapter *padapter); 30 | 31 | #ifdef CONFIG_RTL8188E 32 | void rtl8188es_set_hal_ops(PADAPTER padapter); 33 | #endif 34 | 35 | #ifdef CONFIG_RTL8723B 36 | void rtl8723bs_set_hal_ops(PADAPTER padapter); 37 | #endif 38 | 39 | #ifdef CONFIG_RTL8821A 40 | void rtl8821as_set_hal_ops(PADAPTER padapter); 41 | #endif 42 | 43 | #ifdef CONFIG_RTL8192E 44 | void rtl8192es_set_hal_ops(PADAPTER padapter); 45 | #endif 46 | 47 | #ifdef CONFIG_RTL8703B 48 | void rtl8703bs_set_hal_ops(PADAPTER padapter); 49 | #endif 50 | 51 | #ifdef CONFIG_RTL8188F 52 | void rtl8188fs_set_hal_ops(PADAPTER padapter); 53 | #endif 54 | 55 | #endif //__SDIO_HAL_H__ 56 | 57 | -------------------------------------------------------------------------------- /include/sdio_ops_ce.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _SDIO_OPS_WINCE_H_ 21 | #define _SDIO_OPS_WINCE_H_ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | 29 | #ifdef PLATFORM_OS_CE 30 | 31 | 32 | extern u8 sdbus_cmd52r_ce(struct intf_priv *pintfpriv, u32 addr); 33 | 34 | 35 | extern void sdbus_cmd52w_ce(struct intf_priv *pintfpriv, u32 addr,u8 val8); 36 | 37 | 38 | uint sdbus_read_blocks_to_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); 39 | 40 | extern uint sdbus_read_bytes_to_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); 41 | 42 | 43 | extern uint sdbus_write_blocks_from_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf,u8 async); 44 | 45 | extern uint sdbus_write_bytes_from_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); 46 | extern u8 sdbus_func1cmd52r_ce(struct intf_priv *pintfpriv, u32 addr); 47 | extern void sdbus_func1cmd52w_ce(struct intf_priv *pintfpriv, u32 addr, u8 val8); 48 | extern uint sdbus_read_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt,void *pdata); 49 | extern uint sdbus_write_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt,void *pdata); 50 | extern void sdio_read_int(_adapter *padapter, u32 addr,u8 sz,void *pdata); 51 | 52 | #endif 53 | 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /include/sdio_ops_linux.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __SDIO_OPS_LINUX_H__ 21 | #define __SDIO_OPS_LINUX_H__ 22 | 23 | #define SDIO_ERR_VAL8 0xEA 24 | #define SDIO_ERR_VAL16 0xEAEA 25 | #define SDIO_ERR_VAL32 0xEAEAEAEA 26 | 27 | u8 sd_f0_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err); 28 | void sd_f0_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err); 29 | 30 | s32 _sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata); 31 | s32 _sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata); 32 | s32 sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata); 33 | s32 sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata); 34 | 35 | u8 _sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err); 36 | u8 sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err); 37 | u16 sd_read16(struct intf_hdl *pintfhdl, u32 addr, s32 *err); 38 | u32 _sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err); 39 | u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err); 40 | s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata); 41 | s32 sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata); 42 | void sd_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err); 43 | void sd_write16(struct intf_hdl *pintfhdl, u32 addr, u16 v, s32 *err); 44 | void _sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err); 45 | void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err); 46 | s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata); 47 | s32 sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata); 48 | 49 | 50 | void rtw_sdio_set_irq_thd(struct dvobj_priv *dvobj, _thread_hdl_ thd_hdl); 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /include/sdio_ops_xp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _SDIO_OPS_XP_H_ 21 | #define _SDIO_OPS_XP_H_ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | 29 | #ifdef PLATFORM_OS_XP 30 | 31 | 32 | extern u8 sdbus_cmd52r_xp(struct intf_priv *pintfpriv, u32 addr); 33 | 34 | 35 | extern void sdbus_cmd52w_xp(struct intf_priv *pintfpriv, u32 addr,u8 val8); 36 | 37 | 38 | uint sdbus_read_blocks_to_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); 39 | 40 | extern uint sdbus_read_bytes_to_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); 41 | 42 | 43 | extern uint sdbus_write_blocks_from_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf,u8 async); 44 | 45 | extern uint sdbus_write_bytes_from_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf); 46 | extern u8 sdbus_func1cmd52r_xp(struct intf_priv *pintfpriv, u32 addr); 47 | extern void sdbus_func1cmd52w_xp(struct intf_priv *pintfpriv, u32 addr, u8 val8); 48 | extern uint sdbus_read_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt,void *pdata); 49 | extern uint sdbus_write_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt,void *pdata); 50 | extern void sdio_read_int(_adapter *padapter, u32 addr,u8 sz,void *pdata); 51 | 52 | #endif 53 | 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /include/sdio_osintf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __SDIO_OSINTF_H__ 21 | #define __SDIO_OSINTF_H__ 22 | 23 | 24 | 25 | u8 sd_hal_bus_init(PADAPTER padapter); 26 | u8 sd_hal_bus_deinit(PADAPTER padapter); 27 | void sd_c2h_hdl(PADAPTER padapter); 28 | 29 | #ifdef PLATFORM_OS_CE 30 | extern NDIS_STATUS ce_sd_get_dev_hdl(PADAPTER padapter); 31 | SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, PADAPTER padapter); 32 | extern void sd_setup_irs(PADAPTER padapter); 33 | #endif 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /include/usb_hal.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __USB_HAL_H__ 21 | #define __USB_HAL_H__ 22 | 23 | int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz); 24 | void usb_free_recv_priv (_adapter *padapter, u16 ini_in_buf_sz); 25 | 26 | u8 rtw_set_hal_ops(_adapter *padapter); 27 | 28 | #ifdef CONFIG_RTL8188E 29 | void rtl8188eu_set_hal_ops(_adapter * padapter); 30 | #endif 31 | 32 | #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) 33 | void rtl8812au_set_hal_ops(_adapter * padapter); 34 | #endif 35 | 36 | #ifdef CONFIG_RTL8192E 37 | void rtl8192eu_set_hal_ops(_adapter * padapter); 38 | #endif 39 | 40 | 41 | #ifdef CONFIG_RTL8723B 42 | void rtl8723bu_set_hal_ops(_adapter * padapter); 43 | #endif 44 | 45 | #ifdef CONFIG_RTL8814A 46 | void rtl8814au_set_hal_ops(_adapter * padapter); 47 | #endif /* CONFIG_RTL8814A */ 48 | 49 | #ifdef CONFIG_RTL8188F 50 | void rtl8188fu_set_hal_ops(_adapter *padapter); 51 | #endif 52 | 53 | #ifdef CONFIG_RTL8703B 54 | void rtl8703bu_set_hal_ops(_adapter *padapter); 55 | #endif 56 | 57 | #ifdef CONFIG_INTEL_PROXIM 58 | extern _adapter *rtw_usb_get_sw_pointer(void); 59 | #endif //CONFIG_INTEL_PROXIM 60 | #endif //__USB_HAL_H__ 61 | 62 | -------------------------------------------------------------------------------- /include/usb_osintf.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __USB_OSINTF_H 21 | #define __USB_OSINTF_H 22 | 23 | #include 24 | 25 | #define USBD_HALTED(Status) ((ULONG)(Status) >> 30 == 3) 26 | 27 | 28 | u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, RT_USB_BREQUEST brequest, RT_USB_WVALUE wvalue, u8 windex, void* data, u8 datalen, u8 isdirectionin); 29 | 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /include/usb_vendor_req.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 _USB_VENDOR_REQUEST_H_ 21 | #define _USB_VENDOR_REQUEST_H_ 22 | 23 | //4 Set/Get Register related wIndex/Data 24 | #define RT_USB_RESET_MASK_OFF 0 25 | #define RT_USB_RESET_MASK_ON 1 26 | #define RT_USB_SLEEP_MASK_OFF 0 27 | #define RT_USB_SLEEP_MASK_ON 1 28 | #define RT_USB_LDO_ON 1 29 | #define RT_USB_LDO_OFF 0 30 | 31 | //4 Set/Get SYSCLK related wValue or Data 32 | #define RT_USB_SYSCLK_32KHZ 0 33 | #define RT_USB_SYSCLK_40MHZ 1 34 | #define RT_USB_SYSCLK_60MHZ 2 35 | 36 | 37 | typedef enum _RT_USB_BREQUEST { 38 | RT_USB_SET_REGISTER = 1, 39 | RT_USB_SET_SYSCLK = 2, 40 | RT_USB_GET_SYSCLK = 3, 41 | RT_USB_GET_REGISTER = 4 42 | } RT_USB_BREQUEST; 43 | 44 | 45 | typedef enum _RT_USB_WVALUE { 46 | RT_USB_RESET_MASK = 1, 47 | RT_USB_SLEEP_MASK = 2, 48 | RT_USB_USB_HRCPWM = 3, 49 | RT_USB_LDO = 4, 50 | RT_USB_BOOT_TYPE = 5 51 | } RT_USB_WVALUE; 52 | 53 | 54 | //BOOLEAN usbvendorrequest(PCE_USB_DEVICE CEdevice, RT_USB_BREQUEST bRequest, RT_USB_WVALUE wValue, UCHAR wIndex, PVOID Data, UCHAR DataLength, BOOLEAN isDirectionIn); 55 | //BOOLEAN CEusbGetStatusRequest(PCE_USB_DEVICE CEdevice, IN USHORT Op, IN USHORT Index, PVOID Data); 56 | //BOOLEAN CEusbFeatureRequest(PCE_USB_DEVICE CEdevice, IN USHORT Op, IN USHORT FeatureSelector, IN USHORT Index); 57 | //BOOLEAN CEusbGetDescriptorRequest(PCE_USB_DEVICE CEdevice, IN short urbLength, IN UCHAR DescriptorType, IN UCHAR Index, IN USHORT LanguageId, IN PVOID TransferBuffer, IN ULONG TransferBufferLength); 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /include/xmit_osdep.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 2011 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 __XMIT_OSDEP_H_ 21 | #define __XMIT_OSDEP_H_ 22 | 23 | 24 | struct pkt_file { 25 | _pkt *pkt; 26 | SIZE_T pkt_len; //the remainder length of the open_file 27 | _buffer *cur_buffer; 28 | u8 *buf_start; 29 | u8 *cur_addr; 30 | SIZE_T buf_len; 31 | }; 32 | 33 | #ifdef PLATFORM_WINDOWS 34 | 35 | #ifdef PLATFORM_OS_XP 36 | #ifdef CONFIG_USB_HCI 37 | #include 38 | #include 39 | #include 40 | #endif 41 | #endif 42 | 43 | #ifdef CONFIG_GSPI_HCI 44 | #define NR_XMITFRAME 64 45 | #else 46 | #define NR_XMITFRAME 128 47 | #endif 48 | 49 | #define ETH_ALEN 6 50 | 51 | extern NDIS_STATUS rtw_xmit_entry( 52 | IN _nic_hdl cnxt, 53 | IN NDIS_PACKET *pkt, 54 | IN UINT flags 55 | ); 56 | 57 | #endif 58 | 59 | #ifdef PLATFORM_FREEBSD 60 | #define NR_XMITFRAME 256 61 | extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); 62 | extern void rtw_xmit_entry_wrap (struct ifnet * pifp); 63 | #endif //PLATFORM_FREEBSD 64 | 65 | #ifdef PLATFORM_LINUX 66 | 67 | #define NR_XMITFRAME 256 68 | 69 | struct xmit_priv; 70 | struct pkt_attrib; 71 | struct sta_xmit_priv; 72 | struct xmit_frame; 73 | struct xmit_buf; 74 | 75 | extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); 76 | extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); 77 | 78 | #endif 79 | 80 | void rtw_os_xmit_schedule(_adapter *padapter); 81 | 82 | int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag); 83 | void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag); 84 | 85 | extern void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib); 86 | 87 | extern uint rtw_remainder_len(struct pkt_file *pfile); 88 | extern void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile); 89 | extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen); 90 | extern sint rtw_endofpktfile (struct pkt_file *pfile); 91 | 92 | extern void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt); 93 | extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe); 94 | 95 | void rtw_os_wake_queue_at_free_stainfo(_adapter *padapter, int *qcnt_freed); 96 | 97 | void dump_os_queue(void *sel, _adapter *padapter); 98 | 99 | #endif //__XMIT_OSDEP_H_ 100 | 101 | -------------------------------------------------------------------------------- /os_dep/linux/rtw_proc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright(c) 2007 - 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 __RTW_PROC_H__ 21 | #define __RTW_PROC_H__ 22 | 23 | #include 24 | #include 25 | 26 | struct rtw_proc_hdl { 27 | char *name; 28 | int (*show)(struct seq_file *, void *); 29 | ssize_t (*write)(struct file *file, const char __user *buffer, size_t count, loff_t *pos, void *data); 30 | }; 31 | 32 | #ifdef CONFIG_PROC_DEBUG 33 | 34 | struct proc_dir_entry *get_rtw_drv_proc(void); 35 | int rtw_drv_proc_init(void); 36 | void rtw_drv_proc_deinit(void); 37 | struct proc_dir_entry *rtw_adapter_proc_init(struct net_device *dev); 38 | void rtw_adapter_proc_deinit(struct net_device *dev); 39 | void rtw_adapter_proc_replace(struct net_device *dev); 40 | 41 | #else //!CONFIG_PROC_DEBUG 42 | 43 | #define get_rtw_drv_proc() NULL 44 | #define rtw_drv_proc_init() 0 45 | #define rtw_drv_proc_deinit() do {} while (0) 46 | #define rtw_adapter_proc_init(dev) NULL 47 | #define rtw_adapter_proc_deinit(dev) do {} while (0) 48 | #define rtw_adapter_proc_replace(dev) do {} while (0) 49 | 50 | #endif //!CONFIG_PROC_DEBUG 51 | 52 | #endif //__RTW_PROC_H__ 53 | -------------------------------------------------------------------------------- /platform/platform_RTK_DMP_usb.c: -------------------------------------------------------------------------------- 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 | #include 21 | 22 | int platform_wifi_power_on(void) 23 | { 24 | int ret = 0; 25 | u32 tmp; 26 | tmp=readl((volatile unsigned int*)0xb801a608); 27 | tmp &= 0xffffff00; 28 | tmp |= 0x55; 29 | writel(tmp,(volatile unsigned int*)0xb801a608);//write dummy register for 1055 30 | return ret; 31 | } 32 | 33 | void platform_wifi_power_off(void) 34 | { 35 | } 36 | 37 | -------------------------------------------------------------------------------- /platform/platform_ops.c: -------------------------------------------------------------------------------- 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 CONFIG_PLATFORM_OPS 21 | /* 22 | * Return: 23 | * 0: power on successfully 24 | * others: power on failed 25 | */ 26 | int platform_wifi_power_on(void) 27 | { 28 | int ret = 0; 29 | 30 | 31 | return ret; 32 | } 33 | 34 | void platform_wifi_power_off(void) 35 | { 36 | } 37 | #endif // !CONFIG_PLATFORM_OPS 38 | -------------------------------------------------------------------------------- /platform/platform_ops.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 __PLATFORM_OPS_H__ 21 | #define __PLATFORM_OPS_H__ 22 | 23 | /* 24 | * Return: 25 | * 0: power on successfully 26 | * others: power on failed 27 | */ 28 | int platform_wifi_power_on(void); 29 | void platform_wifi_power_off(void); 30 | 31 | #endif // __PLATFORM_OPS_H__ 32 | -------------------------------------------------------------------------------- /platform/platform_sprd_sdio.c: -------------------------------------------------------------------------------- 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 | #include 21 | 22 | extern void sdhci_bus_scan(void); 23 | #ifndef ANDROID_2X 24 | extern int sdhci_device_attached(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 | 37 | #ifdef CONFIG_RTL8188E 38 | rtw_wifi_gpio_wlan_ctrl(WLAN_POWER_ON); 39 | #endif // CONFIG_RTL8188E 40 | 41 | /* Pull up pwd pin, make wifi leave power down mode. */ 42 | rtw_wifi_gpio_init(); 43 | rtw_wifi_gpio_wlan_ctrl(WLAN_PWDN_ON); 44 | 45 | #if (MP_DRIVER == 1) && (defined(CONFIG_RTL8723A)||defined(CONFIG_RTL8723B)) 46 | // Pull up BT reset pin. 47 | rtw_wifi_gpio_wlan_ctrl(WLAN_BT_PWDN_ON); 48 | #endif 49 | rtw_mdelay_os(5); 50 | 51 | sdhci_bus_scan(); 52 | #ifdef CONFIG_RTL8723B 53 | //YJ,test,130305 54 | rtw_mdelay_os(1000); 55 | #endif 56 | #ifdef ANDROID_2X 57 | rtw_mdelay_os(200); 58 | #else // !ANDROID_2X 59 | if (1) { 60 | int i = 0; 61 | 62 | for (i = 0; i <= 50; i++) { 63 | msleep(10); 64 | if (sdhci_device_attached()) 65 | break; 66 | printk("%s delay times:%d\n", __func__, i); 67 | } 68 | } 69 | #endif // !ANDROID_2X 70 | 71 | return ret; 72 | } 73 | 74 | void platform_wifi_power_off(void) 75 | { 76 | /* Pull down pwd pin, make wifi enter power down mode. */ 77 | rtw_wifi_gpio_wlan_ctrl(WLAN_PWDN_OFF); 78 | rtw_mdelay_os(5); 79 | rtw_wifi_gpio_deinit(); 80 | 81 | #ifdef CONFIG_RTL8188E 82 | rtw_wifi_gpio_wlan_ctrl(WLAN_POWER_OFF); 83 | #endif // CONFIG_RTL8188E 84 | 85 | #ifdef CONFIG_WOWLAN 86 | if(mmc_host) 87 | mmc_host->pm_flags &= ~MMC_PM_KEEP_POWER; 88 | #endif // CONFIG_WOWLAN 89 | } 90 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------