├── .gitignore ├── README.md ├── ralink ├── Kconfig ├── Makefile ├── ralink-flash.c └── ralink-flash.h ├── rt2860v2.sh ├── rt2860v2 ├── History.txt ├── Makefile ├── README_STA_pci ├── RT2860AP.dat ├── RT2860APCard.dat ├── RT2860STA.dat ├── RT2860STACard.dat ├── ap │ ├── ap.c │ ├── ap_apcli.c │ ├── ap_apcli_inf.c │ ├── ap_assoc.c │ ├── ap_auth.c │ ├── ap_autoChSel.c │ ├── ap_cfg.c │ ├── ap_connect.c │ ├── ap_data.c │ ├── ap_dls.c │ ├── ap_ids.c │ ├── ap_mbss.c │ ├── ap_mbss_inf.c │ ├── ap_mlme.c │ ├── ap_qload.c │ ├── ap_repeater.c │ ├── ap_sanity.c │ ├── ap_sync.c │ ├── ap_wds.c │ ├── ap_wds_inf.c │ ├── ap_wpa.c │ ├── apcli_assoc.c │ ├── apcli_auth.c │ ├── apcli_ctrl.c │ └── apcli_sync.c ├── ate │ ├── chips │ │ ├── rt2883_ate.c │ │ ├── rt28xx_ate.c │ │ ├── rt305x_ate.c │ │ ├── rt3352_ate.c │ │ ├── rt3883_ate.c │ │ ├── rt5350_ate.c │ │ └── rt6352_ate.c │ ├── common │ │ ├── ate_pci.c │ │ ├── rt_ate.c │ │ └── rt_qa.c │ └── include │ │ ├── rt_ate.h │ │ └── rt_qa.h ├── chips │ ├── rt2880.c │ ├── rt2883.c │ ├── rt28xx.c │ ├── rt305x.c │ ├── rt3352.c │ ├── rt3883.c │ ├── rt5350.c │ ├── rt6352.c │ ├── rt6352.c.bak │ └── rtmp_chip.c ├── common │ ├── action.c │ ├── ba_action.c │ ├── client_wds.c │ ├── cmm_aes.c │ ├── cmm_asic.c │ ├── cmm_cfg.c │ ├── cmm_cmd.c │ ├── cmm_cs.c │ ├── cmm_data.c │ ├── cmm_data_pci.c │ ├── cmm_dfs.c │ ├── cmm_info.c │ ├── cmm_loft_cal.c │ ├── cmm_mac_pci.c │ ├── cmm_mat.c │ ├── cmm_mat_iparp.c │ ├── cmm_mat_ipv6.c │ ├── cmm_mat_pppoe.c │ ├── cmm_profile.c │ ├── cmm_radar.c │ ├── cmm_rf_cal.c │ ├── cmm_sanity.c │ ├── cmm_sync.c │ ├── cmm_tkip.c │ ├── cmm_txbf.c │ ├── cmm_txbf_cal.c │ ├── cmm_video.c │ ├── cmm_wep.c │ ├── cmm_wpa.c │ ├── cmm_wpa_adhoc.c │ ├── crypt_aes.c │ ├── crypt_arc4.c │ ├── crypt_biginteger.c │ ├── crypt_dh.c │ ├── crypt_hmac.c │ ├── crypt_md5.c │ ├── crypt_sha2.c │ ├── ee_flash.c │ ├── ee_prom.c │ ├── eeprom.c │ ├── frq_cal.c │ ├── igmp_snoop.c │ ├── misc.c │ ├── mlme.c │ ├── netif_block.c │ ├── p2p.c │ ├── p2p_action.c │ ├── p2p_cfg.c │ ├── p2p_ctrl.c │ ├── p2p_dbg.c │ ├── p2p_disc_mng.c │ ├── p2p_inf.c │ ├── p2p_nego_mng.c │ ├── p2p_packet.c │ ├── p2p_table.c │ ├── ps.c │ ├── rt2860.bin │ ├── rt2860.bin.dfs │ ├── rt_channel.c │ ├── rt_led.c │ ├── rt_os_util.c │ ├── rt_rf.c │ ├── rtmp_init.c │ ├── rtmp_init_inf.c │ ├── rtmp_mcu.c │ ├── rtmp_swmcu.c │ ├── rtmp_timer.c │ ├── spectrum.c │ ├── uapsd.c │ ├── wapi.c │ ├── wsc.c │ ├── wsc_tlv.c │ ├── wsc_ufd.c │ └── wsc_v2.c ├── include │ ├── action.h │ ├── ags.h │ ├── ap.h │ ├── ap_apcli.h │ ├── ap_autoChSel.h │ ├── ap_autoChSel_cmm.h │ ├── ap_cfg.h │ ├── ap_diversity.h │ ├── ap_ids.h │ ├── ap_mbss.h │ ├── ap_wds.h │ ├── br_ftph.h │ ├── cfg80211.h │ ├── cfg80211extr.h │ ├── chip │ │ ├── chip_id.h │ │ ├── mac_pci.h │ │ ├── rt2860.h │ │ ├── rt2880.h │ │ ├── rt2883.h │ │ ├── rt28xx.h │ │ ├── rt305x.h │ │ ├── rt3352.h │ │ ├── rt3883.h │ │ ├── rt5350.h │ │ ├── rt6352.h │ │ ├── rtmp_mac.h │ │ └── rtmp_phy.h │ ├── chlist.h │ ├── client_wds.h │ ├── client_wds_cmm.h │ ├── crypt_aes.h │ ├── crypt_arc4.h │ ├── crypt_biginteger.h │ ├── crypt_dh.h │ ├── crypt_hmac.h │ ├── crypt_md5.h │ ├── crypt_sha2.h │ ├── cs.h │ ├── dfs.h │ ├── dot11i_wpa.h │ ├── dot11r_ft.h │ ├── dot11z_tdls.h │ ├── drs_extr.h │ ├── eeprom.h │ ├── firmware.h │ ├── frq_cal.h │ ├── iface │ │ ├── iface_util.h │ │ ├── rtmp_pci.h │ │ └── rtmp_rbs.h │ ├── igmp_snoop.h │ ├── ipv6.h │ ├── link_list.h │ ├── mat.h │ ├── misc.h │ ├── misc_cmm.h │ ├── mlme.h │ ├── netif_block.h │ ├── oid.h │ ├── os │ │ ├── rt_drv.h │ │ ├── rt_linux.h │ │ ├── rt_linux_cmm.h │ │ └── rt_os.h │ ├── p2p.h │ ├── p2p_cmm.h │ ├── p2p_inf.h │ ├── p2pcli.h │ ├── radar.h │ ├── rt_cal.h │ ├── rt_config.h │ ├── rt_led.h │ ├── rt_os_net.h │ ├── rt_os_util.h │ ├── rt_txbf.h │ ├── rtmp.h │ ├── rtmp_chip.h │ ├── rtmp_cmd.h │ ├── rtmp_comm.h │ ├── rtmp_def.h │ ├── rtmp_dot11.h │ ├── rtmp_iface.h │ ├── rtmp_mcu.h │ ├── rtmp_os.h │ ├── rtmp_osabl.h │ ├── rtmp_timer.h │ ├── rtmp_type.h │ ├── spectrum.h │ ├── spectrum_def.h │ ├── sta_cfg.h │ ├── tdls.h │ ├── tdls_cmm.h │ ├── tdls_uapsd.h │ ├── uapsd.h │ ├── video.h │ ├── vr_ikans.h │ ├── vrut_ubm.h │ ├── wapi.h │ ├── wapi_def.h │ ├── wapi_sms4.h │ ├── wfa_p2p.h │ ├── wpa.h │ ├── wpa_cmm.h │ ├── wsc.h │ └── wsc_tlv.h ├── iwpriv_usage.txt ├── os │ └── linux │ │ ├── Kconfig.ap.soc │ │ ├── Kconfig.ap.usb │ │ ├── Kconfig.sta.soc │ │ ├── Makefile.2880.ap │ │ ├── Makefile.2880.sta │ │ ├── Makefile.4 │ │ ├── Makefile.4.netif │ │ ├── Makefile.4.util │ │ ├── Makefile.6 │ │ ├── Makefile.6.netif │ │ ├── Makefile.6.util │ │ ├── Makefile.ap.soc │ │ ├── Makefile.ap.usb │ │ ├── Makefile.clean │ │ ├── Makefile.libautoprovision.6 │ │ ├── Makefile.libwapi.4 │ │ ├── Makefile.libwapi.6 │ │ ├── Makefile.sta.soc │ │ ├── ap_ioctl.c │ │ ├── br_ftph.c │ │ ├── cfg80211.c │ │ ├── cfg80211drv.c │ │ ├── config.mk │ │ ├── inf_ppa.c │ │ ├── pci_main_dev.c │ │ ├── rbus_main_dev.c │ │ ├── rt_linux.c │ │ ├── rt_linux_symb.c │ │ ├── rt_main_dev.c │ │ ├── rt_pci_rbus.c │ │ ├── rt_proc.c │ │ ├── rt_profile.c │ │ ├── rt_rbus_pci_drv.c │ │ ├── rt_rbus_pci_util.c │ │ ├── rt_symb.c │ │ ├── sta_ioctl.c │ │ ├── vr_bdlt.c │ │ └── vr_ikans.c ├── rate_ctrl │ ├── alg_ags.c │ ├── alg_grp.c │ ├── alg_legacy.c │ └── ra_ctrl.c ├── sta │ ├── assoc.c │ ├── auth.c │ ├── auth_rsp.c │ ├── connect.c │ ├── dls.c │ ├── p2pcli.c │ ├── p2pcli_assoc.c │ ├── p2pcli_auth.c │ ├── p2pcli_ctrl.c │ ├── p2pcli_sync.c │ ├── rtmp_ckipmic.c │ ├── rtmp_data.c │ ├── sanity.c │ ├── sta_cfg.c │ ├── sta_iwsc.c │ ├── sync.c │ ├── tdls.c │ ├── tdls_chswitch_mng.c │ ├── tdls_ctrl.c │ ├── tdls_link_mng.c │ ├── tdls_tlv.c │ ├── tdls_uapsd.c │ └── wpa.c ├── sta_ate_iwpriv_usage.txt ├── tools │ ├── Makefile │ ├── bin2h │ └── bin2h.c └── wps_iwpriv_usage.txt ├── rt2860v2_ap ├── Kconfig └── Makefile └── rt2860v2_sta ├── Kconfig └── Makefile /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | 5 | # Libraries 6 | *.lib 7 | *.a 8 | 9 | # Shared objects (inc. Windows DLLs) 10 | *.dll 11 | *.so 12 | *.so.* 13 | *.dylib 14 | 15 | # Executables 16 | *.exe 17 | *.out 18 | *.app 19 | -------------------------------------------------------------------------------- /ralink/Kconfig: -------------------------------------------------------------------------------- 1 | menu "Ralink Flash Type support" 2 | 3 | config MTD_RALINK 4 | bool "Ralink MTD support" 5 | depends on MTD 6 | 7 | endmenu 8 | -------------------------------------------------------------------------------- /ralink/Makefile: -------------------------------------------------------------------------------- 1 | ifeq ($(CONFIG_SOC_MT7620),y) 2 | obj-$(CONFIG_MTD_RALINK) += ralink-flash.o 3 | endif 4 | -------------------------------------------------------------------------------- /ralink/ralink-flash.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This Code was picked from project: https://code.google.com/p/rt-n56u/ 3 | * to fix the following three symbols missing in ralink's wifi driver rt2860v2 4 | * 5 | * EXPORT_SYMBOL(procRegDir); 6 | * EXPORT_SYMBOL(ra_mtd_write_nm); 7 | * EXPORT_SYMBOL(ra_mtd_read_nm); 8 | *************************************************************************** 9 | * www.diveinedu.cn 10 | * Cheetah 大茶园丁 147957232@qq.com 11 | */ 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include "../mtdcore.h" 29 | #include 30 | #include 31 | /* 32 | #include 33 | */ 34 | #include "ralink-flash.h" 35 | 36 | #define WINDOW_ADDR CPHYSADDR(CONFIG_RT2880_MTD_PHYSMAP_START) 37 | #define WINDOW_SIZE CONFIG_RT2880_MTD_PHYSMAP_LEN 38 | #define NUM_FLASH_BANKS 1 39 | 40 | #define BUSWIDTH CONFIG_RT2880_MTD_PHYSMAP_BUSWIDTH 41 | 42 | 43 | 44 | static int __init rt2880_mtd_init(void) 45 | { 46 | 47 | return 0; 48 | } 49 | 50 | static void __exit rt2880_mtd_exit(void) 51 | { 52 | } 53 | 54 | /* 55 | * Flash API: ra_mtd_read, ra_mtd_write 56 | * Arguments: 57 | * - num: specific the mtd number 58 | * - to/from: the offset to read from or written to 59 | * - len: length 60 | * - buf: data to be read/written 61 | * Returns: 62 | * - return -errno if failed 63 | * - return the number of bytes read/written if successed 64 | */ 65 | int ra_mtd_write_nm(char *name, loff_t to, size_t len, const u_char *buf) 66 | { 67 | int ret = -1; 68 | size_t rdlen, wrlen; 69 | struct mtd_info *mtd; 70 | struct erase_info ei; 71 | u_char *bak = NULL; 72 | 73 | mtd = get_mtd_device_nm(name); 74 | 75 | if (IS_ERR(mtd)) { 76 | ret = (int)mtd; 77 | goto out; 78 | } 79 | 80 | if (len > mtd->erasesize) { 81 | put_mtd_device(mtd); 82 | ret = -E2BIG; 83 | goto out; 84 | } 85 | 86 | bak = kzalloc(mtd->erasesize, GFP_KERNEL); 87 | if (bak == NULL) { 88 | put_mtd_device(mtd); 89 | ret = -ENOMEM; 90 | goto out; 91 | } 92 | 93 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) 94 | ret = mtd_read(mtd, 0, mtd->erasesize, &rdlen, bak); 95 | #else 96 | ret = mtd->read(mtd, 0, mtd->erasesize, &rdlen, bak); 97 | #endif 98 | if (ret) { 99 | goto free_out; 100 | } 101 | 102 | if (rdlen != mtd->erasesize) 103 | printk("warning: ra_mtd_write_nm: rdlen is not equal to erasesize\n"); 104 | 105 | memcpy(bak + to, buf, len); 106 | 107 | ei.mtd = mtd; 108 | ei.callback = NULL; 109 | ei.addr = 0; 110 | ei.len = mtd->erasesize; 111 | ei.priv = 0; 112 | 113 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) 114 | ret = mtd_erase(mtd, &ei); 115 | #else 116 | ret = mtd->erase(mtd, &ei); 117 | #endif 118 | if (ret != 0) 119 | goto free_out; 120 | 121 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) 122 | ret = mtd_write(mtd, 0, mtd->erasesize, &wrlen, bak); 123 | #else 124 | ret = mtd->write(mtd, 0, mtd->erasesize, &wrlen, bak); 125 | #endif 126 | 127 | udelay(10); /* add delay after write */ 128 | 129 | free_out: 130 | if (mtd) 131 | put_mtd_device(mtd); 132 | 133 | if (bak) 134 | kfree(bak); 135 | out: 136 | return ret; 137 | } 138 | 139 | int ra_mtd_read_nm(char *name, loff_t from, size_t len, u_char *buf) 140 | { 141 | int ret; 142 | size_t rdlen = 0; 143 | struct mtd_info *mtd; 144 | 145 | mtd = get_mtd_device_nm(name); 146 | if (IS_ERR(mtd)) 147 | return (int)mtd; 148 | 149 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) 150 | ret = mtd_read(mtd, from, len, &rdlen, buf); 151 | #else 152 | ret = mtd->read(mtd, from, len, &rdlen, buf); 153 | #endif 154 | if (rdlen != len) 155 | printk("warning: ra_mtd_read_nm: rdlen is not equal to len\n"); 156 | 157 | put_mtd_device(mtd); 158 | return ret; 159 | } 160 | 161 | module_init(rt2880_mtd_init); 162 | module_exit(rt2880_mtd_exit); 163 | struct proc_dir_entry *procRegDir; 164 | EXPORT_SYMBOL(procRegDir); 165 | EXPORT_SYMBOL(ra_mtd_write_nm); 166 | EXPORT_SYMBOL(ra_mtd_read_nm); 167 | 168 | MODULE_AUTHOR("Steven Liu "); 169 | MODULE_DESCRIPTION("Ralink APSoC Flash Map"); 170 | MODULE_LICENSE("GPL"); 171 | -------------------------------------------------------------------------------- /ralink/ralink-flash.h: -------------------------------------------------------------------------------- 1 | #ifndef __RALINK_FLASH_H__ 2 | #define __RALINK_FLASH_H__ 3 | 4 | #define MTD_BOOT_PART_SIZE 0x30000 5 | #define MTD_CONFIG_PART_SIZE 0x10000 6 | #define MTD_FACTORY_PART_SIZE 0x10000 7 | #if defined (CONFIG_RT2880_FLASH_16M) 8 | #define MTD_STORE_PART_SIZE 0x40000 // 256K 9 | #else 10 | #define MTD_STORE_PART_SIZE 0x10000 // 64K 11 | #endif 12 | 13 | #if defined (CONFIG_RT2880_FLASH_4M) 14 | #define IMAGE1_SIZE 0x400000 15 | #elif defined (CONFIG_RT2880_FLASH_8M) 16 | #define IMAGE1_SIZE 0x800000 17 | #elif defined (CONFIG_RT2880_FLASH_16M) 18 | #define IMAGE1_SIZE 0x1000000 19 | #else 20 | #define IMAGE1_SIZE CONFIG_RT2880_MTD_PHYSMAP_LEN 21 | #endif 22 | 23 | #ifdef CONFIG_RT2880_ROOTFS_IN_FLASH 24 | #ifdef CONFIG_ROOTFS_IN_FLASH_NO_PADDING 25 | #undef CONFIG_MTD_KERNEL_PART_SIZ 26 | #define CONFIG_MTD_KERNEL_PART_SIZ 0 27 | #endif 28 | #define MTD_KERN_PART_SIZE CONFIG_MTD_KERNEL_PART_SIZ 29 | #define MTD_ROOTFS_PART_SIZE (IMAGE1_SIZE - (MTD_BOOT_PART_SIZE + MTD_CONFIG_PART_SIZE + MTD_FACTORY_PART_SIZE + CONFIG_MTD_KERNEL_PART_SIZ + MTD_STORE_PART_SIZE)) 30 | #else 31 | #define MTD_KERN_PART_SIZE (IMAGE1_SIZE - (MTD_BOOT_PART_SIZE + MTD_CONFIG_PART_SIZE + MTD_FACTORY_PART_SIZE + MTD_STORE_PART_SIZE)) 32 | #endif 33 | #if defined (CONFIG_RT2880_FLASH_16M) 34 | #define MTD_FWSTUB_PART_SIZE (IMAGE1_SIZE - (MTD_BOOT_PART_SIZE + MTD_CONFIG_PART_SIZE + MTD_FACTORY_PART_SIZE + MTD_STORE_PART_SIZE)) 35 | #else 36 | #define MTD_FWSTUB_PART_SIZE (IMAGE1_SIZE - (MTD_BOOT_PART_SIZE + MTD_CONFIG_PART_SIZE + MTD_FACTORY_PART_SIZE)) 37 | #endif 38 | #define MTD_FWSTUB_PART_OFFSET (MTD_BOOT_PART_SIZE + MTD_CONFIG_PART_SIZE + MTD_FACTORY_PART_SIZE) 39 | 40 | #define BOOT_FROM_NOR 0 41 | #define BOOT_FROM_NAND 2 42 | #define BOOT_FROM_SPI 3 43 | 44 | #endif /* __RALINK_FLASH_H__ */ 45 | -------------------------------------------------------------------------------- /rt2860v2/README_STA_pci: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/README_STA_pci -------------------------------------------------------------------------------- /rt2860v2/RT2860AP.dat: -------------------------------------------------------------------------------- 1 | #The word of "Default" must not be removed 2 | Default 3 | CountryRegion=5 4 | CountryRegionABand=7 5 | CountryCode=TW 6 | BssidNum=1 7 | SSID1=RT2860AP1 8 | SSID2= 9 | SSID3= 10 | SSID4= 11 | WirelessMode=9 12 | TxRate=0 13 | Channel=11 14 | BasicRate=15 15 | BeaconPeriod=100 16 | DtimPeriod=1 17 | TxPower=100 18 | DisableOLBC=0 19 | BGProtection=0 20 | MaxStaNum=0 21 | TxPreamble=0 22 | RTSThreshold=2347 23 | FragThreshold=2346 24 | TxBurst=1 25 | PktAggregate=0 26 | TurboRate=0 27 | WmmCapable=0 28 | APSDCapable=0 29 | DLSCapable=0 30 | APAifsn=3;7;1;1 31 | APCwmin=4;4;3;2 32 | APCwmax=6;10;4;3 33 | APTxop=0;0;94;47 34 | APACM=0;0;0;0 35 | BSSAifsn=3;7;2;2 36 | BSSCwmin=4;4;3;2 37 | BSSCwmax=10;10;4;3 38 | BSSTxop=0;0;94;47 39 | BSSACM=0;0;0;0 40 | AckPolicy=0;0;0;0 41 | NoForwarding=0 42 | NoForwardingBTNBSSID=0 43 | HideSSID=0 44 | StationKeepAlive=0 45 | ShortSlot=1 46 | AutoChannelSelect=0 47 | IEEE8021X=0 48 | IEEE80211H=0 49 | CSPeriod=10 50 | WirelessEvent=0 51 | IdsEnable=0 52 | AuthFloodThreshold=32 53 | AssocReqFloodThreshold=32 54 | ReassocReqFloodThreshold=32 55 | ProbeReqFloodThreshold=32 56 | DisassocFloodThreshold=32 57 | DeauthFloodThreshold=32 58 | EapReqFooldThreshold=32 59 | PreAuth=0 60 | AuthMode=OPEN 61 | EncrypType=NONE 62 | RekeyInterval=0 63 | RekeyMethod=DISABLE 64 | PMKCachePeriod=10 65 | WPAPSK1= 66 | WPAPSK2= 67 | WPAPSK3= 68 | WPAPSK4= 69 | DefaultKeyID=1 70 | Key1Type=0 71 | Key1Str1= 72 | Key1Str2= 73 | Key1Str3= 74 | Key1Str4= 75 | Key2Type=0 76 | Key2Str1= 77 | Key2Str2= 78 | Key2Str3= 79 | Key2Str4= 80 | Key3Type=0 81 | Key3Str1= 82 | Key3Str2= 83 | Key3Str3= 84 | Key3Str4= 85 | Key4Type=0 86 | Key4Str1= 87 | Key4Str2= 88 | Key4Str3= 89 | Key4Str4= 90 | HSCounter=0 91 | AccessPolicy0=0 92 | AccessControlList0= 93 | AccessPolicy1=0 94 | AccessControlList1= 95 | AccessPolicy2=0 96 | AccessControlList2= 97 | AccessPolicy3=0 98 | AccessControlList3= 99 | WdsEnable=0 100 | WdsEncrypType=NONE 101 | WdsList= 102 | WdsKey= 103 | RADIUS_Server=192.168.2.3 104 | RADIUS_Port=1812 105 | RADIUS_Key=ralink 106 | own_ip_addr=192.168.5.234 107 | EAPifname=br0 108 | PreAuthifname=br0 109 | HT_HTC=0 110 | HT_RDG=0 111 | HT_EXTCHA=0 112 | HT_LinkAdapt=0 113 | HT_OpMode=0 114 | HT_MpduDensity=5 115 | HT_BW=1 116 | HT_AutoBA=1 117 | HT_AMSDU=0 118 | HT_BAWinSize=64 119 | HT_GI=1 120 | HT_MCS=33 121 | MeshId=MESH 122 | MeshAutoLink=1 123 | MeshAuthMode=OPEN 124 | MeshEncrypType=NONE 125 | MeshWPAKEY= 126 | MeshDefaultkey=1 127 | MeshWEPKEY= 128 | WscManufacturer= 129 | WscModelName= 130 | WscDeviceName= 131 | WscModelNumber= 132 | WscSerialNumber= 133 | RadioOn=1 134 | PMFMFPC=0 135 | PMFMFPR=0 136 | PMFSHA256=0 137 | -------------------------------------------------------------------------------- /rt2860v2/RT2860APCard.dat: -------------------------------------------------------------------------------- 1 | #The word of "Default" must not be removed, maximum 32 cards, 00 ~ 31 2 | Default 3 | 4 | #CARDID, MAC, CARDTYPE 5 | SELECT=CARDTYPE 6 | 7 | 00CARDID=/etc/Wireless/RT2860AP/RT2860AP1.dat 8 | 01CARDID=/etc/Wireless/RT2860AP/RT2860AP2.dat 9 | 02CARDID=/etc/Wireless/RT2860AP/RT2860AP3.dat 10 | 11 | 00MAC00:0E:2E:C3:D0:48=/etc/Wireless/RT2860AP/RT2860AP1.dat 12 | 01MAC00:40:F4:FF:AA:40=/etc/Wireless/RT2860AP/RT2860AP2.dat 13 | 02MAC00:0C:43:10:11:5C=/etc/Wireless/RT2860AP/RT2860AP3.dat 14 | 15 | 00CARDTYPEbgn=/etc/Wireless/RT2860AP/RT2860AP1.dat 16 | 01CARDTYPEbgn=/etc/Wireless/RT2860AP/RT2860AP2.dat 17 | 02CARDTYPEabgn=/etc/Wireless/RT2860AP/RT2860AP3.dat 18 | 19 | 20 | -------------------------------------------------------------------------------- /rt2860v2/RT2860STA.dat: -------------------------------------------------------------------------------- 1 | #The word of "Default" must not be removed 2 | Default 3 | CountryRegion=5 4 | CountryRegionABand=7 5 | CountryCode= 6 | ChannelGeography=1 7 | SSID=Dennis2860AP 8 | NetworkType=Infra 9 | WirelessMode=9 10 | Channel=0 11 | BeaconPeriod=100 12 | TxPower=100 13 | BGProtection=0 14 | TxPreamble=0 15 | RTSThreshold=2347 16 | FragThreshold=2346 17 | TxBurst=1 18 | PktAggregate=0 19 | WmmCapable=1 20 | AckPolicy=0;0;0;0 21 | AuthMode=OPEN 22 | EncrypType=NONE 23 | WPAPSK= 24 | DefaultKeyID=1 25 | Key1Type=0 26 | Key1Str= 27 | Key2Type=0 28 | Key2Str= 29 | Key3Type=0 30 | Key3Str= 31 | Key4Type=0 32 | Key4Str= 33 | PSMode=CAM 34 | AutoRoaming=0 35 | RoamThreshold=70 36 | APSDCapable=0 37 | APSDAC=0;0;0;0 38 | HT_RDG=1 39 | HT_EXTCHA=0 40 | HT_OpMode=0 41 | HT_MpduDensity=4 42 | HT_BW=1 43 | HT_AutoBA=1 44 | HT_BADecline=0 45 | HT_AMSDU=0 46 | HT_BAWinSize=64 47 | HT_GI=1 48 | HT_MCS=33 49 | HT_MIMOPSMode=3 50 | HT_DisallowTKIP=1 51 | HT_STBC=0 52 | EthConvertMode= 53 | EthCloneMac= 54 | IEEE80211H=0 55 | TGnWifiTest=0 56 | WirelessEvent=0 57 | MeshId=MESH 58 | MeshAutoLink=1 59 | MeshAuthMode=OPEN 60 | MeshEncrypType=NONE 61 | MeshWPAKEY= 62 | MeshDefaultkey=1 63 | MeshWEPKEY= 64 | CarrierDetect=0 65 | AntDiversity=0 66 | BeaconLostTime=4 67 | FtSupport=0 68 | Wapiifname=ra0 69 | WapiPsk= 70 | WapiPskType= 71 | WapiUserCertPath= 72 | WapiAsCertPath= 73 | PSP_XLINK_MODE=0 74 | WscManufacturer= 75 | WscModelName= 76 | WscDeviceName= 77 | WscModelNumber= 78 | WscSerialNumber= 79 | RadioOn=1 80 | WIDIEnable=1 81 | P2P_L2SD_SCAN_TOGGLE=3 82 | Wsc4digitPinCode=0 83 | P2P_WIDIEnable=0 84 | PMFMFPC=0 85 | PMFMFPR=0 86 | PMFSHA256=0 -------------------------------------------------------------------------------- /rt2860v2/RT2860STACard.dat: -------------------------------------------------------------------------------- 1 | #The word of "Default" must not be removed, maximum 32 cards, 00 ~ 31 2 | Default 3 | 4 | #CARDID, MAC, CARDTYPE 5 | SELECT=CARDTYPE 6 | 7 | 00CARDID=/etc/Wireless/RT2860STA/RT2860STA1.dat 8 | 01CARDID=/etc/Wireless/RT2860STA/RT2860STA2.dat 9 | 02CARDID=/etc/Wireless/RT2860STA/RT2860STA3.dat 10 | 11 | 00MAC00:0E:2E:C3:D0:48=/etc/Wireless/RT2860STA/RT2860STA1.dat 12 | 01MAC00:40:F4:FF:AA:40=/etc/Wireless/RT2860STA/RT2860STA2.dat 13 | 02MAC00:0C:43:10:11:5C=/etc/Wireless/RT2860STA/RT2860STA3.dat 14 | 15 | 00CARDTYPEbgn=/etc/Wireless/RT2860STA/RT2860STA1.dat 16 | 01CARDTYPEbgn=/etc/Wireless/RT2860STA/RT2860STA2.dat 17 | 02CARDTYPEabgn=/etc/Wireless/RT2860STA/RT2860STA3.dat 18 | 19 | 20 | -------------------------------------------------------------------------------- /rt2860v2/ap/ap_wds_inf.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | *************************************************************************** 4 | * Ralink Tech Inc. 5 | * 4F, No. 2 Technology 5th Rd. 6 | * Science-based Industrial Park 7 | * Hsin-chu, Taiwan, R.O.C. 8 | * 9 | * (c) Copyright 2002, Ralink Technology, Inc. 10 | * 11 | * All rights reserved. Ralink's source code is an unpublished work and the 12 | * use of a copyright notice does not imply otherwise. This source code 13 | * contains confidential trade secret material of Ralink Tech. Any attemp 14 | * or participation in deciphering, decoding, reverse engineering or in any 15 | * way altering the source code is stricitly prohibited, unless the prior 16 | * written consent of Ralink Technology, Inc. is obtained. 17 | *************************************************************************** 18 | 19 | Module Name: 20 | ap_wds.c 21 | 22 | Abstract: 23 | Support WDS function. 24 | 25 | Revision History: 26 | Who When What 27 | ------ ---------- ---------------------------------------------- 28 | Fonchi 02-13-2007 created 29 | */ 30 | #define RTMP_MODULE_OS 31 | 32 | #ifdef WDS_SUPPORT 33 | 34 | /*#include "rt_config.h" */ 35 | #include "rtmp_comm.h" 36 | #include "rt_os_util.h" 37 | #include "rt_os_net.h" 38 | 39 | NET_DEV_STATS *RT28xx_get_wds_ether_stats( 40 | IN PNET_DEV net_dev); 41 | 42 | 43 | /* Register WDS interface */ 44 | VOID RT28xx_WDS_Init( 45 | IN VOID *pAd, 46 | IN PNET_DEV net_dev) 47 | { 48 | 49 | RTMP_OS_NETDEV_OP_HOOK netDevOpHook; 50 | 51 | NdisZeroMemory((PUCHAR)&netDevOpHook, sizeof(RTMP_OS_NETDEV_OP_HOOK)); 52 | netDevOpHook.open = WdsVirtualIF_open; 53 | netDevOpHook.stop = WdsVirtualIF_close; 54 | netDevOpHook.xmit = WdsVirtualIFSendPackets; 55 | netDevOpHook.ioctl = WdsVirtualIF_ioctl; 56 | netDevOpHook.get_stats = RT28xx_get_wds_ether_stats; 57 | NdisMoveMemory(&netDevOpHook.devAddr[0], RTMP_OS_NETDEV_GET_PHYADDR(net_dev), MAC_ADDR_LEN); 58 | DBGPRINT(RT_DEBUG_TRACE, ("The new WDS interface MAC = %02X:%02X:%02X:%02X:%02X:%02X\n", 59 | PRINT_MAC(netDevOpHook.devAddr))); 60 | 61 | RTMP_AP_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_WDS_INIT, 62 | 0, &netDevOpHook, 0); 63 | 64 | } 65 | 66 | 67 | INT WdsVirtualIFSendPackets( 68 | IN PNDIS_PACKET pPktSrc, 69 | IN PNET_DEV pDev) 70 | { 71 | 72 | 73 | MEM_DBG_PKT_ALLOC_INC(pPktSrc); 74 | 75 | if(!(RTMP_OS_NETDEV_STATE_RUNNING(pDev))) 76 | { 77 | /* the interface is down */ 78 | RELEASE_NDIS_PACKET(NULL, pPktSrc, NDIS_STATUS_FAILURE); 79 | return 0; 80 | } /* End of if */ 81 | 82 | return WDS_PacketSend(pPktSrc, pDev, rt28xx_packet_xmit); 83 | } 84 | 85 | 86 | INT WdsVirtualIF_open( 87 | IN PNET_DEV dev) 88 | { 89 | VOID *pAd; 90 | #ifdef RTL865X_SOC 91 | INT index; 92 | unsigned int linkid; 93 | #endif 94 | 95 | DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> VirtualIF_open\n", RTMP_OS_NETDEV_GET_DEVNAME(dev))); 96 | 97 | 98 | pAd = RTMP_OS_NETDEV_GET_PRIV(dev); 99 | if (VIRTUAL_IF_UP(pAd) != 0) 100 | return -1; 101 | 102 | /* increase MODULE use count */ 103 | RT_MOD_INC_USE_COUNT(); 104 | 105 | RTMP_OS_NETDEV_START_QUEUE(dev); 106 | return 0; 107 | } 108 | 109 | 110 | INT WdsVirtualIF_close( 111 | IN PNET_DEV dev) 112 | { 113 | VOID *pAd; 114 | 115 | DBGPRINT(RT_DEBUG_TRACE, ("%s: ===> VirtualIF_close\n", RTMP_OS_NETDEV_GET_DEVNAME(dev))); 116 | 117 | 118 | pAd = RTMP_OS_NETDEV_GET_PRIV(dev); 119 | 120 | /*RTMP_OS_NETDEV_CARRIER_OFF(dev);*/ 121 | RTMP_OS_NETDEV_STOP_QUEUE(dev); 122 | 123 | VIRTUAL_IF_DOWN(pAd); 124 | 125 | RT_MOD_DEC_USE_COUNT(); 126 | 127 | return 0; 128 | } 129 | 130 | 131 | INT WdsVirtualIF_ioctl( 132 | IN PNET_DEV net_dev, 133 | IN OUT VOID *rq, 134 | IN INT cmd) 135 | { 136 | VOID *pAd = RTMP_OS_NETDEV_GET_PRIV(net_dev); /*RTMP_OS_NETDEV_GET_PRIV(pVirtualAd->RtmpDev); */ 137 | 138 | /* if(!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_INTERRUPT_IN_USE)) */ 139 | if (RTMP_DRIVER_IOCTL_SANITY_CHECK(pAd, NULL) != NDIS_STATUS_SUCCESS) 140 | { 141 | DBGPRINT(RT_DEBUG_TRACE, ("VirtualIF_ioctl(%s)::Network is down!\n", RTMP_OS_NETDEV_GET_DEVNAME(net_dev))); 142 | return -ENETDOWN; 143 | } 144 | 145 | return rt28xx_ioctl(net_dev, rq, cmd); 146 | } 147 | 148 | 149 | VOID RT28xx_WDS_Remove( 150 | IN VOID *pAd) 151 | { 152 | 153 | RTMP_AP_IoctlHandle(pAd, NULL, CMD_RTPRIV_IOCTL_WDS_REMOVE, 0, NULL, 0); 154 | } 155 | 156 | #endif /* WDS_SUPPORT */ 157 | -------------------------------------------------------------------------------- /rt2860v2/ap/apcli_assoc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/ap/apcli_assoc.c -------------------------------------------------------------------------------- /rt2860v2/chips/rt2880.c: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | rt2880.c 20 | 21 | Abstract: 22 | Specific funcitons and variables for RT2880 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | */ 28 | 29 | 30 | #include "rt_config.h" 31 | 32 | #ifdef RT2880 33 | 34 | /* Default EEPROM value for RT2880 */ 35 | UCHAR RT2880_EeBuffer[EEPROM_SIZE] = { 36 | 0x80,0x28,0x03,0x01,0x00,0x0C,0x43,0x28,0x60,0x20,0x01,0x08,0x14,0x18,0x01,0x80, 37 | 0x00,0x00,0x80,0x28,0x14,0x18,0x00,0x00,0x01,0x00,0x6A,0xFF,0x0C,0x00,0xFF,0xFF, 38 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 39 | 0xFF,0xFF,0xFF,0xFF,0x23,0x02,0x2C,0x00,0xFF,0xFF,0x1D,0x00,0xFF,0xFF,0xFF,0xFF, 40 | 0xFF,0xFF,0xFF,0xFF,0x0A,0x10,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x08,0xFF,0xFF, 41 | 0xFF,0xFF,0x0F,0x0F,0x0F,0x0F,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E, 42 | 0x13,0x13,0x12,0x12,0x11,0x11,0x10,0x10,0x10,0x10,0x0F,0x0F,0x0F,0x0F,0xFF,0xFF, 43 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06, 44 | 45 | 0x06,0x06,0x06,0x06,0x04,0x04,0x04,0x04,0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x05, 46 | 0x05,0x05,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08,0x08,0xFF,0xFF,0xFF,0xFF,0xFF, 47 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x05,0x05,0x05,0x05,0x05,0x05,0x06,0x06,0x06,0x04, 48 | 0x05,0x05,0x05,0x05,0x05,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06, 49 | 0x06,0x06,0x06,0x06,0x07,0x07,0x08,0x09,0x09,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 50 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x66,0x66, 51 | 0xCC,0xAA,0x88,0x66,0xCC,0xAA,0x88,0x66,0xCC,0xAA,0x88,0x66,0xCC,0xAA,0x88,0x66, 52 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 53 | 54 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 55 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 56 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 57 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 58 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 59 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 60 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 61 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 62 | 63 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 64 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 65 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 66 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 67 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 68 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 69 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 70 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 71 | }; 72 | 73 | 74 | VOID RT2880_Init( 75 | IN PRTMP_ADAPTER pAd) 76 | { 77 | RTMP_CHIP_CAP *pChipCap = &pAd->chipCap; 78 | 79 | pChipCap->MaxNumOfBbpId = 185; 80 | #ifdef RTMP_FLASH_SUPPORT 81 | pChipCap->eebuf = RT2880_EeBuffer; 82 | #endif /* RTMP_FLASH_SUPPORT */ 83 | } 84 | 85 | #endif /* RT2880*/ 86 | 87 | -------------------------------------------------------------------------------- /rt2860v2/common/cmm_aes.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/common/cmm_aes.c -------------------------------------------------------------------------------- /rt2860v2/common/cmm_cmd.c: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2006, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | cmm_cmd.c 20 | 21 | Abstract: 22 | All command related API. 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | Name Date Modification logs 28 | Paul Lin 06-25-2004 created 29 | */ 30 | 31 | #include "rt_config.h" 32 | 33 | 34 | 35 | 36 | /* 37 | ======================================================================== 38 | 39 | Routine Description: 40 | 41 | Arguments: 42 | 43 | Return Value: 44 | 45 | IRQL = 46 | 47 | Note: 48 | 49 | ======================================================================== 50 | */ 51 | VOID RTInitializeCmdQ( 52 | IN PCmdQ cmdq) 53 | { 54 | cmdq->head = NULL; 55 | cmdq->tail = NULL; 56 | cmdq->size = 0; 57 | cmdq->CmdQState = RTMP_TASK_STAT_INITED; 58 | } 59 | 60 | 61 | /* 62 | ======================================================================== 63 | 64 | Routine Description: 65 | 66 | Arguments: 67 | 68 | Return Value: 69 | 70 | IRQL = 71 | 72 | Note: 73 | 74 | ======================================================================== 75 | */ 76 | VOID RTThreadDequeueCmd( 77 | IN PCmdQ cmdq, 78 | OUT PCmdQElmt *pcmdqelmt) 79 | { 80 | *pcmdqelmt = cmdq->head; 81 | 82 | if (*pcmdqelmt != NULL) 83 | { 84 | cmdq->head = cmdq->head->next; 85 | cmdq->size--; 86 | if (cmdq->size == 0) 87 | cmdq->tail = NULL; 88 | } 89 | } 90 | 91 | 92 | /* 93 | ======================================================================== 94 | 95 | Routine Description: 96 | 97 | Arguments: 98 | 99 | Return Value: 100 | 101 | IRQL = 102 | 103 | Note: 104 | 105 | ======================================================================== 106 | */ 107 | NDIS_STATUS RTEnqueueInternalCmd( 108 | IN PRTMP_ADAPTER pAd, 109 | IN NDIS_OID Oid, 110 | IN PVOID pInformationBuffer, 111 | IN UINT32 InformationBufferLength) 112 | { 113 | NDIS_STATUS status; 114 | PCmdQElmt cmdqelmt = NULL; 115 | 116 | 117 | status = os_alloc_mem(pAd, (PUCHAR *)&cmdqelmt, sizeof(CmdQElmt)); 118 | if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt == NULL)) 119 | return (NDIS_STATUS_RESOURCES); 120 | NdisZeroMemory(cmdqelmt, sizeof(CmdQElmt)); 121 | 122 | if(InformationBufferLength > 0) 123 | { 124 | status = os_alloc_mem(pAd, (PUCHAR *)&cmdqelmt->buffer, InformationBufferLength); 125 | if ((status != NDIS_STATUS_SUCCESS) || (cmdqelmt->buffer == NULL)) 126 | { 127 | os_free_mem(pAd, cmdqelmt); 128 | return (NDIS_STATUS_RESOURCES); 129 | } 130 | else 131 | { 132 | NdisMoveMemory(cmdqelmt->buffer, pInformationBuffer, InformationBufferLength); 133 | cmdqelmt->bufferlength = InformationBufferLength; 134 | } 135 | } 136 | else 137 | { 138 | cmdqelmt->buffer = NULL; 139 | cmdqelmt->bufferlength = 0; 140 | } 141 | 142 | cmdqelmt->command = Oid; 143 | cmdqelmt->CmdFromNdis = FALSE; 144 | 145 | if (cmdqelmt != NULL) 146 | { 147 | NdisAcquireSpinLock(&pAd->CmdQLock); 148 | if (pAd->CmdQ.CmdQState & RTMP_TASK_CAN_DO_INSERT) 149 | { 150 | EnqueueCmd((&pAd->CmdQ), cmdqelmt); 151 | status = NDIS_STATUS_SUCCESS; 152 | } 153 | else 154 | { 155 | status = NDIS_STATUS_FAILURE; 156 | } 157 | NdisReleaseSpinLock(&pAd->CmdQLock); 158 | 159 | if (status == NDIS_STATUS_FAILURE) 160 | { 161 | if (cmdqelmt->buffer) 162 | os_free_mem(pAd, cmdqelmt->buffer); 163 | os_free_mem(pAd, cmdqelmt); 164 | } 165 | else 166 | RTCMDUp(&pAd->cmdQTask); 167 | } 168 | return(NDIS_STATUS_SUCCESS); 169 | } 170 | -------------------------------------------------------------------------------- /rt2860v2/common/cmm_wpa.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/common/cmm_wpa.c -------------------------------------------------------------------------------- /rt2860v2/common/crypt_hmac.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/common/crypt_hmac.c -------------------------------------------------------------------------------- /rt2860v2/common/eeprom.c: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | eeprom.c 20 | 21 | Abstract: 22 | 23 | Revision History: 24 | Who When What 25 | -------- ---------- ---------------------------------------------- 26 | Name Date Modification logs 27 | */ 28 | #include "rt_config.h" 29 | 30 | 31 | INT RtmpChipOpsEepromHook( 32 | IN RTMP_ADAPTER *pAd, 33 | IN INT infType) 34 | { 35 | RTMP_CHIP_OP *pChipOps = &pAd->chipOps; 36 | 37 | #ifdef RTMP_FLASH_SUPPORT 38 | pChipOps->eeinit = rtmp_nv_init; 39 | pChipOps->eeread = rtmp_ee_flash_read; 40 | pChipOps->eewrite = rtmp_ee_flash_write; 41 | return 0; 42 | #endif /* RTMP_FLASH_SUPPORT */ 43 | 44 | 45 | switch(infType) 46 | { 47 | #ifdef RTMP_PCI_SUPPORT 48 | case RTMP_DEV_INF_PCI: 49 | case RTMP_DEV_INF_PCIE: 50 | { 51 | UINT32 val; 52 | RTMP_IO_READ32(pAd, E2PROM_CSR, &val); 53 | if ((val & 0x30) == 0) 54 | pAd->EEPROMAddressNum = 6; /* 93C46*/ 55 | else if ((val & 0x30) == 0x10) 56 | pAd->EEPROMAddressNum = 8; /* 93C66*/ 57 | else 58 | pAd->EEPROMAddressNum = 8; /* 93C86*/ 59 | } 60 | pChipOps->eeinit = NULL; 61 | pChipOps->eeread = rtmp_ee_prom_read16; 62 | pChipOps->eewrite = rtmp_ee_prom_write16; 63 | break; 64 | #endif /* RTMP_PCI_SUPPORT */ 65 | 66 | #ifdef RTMP_RBUS_SUPPORT 67 | case RTMP_DEV_INF_RBUS: 68 | pChipOps->eeinit = rtmp_nv_init; 69 | pChipOps->eeread = rtmp_ee_flash_read; 70 | pChipOps->eewrite = rtmp_ee_flash_write; 71 | pChipOps->loadFirmware = NULL; 72 | break; 73 | #endif /* RTMP_RBUS_SUPPORT */ 74 | 75 | default: 76 | DBGPRINT(RT_DEBUG_ERROR, ("RtmpChipOpsEepromHook() failed!\n")); 77 | break; 78 | } 79 | 80 | return 0; 81 | } 82 | 83 | -------------------------------------------------------------------------------- /rt2860v2/common/frq_cal.c: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | frq_cal.c 20 | 21 | Abstract: 22 | 23 | Revision History: 24 | Who When What 25 | -------- ---------- ---------------------------------------------- 26 | */ 27 | 28 | 29 | -------------------------------------------------------------------------------- /rt2860v2/common/misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2009, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | misc.c 20 | 21 | Abstract: 22 | 23 | Handling Misc Problem 24 | 25 | Revision History: 26 | Who When What 27 | -------- ---------- ---------------------------------------------- 28 | Sean Wang 2009-08-12 Create 29 | John Li 2009-11-30 Modified 30 | */ 31 | 32 | #include "rt_config.h" 33 | #include "misc.h" 34 | 35 | 36 | -------------------------------------------------------------------------------- /rt2860v2/common/netif_block.c: -------------------------------------------------------------------------------- 1 | #ifdef BLOCK_NET_IF 2 | 3 | #include "rt_config.h" 4 | #include "netif_block.h" 5 | 6 | static NETIF_ENTRY freeNetIfEntryPool[FREE_NETIF_POOL_SIZE]; 7 | static LIST_HEADER freeNetIfEntryList; 8 | 9 | void initblockQueueTab( 10 | IN PRTMP_ADAPTER pAd) 11 | { 12 | int i; 13 | 14 | initList(&freeNetIfEntryList); 15 | for (i = 0; i < FREE_NETIF_POOL_SIZE; i++) 16 | insertTailList(&freeNetIfEntryList, (PLIST_ENTRY)&freeNetIfEntryPool[i]); 17 | 18 | for (i=0; i < NUM_OF_TX_RING; i++) 19 | initList(&pAd->blockQueueTab[i].NetIfList); 20 | 21 | return; 22 | } 23 | 24 | BOOLEAN blockNetIf( 25 | IN PBLOCK_QUEUE_ENTRY pBlockQueueEntry, 26 | IN PNET_DEV pNetDev) 27 | { 28 | PNETIF_ENTRY pNetIfEntry = NULL; 29 | 30 | if ((pNetIfEntry = (PNETIF_ENTRY)removeHeadList(&freeNetIfEntryList)) != NULL) 31 | { 32 | RTMP_OS_NETDEV_STOP_QUEUE(pNetDev); 33 | pNetIfEntry->pNetDev = pNetDev; 34 | insertTailList(&pBlockQueueEntry->NetIfList, (PLIST_ENTRY)pNetIfEntry); 35 | 36 | pBlockQueueEntry->SwTxQueueBlockFlag = TRUE; 37 | DBGPRINT(RT_DEBUG_TRACE, ("RTMP_OS_NETDEV_STOP_QUEUE(%s)\n", RTMP_OS_NETDEV_GET_DEVNAME(pNetDev))); 38 | } 39 | else 40 | return FALSE; 41 | 42 | return TRUE; 43 | } 44 | 45 | VOID releaseNetIf( 46 | IN PBLOCK_QUEUE_ENTRY pBlockQueueEntry) 47 | { 48 | PNETIF_ENTRY pNetIfEntry = NULL; 49 | PLIST_HEADER pNetIfList = &pBlockQueueEntry->NetIfList; 50 | 51 | while((pNetIfEntry = (PNETIF_ENTRY)removeHeadList(pNetIfList)) != NULL) 52 | { 53 | PNET_DEV pNetDev = pNetIfEntry->pNetDev; 54 | RTMP_OS_NETDEV_WAKE_QUEUE(pNetDev); 55 | insertTailList(&freeNetIfEntryList, (PLIST_ENTRY)pNetIfEntry); 56 | 57 | DBGPRINT(RT_DEBUG_TRACE, ("RTMP_OS_NETDEV_WAKE_QUEUE(%s)\n", RTMP_OS_NETDEV_GET_DEVNAME(pNetDev))); 58 | } 59 | pBlockQueueEntry->SwTxQueueBlockFlag = FALSE; 60 | return; 61 | } 62 | 63 | 64 | VOID StopNetIfQueue( 65 | IN PRTMP_ADAPTER pAd, 66 | IN UCHAR QueIdx, 67 | IN PNDIS_PACKET pPacket) 68 | { 69 | PNET_DEV NetDev = NULL; 70 | UCHAR IfIdx = 0; 71 | BOOLEAN valid = FALSE; 72 | 73 | 74 | #ifdef P2P_SUPPORT 75 | if (RTMP_GET_PACKET_NET_DEVICE(pPacket) >= MIN_NET_DEVICE_FOR_P2P_GO) 76 | { 77 | IfIdx = (RTMP_GET_PACKET_NET_DEVICE(pPacket) - MIN_NET_DEVICE_FOR_P2P_GO) % MAX_P2P_NUM; 78 | NetDev = pAd->ApCfg.MBSSID[IfIdx].MSSIDDev; 79 | } 80 | else 81 | #endif /* P2P_SUPPORT */ 82 | #ifdef APCLI_SUPPORT 83 | if (RTMP_GET_PACKET_NET_DEVICE(pPacket) >= MIN_NET_DEVICE_FOR_APCLI) 84 | { 85 | IfIdx = (RTMP_GET_PACKET_NET_DEVICE(pPacket) - MIN_NET_DEVICE_FOR_APCLI) % MAX_APCLI_NUM; 86 | NetDev = pAd->ApCfg.ApCliTab[IfIdx].dev; 87 | } 88 | else 89 | #endif /* APCLI_SUPPORT */ 90 | #ifdef WDS_SUPPORT 91 | if (RTMP_GET_PACKET_NET_DEVICE(pPacket) >= MIN_NET_DEVICE_FOR_WDS) 92 | { 93 | IfIdx = (RTMP_GET_PACKET_NET_DEVICE(pPacket) - MIN_NET_DEVICE_FOR_WDS) % MAX_WDS_ENTRY; 94 | NetDev = pAd->WdsTab.WdsEntry[IfIdx].dev; 95 | } 96 | else 97 | #endif /* WDS_SUPPORT */ 98 | { 99 | #ifdef MBSS_SUPPORT 100 | if (pAd->OpMode == OPMODE_AP) 101 | { 102 | IfIdx = (RTMP_GET_PACKET_NET_DEVICE(pPacket) - MIN_NET_DEVICE_FOR_MBSSID) % MAX_MBSSID_NUM(pAd); 103 | NetDev = pAd->ApCfg.MBSSID[IfIdx].MSSIDDev; 104 | } 105 | else 106 | { 107 | IfIdx = MAIN_MBSSID; 108 | NetDev = pAd->net_dev; 109 | } 110 | #else 111 | IfIdx = MAIN_MBSSID; 112 | NetDev = pAd->net_dev; 113 | #endif 114 | } 115 | 116 | /* WMM support 4 software queues.*/ 117 | /* One software queue full doesn't mean device have no capbility to transmit packet.*/ 118 | /* So disable block Net-If queue function while WMM enable.*/ 119 | #ifdef CONFIG_AP_SUPPORT 120 | IF_DEV_CONFIG_OPMODE_ON_AP(pAd) 121 | valid = (pAd->ApCfg.MBSSID[IfIdx].bWmmCapable == TRUE) ? FALSE : TRUE; 122 | #endif /* CONFIG_AP_SUPPORT */ 123 | #ifdef CONFIG_STA_SUPPORT 124 | { 125 | #ifdef P2P_SUPPORT 126 | if (RTMP_GET_PACKET_NET_DEVICE(pPacket) >= MIN_NET_DEVICE_FOR_P2P_GO) 127 | valid = (pAd->ApCfg.MBSSID[IfIdx].bWmmCapable == TRUE) ? FALSE : TRUE; 128 | else 129 | #endif /* P2P_SUPPORT */ 130 | IF_DEV_CONFIG_OPMODE_ON_STA(pAd) 131 | valid = (pAd->CommonCfg.bWmmCapable == TRUE) ? FALSE : TRUE; 132 | } 133 | #endif /* CONFIG_STA_SUPPORT */ 134 | 135 | if (valid) 136 | blockNetIf(&pAd->blockQueueTab[QueIdx], NetDev); 137 | return; 138 | } 139 | 140 | #endif /* BLOCK_NET_IF */ 141 | -------------------------------------------------------------------------------- /rt2860v2/common/p2p_packet.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/common/p2p_packet.c -------------------------------------------------------------------------------- /rt2860v2/common/rt2860.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/common/rt2860.bin -------------------------------------------------------------------------------- /rt2860v2/common/rt2860.bin.dfs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/common/rt2860.bin.dfs -------------------------------------------------------------------------------- /rt2860v2/common/rtmp_swmcu.c: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | rtmp_swmcu.c 20 | 21 | Abstract: 22 | Miniport generic portion header file 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | */ 28 | 29 | 30 | #ifdef CONFIG_SWMCU_SUPPORT 31 | #include "rt_config.h" 32 | 33 | 34 | 35 | int RtmpAsicSendCommandToSwMcu( 36 | IN RTMP_ADAPTER *pAd, 37 | IN UCHAR Command, 38 | IN UCHAR Token, 39 | IN UCHAR Arg0, 40 | IN UCHAR Arg1, 41 | IN BOOLEAN FlgIsNeedLocked) 42 | { 43 | BBP_CSR_CFG_STRUC BbpCsr, BbpCsr2; 44 | int j, k; 45 | #ifdef LED_CONTROL_SUPPORT 46 | UINT16 Temp; 47 | PSWMCU_LED_CONTROL pSWMCULedCntl = &pAd->LedCntl.SWMCULedCntl; 48 | #endif /* LED_CONTROL_SUPPORT */ 49 | 50 | switch(Command) 51 | { 52 | case 0x80: 53 | RTMP_IO_READ32(pAd, H2M_BBP_AGENT, &BbpCsr.word); 54 | if ((BbpCsr.field.Busy != 1) || (BbpCsr.field.BBP_RW_MODE != 1)) 55 | DBGPRINT(RT_DEBUG_ERROR, ("error read write BBP 1\n")); 56 | 57 | for (j=0; jBbpWriteLatch[BbpCsr.field.RegNum] = BbpCsr2.field.Value; 94 | break; 95 | } 96 | } 97 | 98 | if (j == MAX_BUSY_COUNT) 99 | { 100 | DBGPRINT(RT_DEBUG_ERROR, ("error read write BBP 3\n")); 101 | if (BbpCsr.field.Busy != IDLE) 102 | { 103 | BbpCsr.field.Busy = IDLE; 104 | RTMP_IO_WRITE32(pAd, H2M_BBP_AGENT, BbpCsr.word); 105 | } 106 | } 107 | break; 108 | case 0x30: 109 | break; 110 | case 0x31: 111 | break; 112 | #ifdef WSC_LED_SUPPORT 113 | case MCU_SET_WPS_LED_MODE: 114 | pSWMCULedCntl->LedParameter.LedMode = Arg0; 115 | pSWMCULedCntl->LinkStatus = Arg1; 116 | SetWPSLinkStatus(pAd); 117 | break; 118 | #endif /* WSC_LED_SUPPORT */ 119 | #ifdef LED_CONTROL_SUPPORT 120 | case MCU_SET_LED_MODE: 121 | pSWMCULedCntl->LedParameter.LedMode = Arg0; 122 | pSWMCULedCntl->LinkStatus = Arg1; 123 | SetLedLinkStatus(pAd); 124 | break; 125 | case MCU_SET_LED_GPIO_SIGNAL_CFG: 126 | pSWMCULedCntl->GPIOPolarity = Arg1; 127 | pSWMCULedCntl->SignalStrength = Arg0; 128 | break; 129 | case MCU_SET_LED_AG_CFG: 130 | Temp = ((UINT16)Arg1 << 8) | (UINT16)Arg0; 131 | NdisMoveMemory(&pSWMCULedCntl->LedParameter.LedAgCfg, &Temp, 2); 132 | break; 133 | case MCU_SET_LED_ACT_CFG: 134 | Temp = ((UINT16)Arg1 << 8) | (UINT16)Arg0; 135 | NdisMoveMemory(&pSWMCULedCntl->LedParameter.LedActCfg, &Temp, 2); 136 | break; 137 | case MCU_SET_LED_POLARITY: 138 | Temp = ((UINT16)Arg1 << 8) | (UINT16)Arg0; 139 | NdisMoveMemory(&pSWMCULedCntl->LedParameter.LedPolarityCfg, &Temp, 2); 140 | break; 141 | #endif /* LED_CONTROL_SUPPORT */ 142 | 143 | default: 144 | break; 145 | } 146 | 147 | return 0; 148 | } 149 | 150 | #endif /* CONFIG_SWMCU_SUPPORT */ 151 | -------------------------------------------------------------------------------- /rt2860v2/common/wsc_tlv.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/common/wsc_tlv.c -------------------------------------------------------------------------------- /rt2860v2/include/action.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | aironet.h 20 | 21 | Abstract: 22 | 23 | Revision History: 24 | Who When What 25 | -------- ---------- ---------------------------------------------- 26 | Name Date Modification logs 27 | Paul Lin 04-06-15 Initial 28 | */ 29 | 30 | #ifndef __ACTION_H__ 31 | #define __ACTION_H__ 32 | 33 | typedef struct GNU_PACKED __HT_INFO_OCTET { 34 | #ifdef RT_BIG_ENDIAN 35 | UCHAR Reserved:5; 36 | UCHAR STA_Channel_Width:1; 37 | UCHAR Forty_MHz_Intolerant:1; 38 | UCHAR Request:1; 39 | #else 40 | UCHAR Request:1; 41 | UCHAR Forty_MHz_Intolerant:1; 42 | UCHAR STA_Channel_Width:1; 43 | UCHAR Reserved:5; 44 | #endif 45 | } HT_INFORMATION_OCTET; 46 | 47 | typedef struct GNU_PACKED __FRAME_HT_INFO { 48 | HEADER_802_11 Hdr; 49 | UCHAR Category; 50 | UCHAR Action; 51 | HT_INFORMATION_OCTET HT_Info; 52 | } FRAME_HT_INFO, *PFRAME_HT_INFO; 53 | 54 | #endif /* __ACTION_H__ */ 55 | -------------------------------------------------------------------------------- /rt2860v2/include/ags.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | 17 | Abstract: 18 | 19 | All AGS (Adaptive Group Switching) Related Structure & Definition 20 | 21 | ***************************************************************************/ 22 | 23 | #ifndef __AGS_H__ 24 | #define __AGS_H__ 25 | 26 | 27 | extern UCHAR AGS1x1HTRateTable[]; 28 | extern UCHAR AGS2x2HTRateTable[]; 29 | extern UCHAR AGS3x3HTRateTable[]; 30 | 31 | 32 | #define AGS_TX_QUALITY_WORST_BOUND 8 33 | 34 | /* The size, in bytes, of an AGS entry in the rate switch table */ 35 | #define SIZE_OF_AGS_RATE_TABLE_ENTRY 9 36 | 37 | 38 | typedef struct _RTMP_TX_RATE_SWITCH_AGS { 39 | UCHAR ItemNo; 40 | 41 | #ifdef RT_BIG_ENDIAN 42 | UCHAR Rsv2:2; 43 | UCHAR Mode:2; 44 | UCHAR Rsv1:1; 45 | UCHAR BW:1; 46 | UCHAR ShortGI:1; 47 | UCHAR STBC:1; 48 | #else 49 | UCHAR STBC:1; 50 | UCHAR ShortGI:1; 51 | UCHAR BW:1; 52 | UCHAR Rsv1:1; 53 | UCHAR Mode:2; 54 | UCHAR Rsv2:2; 55 | #endif /* RT_BIG_ENDIAN */ 56 | 57 | UCHAR CurrMCS; 58 | UCHAR TrainUp; 59 | UCHAR TrainDown; 60 | UCHAR downMcs; 61 | UCHAR upMcs3; 62 | UCHAR upMcs2; 63 | UCHAR upMcs1; 64 | } RTMP_TX_RATE_SWITCH_AGS, *PRTMP_TX_RATE_SWITCH_AGS; 65 | 66 | 67 | /* AGS control */ 68 | typedef struct _AGS_CONTROL { 69 | UCHAR MCSGroup; /* The MCS group under testing */ 70 | UCHAR lastRateIdx; 71 | } AGS_CONTROL,*PAGS_CONTROL; 72 | 73 | 74 | /* The statistics information for AGS */ 75 | typedef struct _AGS_STATISTICS_INFO { 76 | CHAR RSSI; 77 | ULONG TxErrorRatio; 78 | ULONG AccuTxTotalCnt; 79 | ULONG TxTotalCnt; 80 | ULONG TxSuccess; 81 | ULONG TxRetransmit; 82 | ULONG TxFailCount; 83 | } AGS_STATISTICS_INFO, *PAGS_STATISTICS_INFO; 84 | 85 | 86 | /* Support AGS (Adaptive Group Switching) */ 87 | #define SUPPORT_AGS(__pAd) (IS_RT3593(__pAd)) 88 | #define AGS_IS_USING(__pAd, __pRateTable) \ 89 | (SUPPORT_AGS(__pAd) && \ 90 | ((__pRateTable == AGS1x1HTRateTable) || \ 91 | (__pRateTable == AGS2x2HTRateTable) || \ 92 | (__pRateTable == AGS3x3HTRateTable))) 93 | 94 | #endif /* __AGS_H__ */ 95 | 96 | /* End of ags.h */ 97 | -------------------------------------------------------------------------------- /rt2860v2/include/ap_autoChSel.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Abstract: 17 | 18 | 19 | */ 20 | 21 | #include "ap_autoChSel_cmm.h" 22 | 23 | #ifndef __AUTOCHSELECT_H__ 24 | #define __AUTOCHSELECT_H__ 25 | 26 | #define AP_AUTO_CH_SEL(__P, __O) APAutoSelectChannel((__P), (__O)) 27 | 28 | ULONG AutoChBssSearchWithSSID( 29 | IN PRTMP_ADAPTER pAd, 30 | IN PUCHAR Bssid, 31 | IN PUCHAR pSsid, 32 | IN UCHAR SsidLen, 33 | IN UCHAR Channel); 34 | 35 | VOID APAutoChannelInit( 36 | IN PRTMP_ADAPTER pAd); 37 | 38 | VOID UpdateChannelInfo( 39 | IN PRTMP_ADAPTER pAd, 40 | IN int ch, 41 | IN ChannelSel_Alg Alg); 42 | 43 | ULONG AutoChBssInsertEntry( 44 | IN PRTMP_ADAPTER pAd, 45 | IN PUCHAR pBssid, 46 | IN CHAR Ssid[], 47 | IN UCHAR SsidLen, 48 | IN UCHAR ChannelNo, 49 | IN UCHAR ExtChOffset, 50 | IN CHAR Rssi); 51 | 52 | VOID AutoChBssTableInit( 53 | IN PRTMP_ADAPTER pAd); 54 | 55 | VOID ChannelInfoInit( 56 | IN PRTMP_ADAPTER pAd); 57 | 58 | VOID AutoChBssTableDestroy( 59 | IN PRTMP_ADAPTER pAd); 60 | 61 | VOID ChannelInfoDestroy( 62 | IN PRTMP_ADAPTER pAd); 63 | 64 | VOID CheckPhyModeIsABand( 65 | IN PRTMP_ADAPTER pAd); 66 | 67 | UCHAR SelectBestChannel( 68 | IN PRTMP_ADAPTER pAd, 69 | IN ChannelSel_Alg Alg); 70 | 71 | UCHAR APAutoSelectChannel( 72 | IN PRTMP_ADAPTER pAd, 73 | IN ChannelSel_Alg Alg); 74 | 75 | #ifdef AP_SCAN_SUPPORT 76 | VOID AutoChannelSelCheck( 77 | IN PRTMP_ADAPTER pAd); 78 | #endif /* AP_SCAN_SUPPORT */ 79 | 80 | #endif /* __AUTOCHSELECT_H__ */ 81 | 82 | -------------------------------------------------------------------------------- /rt2860v2/include/ap_autoChSel_cmm.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Abstract: 17 | 18 | 19 | */ 20 | 21 | 22 | #ifndef __AUTOCHSELECT_CMM_H__ 23 | #define __AUTOCHSELECT_CMM_H__ 24 | 25 | #define RSSI_TO_DBM_OFFSET 120 /* RSSI-115 = dBm */ 26 | 27 | 28 | typedef struct { 29 | ULONG dirtyness[MAX_NUM_OF_CHANNELS+1]; 30 | ULONG ApCnt[MAX_NUM_OF_CHANNELS+1]; 31 | UINT32 FalseCCA[MAX_NUM_OF_CHANNELS+1]; 32 | BOOLEAN SkipList[MAX_NUM_OF_CHANNELS+1]; 33 | #ifdef AP_QLOAD_SUPPORT 34 | UINT32 chanbusytime[MAX_NUM_OF_CHANNELS+1]; /* QLOAD ALARM */ 35 | #endif /* AP_QLOAD_SUPPORT */ 36 | BOOLEAN IsABand; 37 | } CHANNELINFO, *PCHANNELINFO; 38 | 39 | typedef struct { 40 | UCHAR Bssid[MAC_ADDR_LEN]; 41 | UCHAR SsidLen; 42 | CHAR Ssid[MAX_LEN_OF_SSID]; 43 | UCHAR Channel; 44 | UCHAR ExtChOffset; 45 | CHAR Rssi; 46 | } BSSENTRY, *PBSSENTRY; 47 | 48 | typedef struct { 49 | UCHAR BssNr; 50 | BSSENTRY BssEntry[MAX_LEN_OF_BSS_TABLE]; 51 | } BSSINFO, *PBSSINFO; 52 | 53 | typedef enum ChannelSelAlg 54 | { 55 | ChannelAlgRandom, /*use by Dfs */ 56 | ChannelAlgApCnt, 57 | ChannelAlgCCA 58 | } ChannelSel_Alg; 59 | 60 | #endif /* __AUTOCHSELECT_CMM_H__ */ 61 | 62 | -------------------------------------------------------------------------------- /rt2860v2/include/ap_cfg.h: -------------------------------------------------------------------------------- 1 | #ifndef __AP_CFG_H__ 2 | #define __AP_CFG_H__ 3 | 4 | 5 | #include "rt_config.h" 6 | 7 | INT RTMPAPPrivIoctlSet( 8 | IN RTMP_ADAPTER *pAd, 9 | IN RTMP_IOCTL_INPUT_STRUCT *pIoctlCmdStr); 10 | 11 | INT RTMPAPPrivIoctlShow( 12 | IN RTMP_ADAPTER *pAd, 13 | IN RTMP_IOCTL_INPUT_STRUCT *pIoctlCmdStr); 14 | 15 | #ifdef INF_AR9 16 | #ifdef AR9_MAPI_SUPPORT 17 | INT RTMPAPPrivIoctlAR9Show( 18 | IN RTMP_ADAPTER *pAd, 19 | IN RTMP_IOCTL_INPUT_STRUCT *pIoctlCmdStr); 20 | 21 | VOID RTMPAR9IoctlGetMacTable( 22 | IN PRTMP_ADAPTER pAd, 23 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 24 | 25 | VOID RTMPIoctlGetSTAT2( 26 | IN PRTMP_ADAPTER pAd, 27 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 28 | 29 | VOID RTMPIoctlGetRadioDynInfo( 30 | IN PRTMP_ADAPTER pAd, 31 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 32 | #endif /*AR9_MAPI_SUPPORT*/ 33 | #endif/* INF_AR9 */ 34 | 35 | INT RTMPAPSetInformation( 36 | IN PRTMP_ADAPTER pAd, 37 | IN OUT RTMP_IOCTL_INPUT_STRUCT *rq, 38 | IN INT cmd); 39 | 40 | INT RTMPAPQueryInformation( 41 | IN PRTMP_ADAPTER pAd, 42 | IN OUT RTMP_IOCTL_INPUT_STRUCT *rq, 43 | IN INT cmd); 44 | 45 | VOID RTMPIoctlStatistics( 46 | IN PRTMP_ADAPTER pAd, 47 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 48 | 49 | #ifdef RTMP_RBUS_SUPPORT 50 | /* +++ added by Red@Ralink, 2009/09/30 */ 51 | VOID RTMPIoctlGetMacTableStaInfo( 52 | IN PRTMP_ADAPTER pAd, 53 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 54 | /* ++ end of addition */ 55 | #endif /* RTMP_RBUS_SUPPORT */ 56 | 57 | VOID RTMPIoctlGetMacTable( 58 | IN PRTMP_ADAPTER pAd, 59 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 60 | 61 | 62 | VOID RTMPAPIoctlE2PROM( 63 | IN PRTMP_ADAPTER pAdapter, 64 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 65 | 66 | #ifdef DBG 67 | VOID RTMPAPIoctlBBP( 68 | IN PRTMP_ADAPTER pAdapter, 69 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 70 | 71 | VOID RTMPAPIoctlMAC( 72 | IN PRTMP_ADAPTER pAdapter, 73 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 74 | 75 | #ifdef RTMP_RF_RW_SUPPORT 76 | VOID RTMPAPIoctlRF( 77 | IN PRTMP_ADAPTER pAdapter, 78 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 79 | #endif /* RTMP_RF_RW_SUPPORT */ 80 | 81 | #endif /* DBG */ 82 | 83 | VOID RtmpDrvMaxRateGet( 84 | IN VOID *pReserved, 85 | /* IN PHTTRANSMIT_SETTING pHtPhyMode, */ 86 | IN UINT8 MODE, 87 | IN UINT8 ShortGI, 88 | IN UINT8 BW, 89 | IN UINT8 MCS, 90 | OUT UINT32 *pRate); 91 | 92 | #ifdef WSC_AP_SUPPORT 93 | VOID RTMPIoctlWscProfile( 94 | IN PRTMP_ADAPTER pAdapter, 95 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 96 | 97 | VOID RTMPIoctlWscProfile( 98 | IN PRTMP_ADAPTER pAdapter, 99 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 100 | /*add by woody */ 101 | #ifdef INF_AR9 102 | #ifdef AR9_MAPI_SUPPORT 103 | VOID RTMPAR9IoctlWscProfile( 104 | IN PRTMP_ADAPTER pAdapter, 105 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 106 | 107 | VOID RTMPIoctlWscPINCode( 108 | IN PRTMP_ADAPTER pAdapter, 109 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 110 | 111 | 112 | VOID RTMPIoctlWscStatus( 113 | IN PRTMP_ADAPTER pAdapter, 114 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 115 | 116 | VOID RTMPIoctlGetWscDynInfo( 117 | IN PRTMP_ADAPTER pAdapter, 118 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 119 | 120 | VOID RTMPIoctlGetWscRegsDynInfo( 121 | IN PRTMP_ADAPTER pAdapter, 122 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 123 | #endif/*AR9_MAPI_SUPPORT*/ 124 | #endif/* INF_AR9 */ 125 | #endif /* WSC_AP_SUPPORT */ 126 | 127 | #ifdef DOT11_N_SUPPORT 128 | VOID RTMPIoctlQueryBaTable( 129 | IN PRTMP_ADAPTER pAd, 130 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 131 | #endif /* DOT11_N_SUPPORT */ 132 | 133 | #ifdef DOT1X_SUPPORT 134 | VOID RTMPIoctlStaticWepCopy( 135 | IN PRTMP_ADAPTER pAd, 136 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 137 | 138 | VOID RTMPIoctlRadiusData( 139 | IN PRTMP_ADAPTER pAd, 140 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 141 | 142 | VOID RTMPIoctlAddWPAKey( 143 | IN PRTMP_ADAPTER pAd, 144 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 145 | 146 | VOID RTMPIoctlAddPMKIDCache( 147 | IN PRTMP_ADAPTER pAd, 148 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 149 | 150 | VOID RTMPIoctlSetIdleTimeout( 151 | IN PRTMP_ADAPTER pAd, 152 | IN RTMP_IOCTL_INPUT_STRUCT *wrq); 153 | #endif /* DOT1X_SUPPORT */ 154 | 155 | INT ApCfg_Set_AuthMode_Proc( 156 | IN PRTMP_ADAPTER pAd, 157 | IN INT apidx, 158 | IN PSTRING arg); 159 | 160 | INT ApCfg_Set_MaxStaNum_Proc( 161 | IN PRTMP_ADAPTER pAd, 162 | IN INT apidx, 163 | IN PSTRING arg); 164 | 165 | INT ApCfg_Set_IdleTimeout_Proc( 166 | IN PRTMP_ADAPTER pAd, 167 | IN PSTRING arg); 168 | 169 | 170 | #ifdef APCLI_SUPPORT 171 | #ifdef APCLI_WPA_SUPPLICANT_SUPPORT 172 | VOID RTMPApCliAddKey( 173 | IN PRTMP_ADAPTER pAd, 174 | IN INT apidx, 175 | IN PNDIS_APCLI_802_11_KEY pApcliKey); 176 | #endif /* APCLI_WPA_SUPPLICANT_SUPPORT */ 177 | #endif /* APCLI_SUPPORT */ 178 | #endif /* __AP_CFG_H__ */ 179 | 180 | -------------------------------------------------------------------------------- /rt2860v2/include/ap_ids.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | ap_ids.c 18 | 19 | Abstract: 20 | IDS definition 21 | 22 | Revision History: 23 | Who When What 24 | -------- ---------- ---------------------------------------------- 25 | */ 26 | 27 | VOID RTMPIdsPeriodicExec( 28 | IN PVOID SystemSpecific1, 29 | IN PVOID FunctionContext, 30 | IN PVOID SystemSpecific2, 31 | IN PVOID SystemSpecific3); 32 | 33 | BOOLEAN RTMPSpoofedMgmtDetection( 34 | IN PRTMP_ADAPTER pAd, 35 | IN PHEADER_802_11 pHeader, 36 | IN CHAR Rssi0, 37 | IN CHAR Rssi1, 38 | IN CHAR Rssi2); 39 | 40 | VOID RTMPConflictSsidDetection( 41 | IN PRTMP_ADAPTER pAd, 42 | IN PUCHAR pSsid, 43 | IN UCHAR SsidLen, 44 | IN CHAR Rssi0, 45 | IN CHAR Rssi1, 46 | IN CHAR Rssi2); 47 | 48 | BOOLEAN RTMPReplayAttackDetection( 49 | IN PRTMP_ADAPTER pAd, 50 | IN PUCHAR pAddr2, 51 | IN CHAR Rssi0, 52 | IN CHAR Rssi1, 53 | IN CHAR Rssi2); 54 | 55 | VOID RTMPUpdateStaMgmtCounter( 56 | IN PRTMP_ADAPTER pAd, 57 | IN USHORT type); 58 | 59 | VOID RTMPClearAllIdsCounter( 60 | IN PRTMP_ADAPTER pAd); 61 | 62 | VOID RTMPIdsStart( 63 | IN PRTMP_ADAPTER pAd); 64 | 65 | VOID RTMPIdsStop( 66 | IN PRTMP_ADAPTER pAd); 67 | 68 | VOID rtmp_read_ids_from_file( 69 | IN PRTMP_ADAPTER pAd, 70 | char *tmpbuf, 71 | char *buffer); 72 | 73 | -------------------------------------------------------------------------------- /rt2860v2/include/ap_mbss.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | ap_mbss.h 20 | 21 | Abstract: 22 | Support multi-BSS function. 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | Sample Lin 01-02-2007 created 28 | */ 29 | 30 | #ifndef MODULE_MBSS 31 | 32 | #define MBSS_EXTERN extern 33 | 34 | #else 35 | 36 | #define MBSS_EXTERN 37 | 38 | #endif /* MODULE_MBSS */ 39 | 40 | 41 | /* 42 | For MBSS, the phy mode is different; 43 | So MBSS_PHY_MODE_RESET() can help us to adjust the correct mode & 44 | maximum MCS for the BSS. 45 | */ 46 | #define MBSS_PHY_MODE_RESET(__BssId, __HtPhyMode) \ 47 | { \ 48 | UCHAR __PhyMode = pAd->ApCfg.MBSSID[__BssId].PhyMode; \ 49 | if ((__PhyMode == PHY_11B) && \ 50 | (__HtPhyMode.field.MODE != MODE_CCK)) \ 51 | { \ 52 | __HtPhyMode.field.MODE = MODE_CCK; \ 53 | __HtPhyMode.field.MCS = 3; \ 54 | } \ 55 | else if ((__PhyMode <= PHY_11G) && \ 56 | (__PhyMode != PHY_11B) && \ 57 | (__HtPhyMode.field.MODE != MODE_OFDM)) \ 58 | { \ 59 | __HtPhyMode.field.MODE = MODE_OFDM; \ 60 | __HtPhyMode.field.MCS = 7; \ 61 | } \ 62 | } 63 | 64 | 65 | /* Public function list */ 66 | INT Show_MbssInfo_Display_Proc( 67 | IN PRTMP_ADAPTER pAd, 68 | IN PSTRING arg); 69 | 70 | VOID MBSS_Init( 71 | IN PRTMP_ADAPTER pAd, 72 | IN RTMP_OS_NETDEV_OP_HOOK *pNetDevOps); 73 | 74 | VOID MBSS_Remove( 75 | IN PRTMP_ADAPTER pAd); 76 | 77 | INT MBSS_Open( 78 | IN PNET_DEV pDev); 79 | 80 | INT MBSS_Close( 81 | IN PNET_DEV pDev); 82 | 83 | INT32 RT28xx_MBSS_IdxGet( 84 | IN PRTMP_ADAPTER pAd, 85 | IN PNET_DEV pDev); 86 | 87 | /* End of ap_mbss.h */ 88 | -------------------------------------------------------------------------------- /rt2860v2/include/br_ftph.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | 17 | Abstract: 18 | 19 | All Bridge Fast Path Related Structure & Definition. 20 | 21 | ***************************************************************************/ 22 | 23 | #ifndef __BR_FTPH_H__ 24 | #define __BR_FTPH_H__ 25 | 26 | /* Public function prototype */ 27 | /* 28 | ======================================================================== 29 | Routine Description: 30 | Init bridge fast path module. 31 | 32 | Arguments: 33 | None 34 | 35 | Return Value: 36 | None 37 | 38 | Note: 39 | Used in module init. 40 | ======================================================================== 41 | */ 42 | VOID BG_FTPH_Init(VOID); 43 | 44 | /* 45 | ======================================================================== 46 | Routine Description: 47 | Remove bridge fast path module. 48 | 49 | Arguments: 50 | None 51 | 52 | Return Value: 53 | None 54 | 55 | Note: 56 | Used in module remove. 57 | ======================================================================== 58 | */ 59 | VOID BG_FTPH_Remove(VOID); 60 | 61 | /* 62 | ======================================================================== 63 | Routine Description: 64 | Forward the received packet. 65 | 66 | Arguments: 67 | pPacket - the received packet 68 | 69 | Return Value: 70 | None 71 | 72 | Note: 73 | ======================================================================== 74 | */ 75 | UINT32 BG_FTPH_PacketFromApHandle( 76 | IN PNDIS_PACKET pPacket); 77 | 78 | #endif /* __BR_FTPH_H__ */ 79 | 80 | /* End of br_ftph.h */ 81 | 82 | -------------------------------------------------------------------------------- /rt2860v2/include/cfg80211.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | 17 | Abstract: 18 | 19 | All MAC80211/CFG80211 Related Structure & Definition. 20 | 21 | ***************************************************************************/ 22 | 23 | #ifdef RT_CFG80211_SUPPORT 24 | 25 | #include 26 | 27 | typedef struct __CFG80211_CB { 28 | 29 | /* we can change channel/rate information on the fly so we backup them */ 30 | struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS]; 31 | struct ieee80211_channel *pCfg80211_Channels; 32 | struct ieee80211_rate *pCfg80211_Rates; 33 | 34 | /* used in wiphy_unregister */ 35 | struct wireless_dev *pCfg80211_Wdev; 36 | 37 | /* used in scan end */ 38 | struct cfg80211_scan_request *pCfg80211_ScanReq; 39 | 40 | /* monitor filter */ 41 | UINT32 MonFilterFlag; 42 | 43 | /* channel information */ 44 | struct ieee80211_channel ChanInfo[MAX_NUM_OF_CHANNELS]; 45 | } CFG80211_CB; 46 | 47 | 48 | 49 | 50 | /* 51 | ======================================================================== 52 | Routine Description: 53 | Register MAC80211 Module. 54 | 55 | Arguments: 56 | pAd - WLAN control block pointer 57 | pDev - Generic device interface 58 | pNetDev - Network device 59 | 60 | Return Value: 61 | NONE 62 | 63 | Note: 64 | pDev != pNetDev 65 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) 66 | 67 | Can not use pNetDev to replace pDev; Or kernel panic. 68 | ======================================================================== 69 | */ 70 | BOOLEAN CFG80211_Register( 71 | VOID *pAd, 72 | struct device *pDev, 73 | struct net_device *pNetDev); 74 | 75 | 76 | #endif /* RT_CFG80211_SUPPORT */ 77 | 78 | /* End of cfg80211.h */ 79 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/chip_id.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | chip_id.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __CHIP_ID_H__ 27 | #define __CHIP_ID_H__ 28 | 29 | 30 | #define NIC_PCI_VENDOR_ID 0x1814 31 | 32 | #define NIC2860_PCI_DEVICE_ID 0x0601 33 | #define NIC2860_PCIe_DEVICE_ID 0x0681 34 | #define NIC2760_PCI_DEVICE_ID 0x0701 /* 1T/2R Cardbus ??? */ 35 | #define NIC2790_PCIe_DEVICE_ID 0x0781 /* 1T/2R miniCard */ 36 | 37 | #define VEN_AWT_PCIe_DEVICE_ID 0x1059 38 | #define VEN_AWT_PCI_VENDOR_ID 0x1A3B 39 | 40 | #define EDIMAX_PCI_VENDOR_ID 0x1432 41 | 42 | #define NIC3090_PCIe_DEVICE_ID 0x3090 /* 1T/1R miniCard */ 43 | #define NIC3091_PCIe_DEVICE_ID 0x3091 /* 1T/2R miniCard */ 44 | #define NIC3092_PCIe_DEVICE_ID 0x3092 /* 2T/2R miniCard */ 45 | #define NIC3390_PCIe_DEVICE_ID 0x3390 /* 1T/1R miniCard */ 46 | 47 | #define NIC3062_PCI_DEVICE_ID 0x3062 /* 2T/2R miniCard */ 48 | #define NIC3562_PCI_DEVICE_ID 0x3562 /* 2T/2R miniCard */ 49 | #define NIC3060_PCI_DEVICE_ID 0x3060 /* 1T/1R miniCard */ 50 | 51 | #define NIC3592_PCIe_DEVICE_ID 0x3592 /* 2T/2R miniCard */ 52 | 53 | 54 | #define NIC3593_PCI_OR_PCIe_DEVICE_ID 0x3593 55 | #define NIC5390_PCIe_DEVICE_ID 0x5390 56 | #define NIC539F_PCIe_DEVICE_ID 0x539F 57 | #define NIC5392_PCIe_DEVICE_ID 0x5392 58 | #define NIC5360_PCI_DEVICE_ID 0x5360 59 | #define NIC5362_PCI_DEVICE_ID 0x5362 60 | 61 | #define NIC5592_PCIe_DEVICE_ID 0x5592 62 | 63 | #define NIC3290_PCIe_DEVICE_ID 0x3290 64 | 65 | #define DLINK_PCI_VENDOR_ID 0x1186 66 | 67 | #endif /* __CHIP_ID_H__ */ 68 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/rt2860.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt2860.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __RT2860_H__ 27 | #define __RT2860_H__ 28 | 29 | #ifdef RT2860 30 | 31 | #ifndef RTMP_PCI_SUPPORT 32 | #error "For RT2860, you should define the compile flag -DRTMP_PCI_SUPPORT" 33 | #endif 34 | 35 | #ifndef RTMP_MAC_PCI 36 | #error "For RT2880, you should define the compile flag -DRTMP_MAC_PCI" 37 | #endif 38 | 39 | /* 40 | Device ID & Vendor ID, these values should match EEPROM value 41 | */ 42 | 43 | #endif /* RT2860 */ 44 | 45 | #endif /*__RT2860_H__ */ 46 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/rt2880.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt2880.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __RT2880_H__ 27 | #define __RT2880_H__ 28 | 29 | 30 | #ifndef RTMP_RBUS_SUPPORT 31 | #error "For RT2880, you should define the compile flag -DRTMP_RBUS_SUPPORT" 32 | #endif 33 | 34 | #ifndef RTMP_MAC_PCI 35 | #error "For RT2880, you should define the compile flag -DRTMP_MAC_PCI" 36 | #endif 37 | 38 | #ifdef LINUX 39 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) 40 | #include 41 | #define RTMP_MAC_CSR_ADDR RALINK_11N_MAC_BASE 42 | #else 43 | 44 | #ifdef CONFIG_RALINK_RT2880_SHUTTLE 45 | #undef RTMP_MAC_CSR_ADDR 46 | #define RTMP_MAC_CSR_ADDR 0xA0600000 47 | #endif /* CONFIG_RALINK_RT2880_SHUTTLE */ 48 | 49 | #ifdef CONFIG_RALINK_RT2880_MP 50 | #undef RTMP_MAC_CSR_ADDR 51 | #define RTMP_MAC_CSR_ADDR 0xA0480000 52 | #endif /* CONFIG_RALINK_RT2880_MP */ 53 | 54 | #ifndef RTMP_MAC_CSR_ADDR 55 | #error "Please Choice Chip Version (Shuttle/MP)" 56 | #endif 57 | 58 | #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) */ 59 | 60 | #else 61 | 62 | #ifdef CONFIG_RALINK_RT2880_SHUTTLE 63 | #undef RTMP_MAC_CSR_ADDR 64 | #define RTMP_MAC_CSR_ADDR 0xA0600000 65 | #endif /* CONFIG_RALINK_RT2880_SHUTTLE */ 66 | 67 | #ifdef CONFIG_RALINK_RT2880_MP 68 | #undef RTMP_MAC_CSR_ADDR 69 | #define RTMP_MAC_CSR_ADDR 0xA0480000 70 | #endif /* CONFIG_RALINK_RT2880_MP */ 71 | 72 | #ifndef RTMP_MAC_CSR_ADDR 73 | #error "Please Choice Chip Version (Shuttle/MP)" 74 | #endif 75 | #endif /* LINUX */ 76 | 77 | #define RT2860_CSR_ADDR_PCI 0xC0000000 /* RT2880 PCI */ 78 | 79 | #define RTMP_FLASH_BASE_ADDR 0xbfc00000 80 | 81 | struct _RTMP_ADAPTER; 82 | VOID RT2880_Init(IN struct _RTMP_ADAPTER *pAd); 83 | 84 | /* */ 85 | /* Device ID & Vendor ID, these values should match EEPROM value */ 86 | /* */ 87 | 88 | 89 | #endif /*__RT2880_H__ */ 90 | 91 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/rt2883.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt2883.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __RT2883_H__ 27 | #define __RT2883_H__ 28 | 29 | #ifndef RTMP_RBUS_SUPPORT 30 | #error "For RT2880, you should define the compile flag -DRTMP_RBUS_SUPPORT" 31 | #endif 32 | 33 | #ifndef RTMP_MAC_PCI 34 | #error "For RT2880, you should define the compile flag -DRTMP_MAC_PCI" 35 | #endif 36 | 37 | struct _RTMP_ADAPTER; 38 | 39 | #define RTMP_MAC_CSR_ADDR 0xB0180000 40 | #define RTMP_FLASH_BASE_ADDR 0xbfc00000 41 | 42 | #define BBP_REG_BF BBP_R105 43 | #define BBP_REG_SNR0 BBP_R189 44 | #define BBP_REG_SNR1 BBP_R190 45 | #define BBP_REG_SNR2 BBP_R191 46 | 47 | 48 | extern REG_PAIR RT2883_BBPRegTable[]; 49 | extern UCHAR RT2883_NUM_BBP_REG_PARMS; 50 | 51 | 52 | /* */ 53 | /* Device ID & Vendor ID, these values should match EEPROM value */ 54 | /* */ 55 | 56 | 57 | /* ========================= 58 | Function definition 59 | ========================= */ 60 | VOID NICInitRT2883MacRegisters( 61 | IN struct _RTMP_ADAPTER *pAd); 62 | 63 | VOID NICInitRT2883BbpRegisters( 64 | IN struct _RTMP_ADAPTER *pAd); 65 | 66 | #endif /*__RT2880_H__ */ 67 | 68 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/rt28xx.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt28xx.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __RT28XX_H__ 27 | #define __RT28XX_H__ 28 | 29 | #ifdef RT28xx 30 | 31 | VOID RT28xx_ChipSwitchChannel( 32 | IN struct _RTMP_ADAPTER *pAd, 33 | IN UCHAR Channel, 34 | IN BOOLEAN bScan); 35 | 36 | #endif /* RT28xx */ 37 | 38 | #endif /*__RT28XX_H__ */ 39 | 40 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/rt305x.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt305x.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __RT305x_H__ 27 | #define __RT305x_H__ 28 | 29 | #ifdef RT305x 30 | 31 | struct _RTMP_ADAPTER; 32 | 33 | #ifndef RTMP_RBUS_SUPPORT 34 | #error "For RT305x, you should define the compile flag -DRTMP_RBUS_SUPPORT" 35 | #endif 36 | 37 | #ifndef RTMP_MAC_PCI 38 | #error "For RT305x, you should define the compile flag -DRTMP_MAC_PCI" 39 | #endif 40 | 41 | #ifndef RTMP_RF_RW_SUPPORT 42 | #error "For RT305x, you should define the compile flag -DRTMP_RF_RW_SUPPORT" 43 | #endif 44 | 45 | #define RTMP_SYS_CTL_ADDR 0xB0000000 46 | #define RTMP_INT_CTL_ADDR 0xB0000200 47 | #define RTMP_PIO_CTL_ADDR 0xB0000600 48 | #define RTMP_MAC_CSR_ADDR 0xB0180000 49 | #define RTMP_FLASH_BASE_ADDR 0xbfc00000 50 | 51 | /* System Control */ 52 | #define RTMP_SYS_GPIOMODE_OFFSET 0x0060 53 | 54 | /* Programmable I/O */ 55 | #define RTMP_PIO2100_DATA_OFFSET 0x0020 56 | #define RTMP_PIO2100_DIR_OFFSET 0x0024 57 | #define RTMP_PIO2100_POL_OFFSET 0x0028 58 | 59 | extern REG_PAIR RT305x_RFRegTable[]; 60 | 61 | extern REG_PAIR RT305x_BBPRegTable[]; 62 | extern UCHAR RT305x_NUM_BBP_REG_PARMS; 63 | 64 | // 65 | // Device ID & Vendor ID, these values should match EEPROM value 66 | // 67 | 68 | 69 | VOID RT305x_Init( 70 | IN struct _RTMP_ADAPTER *pAd); 71 | 72 | VOID NICInitRT305xMacRegisters( 73 | IN struct _RTMP_ADAPTER *pAd); 74 | 75 | VOID NICInitRT305xBbpRegisters( 76 | IN struct _RTMP_ADAPTER *pAd); 77 | 78 | VOID RT305x_ChipSwitchChannel( 79 | IN struct _RTMP_ADAPTER *pAd, 80 | IN UCHAR Channel, 81 | IN BOOLEAN bScan); 82 | 83 | #ifdef RTMP_INTERNAL_TX_ALC 84 | VOID RT3350_InitDesiredTSSITable( 85 | IN struct _RTMP_ADAPTER *pAd); 86 | 87 | UCHAR RT3350_GetDesiredTSSI( 88 | IN struct _RTMP_ADAPTER *pAd); 89 | 90 | VOID RT3350_AsicTxAlcGetAutoAgcOffset( 91 | IN struct _RTMP_ADAPTER *pAd, 92 | IN PCHAR pDeltaPwr, 93 | IN PCHAR pTotalDeltaPwr, 94 | IN PCHAR pAgcCompensate, 95 | IN PCHAR pDeltaPowerByBbpR1); 96 | #endif /* RTMP_INTERNAL_TX_ALC */ 97 | 98 | VOID RT305x_ChipSpecInit( 99 | IN struct _RTMP_ADAPTER *pAd); 100 | 101 | #endif // RT305x // 102 | 103 | #endif //__RT305x_H__ // 104 | 105 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/rt3352.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt3352.h 18 | 19 | Abstract: 20 | 2*2 Wireless Chip SoC 21 | 22 | Revision History: 23 | Who When What 24 | --------- ---------- ---------------------------------------------- 25 | SampleLin 20100625 Initial version 26 | */ 27 | 28 | #ifndef __RT3352_H__ 29 | #define __RT3352_H__ 30 | 31 | #ifdef RT3352 32 | 33 | struct _RTMP_ADAPTER; 34 | 35 | /* */ 36 | /* Device ID & Vendor ID, these values should match EEPROM value */ 37 | /* */ 38 | 39 | extern REG_PAIR RT3352_RFRegTable[]; 40 | extern UCHAR RT3352_NUM_RF_REG_PARMS; 41 | extern REG_PAIR RT3352_BBPRegTable[]; 42 | extern UCHAR RT3352_NUM_BBP_REG_PARMS; 43 | extern RTMP_REG_PAIR RT3352_MACRegTable[]; 44 | extern UCHAR RT3352_NUM_MAC_REG_PARMS; 45 | 46 | #ifdef CONFIG_RALINK_RT3352 47 | #define PROCREG_DIR "rt3352" 48 | #endif /* CONFIG_RALINK_RT3352 */ 49 | 50 | VOID RT3352_Init( 51 | IN struct _RTMP_ADAPTER *pAd); 52 | 53 | VOID NICInitRT3352MacRegisters( 54 | IN struct _RTMP_ADAPTER *pAd); 55 | 56 | VOID NICInitRT3352BbpRegisters( 57 | IN struct _RTMP_ADAPTER *pAd); 58 | 59 | VOID NICInitRT3352RFRegisters( 60 | IN struct _RTMP_ADAPTER *pAd); 61 | 62 | VOID RT3352_EnableAPMIMOPS( 63 | IN struct _RTMP_ADAPTER *pAd, 64 | IN BOOLEAN ReduceCorePower); 65 | 66 | VOID RT3352_DisableAPMIMOPS( 67 | IN struct _RTMP_ADAPTER *pAd); 68 | 69 | VOID RT3352_RxSensitivityTuning( 70 | IN struct _RTMP_ADAPTER *pAd); 71 | 72 | UCHAR RT3352_ChipAGCAdjust( 73 | IN struct _RTMP_ADAPTER *pAd, 74 | IN CHAR Rssi, 75 | IN UCHAR OrigR66Value); 76 | 77 | VOID RT3352_ChipBBPAdjust( 78 | IN struct _RTMP_ADAPTER *pAd); 79 | 80 | VOID RT3352_ChipSwitchChannel( 81 | IN struct _RTMP_ADAPTER *pAd, 82 | IN UCHAR Channel, 83 | IN BOOLEAN bScan); 84 | 85 | VOID *RT3352_AsicTxAlcTxPwrAdjOverRF( 86 | IN struct _RTMP_ADAPTER *pAd, 87 | IN VOID *pTxPowerTuningEntrySrc); 88 | 89 | VOID RT3352_RTMPSetAGCInitValue( 90 | IN struct _RTMP_ADAPTER *pAd, 91 | IN UCHAR BandWidth); 92 | 93 | #ifdef RTMP_INTERNAL_TX_ALC 94 | VOID RT3352_InitDesiredTSSITable( 95 | IN struct _RTMP_ADAPTER *pAd); 96 | 97 | UCHAR RT3352_GetDesiredTSSI( 98 | IN struct _RTMP_ADAPTER *pAd); 99 | 100 | VOID RT3352_AsicTxAlcGetAutoAgcOffset( 101 | IN struct _RTMP_ADAPTER *pAd, 102 | IN PCHAR pDeltaPwr, 103 | IN PCHAR pTotalDeltaPwr, 104 | IN PCHAR pAgcCompensate, 105 | IN PCHAR pDeltaPowerByBbpR1); 106 | #endif /* RTMP_INTERNAL_TX_ALC */ 107 | #endif /* RT3352 */ 108 | #endif /*__RT3352_H__ */ 109 | 110 | /* End of rt3352.h */ 111 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/rt3883.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt3883.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __RT3883_H__ 27 | #define __RT3883_H__ 28 | 29 | #ifndef RTMP_RBUS_SUPPORT 30 | #error "For RT3883, you should define the compile flag -DRTMP_RBUS_SUPPORT" 31 | #endif 32 | 33 | #ifndef RTMP_MAC_PCI 34 | #error "For RT3883, you should define the compile flag -DRTMP_MAC_PCI" 35 | #endif 36 | 37 | struct _RTMP_ADAPTER; 38 | 39 | #define RTMP_MAC_CSR_ADDR 0xB0180000 40 | #define RTMP_FLASH_BASE_ADDR 0xbc000000 41 | 42 | 43 | #define BBP_REG_BF BBP_R163 44 | #define BBP_REG_SNR0 BBP_R160 45 | #define BBP_REG_SNR1 BBP_R161 46 | #define BBP_REG_SNR2 BBP_R162 47 | 48 | 49 | #define MAX_RF_TX_POWER 31 // Maximum Tx Power value in RF Register 50 | 51 | // Macro to convert Tx Power setting to RF Reg for A Band 52 | #define TX_PWR_TO_RF_REG(p) (CHAR)(0x48 | (((p) & 0x18) << 1) | ((p) & 0x7)) 53 | 54 | extern UCHAR NUM_OF_3883_CHNL; 55 | extern FREQUENCY_ITEM FreqItems3883[]; 56 | 57 | VOID RTMPRT3883ABandSel( 58 | IN UCHAR Channel); 59 | 60 | VOID RTMPRT3883ReadChannelPwr( 61 | IN struct _RTMP_ADAPTER *pAd); 62 | 63 | VOID RTMPRT3883ReadTxPwrPerRate( 64 | IN struct _RTMP_ADAPTER *pAd); 65 | 66 | VOID RT3883_Init( 67 | IN struct _RTMP_ADAPTER *pAd); 68 | 69 | VOID RT3883_AsicGetTxPowerOffset( 70 | IN struct _RTMP_ADAPTER *pAd, 71 | INOUT PULONG pTxPwr); 72 | 73 | #ifdef CONFIG_AP_SUPPORT 74 | int RT3883_ext_pkt_len( 75 | IN UCHAR *pOutBuffer, 76 | IN ULONG FrameLen, 77 | IN UCHAR *RalinkSpecificIe, 78 | IN UCHAR IeLen); 79 | #endif /* CONFIG_AP_SUPPORT */ 80 | 81 | VOID RT3883_CWC_ProtectAdjust( 82 | IN struct _RTMP_ADAPTER *pAd, 83 | IN UCHAR *pSetMask, 84 | IN USHORT *pOperationMode); 85 | 86 | VOID RT3883_CWC_AsicSet( 87 | IN struct _RTMP_ADAPTER *pAd, 88 | IN BOOLEAN bCwc); 89 | 90 | void RT3883_AsicSetFreqOffset( 91 | IN struct _RTMP_ADAPTER *pAd, 92 | IN ULONG freqOffset); 93 | 94 | #endif /*__RT3883_H__ */ 95 | 96 | -------------------------------------------------------------------------------- /rt2860v2/include/chip/rt5350.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt5350.h 18 | 19 | Abstract: 20 | 2*2 Wireless Chip SoC 21 | 22 | Revision History: 23 | Who When What 24 | --------- ---------- ---------------------------------------------- 25 | SampleLin 20100908 Initial version 26 | */ 27 | 28 | #ifndef __RT5350_H__ 29 | #define __RT5350_H__ 30 | 31 | #ifdef RT5350 32 | 33 | struct _RTMP_ADAPTER; 34 | 35 | #undef EEPROM_TSSI_REF_OFFSET 36 | 37 | #define EEPROM_TSSI_REF_OFFSET 0x6E 38 | #define EEPROM_TSSI_DELTA_CH1_CH2 0x6F 39 | #define EEPROM_TSSI_DELTA_CH3_CH4 0x70 40 | #define EEPROM_TSSI_DELTA_CH5_CH6 0x71 41 | #define EEPROM_TSSI_DELTA_CH7_CH8 0x72 42 | #define EEPROM_TSSI_DELTA_CH9_CH10 0x73 43 | #define EEPROM_TSSI_DELTA_CH11_CH12 0x74 44 | #define EEPROM_TSSI_DELTA_CH13_CH14 0x75 45 | 46 | #define EEPROM_TSSI_GAIN_ATTENUATION 0x76 47 | 48 | #define EEPROM_RSSI_GAIN 0x120 49 | 50 | #ifdef RTMP_INTERNAL_TX_ALC 51 | //TSSI delta info is signed number with 4bits 52 | typedef struct 53 | { 54 | char delta:4; 55 | } TssiDeltaInfo; 56 | #endif /* RTMP_INTERNAL_TX_ALC */ 57 | 58 | extern REG_PAIR RT5350_RFRegTable[]; 59 | extern UCHAR RT5350_NUM_RF_REG_PARMS; 60 | extern REG_PAIR RT5350_BBPRegTable[]; 61 | extern UCHAR RT5350_NUM_BBP_REG_PARMS; 62 | extern RTMP_REG_PAIR RT5350_MACRegTable[]; 63 | extern UCHAR RT5350_NUM_MAC_REG_PARMS; 64 | 65 | #ifdef CONFIG_RALINK_RT5350 66 | #define PROCREG_DIR "rt5350" 67 | #endif // CONFIG_RALINK_RT5350 // 68 | 69 | VOID RT5350_Init( 70 | IN struct _RTMP_ADAPTER *pAd); 71 | 72 | VOID NICInitRT5350MacRegisters( 73 | IN struct _RTMP_ADAPTER *pAd); 74 | 75 | VOID NICInitRT5350BbpRegisters( 76 | IN struct _RTMP_ADAPTER *pAd); 77 | 78 | VOID NICInitRT5350RFRegisters( 79 | IN struct _RTMP_ADAPTER *pAd); 80 | 81 | VOID RT5350_RxSensitivityTuning( 82 | IN struct _RTMP_ADAPTER *pAd); 83 | 84 | UCHAR RT5350_ChipAGCAdjust( 85 | IN struct _RTMP_ADAPTER *pAd, 86 | IN CHAR Rssi, 87 | IN UCHAR OrigR66Value); 88 | 89 | VOID RT5350_ChipBBPAdjust( 90 | IN struct _RTMP_ADAPTER *pAd); 91 | 92 | VOID RT5350_ChipSwitchChannel( 93 | IN struct _RTMP_ADAPTER *pAd, 94 | IN UCHAR Channel, 95 | IN BOOLEAN bScan); 96 | 97 | VOID RT5350_AsicInitDesiredTSSITable( 98 | IN struct _RTMP_ADAPTER *pAd); 99 | 100 | VOID *RT5350_AsicTxAlcTxPwrAdjOverRF( 101 | IN struct _RTMP_ADAPTER *pAd, 102 | IN VOID *pTxPowerTuningEntrySrc); 103 | 104 | VOID RT5350_RTMPSetAGCInitValue( 105 | IN struct _RTMP_ADAPTER *pAd, 106 | IN UCHAR BandWidth); 107 | 108 | VOID RT5350_AsicTxAlcGetAutoAgcOffset( 109 | IN struct _RTMP_ADAPTER *pAd, 110 | IN PCHAR pDeltaPwr, 111 | IN PCHAR pTotalDeltaPwr, 112 | IN PCHAR pAgcCompensate, 113 | IN PCHAR pDeltaPowerByBbpR1); 114 | 115 | VOID RT5350_InitDesiredTSSITable( 116 | IN struct _RTMP_ADAPTER *pAd); 117 | 118 | VOID RT5350_AsicExtraPowerOverMAC( 119 | IN struct _RTMP_ADAPTER *pAd); 120 | 121 | #endif // RT5350 // 122 | #endif //__RT5350_H__ // 123 | 124 | /* End of rt5350.h */ 125 | -------------------------------------------------------------------------------- /rt2860v2/include/chlist.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | chlist.c 20 | 21 | Abstract: 22 | 23 | Revision History: 24 | Who When What 25 | -------- ---------- ---------------------------------------------- 26 | Fonchi Wu 2007-12-19 created 27 | */ 28 | 29 | #ifndef __CHLIST_H__ 30 | #define __CHLIST_H__ 31 | 32 | #include "rtmp_type.h" 33 | #include "rtmp_def.h" 34 | 35 | #define BAND_5G 0 36 | #define BAND_24G 1 37 | #define BAND_BOTH 2 38 | 39 | typedef struct _CH_DESC { 40 | UCHAR FirstChannel; 41 | UCHAR NumOfCh; 42 | UCHAR ChannelProp; 43 | }CH_DESC, *PCH_DESC; 44 | 45 | typedef struct _COUNTRY_REGION_CH_DESC { 46 | UCHAR RegionIndex; 47 | PCH_DESC pChDesc; 48 | }COUNTRY_REGION_CH_DESC, *PCOUNTRY_REGION_CH_DESC; 49 | 50 | #ifdef EXT_BUILD_CHANNEL_LIST 51 | #define ODOR 0 52 | #define IDOR 1 53 | #define BOTH 2 54 | 55 | typedef struct _CH_DESP { 56 | UCHAR FirstChannel; 57 | UCHAR NumOfCh; 58 | CHAR MaxTxPwr; /* dBm */ 59 | UCHAR Geography; /* 0:out door, 1:in door, 2:both */ 60 | BOOLEAN DfsReq; /* Dfs require, 0: No, 1: yes. */ 61 | } CH_DESP, *PCH_DESP; 62 | 63 | typedef struct _CH_REGION { 64 | UCHAR CountReg[3]; 65 | UCHAR DfsType; /* 0: CE, 1: FCC, 2: JAP, 3:JAP_W53, JAP_W56 */ 66 | CH_DESP *pChDesp; 67 | } CH_REGION, *PCH_REGION; 68 | 69 | extern CH_REGION ChRegion[]; 70 | #endif /* EXT_BUILD_CHANNEL_LIST */ 71 | 72 | typedef struct _CH_FREQ_MAP_{ 73 | UINT16 channel; 74 | UINT16 freqKHz; 75 | }CH_FREQ_MAP; 76 | 77 | extern CH_FREQ_MAP CH_HZ_ID_MAP[]; 78 | extern int CH_HZ_ID_MAP_NUM; 79 | 80 | #ifdef SINGLE_SKU_V2 81 | #define SINGLE_SKU_TABLE_LENGTH (SINGLE_SKU_TABLE_CCK_LENGTH+SINGLE_SKU_TABLE_OFDM_LENGTH+(SINGLE_SKU_TABLE_HT_LENGTH*2)) 82 | 83 | #define SINGLE_SKU_TABLE_CCK_LENGTH 4 84 | #define SINGLE_SKU_TABLE_OFDM_LENGTH 8 85 | #define SINGLE_SKU_TABLE_HT_LENGTH 16 86 | 87 | typedef struct _CH_POWER_{ 88 | DL_LIST List; 89 | UCHAR channel; 90 | UCHAR num; 91 | UCHAR PwrCCK[SINGLE_SKU_TABLE_CCK_LENGTH]; 92 | UCHAR PwrOFDM[SINGLE_SKU_TABLE_OFDM_LENGTH]; 93 | UCHAR PwrHT20[SINGLE_SKU_TABLE_HT_LENGTH]; 94 | UCHAR PwrHT40[SINGLE_SKU_TABLE_HT_LENGTH]; 95 | }CH_POWER; 96 | #endif /* SINGLE_SKU_V2 */ 97 | 98 | 99 | 100 | #define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \ 101 | RTMP_MapChannelID2KHZ(_ch, (UINT32 *)&(_khz)) 102 | #define MAP_KHZ_TO_CHANNEL_ID(_khz, _ch) \ 103 | RTMP_MapKHZ2ChannelID(_khz, (INT *)&(_ch)) 104 | 105 | 106 | #ifdef EXT_BUILD_CHANNEL_LIST 107 | VOID BuildChannelListEx( 108 | IN PRTMP_ADAPTER pAd); 109 | 110 | VOID BuildBeaconChList( 111 | IN PRTMP_ADAPTER pAd, 112 | OUT PUCHAR pBuf, 113 | OUT PULONG pBufLen); 114 | #endif /* EXT_BUILD_CHANNEL_LIST */ 115 | 116 | #ifdef DOT11_N_SUPPORT 117 | VOID N_ChannelCheck( 118 | IN PRTMP_ADAPTER pAd); 119 | 120 | VOID N_SetCenCh( 121 | IN PRTMP_ADAPTER pAd); 122 | 123 | BOOLEAN N_ChannelGroupCheck( 124 | IN PRTMP_ADAPTER pAd, 125 | IN UCHAR Channel); 126 | 127 | #endif /* DOT11_N_SUPPORT */ 128 | 129 | UINT8 GetCuntryMaxTxPwr( 130 | IN PRTMP_ADAPTER pAd, 131 | IN UINT8 channel); 132 | 133 | VOID RTMP_MapChannelID2KHZ( 134 | IN UCHAR Ch, 135 | OUT UINT32 *pFreq); 136 | 137 | VOID RTMP_MapKHZ2ChannelID( 138 | IN ULONG Freq, 139 | OUT INT *pCh); 140 | 141 | UCHAR GetChannel_5GHZ( 142 | IN PCH_DESC pChDesc, 143 | IN UCHAR index); 144 | 145 | UCHAR GetChannel_2GHZ( 146 | IN PCH_DESC pChDesc, 147 | IN UCHAR index); 148 | 149 | UCHAR GetChannelFlag( 150 | IN PCH_DESC pChDesc, 151 | IN UCHAR index); 152 | 153 | UINT16 TotalChNum( 154 | IN PCH_DESC pChDesc); 155 | 156 | #endif /* __CHLIST_H__ */ 157 | 158 | -------------------------------------------------------------------------------- /rt2860v2/include/client_wds.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | client_wds.h 20 | 21 | Abstract: 22 | */ 23 | 24 | #ifndef __CLIENT_WDS_H__ 25 | #define __CLIENT_WDS_H__ 26 | 27 | #include "client_wds_cmm.h" 28 | 29 | VOID CliWds_ProxyTabInit( 30 | IN PRTMP_ADAPTER pAd); 31 | 32 | VOID CliWds_ProxyTabDestory( 33 | IN PRTMP_ADAPTER pAd); 34 | 35 | PCLIWDS_PROXY_ENTRY CliWdsEntyAlloc( 36 | IN PRTMP_ADAPTER pAd); 37 | 38 | 39 | VOID CliWdsEntyFree( 40 | IN PRTMP_ADAPTER pAd, 41 | IN PCLIWDS_PROXY_ENTRY pCliWdsEntry); 42 | 43 | 44 | PUCHAR CliWds_ProxyLookup( 45 | IN PRTMP_ADAPTER pAd, 46 | IN PUCHAR pMac); 47 | 48 | 49 | VOID CliWds_ProxyTabUpdate( 50 | IN PRTMP_ADAPTER pAd, 51 | IN SHORT Aid, 52 | IN PUCHAR pMac); 53 | 54 | 55 | VOID CliWds_ProxyTabMaintain( 56 | IN PRTMP_ADAPTER pAd); 57 | 58 | #endif /* __CLIENT_WDS_H__ */ 59 | 60 | -------------------------------------------------------------------------------- /rt2860v2/include/client_wds_cmm.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | client_wds_cmm.h 20 | 21 | Abstract: 22 | */ 23 | 24 | #ifndef __CLIENT_WDS_CMM_H__ 25 | #define __CLIENT_WDS_CMM_H__ 26 | 27 | #include "rtmp_def.h" 28 | 29 | #ifdef CLIENT_WDS 30 | 31 | 32 | #define CLI_WDS_ENTRY_AGEOUT 5000 /* seconds */ 33 | 34 | #define CLIWDS_POOL_SIZE 128 35 | #define CLIWDS_HASH_TAB_SIZE 64 /* the legth of hash table must be power of 2. */ 36 | typedef struct _CLIWDS_PROXY_ENTRY { 37 | struct _CLIWDS_PROXY_ENTRY * pNext; 38 | ULONG LastRefTime; 39 | SHORT Aid; 40 | UCHAR Addr[MAC_ADDR_LEN]; 41 | } CLIWDS_PROXY_ENTRY, *PCLIWDS_PROXY_ENTRY; 42 | 43 | #endif /* CLIENT_WDS */ 44 | 45 | #endif /* __CLIENT_WDS_CMM_H__ */ 46 | 47 | -------------------------------------------------------------------------------- /rt2860v2/include/crypt_arc4.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | Module Name: 17 | RC4 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | -------- ---------- ------------------------------------------ 24 | Eddy 2009/05/13 ARC4 25 | ***************************************************************************/ 26 | 27 | #ifndef __CRYPT_ARC4_H__ 28 | #define __CRYPT_ARC4_H__ 29 | 30 | #include "rt_config.h" 31 | 32 | /* ARC4 definition & structure */ 33 | #define ARC4_KEY_BLOCK_SIZE 256 34 | 35 | typedef struct { 36 | UINT BlockIndex1; 37 | UINT BlockIndex2; 38 | UINT8 KeyBlock[256]; 39 | } ARC4_CTX_STRUC, *PARC4_CTX_STRUC; 40 | 41 | /* ARC4 operations */ 42 | VOID ARC4_INIT( 43 | IN ARC4_CTX_STRUC * pARC4_CTX, 44 | IN PUCHAR pKey, 45 | IN UINT KeyLength); 46 | 47 | VOID ARC4_Compute( 48 | IN ARC4_CTX_STRUC * pARC4_CTX, 49 | IN UINT8 InputBlock[], 50 | IN UINT InputBlockSize, 51 | OUT UINT8 OutputBlock[]); 52 | 53 | VOID ARC4_Discard_KeyLength( 54 | IN ARC4_CTX_STRUC * pARC4_CTX, 55 | IN UINT Length); 56 | 57 | #endif /* __CRYPT_ARC4_H__ */ 58 | -------------------------------------------------------------------------------- /rt2860v2/include/crypt_biginteger.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | Module Name: 17 | BigInteger 18 | 19 | 20 | Revision History: 21 | Who When What 22 | -------- ---------- ------------------------------------------ 23 | Eddy 2009/01/12 Create 24 | ***************************************************************************/ 25 | 26 | #ifndef __CRYPT_BIGINTEGER_H__ 27 | #define __CRYPT_BIGINTEGER_H__ 28 | 29 | #include "rt_config.h" 30 | 31 | 32 | /* BigInteger definition & structure */ 33 | #define SLIDING_WINDOW 16 34 | typedef struct _BIG_INTEGER_STRUC 35 | { 36 | STRING Name[10]; 37 | UINT32 *pIntegerArray; 38 | UINT AllocSize; 39 | UINT ArrayLength; 40 | UINT IntegerLength; 41 | INT Signed; 42 | } BIG_INTEGER, *PBIG_INTEGER; 43 | 44 | 45 | /* BigInteger operations */ 46 | VOID BigInteger_Print ( 47 | IN PBIG_INTEGER pBI); 48 | 49 | VOID BigInteger_Init ( 50 | INOUT PBIG_INTEGER *pBI); 51 | 52 | VOID BigInteger_Free_AllocSize ( 53 | IN PBIG_INTEGER *pBI); 54 | 55 | VOID BigInteger_Free ( 56 | IN PBIG_INTEGER *pBI); 57 | 58 | VOID BigInteger_AllocSize ( 59 | IN PBIG_INTEGER *pBI, 60 | IN INT Length); 61 | 62 | VOID BigInteger_ClearHighBits ( 63 | IN PBIG_INTEGER pBI); 64 | 65 | VOID BigInteger_BI2Bin ( 66 | IN PBIG_INTEGER pBI, 67 | OUT UINT8 *pValue, 68 | OUT UINT *Length); 69 | 70 | VOID BigInteger_Bin2BI ( 71 | IN UINT8 *pValue, 72 | IN UINT Length, 73 | OUT PBIG_INTEGER *pBI); 74 | 75 | VOID BigInteger_BitsOfBI ( 76 | IN PBIG_INTEGER pBI, 77 | OUT UINT *Bits_Of_P); 78 | 79 | INT BigInteger_GetBitValue ( 80 | IN PBIG_INTEGER pBI, 81 | IN UINT Index); 82 | 83 | UINT8 BigInteger_GetByteValue ( 84 | IN PBIG_INTEGER pBI, 85 | IN UINT Index); 86 | 87 | VOID BigInteger_Copy ( 88 | IN PBIG_INTEGER pBI_Copied, 89 | OUT PBIG_INTEGER *pBI_Result); 90 | 91 | INT BigInteger_UnsignedCompare ( 92 | IN PBIG_INTEGER pFirstOperand, 93 | IN PBIG_INTEGER pSecondOperand); 94 | 95 | VOID BigInteger_Add ( 96 | IN PBIG_INTEGER pFirstOperand, 97 | IN PBIG_INTEGER pSecondOperand, 98 | OUT PBIG_INTEGER *pBI_Result); 99 | 100 | VOID BigInteger_Sub ( 101 | IN PBIG_INTEGER pFirstOperand, 102 | IN PBIG_INTEGER pSecondOperand, 103 | OUT PBIG_INTEGER *pBI_Result); 104 | 105 | VOID BigInteger_Mul ( 106 | IN PBIG_INTEGER pFirstOperand, 107 | IN PBIG_INTEGER pSecondOperand, 108 | OUT PBIG_INTEGER *pBI_Result); 109 | 110 | VOID BigInteger_Square ( 111 | IN PBIG_INTEGER pBI, 112 | OUT PBIG_INTEGER *pBI_Result); 113 | 114 | VOID BigInteger_Div ( 115 | IN PBIG_INTEGER pFirstOperand, 116 | IN PBIG_INTEGER pSecondOperand, 117 | OUT PBIG_INTEGER *pBI_Result, 118 | OUT PBIG_INTEGER *pBI_Remainder); 119 | 120 | VOID BigInteger_Montgomery_Reduction ( 121 | IN PBIG_INTEGER pBI_A, 122 | IN PBIG_INTEGER pBI_P, 123 | IN PBIG_INTEGER pBI_R, 124 | OUT PBIG_INTEGER *pBI_Result); 125 | 126 | VOID BigInteger_Montgomery_ExpMod ( 127 | IN PBIG_INTEGER pBI_G, 128 | IN PBIG_INTEGER pBI_E, 129 | IN PBIG_INTEGER pBI_P, 130 | OUT PBIG_INTEGER *pBI_Result); 131 | 132 | 133 | #endif /* __CRYPT_BIGINTEGER_H__ */ 134 | 135 | -------------------------------------------------------------------------------- /rt2860v2/include/crypt_dh.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | Module Name: 17 | DH 18 | 19 | Abstract: 20 | RFC 2631: Diffie-Hellman Key Agreement Method 21 | 22 | Revision History: 23 | Who When What 24 | -------- ---------- ------------------------------------------ 25 | Eddy 2009/01/21 Create Diffie-Hellman, Montgomery Algorithm 26 | ***************************************************************************/ 27 | 28 | #ifndef __CRYPT_DH_H__ 29 | #define __CRYPT_DH_H__ 30 | 31 | #include "rt_config.h" 32 | 33 | 34 | /* DH operations */ 35 | void DH_PublicKey_Generate ( 36 | IN UINT8 GValue[], 37 | IN UINT GValueLength, 38 | IN UINT8 PValue[], 39 | IN UINT PValueLength, 40 | IN UINT8 PrivateKey[], 41 | IN UINT PrivateKeyLength, 42 | OUT UINT8 PublicKey[], 43 | INOUT UINT *PublicKeyLength); 44 | 45 | void DH_SecretKey_Generate ( 46 | IN UINT8 PublicKey[], 47 | IN UINT PublicKeyLength, 48 | IN UINT8 PValue[], 49 | IN UINT PValueLength, 50 | IN UINT8 PrivateKey[], 51 | IN UINT PrivateKeyLength, 52 | OUT UINT8 SecretKey[], 53 | INOUT UINT *SecretKeyLength); 54 | 55 | #define RT_DH_PublicKey_Generate(GK, GKL, PV, PVL, PriK, PriKL, PubK, PubKL) \ 56 | DH_PublicKey_Generate((GK), (GKL), (PV), (PVL), (PriK), (PriKL), (UINT8 *) (PubK), (UINT *) (PubKL)) 57 | 58 | #define RT_DH_SecretKey_Generate(PubK, PubKL, PV, PVL, PriK, PriKL, SecK, SecKL) \ 59 | DH_SecretKey_Generate((PubK), (PubKL), (PV), (PVL), (PriK), (PriKL), (UINT8 *) (SecK), (UINT *) (SecKL)) 60 | 61 | #define RT_DH_FREE_ALL() 62 | 63 | 64 | #endif /* __CRYPT_DH_H__ */ 65 | 66 | -------------------------------------------------------------------------------- /rt2860v2/include/crypt_hmac.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | Module Name: 17 | HMAC 18 | 19 | Abstract: 20 | FIPS 198: The Keyed-Hash Message Authentication Code (HMAC) 21 | 22 | Revision History: 23 | Who When What 24 | -------- ---------- ------------------------------------------ 25 | Eddy 2008/11/24 Create HMAC-SHA1, HMAC-SHA256 26 | ***************************************************************************/ 27 | 28 | #ifndef __CRYPT_HMAC_H__ 29 | #define __CRYPT_HMAC_H__ 30 | 31 | #include "rt_config.h" 32 | 33 | 34 | #ifdef SHA1_SUPPORT 35 | #define HMAC_SHA1_SUPPORT 36 | VOID RT_HMAC_SHA1( 37 | IN const UINT8 Key[], 38 | IN UINT KeyLen, 39 | IN const UINT8 Message[], 40 | IN UINT MessageLen, 41 | OUT UINT8 MAC[], 42 | IN UINT MACLen); 43 | #endif /* SHA1_SUPPORT */ 44 | 45 | #ifdef SHA256_SUPPORT 46 | #define HMAC_SHA256_SUPPORT 47 | VOID RT_HMAC_SHA256( 48 | IN const UINT8 Key[], 49 | IN UINT KeyLen, 50 | IN const UINT8 Message[], 51 | IN UINT MessageLen, 52 | OUT UINT8 MAC[], 53 | IN UINT MACLen); 54 | #endif /* SHA256_SUPPORT */ 55 | 56 | #ifdef MD5_SUPPORT 57 | #define HMAC_MD5_SUPPORT 58 | VOID RT_HMAC_MD5( 59 | IN const UINT8 Key[], 60 | IN UINT KeyLen, 61 | IN const UINT8 Message[], 62 | IN UINT MessageLen, 63 | OUT UINT8 MAC[], 64 | IN UINT MACLen); 65 | #endif /* MD5_SUPPORT */ 66 | 67 | 68 | #endif /* __CRYPT_HMAC_H__ */ 69 | -------------------------------------------------------------------------------- /rt2860v2/include/crypt_md5.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | Module Name: 17 | MD5 18 | 19 | Abstract: 20 | RFC1321: The MD5 Message-Digest Algorithm 21 | 22 | Revision History: 23 | Who When What 24 | -------- ---------- ------------------------------------------ 25 | Eddy 2008/11/24 Create md5 26 | ***************************************************************************/ 27 | 28 | #ifndef __CRYPT_MD5_H__ 29 | #define __CRYPT_MD5_H__ 30 | 31 | 32 | /* Algorithm options */ 33 | #define MD5_SUPPORT 34 | 35 | #ifdef MD5_SUPPORT 36 | #define MD5_BLOCK_SIZE 64 /* 512 bits = 64 bytes */ 37 | #define MD5_DIGEST_SIZE 16 /* 128 bits = 16 bytes */ 38 | typedef struct { 39 | UINT32 HashValue[4]; 40 | UINT64 MessageLen; 41 | UINT8 Block[MD5_BLOCK_SIZE]; 42 | UINT BlockLen; 43 | } MD5_CTX_STRUC, *PMD5_CTX_STRUC; 44 | 45 | VOID RT_MD5_Init( 46 | IN MD5_CTX_STRUC * pMD5_CTX); 47 | VOID RT_MD5_Hash( 48 | IN MD5_CTX_STRUC * pMD5_CTX); 49 | VOID RT_MD5_Append( 50 | IN MD5_CTX_STRUC * pMD5_CTX, 51 | IN const UINT8 Message[], 52 | IN UINT MessageLen); 53 | VOID RT_MD5_End( 54 | IN MD5_CTX_STRUC * pMD5_CTX, 55 | OUT UINT8 DigestMessage[]); 56 | VOID RT_MD5( 57 | IN const UINT8 Message[], 58 | IN UINT MessageLen, 59 | OUT UINT8 DigestMessage[]); 60 | #endif /* MD5_SUPPORT */ 61 | 62 | 63 | #endif /* __CRYPT_MD5_H__ */ 64 | -------------------------------------------------------------------------------- /rt2860v2/include/crypt_sha2.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2002, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | Module Name: 17 | SHA2 18 | 19 | Abstract: 20 | FIPS 180-2: Secure Hash Standard (SHS) 21 | 22 | Revision History: 23 | Who When What 24 | -------- ---------- ------------------------------------------ 25 | Eddy 2008/11/24 Create SHA1 26 | Eddy 2008/07/23 Create SHA256 27 | ***************************************************************************/ 28 | 29 | #ifndef __CRYPT_SHA2_H__ 30 | #define __CRYPT_SHA2_H__ 31 | 32 | 33 | /* Algorithm options */ 34 | #define SHA1_SUPPORT 35 | #define SHA256_SUPPORT 36 | 37 | #ifdef SHA1_SUPPORT 38 | #define SHA1_BLOCK_SIZE 64 /* 512 bits = 64 bytes */ 39 | #define SHA1_DIGEST_SIZE 20 /* 160 bits = 20 bytes */ 40 | typedef struct _SHA1_CTX_STRUC { 41 | UINT32 HashValue[5]; /* 5 = (SHA1_DIGEST_SIZE / 32) */ 42 | UINT64 MessageLen; /* total size */ 43 | UINT8 Block[SHA1_BLOCK_SIZE]; 44 | UINT BlockLen; 45 | } SHA1_CTX_STRUC, *PSHA1_CTX_STRUC; 46 | 47 | VOID RT_SHA1_Init( 48 | IN SHA1_CTX_STRUC * pSHA_CTX); 49 | VOID RT_SHA1_Hash( 50 | IN SHA1_CTX_STRUC * pSHA_CTX); 51 | VOID RT_SHA1_Append( 52 | IN SHA1_CTX_STRUC * pSHA_CTX, 53 | IN const UINT8 Message[], 54 | IN UINT MessageLen); 55 | VOID RT_SHA1_End( 56 | IN SHA1_CTX_STRUC * pSHA_CTX, 57 | OUT UINT8 DigestMessage[]); 58 | VOID RT_SHA1( 59 | IN const UINT8 Message[], 60 | IN UINT MessageLen, 61 | OUT UINT8 DigestMessage[]); 62 | #endif /* SHA1_SUPPORT */ 63 | 64 | #ifdef SHA256_SUPPORT 65 | #define SHA256_BLOCK_SIZE 64 /* 512 bits = 64 bytes */ 66 | #define SHA256_DIGEST_SIZE 32 /* 256 bits = 32 bytes */ 67 | typedef struct _SHA256_CTX_STRUC { 68 | UINT32 HashValue[8]; /* 8 = (SHA256_DIGEST_SIZE / 32) */ 69 | UINT64 MessageLen; /* total size */ 70 | UINT8 Block[SHA256_BLOCK_SIZE]; 71 | UINT BlockLen; 72 | } SHA256_CTX_STRUC, *PSHA256_CTX_STRUC; 73 | 74 | VOID RT_SHA256_Init( 75 | IN SHA256_CTX_STRUC * pSHA_CTX); 76 | VOID RT_SHA256_Hash( 77 | IN SHA256_CTX_STRUC * pSHA_CTX); 78 | VOID RT_SHA256_Append( 79 | IN SHA256_CTX_STRUC * pSHA_CTX, 80 | IN const UINT8 Message[], 81 | IN UINT MessageLen); 82 | VOID RT_SHA256_End( 83 | IN SHA256_CTX_STRUC * pSHA_CTX, 84 | OUT UINT8 DigestMessage[]); 85 | VOID RT_SHA256( 86 | IN const UINT8 Message[], 87 | IN UINT MessageLen, 88 | OUT UINT8 DigestMessage[]); 89 | #endif /* SHA256_SUPPORT */ 90 | 91 | 92 | #endif /* __CRYPT_SHA2_H__ */ 93 | -------------------------------------------------------------------------------- /rt2860v2/include/cs.h: -------------------------------------------------------------------------------- 1 | #ifndef __CS_H__ 2 | #define __CS_H__ 3 | 4 | #ifdef CARRIER_DETECTION_SUPPORT 5 | #define CARRIER_DETECT_RECHECK_TIME 3 6 | #define CARRIER_GONE_TRESHOLD 10 /* Radar tone count in 1 sec */ 7 | #define CARRIER_DETECT_THRESHOLD 0x1fffffff 8 | #define CARRIER_DETECT_STOP_RATIO 2 9 | #define CARRIER_DETECT_STOP_RECHECK_TIME 4 10 | #define CARRIER_DETECT_DEFAULT_MASK 20 11 | #define CARRIER_DETECT_DELTA 7 12 | #define CARRIER_DETECT_DIV_FLAG 0 13 | #define CD_INT_POLLING_CMD 0x67 14 | #ifdef RTMP_RBUS_SUPPORT 15 | #define CARRIER_DETECT_CRITIRIA 420 16 | #else 17 | #define CARRIER_DETECT_CRITIRIA 7000 18 | #endif /* RTMP_RBUS_SUPPORT */ 19 | 20 | typedef enum CD_STATE_n { 21 | CD_NORMAL, 22 | CD_SILENCE, 23 | CD_MAX_STATE 24 | } CD_STATE; 25 | 26 | typedef enum _TONE_RADAR_VERSION { 27 | DISABLE_TONE_RADAR = 0, 28 | TONE_RADAR_V1, 29 | TONE_RADAR_V2 30 | } TONE_RADAR_VERSION; 31 | 32 | typedef struct CARRIER_DETECTION_s { 33 | BOOLEAN Enable; 34 | UINT8 CDSessionTime; 35 | UINT8 CDPeriod; 36 | CD_STATE CD_State; 37 | UINT8 delta; 38 | UINT8 SymRund; 39 | UINT8 div_flag; 40 | UINT32 threshold; 41 | UINT8 recheck; 42 | UINT8 recheck1; 43 | UINT32 TimeStamp; /*unit:16us*/ 44 | UINT32 criteria; 45 | ULONG idle_time; 46 | ULONG busy_time; 47 | ULONG Debug; 48 | ULONG OneSecIntCount; 49 | UINT8 CarrierGoneThreshold; 50 | UCHAR VGA_Mask; 51 | UCHAR Packet_End_Mask; 52 | UCHAR Rx_PE_Mask; 53 | } CARRIER_DETECTION_STRUCT, *PCARRIER_DETECTION_STRUCT; 54 | 55 | #ifdef CARRIER_DETECTION_FIRMWARE_SUPPORT 56 | /* Mcu command */ 57 | #define CD_ONOFF_MCU_CMD 0x65 58 | #define CD_CHECKOUT_MCU_CMD 0x66 59 | /* share memory offsets */ 60 | #define CD_CRITERIA 0x4CB2 61 | #define CD_CHECK_COUNT 0x4CB9 62 | #define RADAR_TONE_COUNT 0x4CBE 63 | #define CD_RECHECK 0x4CBF 64 | #undef CARRIER_DETECT_RECHECK_TIME 65 | #undef CARRIER_GONE_TRESHOLD 66 | #undef CARRIER_DETECT_THRESHOLD 67 | #define CARRIER_DETECT_RECHECK_TIME 5 68 | #define CARRIER_GONE_TRESHOLD 35 69 | #define CARRIER_DETECT_THRESHOLD 0x4fffffff 70 | 71 | /* Parameters needed to decide the Carrier Detect State */ 72 | typedef struct _CARRIER_DETECT_PARAM { 73 | UINT8 RadarToneCount; /* Number of radar tones in 100 msec*/ 74 | UINT8 ReCheck; 75 | } CARRIER_DETECT_PARAM, *PCARRIER_DETECT_PARAM; 76 | 77 | /* For debug print */ 78 | typedef struct _CARRIER_DETECT_DEBUG { 79 | UINT8 delta_div; 80 | UINT8 internalRadarToneCount; 81 | UINT16 Criteria; 82 | UINT32 Threshold; 83 | UINT8 Count; 84 | UINT8 CheckCount; 85 | UINT8 Reserved; 86 | UINT8 VGA_Mask; 87 | UINT8 PckMask; 88 | UINT8 RxPeMask; 89 | UINT8 RadarToneCount; 90 | UINT8 ReCheck; 91 | } CARRIER_DETECT_DEBUG, *PCARRIER_DETECT_DEBUG; 92 | #endif /*CARRIER_DETECTION_FIRMWARE_SUPPORT*/ 93 | 94 | INT isCarrierDetectExist( 95 | IN PRTMP_ADAPTER pAd); 96 | 97 | INT CarrierDetectReset( 98 | IN PRTMP_ADAPTER pAd); 99 | 100 | extern VOID RtmpOsMsDelay( 101 | IN ULONG msec); 102 | 103 | INT Set_CarrierCriteria_Proc( 104 | IN PRTMP_ADAPTER pAd, 105 | IN PSTRING arg); 106 | 107 | INT Set_CarrierReCheck_Proc( 108 | IN PRTMP_ADAPTER pAd, 109 | IN PSTRING arg); 110 | 111 | INT Set_CarrierGoneThreshold_Proc( 112 | IN PRTMP_ADAPTER pAd, 113 | IN PSTRING arg); 114 | 115 | INT Set_CarrierStopCheck_Proc( 116 | IN PRTMP_ADAPTER pAd, 117 | IN PSTRING arg); 118 | 119 | INT Set_CarrierDebug_Proc( 120 | IN PRTMP_ADAPTER pAd, 121 | IN PSTRING arg); 122 | 123 | INT Set_CarrierDelta_Proc( 124 | IN PRTMP_ADAPTER pAd, 125 | IN PSTRING arg); 126 | 127 | INT Set_CarrierDivFlag_Proc( 128 | IN PRTMP_ADAPTER pAd, 129 | IN PSTRING arg); 130 | 131 | INT Set_CarrierThrd_Proc( 132 | IN PRTMP_ADAPTER pAd, 133 | IN PSTRING arg); 134 | 135 | /* v2 functions */ 136 | INT Set_CarrierSymRund_Proc( 137 | IN PRTMP_ADAPTER pAd, 138 | IN PSTRING arg); 139 | 140 | INT Set_CarrierMask_Proc( 141 | IN PRTMP_ADAPTER pAd, 142 | IN PSTRING arg); 143 | 144 | VOID CSInit( 145 | IN PRTMP_ADAPTER pAd); 146 | 147 | VOID CarrierDetectionStart( 148 | IN PRTMP_ADAPTER pAd); 149 | 150 | VOID RTMPHandleRadarInterrupt( 151 | IN PRTMP_ADAPTER pAd); 152 | 153 | VOID CarrierDetectionStop( 154 | IN PRTMP_ADAPTER pAd); 155 | 156 | VOID ToneRadarProgram_v1( 157 | IN PRTMP_ADAPTER pAd, 158 | IN ULONG threshold); 159 | 160 | VOID ToneRadarProgram_v2( 161 | IN PRTMP_ADAPTER pAd, 162 | IN ULONG threshold); 163 | 164 | #ifdef CARRIER_DETECTION_FIRMWARE_SUPPORT 165 | VOID CarrierDetectionPeriodicStateCtrl( 166 | IN PRTMP_ADAPTER pAd); 167 | #endif /* CARRIER_DETECTION_FIRMWARE_SUPPORT */ 168 | 169 | #ifdef CONFIG_AP_SUPPORT 170 | INT Set_CarrierDetect_Proc( 171 | IN PRTMP_ADAPTER pAd, 172 | IN PSTRING arg); 173 | #endif /*CONFIG_AP_SUPPORT*/ 174 | #endif /* CARRIER_DETECTION_SUPPORT */ 175 | 176 | #endif /*__CS_H__*/ 177 | -------------------------------------------------------------------------------- /rt2860v2/include/dot11r_ft.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | dot11r_ft.h 18 | 19 | Abstract: 20 | Defined status code, IE and frame structures that FT (802.11rD9.0) needed. 21 | 22 | Revision History: 23 | Who When What 24 | --------- ---------- ---------------------------------------------- 25 | Fonchi Wu 12-02-2008 created for 11r soft-AP 26 | */ 27 | 28 | 29 | #ifndef __DOT11R_FT_H 30 | #define __DOT11R_FT_H 31 | 32 | #define GNU_PACKED __attribute__ ((packed)) 33 | 34 | 35 | #if defined(DOT11R_FT_SUPPORT) || defined(DOT11Z_TDLS_SUPPORT) 36 | #define FT_MIC_LEN 16 37 | #define FT_NONCE_LEN 32 38 | #endif 39 | 40 | 41 | #if defined(DOT11R_FT_SUPPORT) || defined(DOT11Z_TDLS_SUPPORT) 42 | /* Information element ID defined in 802.11rD9.0 specification. */ 43 | #define IE_FT_MDIE 54 44 | #define IE_FT_FTIE 55 45 | #define IE_FT_TIMEOUT_INTERVAL 56 46 | #define IE_FT_RIC_DATA 57 47 | #define IE_FT_RIC_DESCRIPTOR 75 48 | 49 | 50 | /* RIC Type */ 51 | #define FT_RIC_TYPE_BA 1 52 | 53 | /* AKM SUITE */ 54 | #define FT_AKM_SUITE_1X 3 55 | #define FT_AKM_SUITE_PSK 4 56 | #endif 57 | 58 | 59 | #if defined(DOT11R_FT_SUPPORT) || defined(DOT11Z_TDLS_SUPPORT) 60 | typedef union GNU_PACKED _FT_MIC_CTR_FIELD 61 | { 62 | /* 63 | IECnt: contains the number of IEs 64 | that are included int eht MIC calculation. 65 | */ 66 | struct GNU_PACKED 67 | { 68 | #ifdef RT_BIG_ENDIAN 69 | UINT16 IECnt:8; 70 | UINT16 :8; 71 | #else 72 | UINT16 :8; 73 | UINT16 IECnt:8; 74 | #endif 75 | } field; 76 | UINT16 word; 77 | } FT_MIC_CTR_FIELD, *PFT_MIC_CTR_FIELD; 78 | 79 | /* 80 | ** FTIE: Fast Transition IE. 81 | */ 82 | typedef struct GNU_PACKED _FT_FTIE 83 | { 84 | FT_MIC_CTR_FIELD MICCtr; /* 2 Octects. */ 85 | UINT8 MIC[FT_MIC_LEN]; /* 16 Octects. */ 86 | UINT8 ANonce[FT_NONCE_LEN]; /* 32 Octects. */ 87 | UINT8 SNonce[FT_NONCE_LEN]; /* 32 Octects. */ 88 | UINT8 Option[0]; /* 1:R1KHID, 2:GTK, 3:ROKHId, else:Res */ 89 | } FT_FTIE, *PFT_FTIE; 90 | #endif 91 | 92 | 93 | #if defined(DOT11R_FT_SUPPORT) || defined(DOT11Z_TDLS_SUPPORT) 94 | /* 95 | ** Timeout Interval IE. 96 | */ 97 | typedef enum _FT_TIMEOUT_INTERVAL_TYPE 98 | { 99 | REASSOC_DEADLINE_INTERVAL = 1, /* TUs */ 100 | KEY_LIFETIME_INTERVAL, /* seconds. */ 101 | RESERVED_INTERVAL 102 | } FT_TIMEOUT_INTERVAL_TYPE, *PFT_TIMEOUT_INTERVAL_TYPE; 103 | 104 | typedef struct GNU_PACKED _FT_TIMEOUT_INTERVAL_IE 105 | { 106 | UINT8 TimeoutIntervalType; 107 | UINT32 TimeoutIntervalValue; 108 | } FT_TIMEOUT_INTERVAL_IE, *PFT_TIMEOUT_INTERVAL_IE; 109 | #endif 110 | 111 | 112 | #endif /* __DOT11R_FT_H */ 113 | 114 | -------------------------------------------------------------------------------- /rt2860v2/include/eeprom.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | eeprom.h 20 | 21 | Abstract: 22 | Miniport header file for eeprom related information 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | */ 28 | #ifndef __EEPROM_H__ 29 | #define __EEPROM_H__ 30 | 31 | /* For ioctl check usage */ 32 | #define EEPROM_IS_PROGRAMMED 0x80 33 | 34 | #ifdef RTMP_MAC_PCI 35 | #ifdef RT3883 36 | #define EEPROM_SIZE 0x400 37 | #else 38 | #define EEPROM_SIZE 0x200 39 | #endif /* RT3883 */ 40 | #endif /* RTMP_MAC_PCI */ 41 | 42 | 43 | 44 | #ifdef RTMP_PCI_SUPPORT 45 | /************************************************************************* 46 | * Public function declarations for prom-based chipset 47 | ************************************************************************/ 48 | int rtmp_ee_prom_read16( 49 | IN PRTMP_ADAPTER pAd, 50 | IN USHORT Offset, 51 | OUT USHORT *pValue); 52 | 53 | int rtmp_ee_prom_write16( 54 | IN PRTMP_ADAPTER pAd, 55 | IN USHORT Offset, 56 | IN USHORT value); 57 | #endif /* RTMP_PCI_SUPPORT */ 58 | 59 | 60 | 61 | 62 | #if defined(RTMP_RBUS_SUPPORT) || defined(RTMP_FLASH_SUPPORT) 63 | /************************************************************************* 64 | * Public function declarations for flash-based chipset 65 | ************************************************************************/ 66 | NDIS_STATUS rtmp_nv_init( 67 | IN PRTMP_ADAPTER pAd); 68 | 69 | int rtmp_ee_flash_read( 70 | IN PRTMP_ADAPTER pAd, 71 | IN USHORT Offset, 72 | OUT USHORT *pValue); 73 | 74 | int rtmp_ee_flash_write( 75 | IN PRTMP_ADAPTER pAd, 76 | IN USHORT Offset, 77 | IN USHORT Data); 78 | 79 | VOID rtmp_ee_flash_read_all( 80 | IN PRTMP_ADAPTER pAd, 81 | IN USHORT *Data); 82 | 83 | VOID rtmp_ee_flash_write_all( 84 | IN PRTMP_ADAPTER pAd, 85 | IN USHORT *Data); 86 | 87 | #endif /* defined(RTMP_RBUS_SUPPORT) || defined(RTMP_FLASH_SUPPORT) */ 88 | 89 | 90 | /************************************************************************* 91 | * Public function declarations for prom operation callback functions setting 92 | ************************************************************************/ 93 | INT RtmpChipOpsEepromHook( 94 | IN RTMP_ADAPTER *pAd, 95 | IN INT infType); 96 | 97 | #endif /* __EEPROM_H__ */ 98 | -------------------------------------------------------------------------------- /rt2860v2/include/frq_cal.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | eeprom.h 20 | 21 | Abstract: 22 | Miniport header file for eeprom related information 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | */ 28 | #ifndef __FRQCAL_H__ 29 | #define __FRQCAL_H__ 30 | 31 | /* */ 32 | /* The frequency calibration control */ 33 | /* */ 34 | typedef struct _FREQUENCY_CALIBRATION_CONTROL 35 | { 36 | BOOLEAN bEnableFrequencyCalibration; /* Enable the frequency calibration algorithm */ 37 | 38 | BOOLEAN bSkipFirstFrequencyCalibration; /* Avoid calibrating frequency at the time the STA is just link-up */ 39 | BOOLEAN bApproachFrequency; /* Approach the frequency */ 40 | CHAR AdaptiveFreqOffset; /* Adaptive frequency offset */ 41 | CHAR LatestFreqOffsetOverBeacon; /* Latest frequency offset from the beacon */ 42 | CHAR BeaconPhyMode; /* Latest frequency offset from the beacon */ 43 | 44 | } FREQUENCY_CALIBRATION_CONTROL, *PFREQUENCY_CALIBRATION_CONTROL; 45 | 46 | #define RTMP_FREQ_CAL_DISABLE(__pAd) \ 47 | __pAd->FreqCalibrationCtrl.bEnableFrequencyCalibration = FALSE; 48 | 49 | /* */ 50 | /* Invalid frequency offset */ 51 | /* */ 52 | #define INVALID_FREQUENCY_OFFSET -128 53 | 54 | /* */ 55 | /* The upperbound/lowerbound of the frequency offset */ 56 | /* */ 57 | #define UPPERBOUND_OF_FREQUENCY_OFFSET 127 58 | #define LOWERBOUND_OF_FREQUENCY_OFFSET -127 59 | 60 | 61 | /*#ifdef RT5390 */ 62 | /* */ 63 | /* The trigger point of the high/low frequency */ 64 | /* */ 65 | #define HIGH_FREQUENCY_TRIGGER_POINT_OFDM 20 66 | #define LOW_FREQUENCY_TRIGGER_POINT_OFDM -20 67 | #define HIGH_FREQUENCY_TRIGGER_POINT_CCK 4 68 | #define LOW_FREQUENCY_TRIGGER_POINT_CCK -4 69 | 70 | /* */ 71 | /* The trigger point of decreasng/increasing the frequency offset */ 72 | /* */ 73 | #define DECREASE_FREQUENCY_OFFSET_OFDM 10 74 | #define INCREASE_FREQUENCY_OFFSET_OFDM -10 75 | #define DECREASE_FREQUENCY_OFFSET_CCK 2 76 | #define INCREASE_FREQUENCY_OFFSET_CCK -2 77 | /*#endif // RT5390 */ 78 | /* */ 79 | /* The trigger point of decreasng/increasing the frequency offset */ 80 | /* */ 81 | #define DECREASE_FREQUENCY_OFFSET 3 82 | #define INCREASE_FREQUENCY_OFFSET -3 83 | 84 | /* */ 85 | /* Frequency calibration period */ 86 | /* */ 87 | 88 | #define FREQUENCY_CALIBRATION_PERIOD 100 89 | 90 | #endif /* __FRQCAL_H__ */ 91 | -------------------------------------------------------------------------------- /rt2860v2/include/iface/iface_util.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rtmp_util.h 18 | 19 | Abstract: 20 | Common for PCI/USB/RBUS. 21 | 22 | Revision History: 23 | Who When What 24 | --------- ---------- ---------------------------------------------- 25 | */ 26 | 27 | #ifndef __RTMP_UTIL_H__ 28 | #define __RTMP_UTIL_H__ 29 | 30 | /* maximum of PCI, USB, or RBUS, int PCI, it is 0 but in USB, it is 11 */ 31 | #define RTMP_PKT_TAIL_PADDING 11 /* 3(max 4 byte padding) + 4 (last packet padding) + 4 (MaxBulkOutsize align padding) */ 32 | 33 | #ifdef PCI_MSI_SUPPORT 34 | #define RTMP_MSI_ENABLE(_pAd) \ 35 | { POS_COOKIE _pObj = (POS_COOKIE)(_pAd->OS_Cookie); \ 36 | (_pAd)->HaveMsi = pci_enable_msi(_pObj->pci_dev) == 0 ? TRUE : FALSE; \ 37 | } 38 | 39 | #define RTMP_MSI_DISABLE(_pci_dev, _pHaveMsi) \ 40 | { \ 41 | if (*(_pHaveMsi) == TRUE) \ 42 | pci_disable_msi(_pci_dev); \ 43 | *(_pHaveMsi) = FALSE; \ 44 | } 45 | 46 | #else 47 | #define RTMP_MSI_ENABLE(_pAd) do{}while(0) 48 | #define RTMP_MSI_DISABLE(_pci_dev, _pHaveMsi) do{}while(0) 49 | #endif /* PCI_MSI_SUPPORT */ 50 | 51 | #define RTMP_PCI_DMA_TODEVICE 0xFF00 52 | #define RTMP_PCI_DMA_FROMDEVICE 0xFF01 53 | 54 | 55 | 56 | 57 | #define UNLINK_TIMEOUT_MS 3 58 | 59 | #define USBD_TRANSFER_DIRECTION_OUT 0 60 | #define USBD_TRANSFER_DIRECTION_IN 0 61 | #define USBD_SHORT_TRANSFER_OK 0 62 | #define PURB purbb_t 63 | 64 | #define OS_RTUSBMlmeUp RtmpOsMlmeUp 65 | 66 | 67 | 68 | 69 | #endif /* __RTMP_UTIL_H__ */ 70 | -------------------------------------------------------------------------------- /rt2860v2/include/igmp_snoop.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | igmp_snoop.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | 27 | #ifndef __RTMP_IGMP_SNOOP_H__ 28 | #define __RTMP_IGMP_SNOOP_H__ 29 | 30 | #include "link_list.h" 31 | 32 | #define IGMP_PROTOCOL_DESCRIPTOR 0x02 33 | #define IGMP_V1_MEMBERSHIP_REPORT 0x12 34 | #define IGMP_V2_MEMBERSHIP_REPORT 0x16 35 | #define IGMP_LEAVE_GROUP 0x17 36 | #define IGMP_V3_MEMBERSHIP_REPORT 0x22 37 | 38 | #define MLD_V1_LISTENER_REPORT 131 39 | #define MLD_V1_LISTENER_DONE 132 40 | #define MLD_V2_LISTERNER_REPORT 143 41 | 42 | #define IGMPMAC_TB_ENTRY_AGEOUT_TIME (120 * OS_HZ) 43 | 44 | #define MULTICAST_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) & (MAX_LEN_OF_MULTICAST_FILTER_HASH_TABLE - 1)) 45 | 46 | #define IS_MULTICAST_MAC_ADDR(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff)) 47 | #define IS_IPV6_MULTICAST_MAC_ADDR(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) == 0x33)) 48 | #define IS_BROADCAST_MAC_ADDR(Addr) ((((Addr[0]) & 0xff) == 0xff)) 49 | 50 | #define IGMP_NONE 0 51 | #define IGMP_PKT 1 52 | #define IGMP_IN_GROUP 2 53 | 54 | 55 | VOID MulticastFilterTableInit( 56 | IN PRTMP_ADAPTER pAd, 57 | IN PMULTICAST_FILTER_TABLE *ppMulticastFilterTable); 58 | 59 | VOID MultiCastFilterTableReset( 60 | IN PMULTICAST_FILTER_TABLE *ppMulticastFilterTable); 61 | 62 | BOOLEAN MulticastFilterTableInsertEntry( 63 | IN PRTMP_ADAPTER pAd, 64 | IN PUCHAR pGrpId, 65 | IN PUCHAR pMemberAddr, 66 | IN PNET_DEV dev, 67 | IN MulticastFilterEntryType type); 68 | 69 | BOOLEAN MulticastFilterTableDeleteEntry( 70 | IN PRTMP_ADAPTER pAd, 71 | IN PUCHAR pGrpId, 72 | IN PUCHAR pMemberAddr, 73 | IN PNET_DEV dev); 74 | 75 | PMULTICAST_FILTER_TABLE_ENTRY MulticastFilterTableLookup( 76 | IN PMULTICAST_FILTER_TABLE pMulticastFilterTable, 77 | IN PUCHAR pAddr, 78 | IN PNET_DEV dev); 79 | 80 | BOOLEAN isIgmpPkt( 81 | IN PUCHAR pDstMacAddr, 82 | IN PUCHAR pIpHeader); 83 | 84 | VOID IGMPSnooping( 85 | IN PRTMP_ADAPTER pAd, 86 | IN PUCHAR pDstMacAddr, 87 | IN PUCHAR pSrcMacAddr, 88 | IN PUCHAR pIpHeader, 89 | IN PNET_DEV pDev); 90 | 91 | BOOLEAN isMldPkt( 92 | IN PUCHAR pDstMacAddr, 93 | IN PUCHAR pIpHeader, 94 | OUT UINT8 *pProtoType, 95 | OUT PUCHAR *pMldHeader); 96 | 97 | BOOLEAN IPv6MulticastFilterExcluded( 98 | IN PUCHAR pDstMacAddr, 99 | IN PUCHAR pIpHeader); 100 | 101 | VOID MLDSnooping( 102 | IN PRTMP_ADAPTER pAd, 103 | IN PUCHAR pDstMacAddr, 104 | IN PUCHAR pSrcMacAddr, 105 | IN PUCHAR pIpHeader, 106 | IN PNET_DEV pDev); 107 | 108 | UCHAR IgmpMemberCnt( 109 | IN PLIST_HEADER pList); 110 | 111 | VOID IgmpGroupDelMembers( 112 | IN PRTMP_ADAPTER pAd, 113 | IN PUCHAR pMemberAddr, 114 | IN PNET_DEV pDev); 115 | 116 | INT Set_IgmpSn_Enable_Proc( 117 | IN PRTMP_ADAPTER pAd, 118 | IN PSTRING arg); 119 | 120 | INT Set_IgmpSn_AddEntry_Proc( 121 | IN PRTMP_ADAPTER pAd, 122 | IN PSTRING arg); 123 | 124 | INT Set_IgmpSn_DelEntry_Proc( 125 | IN PRTMP_ADAPTER pAd, 126 | IN PSTRING arg); 127 | 128 | INT Set_IgmpSn_TabDisplay_Proc( 129 | IN PRTMP_ADAPTER pAd, 130 | IN PSTRING arg); 131 | 132 | void rtmp_read_igmp_snoop_from_file( 133 | IN PRTMP_ADAPTER pAd, 134 | PSTRING tmpbuf, 135 | PSTRING buffer); 136 | 137 | NDIS_STATUS IgmpPktInfoQuery( 138 | IN PRTMP_ADAPTER pAd, 139 | IN PUCHAR pSrcBufVA, 140 | IN PNDIS_PACKET pPacket, 141 | IN UCHAR FromWhichBSSID, 142 | OUT INT *pInIgmpGroup, 143 | OUT PMULTICAST_FILTER_TABLE_ENTRY *ppGroupEntry); 144 | 145 | NDIS_STATUS IgmpPktClone( 146 | IN PRTMP_ADAPTER pAd, 147 | IN PNDIS_PACKET pPacket, 148 | IN INT IgmpPktInGroup, 149 | IN PMULTICAST_FILTER_TABLE_ENTRY pGroupEntry, 150 | IN UCHAR QueIdx, 151 | IN UINT8 UserPriority, 152 | IN PNET_DEV pNetDev); 153 | 154 | #endif /* __RTMP_IGMP_SNOOP_H__ */ 155 | 156 | -------------------------------------------------------------------------------- /rt2860v2/include/link_list.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __LINK_LIST_H__ 3 | #define __LINK_LIST_H__ 4 | 5 | typedef struct _LIST_ENTRY 6 | { 7 | struct _LIST_ENTRY *pNext; 8 | } LIST_ENTRY, *PLIST_ENTRY; 9 | 10 | typedef struct _LIST_HEADR 11 | { 12 | PLIST_ENTRY pHead; 13 | PLIST_ENTRY pTail; 14 | UCHAR size; 15 | } LIST_HEADER, *PLIST_HEADER; 16 | 17 | static inline VOID initList( 18 | IN PLIST_HEADER pList) 19 | { 20 | pList->pHead = pList->pTail = NULL; 21 | pList->size = 0; 22 | return; 23 | } 24 | 25 | static inline VOID insertTailList( 26 | IN PLIST_HEADER pList, 27 | IN PLIST_ENTRY pEntry) 28 | { 29 | pEntry->pNext = NULL; 30 | if (pList->pTail) 31 | pList->pTail->pNext = pEntry; 32 | else 33 | pList->pHead = pEntry; 34 | pList->pTail = pEntry; 35 | pList->size++; 36 | 37 | return; 38 | } 39 | 40 | static inline PLIST_ENTRY removeHeadList( 41 | IN PLIST_HEADER pList) 42 | { 43 | PLIST_ENTRY pNext; 44 | PLIST_ENTRY pEntry; 45 | 46 | pEntry = pList->pHead; 47 | if (pList->pHead != NULL) 48 | { 49 | pNext = pList->pHead->pNext; 50 | pList->pHead = pNext; 51 | if (pNext == NULL) 52 | pList->pTail = NULL; 53 | pList->size--; 54 | } 55 | return pEntry; 56 | } 57 | 58 | static inline int getListSize( 59 | IN PLIST_HEADER pList) 60 | { 61 | return pList->size; 62 | } 63 | 64 | static inline PLIST_ENTRY delEntryList( 65 | IN PLIST_HEADER pList, 66 | IN PLIST_ENTRY pEntry) 67 | { 68 | PLIST_ENTRY pCurEntry; 69 | PLIST_ENTRY pPrvEntry; 70 | 71 | if(pList->pHead == NULL) 72 | return NULL; 73 | 74 | if(pEntry == pList->pHead) 75 | { 76 | pCurEntry = pList->pHead; 77 | pList->pHead = pCurEntry->pNext; 78 | 79 | if(pList->pHead == NULL) 80 | pList->pTail = NULL; 81 | 82 | pList->size--; 83 | return pCurEntry; 84 | } 85 | 86 | pPrvEntry = pList->pHead; 87 | pCurEntry = pPrvEntry->pNext; 88 | while(pCurEntry != NULL) 89 | { 90 | if (pEntry == pCurEntry) 91 | { 92 | pPrvEntry->pNext = pCurEntry->pNext; 93 | 94 | if(pEntry == pList->pTail) 95 | pList->pTail = pPrvEntry; 96 | 97 | pList->size--; 98 | break; 99 | } 100 | pPrvEntry = pCurEntry; 101 | pCurEntry = pPrvEntry->pNext; 102 | } 103 | 104 | return pCurEntry; 105 | } 106 | 107 | typedef struct _DL_LIST 108 | { 109 | struct _DL_LIST *Next; 110 | struct _DL_LIST *Prev; 111 | }DL_LIST, *PDL_LIST; 112 | 113 | static inline void DlListInit(struct _DL_LIST *List) 114 | { 115 | List->Next = List; 116 | List->Prev = List; 117 | } 118 | 119 | static inline void DlListAdd(struct _DL_LIST *List, struct _DL_LIST *Item) 120 | { 121 | Item->Next = List->Next; 122 | Item->Prev = List; 123 | List->Next->Prev = Item; 124 | List->Next = Item; 125 | } 126 | 127 | static inline void DlListAddTail(struct _DL_LIST *List, struct _DL_LIST *Item) 128 | { 129 | DlListAdd(List->Prev, Item); 130 | } 131 | 132 | static inline void DlListDel(struct _DL_LIST *Item) 133 | { 134 | Item->Next->Prev = Item->Prev; 135 | Item->Prev->Next = Item->Next; 136 | Item->Next = NULL; 137 | Item->Prev = NULL; 138 | } 139 | 140 | static inline int DlListEmpty(struct _DL_LIST *List) 141 | { 142 | return List->Next == List; 143 | } 144 | 145 | static inline unsigned int DlListLen(struct _DL_LIST *List) 146 | { 147 | struct _DL_LIST *Item; 148 | unsigned int Count = 0; 149 | 150 | for (Item = List->Next; Item != List; Item = Item->Next) 151 | Count++; 152 | 153 | return Count; 154 | } 155 | 156 | 157 | #ifndef offsetof 158 | #define offsetof(type, member) ((long) &((type *) 0)->member) 159 | #endif 160 | 161 | #define DlListEntry(item, type, member) \ 162 | ((type *) ((char *) item - offsetof(type, member))) 163 | 164 | #define DlListFirst(list, type, member) \ 165 | (DlListEmpty((list)) ? NULL : \ 166 | DlListEntry((list)->Next, type, member)) 167 | 168 | #define DlListForEach(item, list, type, member) \ 169 | for (item = DlListEntry((list)->Next, type, member); \ 170 | &item->member != (list); \ 171 | item = DlListEntry(item->member.Next, type, member)) 172 | 173 | #define DlListForEachSafe(item, n, list, type, member) \ 174 | for (item = DlListEntry((list)->Next, type, member), \ 175 | n = DlListEntry(item->member.Next, type, member); \ 176 | &item->member != (list); \ 177 | item = n, n = DlListEntry(n->member.Next, type, member)) 178 | 179 | #endif /* ___LINK_LIST_H__ */ 180 | 181 | -------------------------------------------------------------------------------- /rt2860v2/include/misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2009, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | misc.h 20 | 21 | Abstract: 22 | 23 | Handling Misc Problem 24 | 25 | Revision History: 26 | Who When What 27 | -------- ---------- ---------------------------------------------- 28 | Sean Wang 2009-08-12 Create 29 | John Li 2009-12-23 Modified 30 | */ 31 | 32 | 33 | -------------------------------------------------------------------------------- /rt2860v2/include/misc_cmm.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2009, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | misc_cmm.h 20 | 21 | Abstract: 22 | 23 | Handling Misc Problem 24 | 25 | Revision History: 26 | Who When What 27 | -------- ---------- ---------------------------------------------- 28 | Sean Wang 2009-08-12 Create 29 | John Li 2009-12-23 Modified 30 | */ 31 | 32 | 33 | -------------------------------------------------------------------------------- /rt2860v2/include/netif_block.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __NET_IF_BLOCK_H__ 3 | #define __NET_IF_BLOCK_H__ 4 | 5 | #include "link_list.h" 6 | #include "rtmp.h" 7 | 8 | #define FREE_NETIF_POOL_SIZE 32 9 | 10 | typedef struct _NETIF_ENTRY 11 | { 12 | struct _NETIF_ENTRY *pNext; 13 | PNET_DEV pNetDev; 14 | } NETIF_ENTRY, *PNETIF_ENTRY; 15 | 16 | void initblockQueueTab( 17 | IN PRTMP_ADAPTER pAd); 18 | 19 | BOOLEAN blockNetIf( 20 | IN PBLOCK_QUEUE_ENTRY pBlockQueueEntry, 21 | IN PNET_DEV pNetDev); 22 | 23 | VOID releaseNetIf( 24 | IN PBLOCK_QUEUE_ENTRY pBlockQueueEntry); 25 | 26 | VOID StopNetIfQueue( 27 | IN PRTMP_ADAPTER pAd, 28 | IN UCHAR QueIdx, 29 | IN PNDIS_PACKET pPacket); 30 | #endif /* __NET_IF_BLOCK_H__ */ 31 | 32 | -------------------------------------------------------------------------------- /rt2860v2/include/p2p_inf.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2005, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attempt 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | p2p_inf.h 20 | 21 | Abstract: 22 | 23 | Revision History: 24 | Who When What 25 | -------- ---------- ---------------------------------------------- 26 | 27 | */ 28 | 29 | #ifndef __P2P_INF_H__ 30 | #define __P2P_INF_H__ 31 | 32 | #define P2P_DISABLE 0x0 33 | #define P2P_GO_UP 0x1 34 | #define P2P_CLI_UP 0x2 35 | /*#define P2P_GO_ON(_p) (OPSTATUS_TEST_FLAG(_p, fOP_STATUS_P2P_GO)) */ 36 | /*#define P2P_CLI_ON(_p) (OPSTATUS_TEST_FLAG(_p, fOP_STATUS_P2P_CLI)) */ 37 | 38 | 39 | 40 | #define P2P_GO_ON(_pAd) \ 41 | (((_pAd)->flg_p2p_init) \ 42 | && ((_pAd)->flg_p2p_OpStatusFlags == P2P_GO_UP)) 43 | 44 | 45 | #define P2P_CLI_ON(_pAd) \ 46 | (((_pAd)->flg_p2p_init) \ 47 | && ((_pAd)->flg_p2p_OpStatusFlags == P2P_CLI_UP)) 48 | 49 | /* P2P interface hook function definition */ 50 | VOID RTMP_P2P_Init( 51 | IN PRTMP_ADAPTER ad_p, 52 | IN PNET_DEV main_dev_p); 53 | 54 | INT P2P_VirtualIF_Open( 55 | IN PNET_DEV dev_p); 56 | 57 | INT P2P_VirtualIF_Close( 58 | IN PNET_DEV dev_p); 59 | 60 | INT P2P_VirtualIF_PacketSend( 61 | IN PNDIS_PACKET skb_p, 62 | IN PNET_DEV dev_p); 63 | 64 | INT P2P_VirtualIF_Ioctl( 65 | IN PNET_DEV dev_p, 66 | IN OUT struct ifreq *rq_p, 67 | IN INT cmd); 68 | 69 | VOID RTMP_P2P_Remove( 70 | IN PRTMP_ADAPTER pAd); 71 | 72 | #endif /* __P2P_INF_H__ */ 73 | 74 | -------------------------------------------------------------------------------- /rt2860v2/include/radar.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | radar.h 20 | 21 | Abstract: 22 | CS/DFS common functions. 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | */ 28 | #ifndef __RADAR_H__ 29 | #define __RADAR_H__ 30 | 31 | /* RESTRICTION_BAND_1: 5600MHz ~ 5650MHz */ 32 | #define RESTRICTION_BAND_1(_pAd) \ 33 | _pAd->CommonCfg.RegTransmitSetting.field.BW == BW_40 ? \ 34 | ((_pAd->CommonCfg.Channel >= 116) && (_pAd->CommonCfg.Channel <= 128)) : \ 35 | ((_pAd->CommonCfg.Channel >= 120) && (_pAd->CommonCfg.Channel <= 128)) 36 | 37 | /* 802.11H */ 38 | typedef struct _DOT11_H { 39 | /* 802.11H and DFS related params */ 40 | UCHAR CSCount; /*Channel switch counter */ 41 | UCHAR CSPeriod; /*Channel switch period (beacon count) */ 42 | USHORT RDCount; /*Radar detection counter, if RDCount > ChMovingTime, start to send beacons*/ 43 | UCHAR RDMode; /*Radar Detection mode */ 44 | USHORT ChMovingTime; 45 | BOOLEAN bDFSIndoor; 46 | ULONG InServiceMonitorCount; /* unit: sec */ 47 | } DOT11_H, *PDOT11_H; 48 | 49 | BOOLEAN RadarChannelCheck( 50 | IN PRTMP_ADAPTER pAd, 51 | IN UCHAR Ch); 52 | 53 | ULONG JapRadarType( 54 | IN PRTMP_ADAPTER pAd); 55 | 56 | #ifdef CONFIG_AP_SUPPORT 57 | VOID ChannelSwitchingCountDownProc( 58 | IN PRTMP_ADAPTER pAd); 59 | #endif /* CONFIG_AP_SUPPORT */ 60 | 61 | VOID RadarDetectPeriodic( 62 | IN PRTMP_ADAPTER pAd); 63 | 64 | INT Set_CSPeriod_Proc( 65 | IN PRTMP_ADAPTER pAdapter, 66 | IN PSTRING arg); 67 | 68 | INT Set_ChMovingTime_Proc( 69 | IN PRTMP_ADAPTER pAd, 70 | IN PSTRING arg); 71 | 72 | INT Set_BlockChReset_Proc( 73 | IN PRTMP_ADAPTER pAd, 74 | IN PSTRING arg); 75 | 76 | #if defined(DFS_SUPPORT) || defined(CARRIER_DETECTION_SUPPORT) 77 | INT Set_RadarShow_Proc( 78 | IN PRTMP_ADAPTER pAd, 79 | IN PSTRING arg); 80 | 81 | VOID CckMrcStatusCtrl( 82 | IN PRTMP_ADAPTER pAd); 83 | 84 | VOID RadarGLRTCompensate( 85 | IN PRTMP_ADAPTER pAd); 86 | 87 | #endif /*defined(DFS_SUPPORT) || defined(CARRIER_DETECTION_SUPPORT)*/ 88 | 89 | #endif /* __RADAR_H__ */ 90 | -------------------------------------------------------------------------------- /rt2860v2/include/rt_cal.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2009, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | cmm_rf_cal.c 20 | 21 | Abstract: 22 | RF calibration and profile related functions 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | Arvin Tai 2012/05/02 28 | */ 29 | 30 | #define DPD_CAL_PASS_THRES 5 31 | #define DPD_CAL_MAX_RETRY 5 32 | 33 | INT32 CalcRCalibrationCode( 34 | IN PRTMP_ADAPTER pAd, 35 | IN INT32 D1, 36 | IN INT32 D2); 37 | 38 | INT Set_TestRxIQCalibration_Proc( 39 | IN RTMP_ADAPTER *pAd, 40 | IN PSTRING arg); 41 | 42 | VOID R_Calibration( 43 | IN PRTMP_ADAPTER pAd); 44 | 45 | VOID RtmpKickOutHwNullFrame( 46 | IN PRTMP_ADAPTER pAd, 47 | IN BOOLEAN bPrepareContent, 48 | IN BOOLEAN bTransmit); 49 | 50 | VOID DPD_IQ_Swap_AM_PM_Inversion( 51 | IN PRTMP_ADAPTER pAd, 52 | IN UCHAR AntIdx); 53 | 54 | VOID DPD_AM_AM_LUT_Scaling( 55 | IN PRTMP_ADAPTER pAd, 56 | IN UCHAR AntIdx); 57 | 58 | UCHAR DPD_Calibration( 59 | IN PRTMP_ADAPTER pAd, 60 | IN UCHAR AntIdx); 61 | 62 | VOID DoDPDCalibration( 63 | IN PRTMP_ADAPTER pAd); 64 | 65 | INT Set_DPDCalPassThres_Proc( 66 | IN RTMP_ADAPTER *pAd, 67 | IN PSTRING arg); 68 | 69 | INT Set_TestDPDCalibration_Proc( 70 | IN RTMP_ADAPTER *pAd, 71 | IN PSTRING arg); 72 | 73 | INT Set_TestDPDCalibrationTX0_Proc( 74 | IN RTMP_ADAPTER *pAd, 75 | IN PSTRING arg); 76 | 77 | INT Set_TestDPDCalibrationTX1_Proc( 78 | IN RTMP_ADAPTER *pAd, 79 | IN PSTRING arg); 80 | 81 | VOID LOFT_IQ_Calibration( 82 | IN RTMP_ADAPTER *pAd); 83 | 84 | BOOLEAN BW_Filter_Calibration( 85 | IN PRTMP_ADAPTER pAd, 86 | IN BOOLEAN bTxCal); 87 | 88 | VOID RxDCOC_Calibration( 89 | IN PRTMP_ADAPTER pAd); 90 | 91 | VOID RXIQ_Calibration( 92 | IN PRTMP_ADAPTER pAd); 93 | 94 | VOID RF_SELF_TXDC_CAL( 95 | IN PRTMP_ADAPTER pAd); 96 | 97 | -------------------------------------------------------------------------------- /rt2860v2/include/rtmp_dot11.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | #ifndef __DOT11_BASE_H__ 6 | #define __DOT11_BASE_H__ 7 | 8 | #include "rtmp_type.h" 9 | 10 | #ifdef TXBF_SUPPORT 11 | /* CSI/Steering values */ 12 | #define DOT11N_BF_FB_NONE 0 13 | #define DOT11N_BF_FB_CSI 1 14 | #define DOT11N_BF_FB_NOCOMP 2 15 | #define DOT11N_BF_FB_COMP 3 16 | #endif /* TXBF_SUPPORT */ 17 | 18 | /* 4-byte HTC field. maybe included in any frame except non-QOS data frame. The Order bit must set 1. */ 19 | typedef struct GNU_PACKED _HT_CONTROL{ 20 | #ifdef RT_BIG_ENDIAN 21 | UINT32 RDG:1; /*RDG / More PPDU */ 22 | UINT32 ACConstraint:1; /*feedback request */ 23 | UINT32 rsv2:5; /*calibration sequence */ 24 | UINT32 NDPAnnounce:1; /* ZLF announcement */ 25 | UINT32 CSISTEERING:2; /*CSI/ STEERING */ 26 | UINT32 rsv1:2; /* Reserved */ 27 | UINT32 CalSeq:2; /*calibration sequence */ 28 | UINT32 CalPos:2; /* calibration position */ 29 | UINT32 MFBorASC:7; /*Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available */ 30 | UINT32 MFSI:3; /*SET to the received value of MRS. 0x111 for unsolicited MFB. */ 31 | UINT32 MSI:3; /*MCS Request, MRQ Sequence identifier */ 32 | UINT32 MRQ:1; /*MCS feedback. Request for a MCS feedback */ 33 | UINT32 TRQ:1; /*sounding request */ 34 | UINT32 rsv:1; /* Reserved */ 35 | #else 36 | UINT32 rsv:1; /* Reserved */ 37 | UINT32 TRQ:1; /*sounding request */ 38 | UINT32 MRQ:1; /*MCS feedback. Request for a MCS feedback */ 39 | UINT32 MSI:3; /*MCS Request, MRQ Sequence identifier */ 40 | UINT32 MFSI:3; /*SET to the received value of MRS. 0x111 for unsolicited MFB. */ 41 | UINT32 MFBorASC:7; /*Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available */ 42 | UINT32 CalPos:2; /* calibration position */ 43 | UINT32 CalSeq:2; /*calibration sequence */ 44 | UINT32 rsv1:2; /* Reserved */ 45 | UINT32 CSISTEERING:2; /*CSI/ STEERING */ 46 | UINT32 NDPAnnounce:1; /* ZLF announcement */ 47 | UINT32 rsv2:5; /*calibration sequence */ 48 | UINT32 ACConstraint:1; /*feedback request */ 49 | UINT32 RDG:1; /*RDG / More PPDU */ 50 | #endif /* !RT_BIG_ENDIAN */ 51 | } HT_CONTROL, *PHT_CONTROL; 52 | 53 | /* 2-byte QOS CONTROL field */ 54 | typedef struct GNU_PACKED _QOS_CONTROL{ 55 | #ifdef RT_BIG_ENDIAN 56 | USHORT Txop_QueueSize:8; 57 | USHORT AMsduPresent:1; 58 | USHORT AckPolicy:2; /*0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA */ 59 | USHORT EOSP:1; 60 | USHORT TID:4; 61 | #else 62 | USHORT TID:4; 63 | USHORT EOSP:1; 64 | USHORT AckPolicy:2; /*0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA */ 65 | USHORT AMsduPresent:1; 66 | USHORT Txop_QueueSize:8; 67 | #endif /* !RT_BIG_ENDIAN */ 68 | } QOS_CONTROL, *PQOS_CONTROL; 69 | 70 | 71 | typedef struct GNU_PACKED _PSPOLL_FRAME { 72 | FRAME_CONTROL FC; 73 | USHORT Aid; 74 | UCHAR Bssid[MAC_ADDR_LEN]; 75 | UCHAR Ta[MAC_ADDR_LEN]; 76 | } PSPOLL_FRAME, *PPSPOLL_FRAME; 77 | 78 | typedef struct GNU_PACKED _RTS_FRAME { 79 | FRAME_CONTROL FC; 80 | USHORT Duration; 81 | UCHAR Addr1[MAC_ADDR_LEN]; 82 | UCHAR Addr2[MAC_ADDR_LEN]; 83 | } RTS_FRAME, *PRTS_FRAME; 84 | 85 | #endif /* __DOT11_BASE_H__ */ 86 | -------------------------------------------------------------------------------- /rt2860v2/include/rtmp_iface.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rt_iface.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __RTMP_IFACE_H__ 27 | #define __RTMP_IFACE_H__ 28 | 29 | #ifdef RTMP_PCI_SUPPORT 30 | #include "iface/rtmp_pci.h" 31 | #endif /* RTMP_PCI_SUPPORT */ 32 | 33 | #ifdef RTMP_RBUS_SUPPORT 34 | #include "iface/rtmp_rbs.h" 35 | #endif /* RTMP_RBUS_SUPPORT */ 36 | 37 | 38 | typedef struct _INF_PCI_CONFIG_ { 39 | unsigned long CSRBaseAddress; /* PCI MMIO Base Address, all access will use */ 40 | unsigned int irq_num; 41 | } INF_PCI_CONFIG; 42 | 43 | typedef struct _INF_USB_CONFIG_ { 44 | unsigned char BulkInEpAddr; /* bulk-in endpoint address */ 45 | unsigned char BulkOutEpAddr[6]; /* bulk-out endpoint address */ 46 | } INF_USB_CONFIG; 47 | 48 | typedef struct _INF_RBUS_CONFIG_ { 49 | unsigned long csr_addr; 50 | unsigned int irq; 51 | } INF_RBUS_CONFIG; 52 | 53 | 54 | typedef union _RTMP_INF_CONFIG_ { 55 | struct _INF_PCI_CONFIG_ pciConfig; 56 | struct _INF_USB_CONFIG_ usbConfig; 57 | struct _INF_RBUS_CONFIG_ rbusConfig; 58 | } RTMP_INF_CONFIG; 59 | 60 | #endif /* __RTMP_IFACE_H__ */ 61 | -------------------------------------------------------------------------------- /rt2860v2/include/rtmp_mcu.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | rtmp_mcu.h 20 | 21 | Abstract: 22 | Miniport header file for mcu related information 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | */ 28 | 29 | #ifndef __RTMP_MCU_H__ 30 | #define __RTMP_MCU_H__ 31 | 32 | INT RtmpAsicEraseFirmware( 33 | IN PRTMP_ADAPTER pAd); 34 | 35 | NDIS_STATUS RtmpAsicLoadFirmware( 36 | IN PRTMP_ADAPTER pAd); 37 | 38 | NDIS_STATUS isMCUnotReady( 39 | IN PRTMP_ADAPTER pAd); 40 | 41 | NDIS_STATUS isMCUNeedToLoadFIrmware( 42 | IN PRTMP_ADAPTER pAd); 43 | 44 | INT RtmpAsicSendCommandToMcu( 45 | IN PRTMP_ADAPTER pAd, 46 | IN UCHAR Command, 47 | IN UCHAR Token, 48 | IN UCHAR Arg0, 49 | IN UCHAR Arg1, 50 | IN BOOLEAN FlgIsNeedLocked); 51 | 52 | #endif /* __RTMP_MCU_H__ */ 53 | -------------------------------------------------------------------------------- /rt2860v2/include/rtmp_os.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | rtmp_os.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | */ 25 | 26 | #ifndef __RTMP_OS_H__ 27 | #define __RTMP_OS_H__ 28 | 29 | /* Driver Operators */ 30 | typedef int (*RTMP_PRINTK)(const char *ftm, ...); 31 | typedef int (*RTMP_SNPRINTF)(char *, ULONG, const char *ftm, ...); 32 | 33 | typedef struct _RTMP_OS_ABL_OPS { 34 | int (*ra_printk)(const char *ftm, ...); 35 | int (*ra_snprintf)(char *, ULONG, const char *ftm, ...); 36 | } RTMP_OS_ABL_OPS; 37 | 38 | extern RTMP_OS_ABL_OPS *pRaOsOps; 39 | 40 | #ifdef LINUX 41 | #ifndef OS_ABL_FUNC_SUPPORT 42 | #include "os/rt_linux.h" 43 | 44 | #else 45 | 46 | #ifdef RTMP_MODULE_OS 47 | /* for util/netif */ 48 | #include "os/rt_linux.h" 49 | #else 50 | /* for core */ 51 | #include "os/rt_drv.h" 52 | #endif /* RTMP_MODULE_OS */ 53 | #endif /* OS_ABL_FUNC_SUPPORT */ 54 | #endif /* LINUX */ 55 | 56 | 57 | 58 | 59 | 60 | /* 61 | This data structure mainly strip some callback function defined in 62 | "struct net_device" in kernel source "include/linux/netdevice.h". 63 | 64 | The definition of this data structure may various depends on different 65 | OS. Use it carefully. 66 | */ 67 | typedef struct _RTMP_OS_NETDEV_OP_HOOK_ { 68 | void *open; 69 | void *stop; 70 | void *xmit; 71 | void *ioctl; 72 | void *get_stats; 73 | void *priv; 74 | void *get_wstats; 75 | void *iw_handler; 76 | int priv_flags; 77 | unsigned char devAddr[6]; 78 | unsigned char devName[16]; 79 | unsigned char needProtcted; 80 | } RTMP_OS_NETDEV_OP_HOOK, *PRTMP_OS_NETDEV_OP_HOOK; 81 | 82 | 83 | typedef enum _RTMP_TASK_STATUS_ { 84 | RTMP_TASK_STAT_UNKNOWN = 0, 85 | RTMP_TASK_STAT_INITED = 1, 86 | RTMP_TASK_STAT_RUNNING = 2, 87 | RTMP_TASK_STAT_STOPED = 4, 88 | } RTMP_TASK_STATUS; 89 | #define RTMP_TASK_CAN_DO_INSERT (RTMP_TASK_STAT_INITED |RTMP_TASK_STAT_RUNNING) 90 | 91 | #define RTMP_OS_TASK_NAME_LEN 16 92 | 93 | #if defined(RTMP_MODULE_OS) || !defined(OS_ABL_FUNC_SUPPORT) 94 | /* used in UTIL/NETIF module */ 95 | typedef struct _RTMP_OS_TASK_ { 96 | char taskName[RTMP_OS_TASK_NAME_LEN]; 97 | void *priv; 98 | /*unsigned long taskFlags; */ 99 | RTMP_TASK_STATUS taskStatus; 100 | #ifndef KTHREAD_SUPPORT 101 | RTMP_OS_SEM taskSema; 102 | RTMP_OS_PID taskPID; 103 | struct completion taskComplete; 104 | #endif 105 | unsigned char task_killed; 106 | #ifdef KTHREAD_SUPPORT 107 | struct task_struct *kthread_task; 108 | wait_queue_head_t kthread_q; 109 | BOOLEAN kthread_running; 110 | #endif 111 | } OS_TASK; 112 | #endif /* RTMP_MODULE_OS || ! OS_ABL_FUNC_SUPPORT */ 113 | 114 | int RtmpOSIRQRequest( 115 | IN PNET_DEV pNetDev); 116 | /*int RtmpOSIRQRelease(IN PNET_DEV pNetDev); */ 117 | 118 | #ifndef OS_ABL_SUPPORT 119 | #define RTMP_MATOpsInit(__pAd) 120 | #define RTMP_MATPktRxNeedConvert(__pAd, __pDev) \ 121 | MATPktRxNeedConvert(__pAd, __pDev) 122 | #define RTMP_MATEngineRxHandle(__pAd, __pPkt, __InfIdx) \ 123 | MATEngineRxHandle(__pAd, __pPkt, __InfIdx) 124 | #else 125 | 126 | #define RTMP_MATOpsInit(__pAd) \ 127 | (__pAd)->MATPktRxNeedConvert = MATPktRxNeedConvert; \ 128 | (__pAd)->MATEngineRxHandle = MATEngineRxHandle; 129 | #define RTMP_MATPktRxNeedConvert(__pAd, __pDev) \ 130 | ((__pAd)->MATPktRxNeedConvert(__pAd, __pDev)) 131 | #define RTMP_MATEngineRxHandle(__pAd, __pPkt, __InfIdx) \ 132 | ((__pAd)->MATEngineRxHandle(__pAd, __pPkt, __InfIdx)) 133 | #endif /* OS_ABL_SUPPORT */ 134 | 135 | #endif /* __RMTP_OS_H__ */ 136 | -------------------------------------------------------------------------------- /rt2860v2/include/rtmp_osabl.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | 3 | Module Name: 4 | OS/rtmp_osabl.h 5 | 6 | Abstract: 7 | Some structure/definitions for OS ABL function. 8 | 9 | Revision History: 10 | Who When What 11 | --------- ---------- ---------------------------------------------- 12 | 13 | ***************************************************************************/ 14 | 15 | #ifndef __RTMP_OS_ABL_H__ 16 | #define __RTMP_OS_ABL_H__ 17 | 18 | #ifdef OS_ABL_FUNC_SUPPORT 19 | 20 | #ifdef OS_ABL_OS_PCI_SUPPORT 21 | #ifndef RTMP_MAC_PCI 22 | #define RTMP_MAC_PCI 23 | #endif /* RTMP_MAC_PCI */ 24 | #ifndef RTMP_PCI_SUPPORT 25 | #define RTMP_PCI_SUPPORT 26 | #endif /* RTMP_PCI_SUPPORT */ 27 | #endif /* OS_ABL_OS_PCI_SUPPORT */ 28 | 29 | #ifdef OS_ABL_OS_USB_SUPPORT 30 | #include 31 | 32 | #define RTMP_MAC_USB 33 | #define RTMP_USB_SUPPORT 34 | #endif /* OS_ABL_OS_USB_SUPPORT */ 35 | 36 | #ifdef OS_ABL_OS_RBUS_SUPPORT 37 | #ifndef RTMP_RBUS_SUPPORT 38 | #define RTMP_RBUS_SUPPORT 39 | #endif /* RTMP_RBUS_SUPPORT */ 40 | #endif /* OS_ABL_OS_RBUS_SUPPORT */ 41 | 42 | #ifdef OS_ABL_OS_AP_SUPPORT 43 | #ifndef CONFIG_AP_SUPPORT 44 | #define CONFIG_AP_SUPPORT 45 | #endif /* CONFIG_AP_SUPPORT */ 46 | #endif /* OS_ABL_OS_AP_SUPPORT */ 47 | 48 | #ifdef OS_ABL_OS_STA_SUPPORT 49 | #ifndef CONFIG_STA_SUPPORT 50 | #define CONFIG_STA_SUPPORT 51 | #endif /* CONFIG_STA_SUPPORT */ 52 | #endif /* OS_ABL_OS_STA_SUPPORT */ 53 | 54 | /* AP & STA con-current */ 55 | #undef RT_CONFIG_IF_OPMODE_ON_AP 56 | #undef RT_CONFIG_IF_OPMODE_ON_STA 57 | 58 | #if defined(CONFIG_AP_SUPPORT) && defined(CONFIG_STA_SUPPORT) 59 | #define RT_CONFIG_IF_OPMODE_ON_AP(__OpMode) if (__OpMode == OPMODE_AP) 60 | #define RT_CONFIG_IF_OPMODE_ON_STA(__OpMode) if (__OpMode == OPMODE_STA) 61 | #else 62 | #define RT_CONFIG_IF_OPMODE_ON_AP(__OpMode) 63 | #define RT_CONFIG_IF_OPMODE_ON_STA(__OpMode) 64 | #endif 65 | 66 | #endif /* OS_ABL_FUNC_SUPPORT */ 67 | 68 | #endif /* __RTMP_OS_ABL_H__ */ 69 | 70 | /* End of rtmp_osabl.h */ 71 | -------------------------------------------------------------------------------- /rt2860v2/include/rtmp_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2004, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | rtmp_type.h 20 | 21 | Abstract: 22 | 23 | Revision History: 24 | Who When What 25 | -------- ---------- ---------------------------------------------- 26 | Name Date Modification logs 27 | Paul Lin 1-2-2004 28 | */ 29 | 30 | #ifndef __RTMP_TYPE_H__ 31 | #define __RTMP_TYPE_H__ 32 | 33 | 34 | 35 | #ifndef GNU_PACKED 36 | #define GNU_PACKED __attribute__ ((packed)) 37 | #endif /* GNU_PACKED */ 38 | 39 | 40 | #ifdef LINUX 41 | /* Put platform dependent declaration here */ 42 | /* For example, linux type definition */ 43 | typedef unsigned char UINT8; 44 | typedef unsigned short UINT16; 45 | typedef unsigned int UINT32; 46 | typedef unsigned long long UINT64; 47 | typedef short INT16; 48 | typedef int INT32; 49 | typedef long long INT64; 50 | 51 | typedef unsigned char UCHAR; 52 | typedef unsigned short USHORT; 53 | typedef unsigned int UINT; 54 | typedef unsigned long ULONG; 55 | #endif /* LINUX */ 56 | 57 | typedef unsigned char *PUINT8; 58 | typedef unsigned short *PUINT16; 59 | typedef unsigned int *PUINT32; 60 | typedef unsigned long long *PUINT64; 61 | typedef int *PINT32; 62 | typedef long long *PINT64; 63 | 64 | /* modified for fixing compile warning on Sigma 8634 platform */ 65 | typedef char STRING; 66 | 67 | typedef signed char CHAR; 68 | 69 | typedef signed short SHORT; 70 | typedef signed int INT; 71 | typedef signed long LONG; 72 | typedef signed long long LONGLONG; 73 | 74 | typedef unsigned long long ULONGLONG; 75 | 76 | typedef unsigned char BOOLEAN; 77 | #ifdef LINUX 78 | typedef void VOID; 79 | #endif /* LINUX */ 80 | 81 | typedef char *PSTRING; 82 | typedef VOID *PVOID; 83 | typedef CHAR *PCHAR; 84 | typedef UCHAR *PUCHAR; 85 | typedef USHORT *PUSHORT; 86 | typedef LONG *PLONG; 87 | typedef ULONG *PULONG; 88 | typedef UINT *PUINT; 89 | 90 | typedef unsigned int NDIS_MEDIA_STATE; 91 | 92 | typedef union _LARGE_INTEGER { 93 | struct { 94 | #ifdef RT_BIG_ENDIAN 95 | INT32 HighPart; 96 | UINT LowPart; 97 | #else 98 | UINT LowPart; 99 | INT32 HighPart; 100 | #endif 101 | } u; 102 | INT64 QuadPart; 103 | } LARGE_INTEGER; 104 | 105 | /* */ 106 | /* Register set pair for initialzation register set definition */ 107 | /* */ 108 | typedef struct _RTMP_REG_PAIR { 109 | ULONG Register; 110 | ULONG Value; 111 | } RTMP_REG_PAIR, *PRTMP_REG_PAIR; 112 | 113 | typedef struct _REG_PAIR { 114 | UCHAR Register; 115 | UCHAR Value; 116 | } REG_PAIR, *PREG_PAIR; 117 | 118 | typedef struct _REG_PAIR_CHANNEL { 119 | UCHAR Register; 120 | UCHAR FirstChannel; 121 | UCHAR LastChannel; 122 | UCHAR Value; 123 | } REG_PAIR_CHANNEL, *PREG_PAIR_CHANNEL; 124 | 125 | typedef struct _REG_PAIR_BW { 126 | UCHAR Register; 127 | UCHAR BW; 128 | UCHAR Value; 129 | } REG_PAIR_BW, *PREG_PAIR_BW; 130 | 131 | /* */ 132 | /* Register set pair for initialzation register set definition */ 133 | /* */ 134 | typedef struct _RTMP_RF_REGS { 135 | UCHAR Channel; 136 | UINT32 R1; 137 | UINT32 R2; 138 | UINT32 R3; 139 | UINT32 R4; 140 | } RTMP_RF_REGS, *PRTMP_RF_REGS; 141 | 142 | typedef struct _FREQUENCY_ITEM { 143 | UCHAR Channel; 144 | UCHAR N; 145 | UCHAR R; 146 | UCHAR K; 147 | } FREQUENCY_ITEM, *PFREQUENCY_ITEM; 148 | 149 | typedef int NTSTATUS; 150 | 151 | #define STATUS_SUCCESS 0x00 152 | #define STATUS_UNSUCCESSFUL 0x01 153 | 154 | typedef struct _QUEUE_ENTRY { 155 | struct _QUEUE_ENTRY *Next; 156 | } QUEUE_ENTRY, *PQUEUE_ENTRY; 157 | 158 | /* Queue structure */ 159 | typedef struct _QUEUE_HEADER { 160 | PQUEUE_ENTRY Head; 161 | PQUEUE_ENTRY Tail; 162 | ULONG Number; 163 | } QUEUE_HEADER, *PQUEUE_HEADER; 164 | 165 | #endif /* __RTMP_TYPE_H__ */ 166 | -------------------------------------------------------------------------------- /rt2860v2/include/sta_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002-2009, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | sta_cfg.h 20 | 21 | Abstract: 22 | 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | 28 | */ 29 | 30 | #ifndef __STA_CFG_H__ 31 | #define __STA_CFG_H__ 32 | 33 | INT RTMPSTAPrivIoctlSet( 34 | IN RTMP_ADAPTER *pAd, 35 | IN PSTRING SetProcName, 36 | IN PSTRING ProcArg); 37 | 38 | #ifdef WOW_SUPPORT 39 | #endif /* WOW_SUPPORT */ 40 | 41 | #endif /* __STA_CFG_H__ */ 42 | -------------------------------------------------------------------------------- /rt2860v2/include/video.h: -------------------------------------------------------------------------------- 1 | #ifdef VIDEO_TURBINE_SUPPORT 2 | extern AP_VIDEO_STRUCT GLOBAL_AP_VIDEO_CONFIG; 3 | 4 | VOID VideoModeUpdate(IN PRTMP_ADAPTER pAd); 5 | VOID VideoModeDynamicTune(IN PRTMP_ADAPTER pAd); 6 | UINT32 GetAsicDefaultRetry(IN PRTMP_ADAPTER pAd); 7 | UCHAR GetAsicDefaultTxBA(IN PRTMP_ADAPTER pAd); 8 | UINT32 GetAsicVideoRetry(IN PRTMP_ADAPTER pAd); 9 | UCHAR GetAsicVideoTxBA(IN PRTMP_ADAPTER pAd); 10 | VOID VideoConfigInit(IN PRTMP_ADAPTER pAd); 11 | #endif /* VIDEO_TURBINE_SUPPORT */ 12 | 13 | -------------------------------------------------------------------------------- /rt2860v2/include/vr_ikans.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | vr_ikans.h 18 | 19 | Abstract: 20 | Only for IKANOS Vx160 or Vx180 platform. 21 | 22 | Revision History: 23 | Who When What 24 | -------- ---------- ---------------------------------------------- 25 | Sample Lin 01-28-2008 Created 26 | 27 | */ 28 | 29 | #ifndef __VR_IKANS_H__ 30 | #define __VR_IKANS_H__ 31 | 32 | #ifndef MODULE_IKANOS 33 | #define IKANOS_EXTERN extern 34 | #else 35 | #define IKANOS_EXTERN 36 | #endif /* MODULE_IKANOS */ 37 | 38 | #ifdef IKANOS_VX_1X0 39 | typedef void (*IkanosWlanTxCbFuncP)(void *, void *); 40 | 41 | struct IKANOS_TX_INFO 42 | { 43 | struct net_device *netdev; 44 | IkanosWlanTxCbFuncP *fp; 45 | }; 46 | #endif /* IKANOS_VX_1X0 */ 47 | 48 | 49 | IKANOS_EXTERN void VR_IKANOS_FP_Init(UINT8 BssNum, UINT8 *pApMac); 50 | 51 | IKANOS_EXTERN INT32 IKANOS_DataFramesTx(struct sk_buff *pSkb, 52 | struct net_device *pNetDev); 53 | 54 | IKANOS_EXTERN void IKANOS_DataFrameRx(PRTMP_ADAPTER pAd, 55 | struct sk_buff *pSkb); 56 | 57 | #endif /* __VR_IKANS_H__ */ 58 | 59 | /* End of vr_ikans.h */ 60 | -------------------------------------------------------------------------------- /rt2860v2/include/vrut_ubm.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * Taiwan, R.O.C. 4 | * 5 | * (c) Copyright 2010, Ralink Technology, Inc. 6 | * 7 | * All rights reserved. Ralink's source code is an unpublished work and the 8 | * use of a copyright notice does not imply otherwise. This source code 9 | * contains confidential trade secret material of Ralink Tech. Any attemp 10 | * or participation in deciphering, decoding, reverse engineering or in any 11 | * way altering the source code is stricitly prohibited, unless the prior 12 | * written consent of Ralink Technology, Inc. is obtained. 13 | ***************************************************************************/ 14 | 15 | /**************************************************************************** 16 | 17 | Abstract: 18 | 19 | All Related Structure & Definition for UBICOM platform. 20 | 21 | Only used in UTIL module. 22 | 23 | ***************************************************************************/ 24 | 25 | #ifndef __VR_UBICOM_H__ 26 | #define __VR_UBICOM_H__ 27 | 28 | #ifdef PLATFORM_UBM_IPX8 29 | 30 | #include 31 | 32 | #undef RTMP_UTIL_DCACHE_FLUSH 33 | #define RTMP_UTIL_DCACHE_FLUSH(__AddrStart, __Size) \ 34 | flush_dcache_range((ULONG)(__AddrStart), \ 35 | (ULONG)(((UCHAR *)(__AddrStart)) + __Size - 1)) 36 | 37 | #endif /* PLATFORM_UBM_IPX8 */ 38 | 39 | #endif /* __VR_UBICOM_H__ */ 40 | 41 | /* End of vrut_ubm.h */ 42 | 43 | -------------------------------------------------------------------------------- /rt2860v2/include/wapi_sms4.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* SMS4 encryption/decryption definition */ 4 | /* Parameter : */ 5 | /* Input - the incoming message packet */ 6 | /* Ouput - the result ouput */ 7 | /* rk - key */ 8 | void SMS4Crypt(unsigned char *Input, unsigned char *Output, unsigned int *rk); 9 | 10 | /* SMS4 key extend algorithm */ 11 | void SMS4KeyExt(unsigned char *Key, unsigned int *rk, unsigned int CryptFlag); 12 | 13 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Kconfig.ap.soc: -------------------------------------------------------------------------------- 1 | config RT2860V2_AP 2 | tristate "Ralink RT2860 802.11n AP support" 3 | depends on NET_RADIO 4 | 5 | config RT2860V2_AP_V24_DATA_STRUCTURE 6 | bool 7 | depends on RT2860V2_AP 8 | default y 9 | 10 | config RT2860V2_AP_LED 11 | bool "LED Support" 12 | depends on RT2860V2_AP 13 | 14 | config RT2860V2_AP_WSC 15 | bool "WSC (WiFi Simple Config)" 16 | depends on RT2860V2_AP 17 | 18 | config RT2860V2_AP_LLTD 19 | bool "LLTD (Link Layer Topology Discovery Protocol)" 20 | depends on RT2860V2_AP 21 | 22 | config RT2860V2_AP_WDS 23 | bool "WDS" 24 | depends on RT2860V2_AP 25 | 26 | config RT2860V2_AP_NINTENDO 27 | bool "Nintendo" 28 | depends on RT2860V2_AP 29 | 30 | config RT2860V2_AP_WMM_ACM 31 | bool "WMM ACM" 32 | depends on RT2860V2_AP 33 | 34 | config RT2860V2_AP_MBSS 35 | bool "MBSSID" 36 | depends on RT2860V2_AP 37 | 38 | config NEW_MBSSID_MODE 39 | bool "New MBSSID MODE" 40 | depends on RT2860V2_AP 41 | depends on RT2860V2_AP_MBSS 42 | depends on RALINK_RT3883 || RALINK_RT3352 || RALINK_RT5350 43 | default n 44 | 45 | config RT2860V2_AP_APCLI 46 | bool "AP-CLient Support" 47 | depends on RT2860V2_AP 48 | 49 | config RT2860V2_AP_IGMP_SNOOP 50 | bool "IGMP snooping" 51 | depends on RT2860V2_AP 52 | 53 | config RT2860V2_AP_NETIF_BLOCK 54 | bool "NETIF Block" 55 | depends on RT2860V2_AP 56 | help 57 | Support Net interface block while Tx-Sw queue full 58 | 59 | config RT2860V2_AP_DFS 60 | bool "DFS" 61 | depends on RT2860V2_AP 62 | select RALINK_TIMER_DFS 63 | 64 | config RT2860V2_AP_CARRIER 65 | bool "Carrier Detect" 66 | depends on RT2860V2_AP 67 | select RALINK_TIMER_DFS 68 | 69 | config RT2860V2_AP_DLS 70 | bool "DLS ((Direct-Link Setup) Support" 71 | depends on RT2860V2_AP 72 | 73 | config RT2860V2_AP_IDS 74 | bool "IDS (Intrusion Detection System) Support" 75 | depends on RT2860V2_AP 76 | 77 | config RT2860V2_AP_MESH 78 | bool "MESH Support" 79 | depends on RT2860V2_AP 80 | 81 | config RT2860V2_HW_ANTENNA_DIVERSITY 82 | bool "Antenna Diversity Support" 83 | depends on RT2860V2_AP 84 | depends on RALINK_RT5350 85 | 86 | config RT2860V2_RT3XXX_AP_ANTENNA_DIVERSITY 87 | bool "Antenna Diversity Support" 88 | depends on RT2860V2_AP 89 | 90 | config RT2860V2_AP_WAPI 91 | bool "WAPI Support" 92 | depends on RT2860V2_AP 93 | 94 | config RT2860V2_AP_COC 95 | bool "CoC Support" 96 | depends on RT2860V2_AP 97 | 98 | config RT2860V2_AP_MEMORY_OPTIMIZATION 99 | bool "Memory Optimization" 100 | depends on RT2860V2_AP 101 | 102 | config RT2860V2_AP_VIDEO_TURBINE 103 | bool "Video Turbine support" 104 | depends on RT2860V2_AP 105 | 106 | config RA_CLASSIFIER 107 | tristate "Ralink Flow Classifier" 108 | depends on RT2860V2_AP_VIDEO_TURBINE 109 | default n 110 | 111 | config RT2860V2_80211N_DRAFT3 112 | bool "802.11n Draft3" 113 | depends on RT2860V2_AP 114 | 115 | config RT2860V2_AP_INTELLIGENT_RATE_ADAPTION 116 | bool "Intelligent Rate Adaption" 117 | depends on RT2860V2_AP 118 | 119 | config RT2860V2_AP_TXBF 120 | bool "Tx Beam Forming" 121 | depends on RT2860V2_AP 122 | depends on RALINK_RT3883 123 | 124 | config RT2860V2_AP_RTMP_INTERNAL_TX_ALC 125 | bool "TSSI Compensation" 126 | depends on RT2860V2_AP 127 | depends on RALINK_RT3350 || RALINK_RT3352 || RALINK_RT5350 128 | 129 | #config RT2860V2_EXT_CHANNEL_LIST 130 | # bool "Extension Channel List" 131 | # depends on RT2860V2_AP 132 | 133 | #config RT2860V2_KTHREAD 134 | # bool "Kernel Thread" 135 | # depends on RT2860V2_AP 136 | 137 | #config RT2860V2_AUTO_CH_SELECT_ENHANCE 138 | # bool "Auto Channel Selection Enhancement" 139 | # depends on RT2860V2_AP 140 | 141 | #config RT2860V2_80211R_FT 142 | # bool "802.11r Fast BSS Transition" 143 | # depends on RT2860V2_AP 144 | 145 | #config RT2860V2_80211R_RR 146 | # bool "802.11k Radio Resource Management" 147 | # depends on RT2860V2_AP 148 | 149 | #config RT2860V2_SINGLE_SKU 150 | # bool "Single SKU" 151 | # depends on RT2860V2_AP 152 | 153 | #config RT2860V2_MCAST_RATE_SPECIFIC 154 | # bool "User specific tx rate of mcast pkt" 155 | # depends on RT2860V2_AP 156 | 157 | #config RT2860V2_SNMP 158 | # bool "Net-SNMP Support" 159 | # depends on RT2860V2_AP 160 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Kconfig.ap.usb: -------------------------------------------------------------------------------- 1 | config RTUSB_AP 2 | tristate "Ralink WiFi USB combo driver AP module" 3 | depends on m 4 | default m 5 | 6 | config RTUSB_AP_WSC 7 | bool "WPS support including WPS2.0" 8 | depends on RTUSB_AP 9 | default y 10 | 11 | config RTUSB_AP_MBSS 12 | bool "MBSS support" 13 | depends on RTUSB_AP 14 | default y 15 | 16 | config RTUSB_AP_NEW_MBSS_MODE 17 | bool "New MBSS support" 18 | depends on RTUSB_AP_MBSS 19 | 20 | config RTUSB_WDS 21 | bool "WDS support" 22 | depends on RTUSB_AP 23 | 24 | config RTUSB_APCLI 25 | bool "APClient support" 26 | depends on RTUSB_AP 27 | 28 | config RTUSB_DFS 29 | bool "DFS support" 30 | depends on RTUSB_AP 31 | 32 | config RTUSB_CS 33 | bool "CS support" 34 | depends on RTUSB_AP 35 | 36 | config RTUSB_IGMP_SNOOP 37 | bool "IGMP snoop support" 38 | depends on RTUSB_AP 39 | 40 | config RTUSB_NETIF_BLOCK 41 | bool "NETIF block support" 42 | depends on RTUSB_AP 43 | 44 | config RTUSB_DLS 45 | bool "DLS support" 46 | depends on RTUSB_AP 47 | 48 | config RTUSB_IDS 49 | bool "IDS support" 50 | depends on RTUSB_AP 51 | 52 | config RTUSB_AP_FLASH_SUPPORT 53 | bool "FLASH support" 54 | depends on RTUSB_AP 55 | 56 | config RTUSB_AP_80211N_DRAFT3 57 | bool "802.11n Draft3 support" 58 | depends on RTUSB_AP 59 | default y 60 | 61 | # Chip related 62 | config RT2870_AP 63 | bool "RT2870 support" 64 | depends on RTUSB_AP 65 | 66 | config RT3572_AP 67 | bool "RT3572 support" 68 | depends on RTUSB_AP 69 | 70 | config RT3573_AP 71 | bool "RT3573 support" 72 | depends on RTUSB_AP 73 | 74 | config RT5572_AP 75 | bool "RT5572 support" 76 | depends on RTUSB_AP 77 | default y 78 | 79 | # ATE 80 | config RTUSB_AP_ATE 81 | bool "ATE support" 82 | depends on RTUSB_AP 83 | 84 | config RT2870_AP_ATE 85 | bool "RT2870 ATE support" 86 | depends on RTUSB_AP_ATE && RT2870_AP 87 | 88 | config RT3572_AP_ATE 89 | bool "RT3572 ATE support" 90 | depends on RTUSB_AP_ATE && RT3572_AP 91 | 92 | config RT5572_AP_ATE 93 | bool "RT5572 ATE support" 94 | depends on RTUSB_AP_ATE && RT5572_AP 95 | default y 96 | 97 | # QA 98 | config RTUSB_AP_QA 99 | bool "QA tool support" 100 | depends on RTUSB_AP_ATE 101 | default y 102 | 103 | config RTUSB_AP_WAPI 104 | bool "WAPI support" 105 | depends on RTUSB_AP 106 | 107 | # Platform specific 108 | config RT5572_AP_WDS 109 | bool 110 | depends on RTUSB_WDS 111 | default y 112 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Kconfig.sta.soc: -------------------------------------------------------------------------------- 1 | config RT2860V2_STA 2 | tristate "Ralink RT2860 802.11n STA support" 3 | depends on NET_RADIO 4 | 5 | config RT2860V2_STA_WPA_SUPPLICANT 6 | bool "WPA Supplicant" 7 | depends on RT2860V2_STA 8 | 9 | config RT2860V2_STA_ETH_CONVERT 10 | bool "Ethernet Convert Support" 11 | depends on RT2860V2_STA 12 | 13 | config RT2860V2_STA_DPB 14 | bool 15 | depends on RT2860V2_STA_ETH_CONVERT 16 | default y 17 | 18 | config RT2860V2_STA_WMM_ACM 19 | bool "WMM ACM Support" 20 | depends on RT2860V2_STA 21 | 22 | config RT2860V2_STA_LED 23 | bool "LED Support" 24 | depends on RT2860V2_STA 25 | 26 | config RT2860V2_STA_IDS 27 | bool "IDS (Intrusion Detection System) Support" 28 | depends on RT2860V2_STA 29 | 30 | config RT2860V2_STA_WSC 31 | bool "WSC (WiFi Simple Config)" 32 | depends on RT2860V2_STA 33 | 34 | config RT2860V2_STA_CARRIER 35 | bool "Carrier Sense Support" 36 | depends on RT2860V2_STA 37 | select RALINK_TIMER 38 | select RALINK_TIMER_DFS 39 | 40 | config RT2860V2_STA_DLS 41 | bool "DLS ((Direct-Link Setup) Support" 42 | depends on RT2860V2_STA 43 | 44 | config RT2860V2_STA_MESH 45 | bool "MESH Support" 46 | depends on RT2860V2_STA 47 | 48 | config RT2860V2_RT3XXX_STA_ANTENNA_DIVERSITY 49 | bool "Antenna Diversity Support" 50 | depends on RT2860V2_STA 51 | 52 | config RT2860V2_HW_STA_ANTENNA_DIVERSITY 53 | bool "Antenna Diversity Support" 54 | depends on RT2860V2_STA 55 | depends on RALINK_RT5350 56 | 57 | #config RT2860V2_STA_WAPI 58 | # bool "WAPI Support" 59 | # depends on RT2860V2_STA 60 | 61 | config RT2860V2_STA_VIDEO_TURBINE 62 | bool "Video Turbine support" 63 | depends on RT2860V2_STA 64 | 65 | config RT2860V2_STA_INTELLIGENT_RATE_ADAPTION 66 | bool "Intelligent Rate Adaption" 67 | depends on RT2860V2_STA 68 | 69 | config RT2860V2_STA_TXBF 70 | bool "Tx Bean Forming Support (Only 3883)" 71 | depends on RT2860V2_STA 72 | depends on RALINK_RT3883 73 | 74 | config RT2860V2_STA_RTMP_INTERNAL_TX_ALC 75 | bool "TSSI Compensation" 76 | depends on RT2860V2_STA 77 | depends on RALINK_RT3350 || RALINK_RT3352 || RALINK_RT5350 78 | 79 | config RT2860V2_STA_80211N_DRAFT3 80 | bool "802.11n Draft3" 81 | depends on RT2860V2_STA 82 | 83 | #config RT2860V2_EXT_CHANNEL_LIST 84 | # bool "Extension Channel List" 85 | # depends on RT2860V2_STA 86 | 87 | #config RT2860V2_SNMP 88 | # bool "Net-SNMP Support" 89 | # depends on RT2860V2_STA 90 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.2880.ap: -------------------------------------------------------------------------------- 1 | VPATH = ../rt2860v2/os/linux:../rt2860v2/ap:../rt2860v2/common:../rt2860v2/sta 2 | 3 | ################### 4 | # AP 5 | ################## 6 | 7 | O_TARGET := rt2860v2_ap.o 8 | 9 | RT2860_OBJ = md5.o mlme.o rtmp_wep.o action.o ba_action.o cmm_data.o cmm_data_pci.o \ 10 | rtmp_init.o cmm_mac_pci.o rtmp_tkip.o cmm_sync.o cmm_sanity.o cmm_info.o cmm_cfg.o cmm_wpa.o cmm_asic.o\ 11 | ap.o ap_assoc.o ap_auth.o ap_authrsp.o ap_connect.o ap_mlme.o ap_sanity.o \ 12 | ap_sync.o ap_wpa.o ap_data.o uapsd.o ap_autoChSel.o \ 13 | rt_linux.o rt_profile.o cmm_profile.o rt_main_dev.o pci_main_dev.o ap_ioctl.o rt_2860_rbus.o rt_eeprom.o \ 14 | rt_ate.o 15 | 16 | ifeq ($(CONFIG_RT2860V2_AP_DLS),y) 17 | RT2860_OBJ += ap_dls.o 18 | endif 19 | 20 | ifeq ($(CONFIG_RT2860V2_AP_IDS),y) 21 | RT2860_OBJ += ap_ids.o 22 | endif 23 | 24 | ifeq ($(CONFIG_RT2860V2_AP_DFS),y) 25 | RT2860_OBJ += dfs.o dfs_mcu.o 26 | else 27 | ifeq ($(CONFIG_RT2860V2_AP_CARRIER),y) 28 | RT2860_OBJ += dfs.o dfs_mcu.o 29 | endif 30 | endif 31 | 32 | ifeq ($(CONFIG_RT2860V2_AP_LED),y) 33 | RT2860_OBJ += rt_led.o 34 | endif 35 | 36 | ifeq ($(CONFIG_RT2860V2_AP_WSC),y) 37 | RT2860_OBJ += wsc.o wsc_tlv.o sha2.o hmac.o dh_key.o evp_enc.o 38 | endif 39 | 40 | 41 | ifeq ($(CONFIG_RT2860V2_AP_WDS),y) 42 | RT2860_OBJ += ap_wds.o 43 | endif 44 | 45 | ifeq ($(CONFIG_RT2860V2_AP_MBSS),y) 46 | RT2860_OBJ += ap_mbss.o 47 | endif 48 | 49 | ifeq ($(CONFIG_RT2860V2_AP_APCLI),y) 50 | RT2860_OBJ += ap_apcli.o apcli_assoc.o apcli_auth.o apcli_ctrl.o apcli_mlme.o apcli_sync.o 51 | RT2860_OBJ += cmm_mat.o cmm_mat_iparp.o cmm_mat_pppoe.o cmm_mat_ipv6.o 52 | endif 53 | 54 | ifeq ($(CONFIG_RT2860V2_AP_IGMP_SNOOP),y) 55 | RT2860_OBJ += igmp_snoop.o 56 | endif 57 | 58 | ifeq ($(CONFIG_RT2860V2_AP_NETIF_BLOCK),y) 59 | RT2860_OBJ += netif_block.o 60 | endif 61 | 62 | ################### 63 | # CFLAGS 64 | ################## 65 | EXTRA_CFLAGS = -I../rt2860v2/include -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT -DLINUX \ 66 | -Wall -Wstrict-prototypes -Wno-trigraphs 67 | 68 | EXTRA_CFLAGS += -DCONFIG_AP_SUPPORT -DUAPSD_SUPPORT -DDBG -DRT2860 # -DDFS_DEBUG -DIAPP_SUPPORT 69 | EXTRA_CFLAGS += -DRALINK_ATE -DRALINK_QA -DCONFIG_RT2880_ATE_CMD_NEW 70 | 71 | ifeq ($(CONFIG_RT2860V2_AP_DLS),y) 72 | EXTRA_CFLAGS += -DQOS_DLS_SUPPORT 73 | endif 74 | 75 | 76 | ifeq ($(CONFIG_RT2860V2_AP_IDS),y) 77 | EXTRA_CFLAGS += -DIDS_SUPPORT 78 | endif 79 | 80 | ifeq ($(CONFIG_RT2860V2_AP_DFS),y) 81 | EXTRA_CFLAGS += -DDFS_SUPPORT 82 | endif 83 | 84 | ifeq ($(CONFIG_RT2860V2_AP_CARRIER),y) 85 | EXTRA_CFLAGS += -DCARRIER_DETECTION_SUPPORT 86 | endif 87 | 88 | ifeq ($(CONFIG_RT2860V2_AP_LED),y) 89 | EXTRA_CFLAGS += -DAP_LED 90 | endif 91 | 92 | 93 | ifeq ($(CONFIG_RT2860V2_AP_WSC),y) 94 | EXTRA_CFLAGS += -DWSC_AP_SUPPORT 95 | endif 96 | 97 | ifeq ($(CONFIG_RT2860V2_AP_LLTD),y) 98 | EXTRA_CFLAGS += -DLLTD_SUPPORT 99 | endif 100 | 101 | ifeq ($(CONFIG_RT2860V2_AP_WDS),y) 102 | EXTRA_CFLAGS += -DWDS_SUPPORT 103 | endif 104 | 105 | ifeq ($(CONFIG_RT2860V2_AP_MBSS),y) 106 | EXTRA_CFLAGS += -DMBSS_SUPPORT 107 | endif 108 | 109 | ifeq ($(CONFIG_RT2860V2_AP_APCLI),y) 110 | EXTRA_CFLAGS += -DAPCLI_SUPPORT 111 | EXTRA_CFLAGS += -DMAT_SUPPORT 112 | endif 113 | 114 | ifeq ($(CONFIG_RT2860V2_AP_IGMP_SNOOP),y) 115 | EXTRA_CFLAGS += -DIGMP_SNOOP_SUPPORT 116 | endif 117 | 118 | ifeq ($(CONFIG_RT2860V2_AP_NETIF_BLOCK),y) 119 | EXTRA_CFLAGS += -DBLOCK_NET_IF 120 | endif 121 | 122 | ifeq ($(CONFIG_RT2880_AP_BRIDGING_ONLY),y) 123 | EXTRA_CFLAGS += -DCONFIG_RT2880_BRIDGING_ONLY 124 | endif 125 | 126 | 127 | obj-y := $(RT2860_OBJ) 128 | obj-m := $(O_TARGET) 129 | 130 | include $(TOPDIR)/Rules.make 131 | 132 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.2880.sta: -------------------------------------------------------------------------------- 1 | VPATH = ../rt2860v2/os/linux:../rt2860v2/ap:../rt2860v2/common:../rt2860v2/sta 2 | 3 | ################### 4 | # STA 5 | ################## 6 | O_TARGET := rt2860v2_sta.o 7 | 8 | 9 | RT2860_OBJ = md5.o mlme.o rtmp_wep.o action.o ba_action.o cmm_data.o cmm_data_pci.o \ 10 | rtmp_init.o cmm_mac_pci.o rtmp_tkip.o cmm_sync.o cmm_sanity.o cmm_info.o cmm_cfg.o cmm_asic.o\ 11 | cmm_wpa.o assoc.o aironet.o auth.o auth_rsp.o sync.o sanity.o \ 12 | rtmp_data.o connect.o wpa.o rt_linux.o rt_profile.o cmm_profile.o \ 13 | rt_main_dev.o rt_ate.o sta_ioctl.o pci_main_dev.o rt_2860_rbus.o rt_eeprom.o \ 14 | #netif_block.o 15 | 16 | ################### 17 | # CFLAGS 18 | ################## 19 | EXTRA_CFLAGS = -I../rt2860v2/include -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT -DLINUX \ 20 | -Wall -Wstrict-prototypes -Wno-trigraphs 21 | 22 | EXTRA_CFLAGS += -DCONFIG_STA_SUPPORT -DDBG -DRALINK_ATE -DRALINK_QA -DRT2860 #-DBLOCK_NET_IF 23 | 24 | ifeq ($(CONFIG_RT2860V2_STA_CARRIER),y) 25 | RT2860_OBJ += dfs.o dfs_mcu.o 26 | EXTRA_CFLAGS += -DCARRIER_DETECTION_SUPPORT 27 | endif 28 | 29 | ifeq ($(CONFIG_RT2860V2_STA_WPA_SUPPLICANT),y) 30 | EXTRA_CFLAGS += -DWPA_SUPPLICANT_SUPPORT 31 | endif 32 | 33 | ifeq ($(CONFIG_RT2860V2_STA_LED),y) 34 | RT2860_OBJ += rt_led.o 35 | EXTRA_CFLAGS += -DSTA_LED 36 | endif 37 | 38 | ifeq ($(CONFIG_RT2860V2_STA_WIFI_TEST),y) 39 | EXTRA_CFLAGS += -DWIFI_TEST 40 | endif 41 | 42 | ifeq ($(CONFIG_RT2860V2_STA_WSC),y) 43 | RT2860_OBJ += wsc.o wsc_tlv.o sha2.o hmac.o dh_key.o evp_enc.o 44 | EXTRA_CFLAGS += -DWSC_INCLUDED -DWSC_STA_SUPPORT 45 | endif 46 | 47 | 48 | obj-y := $(RT2860_OBJ) 49 | obj-m := $(O_TARGET) 50 | 51 | include $(TOPDIR)/Rules.make 52 | 53 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.4.netif: -------------------------------------------------------------------------------- 1 | include $(RT28xx_DIR)/os/linux/config.mk 2 | 3 | #ifdef CONFIG_AP_SUPPORT 4 | ifeq ($(RT28xx_MODE),AP) 5 | MOD_NAME = rtnet$(MODULE)ap 6 | endif 7 | #endif // CONFIG_AP_SUPPORT // 8 | 9 | #ifdef CONFIG_STA_SUPPORT 10 | ifeq ($(RT28xx_MODE), STA) 11 | MOD_NAME = rtnet$(MODULE)sta 12 | endif 13 | #endif // CONFIG_STA_SUPPORT // 14 | 15 | #ifdef CONFIG_APSTA_SUPPORT 16 | ifeq ($(RT28xx_MODE), APSTA) 17 | MOD_NAME = rtnet$(MODULE)apsta 18 | endif 19 | #endif // CONFIG_APSTA_SUPPORT // 20 | 21 | OBJ := $(MOD_NAME).o 22 | 23 | #ifdef CONFIG_AP_SUPPORT 24 | 25 | RT28XX_AP_OBJ := \ 26 | ../../ap/ap_mbss_inf.o\ 27 | ../../os/linux/ap_ioctl.o\ 28 | ../../os/linux/rt_main_dev.o 29 | 30 | ifeq ($(HAS_WDS),y) 31 | RT28XX_AP_OBJ += \ 32 | ../../ap/ap_wds_inf.o 33 | endif 34 | 35 | ifeq ($(HAS_APCLI),y) 36 | RT28XX_AP_OBJ += \ 37 | ../../ap/ap_apcli_inf.o 38 | endif 39 | 40 | ifeq ($(HAS_MESH_SUPPORT),y) 41 | RT28XX_AP_OBJ += \ 42 | ../../common/mesh_inf.o 43 | endif 44 | 45 | #ifdef RT2860 46 | ifneq ($(findstring 2860,$(CHIPSET)),) 47 | RT28XX_AP_OBJ += \ 48 | ../../os/linux/rt_pci_rbus.o\ 49 | ../../os/linux/pci_main_dev.o 50 | endif 51 | #endif // RT2860 // 52 | 53 | 54 | 55 | 56 | 57 | #ifdef RT2880 58 | ifneq ($(findstring 2880,$(CHIPSET)),) 59 | RT28XX_AP_OBJ += \ 60 | ../../os/linux/rt_pci_rbus.o\ 61 | ../../os/linux/pci_main_dev.o 62 | endif 63 | #endif // RT2880 // 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | #endif // CONFIG_AP_SUPPORT // 75 | 76 | #ifdef CONFIG_STA_SUPPORT 77 | RT28XX_STA_OBJ := \ 78 | ../../os/linux/sta_ioctl.o\ 79 | ../../os/linux/rt_main_dev.o 80 | 81 | ifeq ($(HAS_MESH_SUPPORT),y) 82 | RT28XX_STA_OBJ += \ 83 | ../../common/mesh_inf.o 84 | endif 85 | 86 | ifeq ($(HAS_P2P_SUPPORT), y) 87 | RT28XX_STA_OBJ += \ 88 | ../../common/p2p_inf.o\ 89 | ../../os/linux/ap_ioctl.o 90 | endif 91 | 92 | #ifdef RT2860 93 | ifneq ($(findstring 2860,$(CHIPSET)),) 94 | RT28XX_STA_OBJ += \ 95 | ../../os/linux/rt_pci_rbus.o\ 96 | ../../os/linux/pci_main_dev.o 97 | endif 98 | #endif // RT2860 // 99 | 100 | 101 | 102 | 103 | 104 | #ifdef RT2880 105 | ifneq ($(findstring 2880,$(CHIPSET)),) 106 | RT28XX_STA_OBJ += \ 107 | ../../os/linux/rt_pci_rbus.o\ 108 | ../../os/linux/pci_main_dev.o 109 | endif 110 | #endif // RT2880 // 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | #endif // CONFIG_STA_SUPPORT // 123 | 124 | #ifdef CONFIG_APSTA_SUPPORT 125 | RT28XX_APSTA_OBJ := \ 126 | ../../ap/ap_mbss_inf.o\ 127 | ../../common/p2p_inf.o\ 128 | ../../os/linux/ap_ioctl.o\ 129 | ../../os/linux/sta_ioctl.o\ 130 | ../../os/linux/rt_main_dev.o 131 | 132 | ifeq ($(HAS_WDS),y) 133 | RT28XX_APSTA_OBJ += \ 134 | ../../ap/ap_wds_inf.o 135 | endif 136 | 137 | ifeq ($(HAS_APCLI),y) 138 | RT28XX_APSTA_OBJ += \ 139 | ../../ap/ap_apcli_inf.o 140 | endif 141 | 142 | ifeq ($(HAS_MESH_SUPPORT),y) 143 | RT28XX_APSTA_OBJ += \ 144 | ../../common/mesh_inf.o 145 | endif 146 | 147 | #ifdef RT2860 148 | ifneq ($(findstring 2860,$(CHIPSET)),) 149 | RT28XX_APSTA_OBJ += \ 150 | ../../os/linux/rt_pci_rbus.o\ 151 | ../../os/linux/pci_main_dev.o 152 | endif 153 | #endif // RT2860 // 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | #endif // CONFIG_APSTA_SUPPORT // 167 | 168 | PHONY := all clean 169 | 170 | all:$(OBJ) 171 | 172 | rtnet$(MODULE)sta.o: $(RT28XX_STA_OBJ) 173 | $(LD) -r $^ -o $@ 174 | 175 | rtnet$(MODULE)ap.o: $(RT28XX_AP_OBJ) 176 | $(LD) -r $^ -o $@ 177 | 178 | rtnet$(MODULE)apsta.o: $(RT28XX_APSTA_OBJ) 179 | $(LD) -r $^ -o $@ 180 | 181 | clean: 182 | rm -f $(RT28xx_DIR)/common/*.o 183 | rm -f $(RT28xx_DIR)/common/.*.{cmd,flags,d} 184 | rm -f $(RT28xx_DIR)/os/linux/*.{o,ko,mod.{o,c}} 185 | rm -f $(RT28xx_DIR)/os/linux/.*.{cmd,flags,d} 186 | rm -fr $(RT28xx_DIR)/os/linux/.tmp_versions 187 | rm -f $(RT28xx_DIR)/chips/*.o 188 | rm -f $(RT28xx_DIR)/chips/.*.{cmd,flags,d} 189 | ifeq ($(RT28xx_MODE),AP) 190 | rm -f $(RT28xx_DIR)/ap/*.o 191 | rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d} 192 | else 193 | ifeq ($(RT28xx_MODE),STA) 194 | rm -f $(RT28xx_DIR)/sta/*.o 195 | rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d} 196 | else 197 | ifeq ($(RT28xx_MODE),APSTA) 198 | rm -f $(RT28xx_DIR)/ap/*.o 199 | rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d} 200 | rm -f $(RT28xx_DIR)/sta/*.o 201 | rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d} 202 | endif 203 | endif 204 | endif 205 | 206 | install: 207 | install -d $(LINUX_SRC_MODULE) 208 | install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE) 209 | /sbin/depmod -a ${shell uname -r} 210 | 211 | uninstall: 212 | rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME))) 213 | /sbin/depmod -a ${shell uname -r} 214 | 215 | # Declare the contents of the .PHONY variable as phony. We keep that 216 | # # information in a variable so we can use it in if_changed and friends. 217 | .PHONY: $(PHONY) 218 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.4.util: -------------------------------------------------------------------------------- 1 | include $(RT28xx_DIR)/os/linux/config.mk 2 | 3 | #ifdef CONFIG_AP_SUPPORT 4 | ifeq ($(RT28xx_MODE),AP) 5 | MOD_NAME = rtutil$(MODULE)ap 6 | endif 7 | #endif // CONFIG_AP_SUPPORT // 8 | 9 | #ifdef CONFIG_STA_SUPPORT 10 | ifeq ($(RT28xx_MODE), STA) 11 | MOD_NAME = rtutil$(MODULE)sta 12 | endif 13 | #endif // CONFIG_STA_SUPPORT // 14 | 15 | #ifdef CONFIG_APSTA_SUPPORT 16 | ifeq ($(RT28xx_MODE), APSTA) 17 | MOD_NAME = rtutil$(MODULE)apsta 18 | endif 19 | #endif // CONFIG_APSTA_SUPPORT // 20 | 21 | OBJ := $(MOD_NAME).o 22 | 23 | #ifdef CONFIG_AP_SUPPORT 24 | 25 | RT28XX_AP_OBJ := \ 26 | ../../common/rt_os_util.o\ 27 | ../../os/linux/rt_linux_symb.o\ 28 | ../../os/linux/rt_rbus_pci_util.o\ 29 | ../../os/linux/rt_usb_util.o\ 30 | ../../os/linux/rt_linux.o 31 | 32 | ifeq ($(HAS_BGFP_SUPPORT),y) 33 | RT28XX_AP_OBJ += \ 34 | $(RT28xx_DIR)/os/linux/br_ftph.o 35 | endif 36 | 37 | #endif // CONFIG_AP_SUPPORT // 38 | 39 | 40 | #ifdef CONFIG_STA_SUPPORT 41 | 42 | RT28XX_STA_OBJ := \ 43 | ../../common/rt_os_util.o\ 44 | ../../os/linux/rt_linux_symb.o\ 45 | ../../os/linux/rt_rbus_pci_util.o\ 46 | ../../os/linux/rt_usb_util.o\ 47 | ../../os/linux/rt_linux.o 48 | #endif // CONFIG_STA_SUPPORT // 49 | 50 | 51 | #ifdef CONFIG_APSTA_SUPPORT 52 | RT28XX_APSTA_OBJ := \ 53 | ../../common/rt_os_util.o\ 54 | ../../os/linux/rt_linux_symb.o\ 55 | ../../os/linux/rt_rbus_pci_util.o\ 56 | ../../os/linux/rt_usb_util.o\ 57 | ../../os/linux/rt_linux.o 58 | 59 | #endif // CONFIG_APSTA_SUPPORT // 60 | 61 | PHONY := all clean 62 | 63 | all:$(OBJ) 64 | 65 | rtutil$(MODULE)sta.o: $(RT28XX_STA_OBJ) 66 | $(LD) -r $^ -o $@ 67 | 68 | rtutil$(MODULE)ap.o: $(RT28XX_AP_OBJ) 69 | $(LD) -r $^ -o $@ 70 | 71 | rtutil$(MODULE)apsta.o: $(RT28XX_APSTA_OBJ) 72 | $(LD) -r $^ -o $@ 73 | 74 | clean: 75 | rm -f $(RT28xx_DIR)/common/*.o 76 | rm -f $(RT28xx_DIR)/common/.*.{cmd,flags,d} 77 | rm -f $(RT28xx_DIR)/os/linux/*.{o,ko,mod.{o,c}} 78 | rm -f $(RT28xx_DIR)/os/linux/.*.{cmd,flags,d} 79 | rm -fr $(RT28xx_DIR)/os/linux/.tmp_versions 80 | rm -f $(RT28xx_DIR)/chips/*.o 81 | rm -f $(RT28xx_DIR)/chips/.*.{cmd,flags,d} 82 | ifeq ($(RT28xx_MODE),AP) 83 | rm -f $(RT28xx_DIR)/ap/*.o 84 | rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d} 85 | else 86 | ifeq ($(RT28xx_MODE),STA) 87 | rm -f $(RT28xx_DIR)/sta/*.o 88 | rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d} 89 | else 90 | ifeq ($(RT28xx_MODE),APSTA) 91 | rm -f $(RT28xx_DIR)/ap/*.o 92 | rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d} 93 | rm -f $(RT28xx_DIR)/sta/*.o 94 | rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d} 95 | endif 96 | endif 97 | endif 98 | 99 | install: 100 | install -d $(LINUX_SRC_MODULE) 101 | install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE) 102 | /sbin/depmod -a ${shell uname -r} 103 | 104 | uninstall: 105 | rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME))) 106 | /sbin/depmod -a ${shell uname -r} 107 | 108 | # Declare the contents of the .PHONY variable as phony. We keep that 109 | # # information in a variable so we can use it in if_changed and friends. 110 | .PHONY: $(PHONY) 111 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.6.netif: -------------------------------------------------------------------------------- 1 | include $(RT28xx_DIR)/os/linux/config.mk 2 | 3 | #ifdef CONFIG_AP_SUPPORT 4 | ifeq ($(RT28xx_MODE),AP) 5 | MOD_NAME = rtnet$(MODULE)ap 6 | endif 7 | #endif // CONFIG_AP_SUPPORT // 8 | 9 | #ifdef CONFIG_STA_SUPPORT 10 | ifeq ($(RT28xx_MODE), STA) 11 | MOD_NAME = rtnet$(MODULE)sta 12 | endif 13 | #endif // CONFIG_STA_SUPPORT // 14 | 15 | #ifdef CONFIG_APSTA_SUPPORT 16 | ifeq ($(RT28xx_MODE), APSTA) 17 | MOD_NAME = rtnet$(MODULE)apsta 18 | endif 19 | #endif // CONFIG_APSTA_SUPPORT // 20 | 21 | obj-m := $(MOD_NAME).o 22 | 23 | #ifdef CONFIG_AP_SUPPORT 24 | ifeq ($(RT28xx_MODE),AP) 25 | $(MOD_NAME)-objs := \ 26 | ../../ap/ap_mbss_inf.o\ 27 | ../../os/linux/ap_ioctl.o\ 28 | ../../os/linux/rt_main_dev.o 29 | 30 | ifeq ($(HAS_CFG80211_SUPPORT),y) 31 | $(MOD_NAME)-objs += \ 32 | ../../os/linux/cfg80211.o 33 | endif 34 | 35 | ifeq ($(HAS_WDS),y) 36 | $(MOD_NAME)-objs += \ 37 | ../../ap/ap_wds_inf.o 38 | endif 39 | 40 | ifeq ($(HAS_APCLI),y) 41 | $(MOD_NAME)-objs += \ 42 | ../../ap/ap_apcli_inf.o 43 | endif 44 | 45 | ifeq ($(HAS_MESH_SUPPORT),y) 46 | $(MOD_NAME)-objs += \ 47 | ../../common/mesh_inf.o 48 | endif 49 | 50 | endif 51 | #endif // CONFIG_AP_SUPPORT // 52 | 53 | #ifdef CONFIG_STA_SUPPORT 54 | ifeq ($(RT28xx_MODE), STA) 55 | $(MOD_NAME)-objs := \ 56 | ../../os/linux/sta_ioctl.o\ 57 | ../../os/linux/rt_main_dev.o 58 | 59 | ifeq ($(HAS_CFG80211_SUPPORT),y) 60 | $(MOD_NAME)-objs += \ 61 | ../../os/linux/cfg80211.o 62 | endif 63 | 64 | ifeq ($(HAS_MESH_SUPPORT),y) 65 | $(MOD_NAME)-objs += \ 66 | ../../common/mesh_inf.o 67 | endif 68 | 69 | ifeq ($(HAS_P2P_SUPPORT), y) 70 | $(MOD_NAME)-objs += \ 71 | ../../common/p2p_inf.o\ 72 | ../../os/linux/ap_ioctl.o 73 | endif 74 | 75 | endif 76 | #endif // CONFIG_STA_SUPPORT // 77 | 78 | #ifdef CONFIG_APSTA_SUPPORT 79 | ifeq ($(RT28xx_MODE), APSTA) 80 | $(MOD_NAME)-objs := \ 81 | ../../ap/ap_mbss_inf.o\ 82 | ../../common/p2p_inf.o\ 83 | ../../os/linux/ap_ioctl.o\ 84 | ../../os/linux/sta_ioctl.o\ 85 | ../../os/linux/rt_main_dev.o 86 | 87 | ifeq ($(HAS_CFG80211_SUPPORT),y) 88 | $(MOD_NAME)-objs += \ 89 | ../../os/linux/cfg80211.o 90 | endif 91 | 92 | ifeq ($(HAS_WDS),y) 93 | $(MOD_NAME)-objs += \ 94 | ../../ap/ap_wds_inf.o 95 | endif 96 | 97 | ifeq ($(HAS_APCLI),y) 98 | $(MOD_NAME)-objs += \ 99 | ../../ap/ap_apcli_inf.o 100 | endif 101 | 102 | ifeq ($(HAS_MESH_SUPPORT),y) 103 | $(MOD_NAME)-objs += \ 104 | ../../common/mesh_inf.o 105 | endif 106 | 107 | 108 | endif 109 | #endif // CONFIG_APSTA_SUPPORT // 110 | 111 | #chip related 112 | #ifdef RT2860 113 | ifneq ($(findstring 2860,$(CHIPSET)),) 114 | $(MOD_NAME)-objs += \ 115 | ../../os/linux/rt_pci_rbus.o\ 116 | ../../os/linux/pci_main_dev.o 117 | endif 118 | #endif // RT2860 // 119 | 120 | 121 | 122 | 123 | 124 | #ifdef RT2880 125 | ifneq ($(findstring 2880,$(CHIPSET)),) 126 | $(MOD_NAME)-objs += \ 127 | ../../os/linux/rt_pci_rbus.o\ 128 | ../../os/linux/pci_main_dev.o 129 | endif 130 | #endif // RT2880 // 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | #ifdef RTMP_MAC_PCI 139 | #endif // RTMP_MAC_PCI // 140 | 141 | 142 | 143 | #ifdef RTMP_MAC_PCI 144 | #endif // RTMP_MAC_PCI // 145 | 146 | clean: 147 | rm -f ../../common/*.o 148 | rm -f ../../common/.*.{cmd,flags,d} 149 | rm -f ../../os/linux/*.{o,ko,mod.{o,c}} 150 | rm -f ../../os/linux/.*.{cmd,flags,d} 151 | rm -fr ../../os/linux/.tmp_versions 152 | rm -f ../../os/linux/Module.symvers 153 | rm -f ../../os/linux/Modules.symvers 154 | rm -f ../../os/linux/Module.markers 155 | rm -f ../../os/linux/modules.order 156 | rm -f ../../chips/*.o 157 | rm -f ../../chips/.*.{cmd,flags,d} 158 | ifeq ($(RT28xx_MODE),AP) 159 | rm -f ../../ap/*.o 160 | rm -f ../../ap/.*.{cmd,flags,d} 161 | else 162 | ifeq ($(RT28xx_MODE),STA) 163 | rm -f ../../sta/*.o 164 | rm -f ../../sta/.*.{cmd,flags,d} 165 | endif 166 | endif 167 | 168 | install: 169 | install -d $(LINUX_SRC_MODULE) 170 | install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE) 171 | /sbin/depmod -a ${shell uname -r} 172 | 173 | uninstall: 174 | rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME))) 175 | /sbin/depmod -a ${shell uname -r} 176 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.6.util: -------------------------------------------------------------------------------- 1 | include $(RT28xx_DIR)/os/linux/config.mk 2 | 3 | #ifdef CONFIG_AP_SUPPORT 4 | ifeq ($(RT28xx_MODE),AP) 5 | MOD_NAME = rtutil$(MODULE)ap 6 | endif 7 | #endif // CONFIG_AP_SUPPORT // 8 | 9 | #ifdef CONFIG_STA_SUPPORT 10 | ifeq ($(RT28xx_MODE), STA) 11 | MOD_NAME = rtutil$(MODULE)sta 12 | endif 13 | #endif // CONFIG_STA_SUPPORT // 14 | 15 | #ifdef CONFIG_APSTA_SUPPORT 16 | ifeq ($(RT28xx_MODE), APSTA) 17 | MOD_NAME = rtutil$(MODULE)apsta 18 | endif 19 | #endif // CONFIG_APSTA_SUPPORT // 20 | 21 | obj-m := $(MOD_NAME).o 22 | 23 | #ifdef CONFIG_AP_SUPPORT 24 | ifeq ($(RT28xx_MODE),AP) 25 | $(MOD_NAME)-objs := \ 26 | ../../common/rt_os_util.o\ 27 | ../../os/linux/rt_linux_symb.o\ 28 | ../../os/linux/rt_rbus_pci_util.o\ 29 | ../../os/linux/rt_usb_util.o\ 30 | ../../os/linux/rt_linux.o 31 | 32 | ifeq ($(PLATFORM),BL2348) 33 | $(MOD_NAME)-objs += \ 34 | ../../os/linux/vr_bdlt.o 35 | endif 36 | 37 | ifeq ($(PLATFORM),BLUBB) 38 | $(MOD_NAME)-objs += \ 39 | ../../os/linux/vr_bdlt.o 40 | endif 41 | 42 | ifeq ($(HAS_BGFP_SUPPORT),y) 43 | $(MOD_NAME)-objs += \ 44 | ../../os/linux/br_ftph.o 45 | endif 46 | endif 47 | #endif // CONFIG_AP_SUPPORT // 48 | 49 | 50 | #ifdef CONFIG_STA_SUPPORT 51 | ifeq ($(RT28xx_MODE), STA) 52 | $(MOD_NAME)-objs := \ 53 | ../../common/rt_os_util.o\ 54 | ../../os/linux/rt_linux_symb.o\ 55 | ../../os/linux/rt_rbus_pci_util.o\ 56 | ../../os/linux/rt_usb_util.o\ 57 | ../../os/linux/rt_linux.o 58 | endif 59 | #endif // CONFIG_STA_SUPPORT // 60 | 61 | 62 | #ifdef CONFIG_APSTA_SUPPORT 63 | ifeq ($(RT28xx_MODE), APSTA) 64 | $(MOD_NAME)-objs := \ 65 | ../../common/rt_os_util.o\ 66 | ../../os/linux/rt_linux_symb.o\ 67 | ../../os/linux/rt_rbus_pci_util.o\ 68 | ../../os/linux/rt_usb_util.o\ 69 | ../../os/linux/rt_linux.o 70 | 71 | ifeq ($(PLATFORM),BL2348) 72 | $(MOD_NAME)-objs += \ 73 | ../../os/linux/vr_bdlt.o 74 | endif 75 | 76 | ifeq ($(PLATFORM),BLUBB) 77 | $(MOD_NAME)-objs += \ 78 | ../../os/linux/vr_bdlt.o 79 | endif 80 | 81 | ifeq ($(HAS_BGFP_SUPPORT),y) 82 | $(MOD_NAME)-objs += \ 83 | ../../os/linux/br_ftph.o 84 | endif 85 | endif 86 | #endif // CONFIG_APSTA_SUPPORT // 87 | 88 | clean: 89 | rm -f ../../common/*.o 90 | rm -f ../../common/.*.{cmd,flags,d} 91 | rm -f ../../os/linux/*.{o,ko,mod.{o,c}} 92 | rm -f ../../os/linux/.*.{cmd,flags,d} 93 | rm -fr ../../os/linux/.tmp_versions 94 | rm -f ../../os/linux/Module.symvers 95 | rm -f ../../os/linux/Modules.symvers 96 | rm -f ../../os/linux/Module.markers 97 | rm -f ../../os/linux/modules.order 98 | rm -f ../../chips/*.o 99 | rm -f ../../chips/.*.{cmd,flags,d} 100 | ifeq ($(RT28xx_MODE),AP) 101 | rm -f ../../ap/*.o 102 | rm -f ../../ap/.*.{cmd,flags,d} 103 | else 104 | ifeq ($(RT28xx_MODE),STA) 105 | rm -f ../../sta/*.o 106 | rm -f ../../sta/.*.{cmd,flags,d} 107 | endif 108 | endif 109 | 110 | install: 111 | install -d $(LINUX_SRC_MODULE) 112 | install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE) 113 | /sbin/depmod -a ${shell uname -r} 114 | 115 | uninstall: 116 | rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME))) 117 | /sbin/depmod -a ${shell uname -r} -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.clean: -------------------------------------------------------------------------------- 1 | include $(RT28xx_DIR)/os/linux/config.mk 2 | 3 | PHONY := clean install uninstall 4 | 5 | clean: 6 | rm -f ../../common/*.o 7 | rm -f ../../common/.*.o.cmd 8 | rm -f ../../common/.*.{cmd,flags,d} 9 | rm -f ../../os/linux/*.o 10 | rm -f ../../os/linux/.*.o.cmd 11 | rm -f ../../os/linux/*.{o,ko,mod.{o,c}} 12 | rm -f ../../os/linux/.*.{cmd,flags,d} 13 | rm -fr ../../os/linux/.tmp_versions 14 | #Must clean Module.symvers; or you will suffer symbol version not match 15 | #when OS_ABL = YES. 16 | rm -f ../../os/linux/Module.symvers 17 | rm -f ../../os/linux/Modules.symvers 18 | rm -f ../../os/linux/Module.markers 19 | rm -f ../../os/linux/modules.order 20 | rm -f ../../chips/*.o 21 | rm -f ../../chips/.*.o.cmd 22 | rm -f ../../chips/.*.{cmd,flags,d} 23 | rm -f ../../rate_ctrl/*.o 24 | rm -f ../../rate_ctrl/.*.o.cmd 25 | rm -f ../../rate_ctrl/.*.{cmd,flags,d} 26 | rm -f ../../ate/common/*.o 27 | rm -f ../../ate/common/.*.o.cmd 28 | rm -f ../../ate/common/.*.{cmd,flags,d} 29 | rm -f ../../ate/chips/*.o 30 | rm -f ../../ate/chips/.*.o.cmd 31 | rm -f ../../ate/chips/.*.{cmd,flags,d} 32 | ifeq ($(RT28xx_MODE),AP) 33 | rm -f ../../ap/*.o 34 | rm -f ../../ap/.*.o.cmd 35 | rm -f ../../ap/.*.{cmd,flags,d} 36 | else 37 | ifeq ($(RT28xx_MODE),STA) 38 | rm -f ../../sta/*.o 39 | rm -f ../../sta/.*.o.cmd 40 | rm -f ../../sta/.*.{cmd,flags,d} 41 | ifeq ($(HAS_P2P_SUPPORT),y) 42 | rm -f ../../ap/*.o 43 | rm -f ../../ap/.*.{cmd,flags,d} 44 | endif 45 | else 46 | ifeq ($(RT28xx_MODE),APSTA) 47 | rm -f ../../ap/*.o 48 | rm -f ../../ap/.*.o.cmd 49 | rm -f ../../ap/.*.{cmd,flags,d} 50 | rm -f ../../sta/*.o 51 | rm -f ../../sta/.*.o.cmd 52 | rm -f ../../sta/.*.{cmd,flags,d} 53 | endif 54 | endif 55 | endif 56 | 57 | # Declare the contents of the .PHONY variable as phony. We keep that 58 | # information in a variable so we can use it in if_changed and friends. 59 | .PHONY: $(PHONY) 60 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.libautoprovision.6: -------------------------------------------------------------------------------- 1 | include $(RT28xx_DIR)/os/linux/config.mk 2 | 3 | #ifdef CONFIG_AP_SUPPORT 4 | 5 | ifeq ($(HAS_SAMSUNG_EASY_CONFIG_SUPPORT),y) 6 | lib-y := ../../common/auto_provision.o 7 | endif 8 | 9 | #endif // CONFIG_AP_SUPPORT // 10 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.libwapi.4: -------------------------------------------------------------------------------- 1 | # 2 | # Release file for AP Mode 3 | # 4 | include $(RT28xx_DIR)/os/linux/config.mk 5 | 6 | MOD_NAME = wapi_module 7 | 8 | OBJ := $(MOD_NAME).o 9 | 10 | WAPI_M_OBJ := \ 11 | $(RT28xx_DIR)/common/wapi_sms4.o\ 12 | $(RT28xx_DIR)/common/wapi_crypt.o 13 | 14 | PHONY := all 15 | 16 | all:$(OBJ) 17 | 18 | $(MOD_NAME).o: $(WAPI_M_OBJ) 19 | $(LD) -r $^ -o $@ 20 | 21 | # Declare the contents of the .PHONY variable as phony. We keep that 22 | # information in a variable so we can use it in if_changed and friends. 23 | .PHONY: $(PHONY) -------------------------------------------------------------------------------- /rt2860v2/os/linux/Makefile.libwapi.6: -------------------------------------------------------------------------------- 1 | # 2 | # Release file for AP Mode 3 | # 4 | include $(RT28xx_DIR)/os/linux/config.mk 5 | 6 | obj-m := wapi_module.o 7 | 8 | wapi_module-objs := \ 9 | ../../common/wapi_sms4.o\ 10 | ../../common/wapi_crypt.o 11 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/config.mk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/os/linux/config.mk -------------------------------------------------------------------------------- /rt2860v2/os/linux/inf_ppa.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | inf_ppa.c 18 | 19 | Abstract: 20 | Only for Infineon PPA Direct path feature. 21 | 22 | 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | carella 06-01-2010 Created 28 | 29 | */ 30 | 31 | #ifdef INF_PPA_SUPPORT 32 | 33 | #include "rt_config.h" 34 | #include 35 | #include 36 | 37 | extern INT rt28xx_send_packets( 38 | IN struct sk_buff *skb_p, 39 | IN struct net_device *net_dev); 40 | 41 | int ifx_ra_start_xmit( 42 | struct net_device *rx_dev, 43 | struct net_device *tx_dev, 44 | struct sk_buff *skb, int len) 45 | { 46 | if(tx_dev != NULL) 47 | { 48 | SET_OS_PKT_NETDEV(skb, tx_dev); 49 | rt28xx_send_packets(skb, tx_dev); 50 | } 51 | else if(rx_dev != NULL) 52 | { 53 | skb->protocol = eth_type_trans(skb, skb->dev); 54 | netif_rx(skb); 55 | } 56 | else 57 | { 58 | dev_kfree_skb_any(skb); 59 | } 60 | return 0; 61 | } 62 | #endif /* INF_PPA_SUPPORT */ 63 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/rt_pci_rbus.c: -------------------------------------------------------------------------------- 1 | /* 2 | *************************************************************************** 3 | * Ralink Tech Inc. 4 | * 4F, No. 2 Technology 5th Rd. 5 | * Science-based Industrial Park 6 | * Hsin-chu, Taiwan, R.O.C. 7 | * 8 | * (c) Copyright 2002, Ralink Technology, Inc. 9 | * 10 | * All rights reserved. Ralink's source code is an unpublished work and the 11 | * use of a copyright notice does not imply otherwise. This source code 12 | * contains confidential trade secret material of Ralink Tech. Any attemp 13 | * or participation in deciphering, decoding, reverse engineering or in any 14 | * way altering the source code is stricitly prohibited, unless the prior 15 | * written consent of Ralink Technology, Inc. is obtained. 16 | *************************************************************************** 17 | 18 | Module Name: 19 | rt_pci_rbus.c 20 | 21 | Abstract: 22 | Create and register network interface. 23 | 24 | Revision History: 25 | Who When What 26 | -------- ---------- ---------------------------------------------- 27 | */ 28 | 29 | #define RTMP_MODULE_OS 30 | 31 | /*#include */ 32 | #include "rtmp_comm.h" 33 | #include "rt_os_util.h" 34 | #include "rt_os_net.h" 35 | #include 36 | 37 | 38 | IRQ_HANDLE_TYPE 39 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) 40 | rt2860_interrupt(int irq, void *dev_instance); 41 | #else 42 | rt2860_interrupt(int irq, void *dev_instance, struct pt_regs *regs); 43 | #endif 44 | 45 | 46 | 47 | /*************************************************************************** 48 | * 49 | * Interface-depended memory allocation/Free related procedures. 50 | * Mainly for Hardware TxDesc/RxDesc/MgmtDesc, DMA Memory for TxData/RxData, etc., 51 | * 52 | **************************************************************************/ 53 | 54 | 55 | 56 | 57 | 58 | 59 | /*************************************************************************** 60 | * 61 | * interrupt handler related procedures. 62 | * 63 | **************************************************************************/ 64 | /*int print_int_count; */ 65 | 66 | IRQ_HANDLE_TYPE 67 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) 68 | rt2860_interrupt(int irq, void *dev_instance) 69 | #else 70 | rt2860_interrupt(int irq, void *dev_instance, struct pt_regs *regs) 71 | #endif 72 | { 73 | struct net_device *net_dev = (struct net_device *) dev_instance; 74 | VOID *pAd = NULL; 75 | /* INT_SOURCE_CSR_STRUC IntSource; */ 76 | /* POS_COOKIE pObj; */ 77 | #ifdef MULTI_CORE_SUPPORT 78 | unsigned long flags=0; 79 | #endif // MULTI_CORE_SUPPORT // 80 | GET_PAD_FROM_NET_DEV(pAd, net_dev); 81 | 82 | RTMPHandleInterrupt(pAd); 83 | 84 | 85 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) 86 | return IRQ_HANDLED; 87 | #endif 88 | 89 | } 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/rt_symb.c: -------------------------------------------------------------------------------- 1 | #ifdef OS_ABL_SUPPORT 2 | 3 | #include 4 | #include "rt_config.h" 5 | 6 | EXPORT_SYMBOL(RTMP_DRV_OPS_FUNCTION); 7 | 8 | #endif /* OS_ABL_SUPPORT */ 9 | 10 | /* End of rt_symb.c */ 11 | -------------------------------------------------------------------------------- /rt2860v2/os/linux/vr_bdlt.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | 3 | Module Name: 4 | vr_brlt.c 5 | 6 | Abstract: 7 | Only for BroadLight 2348 platform. 8 | 9 | Revision History: 10 | Who When What 11 | --------- ---------- ---------------------------------------------- 12 | Sample Lin 01-12-2010 Created 13 | 14 | ***************************************************************************/ 15 | 16 | #define RTMP_MODULE_OS 17 | #define RTMP_MODULE_OS_UTIL 18 | 19 | #define MODULE_BDLT 20 | 21 | /*#include "rt_config.h" */ 22 | #include "rtmp_comm.h" 23 | #include "rt_os_util.h" 24 | #include "rtmp_osabl.h" 25 | 26 | 27 | #if defined(PLATFORM_BL2348) || defined(PLATFORM_BL23570) 28 | 29 | /* global variables */ 30 | int (*pToUpperLayerPktSent)(struct sk_buff *pSkb) = netif_rx ; 31 | 32 | 33 | 34 | 35 | /* 36 | ======================================================================== 37 | Routine Description: 38 | Assign the briding function. 39 | 40 | Arguments: 41 | xi_destination_ptr - bridging function 42 | 43 | Return Value: 44 | None 45 | 46 | Note: 47 | The function name must be replace_upper_layer_packet_destination. 48 | ======================================================================== 49 | */ 50 | VOID replace_upper_layer_packet_destination(VOID *pXiDestination) 51 | { 52 | DBGPRINT(RT_DEBUG_TRACE, ("ralink broad light> replace_upper_layer_packet_destination\n")); 53 | pToUpperLayerPktSent = pXiDestination ; 54 | } /* End of replace_upper_layer_packet_destination */ 55 | 56 | 57 | EXPORT_SYMBOL(pToUpperLayerPktSent); 58 | EXPORT_SYMBOL(replace_upper_layer_packet_destination); 59 | 60 | #endif /* PLATFORM_BL2348 */ 61 | 62 | 63 | /* End of vr_bdlt.c */ 64 | -------------------------------------------------------------------------------- /rt2860v2/sta/assoc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/sta/assoc.c -------------------------------------------------------------------------------- /rt2860v2/sta/p2pcli_assoc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/sta/p2pcli_assoc.c -------------------------------------------------------------------------------- /rt2860v2/sta/tdls_ctrl.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Ralink Tech Inc. 3 | * 4F, No. 2 Technology 5th Rd. 4 | * Science-based Industrial Park 5 | * Hsin-chu, Taiwan, R.O.C. 6 | * (c) Copyright 2002, Ralink Technology, Inc. 7 | * 8 | * All rights reserved. Ralink's source code is an unpublished work and the 9 | * use of a copyright notice does not imply otherwise. This source code 10 | * contains confidential trade secret material of Ralink Tech. Any attemp 11 | * or participation in deciphering, decoding, reverse engineering or in any 12 | * way altering the source code is stricitly prohibited, unless the prior 13 | * written consent of Ralink Technology, Inc. is obtained. 14 | **************************************************************************** 15 | 16 | Module Name: 17 | tdls.h 18 | 19 | Abstract: 20 | 21 | Revision History: 22 | Who When What 23 | --------- ---------- ---------------------------------------------- 24 | Arvin Tai 17-04-2009 created for 802.11z 25 | */ 26 | 27 | #ifdef DOT11Z_TDLS_SUPPORT 28 | 29 | #include "rt_config.h" 30 | //#include "dot11r_ft.h" 31 | 32 | 33 | #endif /* DOT11Z_TDLS_SUPPORT */ 34 | 35 | -------------------------------------------------------------------------------- /rt2860v2/sta_ate_iwpriv_usage.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/sta_ate_iwpriv_usage.txt -------------------------------------------------------------------------------- /rt2860v2/tools/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | gcc -g bin2h.c -o bin2h 3 | clean: 4 | rm -f *.o bin2h 5 | 6 | 7 | -------------------------------------------------------------------------------- /rt2860v2/tools/bin2h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wuqiong/rt2860v2-for-openwrt-mt7620/bd6e0dffd3aef166dc35d35d5ce7ee222ff845eb/rt2860v2/tools/bin2h -------------------------------------------------------------------------------- /rt2860v2/tools/bin2h.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc ,char *argv[]) 6 | { 7 | FILE *infile, *outfile; 8 | char infname[1024]; 9 | char outfname[1024]; 10 | char *rt28xxdir; 11 | char *chipset; 12 | char *wow, *rt28xx_mode; /* for WOW firmware */ 13 | int i=0;//,n=0; 14 | unsigned char c; 15 | 16 | memset(infname,0,1024); 17 | memset(outfname,0,1024); 18 | 19 | rt28xxdir = (char *)getenv("RT28xx_DIR"); 20 | chipset = (char *)getenv("CHIPSET"); 21 | wow = (char *)getenv("HAS_WOW_SUPPORT"); /* for WOW firmware */ 22 | rt28xx_mode = (char *)getenv("RT28xx_MODE"); 23 | 24 | if(!rt28xxdir) 25 | { 26 | printf("Environment value \"RT28xx_DIR\" not export \n"); 27 | return -1; 28 | } 29 | if(!chipset) 30 | { 31 | printf("Environment value \"CHIPSET\" not export \n"); 32 | return -1; 33 | } 34 | if (strlen(rt28xxdir) > (sizeof(infname)-100)) 35 | { 36 | printf("Environment value \"RT28xx_DIR\" is too long!\n"); 37 | return -1; 38 | } 39 | 40 | strcat(infname,rt28xxdir); 41 | if(strncmp(chipset, "2860",4)==0) 42 | strcat(infname,"/common/rt2860.bin"); 43 | else if(strncmp(chipset, "2870",4)==0) 44 | strcat(infname,"/common/rt2870.bin"); 45 | else if(strncmp(chipset, "3090",4)==0) 46 | strcat(infname,"/common/rt2860.bin"); 47 | else if(strncmp(chipset, "2070",4)==0) 48 | strcat(infname,"/common/rt2870.bin"); 49 | else if(strncmp(chipset, "3070",4)==0) 50 | strcat(infname,"/common/rt2870.bin"); 51 | else if(strncmp(chipset, "3572",4)==0) 52 | strcat(infname,"/common/rt2870.bin"); 53 | else if(strncmp(chipset, "3573",4)==0) 54 | strcat(infname,"/common/rt2870.bin"); 55 | else if(strncmp(chipset, "3370",4)==0) 56 | strcat(infname,"/common/rt2870.bin"); 57 | else if(strncmp(chipset, "5370",4)==0) 58 | strcat(infname,"/common/rt2870.bin"); 59 | else if(strncmp(chipset, "5572",4)==0) 60 | strcat(infname,"/common/rt2870.bin"); 61 | else if(strncmp(chipset, "5592",4)==0) 62 | strcat(infname,"/common/rt2860.bin"); 63 | else if(strncmp(chipset, "USB",3)==0) 64 | strcat(infname,"/common/rt2870.bin"); 65 | else if(strncmp(chipset, "PCI",3)==0) 66 | strcat(infname,"/common/rt2860.bin"); 67 | else 68 | strcat(infname,"/common/rt2860.bin"); 69 | 70 | /* for WOW support firmware */ 71 | if ((wow != NULL) && (strncmp(wow, "y", 1) == 0) && (strncmp(rt28xx_mode, "STA", 3) == 0)) 72 | { 73 | if ((wow = strstr(infname, "rt2870")) != NULL) 74 | { 75 | strcpy(wow, "rt2870_wow.bin"); 76 | fprintf(stderr, "infname %s\n", infname); 77 | } 78 | } 79 | 80 | strcat(outfname,rt28xxdir); 81 | strcat(outfname,"/include/firmware.h"); 82 | 83 | infile = fopen(infname,"r"); 84 | if (infile == (FILE *) NULL) 85 | { 86 | printf("Can't read file %s \n",infname); 87 | return -1; 88 | } 89 | outfile = fopen(outfname,"w"); 90 | 91 | if (outfile == (FILE *) NULL) 92 | { 93 | printf("Can't open write file %s \n",outfname); 94 | return -1; 95 | } 96 | 97 | fputs("/* AUTO GEN PLEASE DO NOT MODIFY IT */ \n",outfile); 98 | fputs("/* AUTO GEN PLEASE DO NOT MODIFY IT */ \n",outfile); 99 | fputs("\n",outfile); 100 | fputs("\n",outfile); 101 | fputs("UCHAR FirmwareImage [] = { \n",outfile); 102 | while(1) 103 | { 104 | char cc[3]; 105 | 106 | c = getc(infile); 107 | 108 | if (feof(infile)) 109 | break; 110 | 111 | memset(cc,0,2); 112 | 113 | if (i>=16) 114 | { 115 | fputs("\n", outfile); 116 | i = 0; 117 | } 118 | fputs("0x", outfile); 119 | sprintf(cc,"%02x",c); 120 | fputs(cc, outfile); 121 | fputs(", ", outfile); 122 | i++; 123 | } 124 | 125 | fputs("} ;\n", outfile); 126 | fclose(infile); 127 | fclose(outfile); 128 | exit(0); 129 | } 130 | -------------------------------------------------------------------------------- /rt2860v2_sta/Kconfig: -------------------------------------------------------------------------------- 1 | config RT2860V2_STA 2 | tristate "Ralink RT2860 802.11n STA support" 3 | # depends on NET_RADIO 4 | select WIRELESS_EXT 5 | select WEXT_SPY 6 | select WEXT_PRIV 7 | 8 | config RT2860V2_STA_WPA_SUPPLICANT 9 | bool "WPA Supplicant" 10 | depends on RT2860V2_STA 11 | 12 | #config RT2860V2_STA_WMM_ACM 13 | # bool "WMM ACM Support" 14 | # depends on RT2860V2_STA 15 | 16 | config RT2860V2_STA_LED 17 | bool "LED Support" 18 | depends on RT2860V2_STA 19 | 20 | #config RT2860V2_STA_IDS 21 | # bool "IDS (Intrusion Detection System) Support" 22 | # depends on RT2860V2_STA 23 | 24 | config RT2860V2_STA_WSC 25 | bool "WSC (WiFi Simple Config)" 26 | depends on RT2860V2_STA 27 | 28 | config RT2860V2_STA_WSC_V2 29 | bool "WSC 2.0(WiFi Simple Config 2.0)" 30 | depends on RT2860V2_STA_WSC 31 | 32 | #config RT2860V2_STA_CARRIER 33 | # bool "Carrier Sense Support" 34 | # depends on RT2860V2_STA 35 | # select RALINK_TIMER_DFS 36 | 37 | config RT2860V2_STA_DLS 38 | bool "DLS ((Direct-Link Setup) Support" 39 | depends on RT2860V2_STA 40 | 41 | config RT2860V2_HW_STA_ANTENNA_DIVERSITY 42 | bool "Antenna Diversity Support" 43 | depends on RT2860V2_STA 44 | depends on RALINK_RT5350 45 | 46 | #config RT2860V2_STA_WAPI 47 | # bool "WAPI Support" 48 | # depends on RT2860V2_STA 49 | 50 | config RT2860V2_STA_VIDEO_TURBINE 51 | bool "Video Turbine support" 52 | depends on RT2860V2_STA 53 | 54 | config RT2860V2_STA_RTMP_INTERNAL_TX_ALC 55 | bool "TSSI Compensation" 56 | depends on RT2860V2_STA 57 | depends on RALINK_RT3350 || RALINK_RT3352 || RALINK_RT5350 || SOC_MT7620 || RALINK_RT6352 58 | 59 | config RT2860V2_STA_INTELLIGENT_RATE_ADAPTION 60 | bool "Intelligent Rate Adaption" 61 | depends on RT2860V2_STA 62 | depends on RALINK_RT2883 || RALINK_RT3883 63 | 64 | config RT2860V2_STA_TXBF 65 | bool "Tx Bean Forming Support (Only 3883)" 66 | depends on RT2860V2_STA 67 | depends on RALINK_RT2883 || RALINK_RT3883 68 | 69 | config RT2860V2_STA_80211N_DRAFT3 70 | bool "802.11n Draft3" 71 | depends on RT2860V2_STA 72 | 73 | #config RT2860V2_EXT_CHANNEL_LIST 74 | # bool "Extension Channel List" 75 | # depends on RT2860V2_STA 76 | 77 | #config RT2860V2_SNMP 78 | # bool "Net-SNMP Support" 79 | # depends on RT2860V2_STA 80 | 81 | config RT2860V2_STA_P2P 82 | bool "Wireless Direct(P2P)" 83 | depends on RT2860V2_STA 84 | --------------------------------------------------------------------------------