├── .gitignore
├── Doc
├── USB Wireless LAN Driver for STM32F4xx Doc(In Chinese).pdf
└── USB Wireless LAN Driver for STM32F4xx Doc.pdf
├── EvalBoards
└── ST
│ └── STM32F4-Discovery
│ ├── BSP
│ ├── KeilMDK
│ │ └── cstartup.s
│ ├── OS
│ │ └── uCOS-III
│ │ │ ├── bsp_os.c
│ │ │ └── bsp_os.h
│ ├── ST
│ │ ├── CMSIS
│ │ │ ├── Device
│ │ │ │ └── ST
│ │ │ │ │ └── STM32F4xx
│ │ │ │ │ ├── Include
│ │ │ │ │ ├── stm32f4xx.h
│ │ │ │ │ └── system_stm32f4xx.h
│ │ │ │ │ ├── Release_Notes.html
│ │ │ │ │ └── Source
│ │ │ │ │ └── Templates
│ │ │ │ │ ├── arm
│ │ │ │ │ ├── startup_stm32f401xx.s
│ │ │ │ │ ├── startup_stm32f40_41xxx.s
│ │ │ │ │ ├── startup_stm32f40xx.s
│ │ │ │ │ ├── startup_stm32f427_437xx.s
│ │ │ │ │ ├── startup_stm32f427x.s
│ │ │ │ │ └── startup_stm32f429_439xx.s
│ │ │ │ │ └── system_stm32f4xx.c
│ │ │ └── Include
│ │ │ │ ├── arm_common_tables.h
│ │ │ │ ├── arm_const_structs.h
│ │ │ │ ├── arm_math.h
│ │ │ │ ├── core_cm0.h
│ │ │ │ ├── core_cm0plus.h
│ │ │ │ ├── core_cm3.h
│ │ │ │ ├── core_cm4.h
│ │ │ │ ├── core_cm4_simd.h
│ │ │ │ ├── core_cmFunc.h
│ │ │ │ ├── core_cmInstr.h
│ │ │ │ ├── core_sc000.h
│ │ │ │ └── core_sc300.h
│ │ └── STM32F4xx_StdPeriph_Driver
│ │ │ ├── Release_Notes.html
│ │ │ ├── inc
│ │ │ ├── misc.h
│ │ │ ├── stm32f4xx_adc.h
│ │ │ ├── stm32f4xx_can.h
│ │ │ ├── stm32f4xx_crc.h
│ │ │ ├── stm32f4xx_cryp.h
│ │ │ ├── stm32f4xx_dac.h
│ │ │ ├── stm32f4xx_dbgmcu.h
│ │ │ ├── stm32f4xx_dcmi.h
│ │ │ ├── stm32f4xx_dma.h
│ │ │ ├── stm32f4xx_dma2d.h
│ │ │ ├── stm32f4xx_exti.h
│ │ │ ├── stm32f4xx_flash.h
│ │ │ ├── stm32f4xx_fmc.h
│ │ │ ├── stm32f4xx_fsmc.h
│ │ │ ├── stm32f4xx_gpio.h
│ │ │ ├── stm32f4xx_hash.h
│ │ │ ├── stm32f4xx_i2c.h
│ │ │ ├── stm32f4xx_iwdg.h
│ │ │ ├── stm32f4xx_ltdc.h
│ │ │ ├── stm32f4xx_pwr.h
│ │ │ ├── stm32f4xx_rcc.h
│ │ │ ├── stm32f4xx_rng.h
│ │ │ ├── stm32f4xx_rtc.h
│ │ │ ├── stm32f4xx_sai.h
│ │ │ ├── stm32f4xx_sdio.h
│ │ │ ├── stm32f4xx_spi.h
│ │ │ ├── stm32f4xx_syscfg.h
│ │ │ ├── stm32f4xx_tim.h
│ │ │ ├── stm32f4xx_usart.h
│ │ │ └── stm32f4xx_wwdg.h
│ │ │ └── src
│ │ │ ├── misc.c
│ │ │ ├── stm32f4xx_adc.c
│ │ │ ├── stm32f4xx_can.c
│ │ │ ├── stm32f4xx_crc.c
│ │ │ ├── stm32f4xx_cryp.c
│ │ │ ├── stm32f4xx_cryp_aes.c
│ │ │ ├── stm32f4xx_cryp_des.c
│ │ │ ├── stm32f4xx_cryp_tdes.c
│ │ │ ├── stm32f4xx_dac.c
│ │ │ ├── stm32f4xx_dbgmcu.c
│ │ │ ├── stm32f4xx_dcmi.c
│ │ │ ├── stm32f4xx_dma.c
│ │ │ ├── stm32f4xx_dma2d.c
│ │ │ ├── stm32f4xx_exti.c
│ │ │ ├── stm32f4xx_flash.c
│ │ │ ├── stm32f4xx_fmc.c
│ │ │ ├── stm32f4xx_fsmc.c
│ │ │ ├── stm32f4xx_gpio.c
│ │ │ ├── stm32f4xx_hash.c
│ │ │ ├── stm32f4xx_hash_md5.c
│ │ │ ├── stm32f4xx_hash_sha1.c
│ │ │ ├── stm32f4xx_i2c.c
│ │ │ ├── stm32f4xx_iwdg.c
│ │ │ ├── stm32f4xx_ltdc.c
│ │ │ ├── stm32f4xx_pwr.c
│ │ │ ├── stm32f4xx_rcc.c
│ │ │ ├── stm32f4xx_rng.c
│ │ │ ├── stm32f4xx_rtc.c
│ │ │ ├── stm32f4xx_sai.c
│ │ │ ├── stm32f4xx_sdio.c
│ │ │ ├── stm32f4xx_spi.c
│ │ │ ├── stm32f4xx_syscfg.c
│ │ │ ├── stm32f4xx_tim.c
│ │ │ ├── stm32f4xx_usart.c
│ │ │ └── stm32f4xx_wwdg.c
│ ├── bmd.h
│ ├── bsp.c
│ ├── bsp.h
│ ├── bsp_int.c
│ ├── bsp_periph.c
│ ├── bsp_ser.c
│ ├── bsp_ser.h
│ ├── delay.c
│ ├── delay.h
│ └── usb_bsp.c
│ └── uCOS-III
│ ├── App
│ └── src
│ │ ├── iwlib.c
│ │ ├── iwlib.h
│ │ ├── iwpriv.c
│ │ ├── ping.c
│ │ ├── ping.h
│ │ ├── smartlink.c
│ │ ├── smartlink.h
│ │ ├── wlan.c
│ │ └── wlan.h
│ ├── KeilMDK
│ ├── uCOS-III.uvgui.Administrator
│ ├── uCOS-III.uvgui_Administrator.bak
│ ├── uCOS-III.uvopt
│ ├── uCOS-III.uvproj
│ ├── uCOS-III_FLASH.dep
│ ├── uCOS-III_uvopt.bak
│ └── uCOS-III_uvproj.bak
│ ├── app.c
│ ├── app_cfg.h
│ ├── cpu_cfg.h
│ ├── includes.h
│ ├── lib_cfg.h
│ ├── lwipopts.h
│ ├── os_app_hooks.c
│ ├── os_app_hooks.h
│ ├── os_cfg.h
│ ├── os_cfg_app.h
│ ├── rt2870sta_conf.h
│ ├── shell_cfg.h
│ ├── stm32f4xx_conf.h
│ └── usb_conf.h
├── LICENSE
├── README.md
├── Ralink-WIFI
├── DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.bz2
├── DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize
│ ├── Makefile
│ ├── README_STA_usb
│ ├── RT2870STA.dat
│ ├── RT2870STACard.dat
│ ├── chips
│ │ ├── rt28xx.c
│ │ ├── rt3070.c
│ │ ├── rt30xx.c
│ │ ├── rt3290.c
│ │ ├── rt3370.c
│ │ ├── rt33xx.c
│ │ ├── rt3593.c
│ │ ├── rt35xx.c
│ │ ├── rt5390.c
│ │ ├── rt5592.c
│ │ └── 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_usb.c
│ │ ├── cmm_info.c
│ │ ├── cmm_mac_usb.c
│ │ ├── cmm_profile.c
│ │ ├── cmm_radar.c
│ │ ├── cmm_sanity.c
│ │ ├── cmm_sync.c
│ │ ├── cmm_tkip.c
│ │ ├── cmm_video.c
│ │ ├── cmm_wep.c
│ │ ├── cmm_wpa.c
│ │ ├── crypt_aes.c
│ │ ├── crypt_arc4.c
│ │ ├── crypt_hmac.c
│ │ ├── crypt_md5.c
│ │ ├── crypt_sha2.c
│ │ ├── ee_efuse.c
│ │ ├── ee_flash.c
│ │ ├── ee_prom.c
│ │ ├── eeprom.c
│ │ ├── frq_cal.c
│ │ ├── misc.c
│ │ ├── mlme.c
│ │ ├── multi_channel.c
│ │ ├── netif_block.c
│ │ ├── ps.c
│ │ ├── rt2870.bin
│ │ ├── rt2870_sw_ch_offload.bin
│ │ ├── rt_channel.c
│ │ ├── rt_led.c
│ │ ├── rt_os_util.c
│ │ ├── rt_rf.c
│ │ ├── rtmp_init.c
│ │ ├── rtmp_init_inf.c
│ │ ├── rtmp_mcu.c
│ │ ├── rtmp_timer.c
│ │ ├── rtusb_bulk.c
│ │ ├── rtusb_data.c
│ │ ├── rtusb_dev_id.c
│ │ ├── rtusb_io.c
│ │ ├── spectrum.c
│ │ ├── uapsd.c
│ │ └── wfd.c
│ ├── include
│ │ ├── action.h
│ │ ├── ags.h
│ │ ├── ap.h
│ │ ├── ap_diversity.h
│ │ ├── br_ftph.h
│ │ ├── cfg80211.h
│ │ ├── cfg80211extr.h
│ │ ├── chip
│ │ │ ├── chip_id.h
│ │ │ ├── mac_usb.h
│ │ │ ├── rt2870.h
│ │ │ ├── rt28xx.h
│ │ │ ├── rt3070.h
│ │ │ ├── rt30xx.h
│ │ │ ├── rt3290.h
│ │ │ ├── rt3370.h
│ │ │ ├── rt33xx.h
│ │ │ ├── rt3593.h
│ │ │ ├── rt35xx.h
│ │ │ ├── rt5390.h
│ │ │ ├── rt5592.h
│ │ │ ├── rtmp_mac.h
│ │ │ └── rtmp_phy.h
│ │ ├── chlist.h
│ │ ├── client_wds.h
│ │ ├── client_wds_cmm.h
│ │ ├── crypt_aes.h
│ │ ├── crypt_arc4.h
│ │ ├── crypt_hmac.h
│ │ ├── crypt_md5.h
│ │ ├── crypt_sha2.h
│ │ ├── cs.h
│ │ ├── dfs.h
│ │ ├── dot11i_wpa.h
│ │ ├── drs_extr.h
│ │ ├── eeprom.h
│ │ ├── firmware.h
│ │ ├── frq_cal.h
│ │ ├── iface
│ │ │ ├── iface_util.h
│ │ │ └── rtmp_usb.h
│ │ ├── link_list.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
│ │ ├── radar.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
│ │ ├── rtusb_io.h
│ │ ├── spectrum.h
│ │ ├── spectrum_def.h
│ │ ├── sta_cfg.h
│ │ ├── uapsd.h
│ │ ├── video.h
│ │ ├── vr_ikans.h
│ │ ├── vrut_ubm.h
│ │ ├── wfd.h
│ │ ├── wfd_cmm.h
│ │ ├── wpa.h
│ │ ├── wpa_cmm.h
│ │ └── wsc.h
│ ├── iwpriv_usage.txt
│ ├── os
│ │ └── linux
│ │ │ ├── Kconfig.ap.soc
│ │ │ ├── Kconfig.ap.usb
│ │ │ ├── Kconfig.sta.soc
│ │ │ ├── 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.sta.soc
│ │ │ ├── br_ftph.c
│ │ │ ├── cfg80211.c
│ │ │ ├── cfg80211drv.c
│ │ │ ├── config.mk
│ │ │ ├── inf_ppa.c
│ │ │ ├── rt_linux.c
│ │ │ ├── rt_linux_symb.c
│ │ │ ├── rt_main_dev.c
│ │ │ ├── rt_proc.c
│ │ │ ├── rt_profile.c
│ │ │ ├── rt_rbus_pci_drv.c
│ │ │ ├── rt_symb.c
│ │ │ ├── rt_usb.c
│ │ │ ├── rt_usb_util.c
│ │ │ ├── sta_ioctl.c
│ │ │ ├── usb_main_dev.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
│ │ ├── rtmp_ckipmic.c
│ │ ├── rtmp_data.c
│ │ ├── sanity.c
│ │ ├── sta_cfg.c
│ │ ├── sync.c
│ │ └── wpa.c
│ ├── sta_ate_iwpriv_usage.txt
│ └── tools
│ │ ├── Makefile
│ │ ├── bin2h
│ │ └── bin2h.c
└── readme.txt
├── USB_Host_Linux_Convert
├── memory
│ ├── mem_cvt.c
│ ├── mem_cvt.h
│ ├── mem_dbg.c
│ ├── mem_dbg.h
│ ├── memory.h
│ └── memory_middle.h
├── object
│ ├── atomic.c
│ ├── atomic.h
│ ├── bitops.h
│ ├── complete.c
│ ├── complete.h
│ ├── err.h
│ ├── errno-base.h
│ ├── errno.h
│ ├── fs_cvt.c
│ ├── fs_cvt.h
│ ├── if.h
│ ├── irq.h
│ ├── iw_handler.h
│ ├── iw_handler_def.h
│ ├── kref.c
│ ├── kref.h
│ ├── kthread.c
│ ├── kthread.h
│ ├── list.h
│ ├── misc_cvt.c
│ ├── misc_cvt.h
│ ├── mutex.c
│ ├── mutex.h
│ ├── net_cvt.c
│ ├── net_cvt.h
│ ├── sem.c
│ ├── sem.h
│ ├── sockios.h
│ ├── spinlock.c
│ ├── spinlock.h
│ ├── tasklet.c
│ ├── tasklet.h
│ ├── timer.c
│ ├── timer.h
│ ├── type.h
│ ├── unaligned.c
│ ├── unaligned.h
│ └── wireless.h
└── usb_host
│ ├── STM32_USB_OTG_Driver
│ ├── inc
│ │ ├── usb_core.h
│ │ ├── usb_defines.h
│ │ ├── usb_hcd.h
│ │ ├── usb_hcd_int.h
│ │ └── usb_regs.h
│ └── src
│ │ ├── usb_core.c
│ │ ├── usb_hcd.c
│ │ └── usb_hcd_int.c
│ ├── usb_bsp.h
│ ├── usbh_config.c
│ ├── usbh_core.c
│ ├── usbh_core.h
│ ├── usbh_debug.h
│ ├── usbh_def.h
│ ├── usbh_ioreq.c
│ ├── usbh_ioreq.h
│ ├── usbh_linux.c
│ └── usbh_linux.h
├── iperf
├── AUTHORS
├── README
├── compat
│ ├── Makefile.am
│ ├── Thread_iperf.c
│ ├── delay_iperf.cpp
│ ├── error.c
│ ├── gettimeofday.c
│ ├── inet_ntop.c
│ ├── inet_pton.c
│ ├── setitimer.c
│ ├── signal.c
│ ├── snprintf.c
│ └── string.c
├── doc
│ ├── Makefile.am
│ ├── dast.gif
│ ├── index.html
│ └── ui_license.html
├── include
│ ├── Client.hpp
│ ├── Condition.h
│ ├── Extractor.h
│ ├── List_iperf.h
│ ├── Listener.hpp
│ ├── Locale.h
│ ├── Makefile.am
│ ├── Mutex.h
│ ├── PerfSocket.hpp
│ ├── Reporter.h
│ ├── Server.hpp
│ ├── Settings.hpp
│ ├── SocketAddr.h
│ ├── Thread_iperf.h
│ ├── Timestamp.hpp
│ ├── config.wiced.h
│ ├── config.win32.h
│ ├── debug.h
│ ├── delay.hpp
│ ├── gettimeofday.h
│ ├── gnu_getopt.h
│ ├── header_version.h
│ ├── headers.h
│ ├── inet_aton.h
│ ├── report_CSV.h
│ ├── report_default.h
│ ├── service.h
│ ├── setitimer.h
│ ├── snprintf.h
│ ├── util.h
│ └── version.h
├── m4
│ ├── acx_pthread.m4
│ ├── ax_create_stdint_h.m4
│ └── dast.m4
└── src
│ ├── Client.cpp
│ ├── Extractor.c
│ ├── Launch.cpp
│ ├── List.cpp
│ ├── Listener.cpp
│ ├── Locale.c
│ ├── Makefile.am
│ ├── PerfSocket.cpp
│ ├── ReportCSV.c
│ ├── ReportDefault.c
│ ├── Reporter.c
│ ├── Server.cpp
│ ├── Settings.cpp
│ ├── SocketAddr.c
│ ├── debug.c
│ ├── gnu_getopt.c
│ ├── gnu_getopt_long.c
│ ├── main.cpp
│ ├── service.c
│ ├── sockets_iperf.c
│ ├── stdio.c
│ └── tcp_window_size.c
├── lwip-1.4.1
├── doc
│ ├── FILES
│ ├── contrib.txt
│ ├── rawapi.txt
│ ├── savannah.txt
│ ├── snmp_agent.txt
│ └── sys_arch.txt
├── port
│ ├── Standalone
│ │ ├── wlan_ethernetif.c
│ │ └── wlan_ethernetif.h
│ └── arch
│ │ ├── cc.h
│ │ ├── cpu.h
│ │ ├── perf.h
│ │ ├── sys_arch.c
│ │ └── sys_arch.h
├── src
│ ├── FILES
│ ├── api
│ │ ├── api_lib.c
│ │ ├── api_msg.c
│ │ ├── err.c
│ │ ├── netbuf.c
│ │ ├── netdb.c
│ │ ├── netifapi.c
│ │ ├── sockets.c
│ │ └── tcpip.c
│ ├── core
│ │ ├── def.c
│ │ ├── dhcp.c
│ │ ├── dns.c
│ │ ├── init.c
│ │ ├── ipv4
│ │ │ ├── autoip.c
│ │ │ ├── icmp.c
│ │ │ ├── igmp.c
│ │ │ ├── inet.c
│ │ │ ├── inet_chksum.c
│ │ │ ├── ip.c
│ │ │ ├── ip_addr.c
│ │ │ └── ip_frag.c
│ │ ├── ipv6
│ │ │ ├── README
│ │ │ ├── icmp6.c
│ │ │ ├── inet6.c
│ │ │ ├── ip6.c
│ │ │ └── ip6_addr.c
│ │ ├── mem.c
│ │ ├── memp.c
│ │ ├── netif.c
│ │ ├── pbuf.c
│ │ ├── raw.c
│ │ ├── snmp
│ │ │ ├── asn1_dec.c
│ │ │ ├── asn1_enc.c
│ │ │ ├── mib2.c
│ │ │ ├── mib_structs.c
│ │ │ ├── msg_in.c
│ │ │ └── msg_out.c
│ │ ├── stats.c
│ │ ├── sys.c
│ │ ├── tcp.c
│ │ ├── tcp_in.c
│ │ ├── tcp_out.c
│ │ ├── timers.c
│ │ └── udp.c
│ ├── include
│ │ ├── ipv4
│ │ │ └── lwip
│ │ │ │ ├── autoip.h
│ │ │ │ ├── icmp.h
│ │ │ │ ├── igmp.h
│ │ │ │ ├── inet.h
│ │ │ │ ├── inet_chksum.h
│ │ │ │ ├── ip.h
│ │ │ │ ├── ip_addr.h
│ │ │ │ └── ip_frag.h
│ │ ├── ipv6
│ │ │ └── lwip
│ │ │ │ ├── icmp.h
│ │ │ │ ├── inet.h
│ │ │ │ ├── ip.h
│ │ │ │ └── ip_addr.h
│ │ ├── lwip
│ │ │ ├── api.h
│ │ │ ├── api_msg.h
│ │ │ ├── arch.h
│ │ │ ├── debug.h
│ │ │ ├── def.h
│ │ │ ├── dhcp.h
│ │ │ ├── dns.h
│ │ │ ├── err.h
│ │ │ ├── init.h
│ │ │ ├── mem.h
│ │ │ ├── memp.h
│ │ │ ├── memp_std.h
│ │ │ ├── netbuf.h
│ │ │ ├── netdb.h
│ │ │ ├── netif.h
│ │ │ ├── netifapi.h
│ │ │ ├── opt.h
│ │ │ ├── pbuf.h
│ │ │ ├── raw.h
│ │ │ ├── sio.h
│ │ │ ├── snmp.h
│ │ │ ├── snmp_asn1.h
│ │ │ ├── snmp_msg.h
│ │ │ ├── snmp_structs.h
│ │ │ ├── sockets.h
│ │ │ ├── stats.h
│ │ │ ├── sys.h
│ │ │ ├── tcp.h
│ │ │ ├── tcp_impl.h
│ │ │ ├── tcpip.h
│ │ │ ├── timers.h
│ │ │ └── udp.h
│ │ ├── netif
│ │ │ ├── etharp.h
│ │ │ ├── ppp_oe.h
│ │ │ └── slipif.h
│ │ └── posix
│ │ │ ├── netdb.h
│ │ │ └── sys
│ │ │ └── socket.h
│ └── netif
│ │ ├── FILES
│ │ ├── etharp.c
│ │ ├── ethernetif.c
│ │ ├── ppp
│ │ ├── auth.c
│ │ ├── auth.h
│ │ ├── chap.c
│ │ ├── chap.h
│ │ ├── chpms.c
│ │ ├── chpms.h
│ │ ├── fsm.c
│ │ ├── fsm.h
│ │ ├── ipcp.c
│ │ ├── ipcp.h
│ │ ├── lcp.c
│ │ ├── lcp.h
│ │ ├── magic.c
│ │ ├── magic.h
│ │ ├── md5.c
│ │ ├── md5.h
│ │ ├── pap.c
│ │ ├── pap.h
│ │ ├── ppp.c
│ │ ├── ppp.h
│ │ ├── ppp_impl.h
│ │ ├── ppp_oe.c
│ │ ├── pppdebug.h
│ │ ├── randm.c
│ │ ├── randm.h
│ │ ├── vj.c
│ │ └── vj.h
│ │ └── slipif.c
└── test
│ └── unit
│ ├── core
│ ├── test_mem.c
│ └── test_mem.h
│ ├── etharp
│ ├── test_etharp.c
│ └── test_etharp.h
│ ├── lwip_check.h
│ ├── lwip_unittests.c
│ ├── lwipopts.h
│ ├── tcp
│ ├── tcp_helper.c
│ ├── tcp_helper.h
│ ├── test_tcp.c
│ ├── test_tcp.h
│ ├── test_tcp_oos.c
│ └── test_tcp_oos.h
│ └── udp
│ ├── test_udp.c
│ └── test_udp.h
├── uC-CPU
├── ARM-Cortex-M4
│ ├── GNU
│ │ ├── cpu.h
│ │ ├── cpu_a.s
│ │ └── cpu_c.c
│ ├── IAR
│ │ ├── cpu.h
│ │ ├── cpu_a.asm
│ │ └── cpu_c.c
│ └── RealView
│ │ ├── cpu.h
│ │ ├── cpu_a.asm
│ │ └── cpu_c.c
├── cpu_core.c
├── cpu_core.h
└── cpu_def.h
├── uC-LIB
├── Ports
│ └── ARM-Cortex-M4
│ │ ├── GNU
│ │ └── lib_mem_a.s
│ │ ├── IAR
│ │ └── lib_mem_a.asm
│ │ └── RealView
│ │ └── lib_mem_a.asm
├── lib_ascii.c
├── lib_ascii.h
├── lib_def.h
├── lib_math.c
├── lib_math.h
├── lib_mem.c
├── lib_mem.h
├── lib_str.c
└── lib_str.h
├── uC-Shell
├── Cfg
│ └── Template
│ │ └── shell_cfg.h
├── Doc
│ ├── Shell-Manual.pdf
│ └── Shell-ReleaseNotes.pdf
└── Source
│ ├── shell.c
│ └── shell.h
└── uCOS-III
├── Ports
└── ARM-Cortex-M4
│ └── Generic
│ ├── GNU
│ ├── _sgbak
│ │ ├── os_cpu.h.1149602.3.2013-09-20.15-22-32.5330
│ │ ├── os_cpu_a.S.1141355.1.2013-09-20.15-22-32.5140
│ │ └── os_cpu_c.c.1149601.3.2013-09-20.15-22-32.5250
│ ├── os_cpu.h
│ ├── os_cpu_a.S
│ └── os_cpu_c.c
│ ├── IAR
│ ├── os_cpu.h
│ ├── os_cpu_a.asm
│ └── os_cpu_c.c
│ └── RealView
│ ├── os_cpu.h
│ ├── os_cpu_a.asm
│ └── os_cpu_c.c
└── Source
├── os.h
├── os_cfg_app.c
├── os_core.c
├── os_dbg.c
├── os_flag.c
├── os_int.c
├── os_mem.c
├── os_msg.c
├── os_mutex.c
├── os_pend_multi.c
├── os_prio.c
├── os_q.c
├── os_sem.c
├── os_stat.c
├── os_task.c
├── os_tick.c
├── os_time.c
├── os_tmr.c
├── os_type.h
└── os_var.c
/.gitignore:
--------------------------------------------------------------------------------
1 | # Object files
2 | *.o
3 |
4 | # Libraries
5 | *.lib
6 | *.a
7 |
8 | # Shared objects (inc. Windows DLLs)
9 | *.dll
10 | *.so
11 | *.so.*
12 | *.dylib
13 |
14 | # Executables
15 | *.out
16 | *.app
17 |
18 | #Other
19 | EvalBoards/ST/STM32F4-Discovery/uCOS-III/KeilMDK/Obj/
20 | EvalBoards/ST/STM32F4-Discovery/uCOS-III/KeilMDK/Lst/
21 | EvalBoards/ST/STM32F4-Discovery/sourceinsight/
22 |
--------------------------------------------------------------------------------
/Doc/USB Wireless LAN Driver for STM32F4xx Doc(In Chinese).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Doc/USB Wireless LAN Driver for STM32F4xx Doc(In Chinese).pdf
--------------------------------------------------------------------------------
/Doc/USB Wireless LAN Driver for STM32F4xx Doc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Doc/USB Wireless LAN Driver for STM32F4xx Doc.pdf
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/BSP/KeilMDK/cstartup.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/EvalBoards/ST/STM32F4-Discovery/BSP/KeilMDK/cstartup.s
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/BSP/ST/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/EvalBoards/ST/STM32F4-Discovery/BSP/ST/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/BSP/ST/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f4xx.h
4 | * @author MCD Application Team
5 | * @version V1.3.0
6 | * @date 08-November-2013
7 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
8 | ******************************************************************************
9 | * @attention
10 | *
11 | *
© COPYRIGHT 2013 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /** @addtogroup CMSIS
29 | * @{
30 | */
31 |
32 | /** @addtogroup stm32f4xx_system
33 | * @{
34 | */
35 |
36 | /**
37 | * @brief Define to prevent recursive inclusion
38 | */
39 | #ifndef __SYSTEM_STM32F4XX_H
40 | #define __SYSTEM_STM32F4XX_H
41 |
42 | #ifdef __cplusplus
43 | extern "C" {
44 | #endif
45 |
46 | /** @addtogroup STM32F4xx_System_Includes
47 | * @{
48 | */
49 |
50 | /**
51 | * @}
52 | */
53 |
54 |
55 | /** @addtogroup STM32F4xx_System_Exported_types
56 | * @{
57 | */
58 |
59 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
60 |
61 |
62 | /**
63 | * @}
64 | */
65 |
66 | /** @addtogroup STM32F4xx_System_Exported_Constants
67 | * @{
68 | */
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | /** @addtogroup STM32F4xx_System_Exported_Macros
75 | * @{
76 | */
77 |
78 | /**
79 | * @}
80 | */
81 |
82 | /** @addtogroup STM32F4xx_System_Exported_Functions
83 | * @{
84 | */
85 |
86 | extern void SystemInit(void);
87 | extern void SystemCoreClockUpdate(void);
88 | /**
89 | * @}
90 | */
91 |
92 | #ifdef __cplusplus
93 | }
94 | #endif
95 |
96 | #endif /*__SYSTEM_STM32F4XX_H */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 | /**
103 | * @}
104 | */
105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
106 |
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/BSP/ST/STM32F4xx_StdPeriph_Driver/Release_Notes.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/EvalBoards/ST/STM32F4-Discovery/BSP/ST/STM32F4xx_StdPeriph_Driver/Release_Notes.html
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/BSP/ST/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_crc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_crc.h
4 | * @author MCD Application Team
5 | * @version V1.3.0
6 | * @date 08-November-2013
7 | * @brief This file contains all the functions prototypes for the CRC firmware
8 | * library.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * © COPYRIGHT 2013 STMicroelectronics
13 | *
14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
15 | * You may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at:
17 | *
18 | * http://www.st.com/software_license_agreement_liberty_v2
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | ******************************************************************************
27 | */
28 |
29 | /* Define to prevent recursive inclusion -------------------------------------*/
30 | #ifndef __STM32F4xx_CRC_H
31 | #define __STM32F4xx_CRC_H
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /* Includes ------------------------------------------------------------------*/
38 | #include "stm32f4xx.h"
39 |
40 | /** @addtogroup STM32F4xx_StdPeriph_Driver
41 | * @{
42 | */
43 |
44 | /** @addtogroup CRC
45 | * @{
46 | */
47 |
48 | /* Exported types ------------------------------------------------------------*/
49 | /* Exported constants --------------------------------------------------------*/
50 |
51 | /** @defgroup CRC_Exported_Constants
52 | * @{
53 | */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /* Exported macro ------------------------------------------------------------*/
60 | /* Exported functions --------------------------------------------------------*/
61 |
62 | void CRC_ResetDR(void);
63 | uint32_t CRC_CalcCRC(uint32_t Data);
64 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
65 | uint32_t CRC_GetCRC(void);
66 | void CRC_SetIDRegister(uint8_t IDValue);
67 | uint8_t CRC_GetIDRegister(void);
68 |
69 | #ifdef __cplusplus
70 | }
71 | #endif
72 |
73 | #endif /* __STM32F4xx_CRC_H */
74 |
75 | /**
76 | * @}
77 | */
78 |
79 | /**
80 | * @}
81 | */
82 |
83 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
84 |
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/BSP/bsp_ser.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/EvalBoards/ST/STM32F4-Discovery/BSP/bsp_ser.c
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/BSP/delay.c:
--------------------------------------------------------------------------------
1 | #include "stm32f4xx.h"
2 | #include "delay.h"
3 |
4 | #define CPU_FREQUENCY_MHZ 168
5 |
6 | static __IO uint32_t TimingDelay;
7 |
8 | /* Private function prototypes -----------------------------------------------*/
9 |
10 |
11 | void delay_us(__IO uint32_t nTime)
12 | {
13 | int old_val,new_val,val;
14 |
15 | if(nTime > 900)
16 | {
17 | for(old_val = 0; old_val < nTime/900; old_val++)
18 | {
19 | delay_us(900);
20 | }
21 | nTime = nTime%900;
22 | }
23 |
24 | old_val = SysTick->VAL;
25 | new_val = old_val - CPU_FREQUENCY_MHZ*nTime;
26 | if(new_val >= 0)
27 | {
28 | do
29 | {
30 | val = SysTick->VAL;
31 | }
32 | while((val < old_val)&&(val >= new_val));
33 | }
34 | else
35 | {
36 | new_val +=CPU_FREQUENCY_MHZ*1000;
37 | do
38 | {
39 | val = SysTick->VAL;
40 | }
41 | while((val <= old_val)||(val > new_val));
42 |
43 | }
44 | }
45 |
46 |
47 |
48 | void delay_ms(__IO uint32_t nTime)
49 | {
50 | delay_us(1000*nTime);
51 | }
52 |
53 |
54 |
55 | int GetCurTime(void)
56 | {
57 | return TimingDelay;
58 | }
59 |
60 | void SysTick_Handler(void)
61 | {
62 | TimingDelay++;
63 | }
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/BSP/delay.h:
--------------------------------------------------------------------------------
1 | #ifndef __DELAY_H
2 | #define __DELAY_H
3 | #include "stdint.h"
4 |
5 | int GetCurTime(void);
6 | void Time_MeasureStart(void);
7 | int Time_MeasureEnd(void);
8 | void delay_ms(volatile uint32_t nTime);
9 | void delay_us(volatile uint32_t nTime);
10 |
11 | #endif
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/uCOS-III/App/src/ping.h:
--------------------------------------------------------------------------------
1 | #ifndef _PING_H_
2 | #define _PING_H_
3 |
4 |
5 | #include "shell.h"
6 |
7 | CPU_INT16S ping (CPU_INT16U argc,
8 | CPU_CHAR *argv[],
9 | SHELL_OUT_FNCT out_fnct,
10 | SHELL_CMD_PARAM *pcmd_param);
11 |
12 |
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/uCOS-III/App/src/smartlink.h:
--------------------------------------------------------------------------------
1 | #ifndef _SMARTLINK_H
2 | #define _SMARTLINK_H
3 |
4 |
5 | #include "rt_config.h"
6 |
7 |
8 |
9 | int smartlink_start(RTMP_ADAPTER *pAd);
10 |
11 | int smartlink_stop(RTMP_ADAPTER *pAd);
12 |
13 | int smartlink_init(void);
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/uCOS-III/App/src/wlan.h:
--------------------------------------------------------------------------------
1 | #ifndef _WLAN_H
2 | #define _WLAN_H
3 |
4 |
5 |
6 |
7 |
8 | int wireless_exec_cmd(char *cmd);
9 |
10 |
11 |
12 |
13 | void Netif_Config(void);
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/EvalBoards/ST/STM32F4-Discovery/uCOS-III/rt2870sta_conf.h:
--------------------------------------------------------------------------------
1 | /*
2 | # This C config file is converted from DPO_RT5572_LinuxSTA_2.6.1.3_20121022/RT2870STA.dat
3 | # This file is a binary file and will be read on loading rt.o module.
4 | #
5 | # Modify settings according to your need.
6 | #
7 | # 1.) set NetworkType to "Adhoc" for using Adhoc-mode, otherwise using Infrastructure
8 | # 2.) set Channel to "0" for auto-select on Infrastructure mode
9 | # 3.) set SSID for connecting to your Accss-point.
10 | # 4.) AuthMode can be "WEPAUTO", "OPEN", "SHARED", "WPAPSK", "WPA2PSK", "WPANONE"
11 | # 5.) EncrypType can be "NONE", "WEP", "TKIP", "AES"
12 | # for more information refer to the DPO_RT5572_LinuxSTA_2.6.1.3_20121022/README_STA_usb.
13 | */
14 |
15 | #define LF "\n"
16 | static const unsigned char RT2870STA_dat[] = {
17 | "#The word of \"Default\" must not be removed"
18 | LF"Default"
19 | LF"CountryRegion=5"
20 | LF"CountryRegionABand=7"
21 | LF"CountryCode="
22 | LF"ChannelGeography=1"
23 | LF"NetworkType=Infra"
24 | LF"WirelessMode=5"
25 | LF"Channel=0"
26 | LF"BeaconPeriod=100"
27 | LF"TxPower=100"
28 | LF"BGProtection=0"
29 | LF"TxPreamble=0"
30 | LF"RTSThreshold=2347"
31 | LF"FragThreshold=2346"
32 | LF"TxBurst=1"
33 | LF"PktAggregate=0"
34 | LF"WmmCapable=1"
35 | LF"AckPolicy=0;0;0;0"
36 |
37 | LF"SSID=mytest"
38 | LF"AuthMode=WPA2PSK"
39 | LF"EncrypType=AES"
40 | LF"WPAPSK=12345678"
41 |
42 | LF"DefaultKeyID=1"
43 | LF"Key1Type=0"
44 | LF"Key1Str="
45 | LF"Key2Type=0"
46 | LF"Key2Str="
47 | LF"Key3Type=0"
48 | LF"Key3Str="
49 | LF"Key4Type=0"
50 | LF"Key4Str="
51 | LF"PSMode=CAM"
52 | LF"AutoRoaming=0"
53 | LF"RoamThreshold=70"
54 | LF"APSDCapable=0"
55 | LF"APSDAC=0;0;0;0"
56 | LF"HT_RDG=1"
57 | LF"HT_EXTCHA=0"
58 | LF"HT_OpMode=0"
59 | LF"HT_MpduDensity=4"
60 | LF"HT_BW=1"
61 | LF"HT_BADecline=0"
62 | LF"HT_AutoBA=1"
63 | LF"HT_AMSDU=0"
64 | LF"HT_BAWinSize=64"
65 | LF"HT_GI=1"
66 | LF"HT_MCS=33"
67 | LF"HT_MIMOPSMode=3"
68 | LF"HT_DisallowTKIP=1"
69 | LF"HT_STBC=0"
70 | LF"EthConvertMode="
71 | LF"EthCloneMac="
72 | LF"IEEE80211H=0"
73 | LF"TGnWifiTest=0"
74 | LF"WirelessEvent=1"
75 | LF"MeshId=MESH"
76 | LF"MeshAutoLink=1"
77 | LF"MeshAuthMode=OPEN"
78 | LF"MeshEncrypType=NONE"
79 | LF"MeshWPAKEY="
80 | LF"MeshDefaultkey=1"
81 | LF"MeshWEPKEY="
82 | LF"CarrierDetect=0"
83 | LF"AntDiversity=0"
84 | LF"BeaconLostTime=4"
85 | LF"FtSupport=0"
86 | LF"Wapiifname=ra0"
87 | LF"WapiPsk="
88 | LF"WapiPskType="
89 | LF"WapiUserCertPath="
90 | LF"WapiAsCertPath="
91 | LF"PSP_XLINK_MODE=0"
92 | LF"WscManufacturer="
93 | LF"WscModelName="
94 | LF"WscDeviceName="
95 | LF"WscModelNumber="
96 | LF"WscSerialNumber="
97 | LF"RadioOn=1"
98 | LF"WIDIEnable=0"
99 | LF"P2P_L2SD_SCAN_TOGGLE=8"
100 | LF"Wsc4digitPinCode=0"
101 | LF"P2P_WIDIEnable=0"
102 | LF"PMFMFPC=0"
103 | LF"PMFMFPR=0"
104 | LF"PMFSHA256=0"
105 | LF
106 | };
107 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #USB Wireless LAN Driver for STM32F4xx
2 |
3 | The software utilizes uC/OS-III as embedded operating system, lwip as network
4 | protocol stack, STM32F4xx as microprocessor, ports and optimizes the MediaTek's
5 | USB wireless lan driver DPO_RT5572_LinuxSTA_2.6.1.3_20121022 for embedded systems.
6 | Testing process could achieve 3.3 Mbits upstream speed, 6 Mbits downstream speed.
7 | Now it supports STM32F4-Discovery board.
8 |
9 | The software features:
10 | 1.HotPlug.
11 | 2.Support authentication type and encryption type like WEP、WPAPSK-AES、WPAPSK-TKIP、
12 | WPA2PSK-AES、WPA2PSK-TKIP.
13 | 3.Support 802.11b/g/n.
14 | 4.Utilize iwpriv to configure the Wireless LAN.
15 | 5.Tested USB Wireless LAN type RT5370 and RT3070.
16 |
17 | More sampled demos and help refer to Doc\USB Wireless LAN for STM32F4xx Doc.pdf.
18 |
19 | ======================================================================================
20 |
21 | 本软件使用uC/OS-III作为嵌入式操作系统,lwip作为网络协议栈,STM32F4xx作为
22 | 微处理器,移植了联发科的USB无线网卡驱动DPO_RT5572_LinuxSTA_2.6.1.3_20121022,
23 | 并针对嵌入式系统做了优化。测试过程可以达到3.3Mbits的上行速度,6Mbits的下
24 | 行速度。现支持STM32F4-Discovery板子。
25 |
26 | 本软件特性:
27 | 1.支持热插拔
28 | 2.支持WEP、WPAPSK-AES、WPAPSK-TKIP、WPA2PSK-AES、WPA2PSK-TKIP等认证和加密方式
29 | 3.支持802.11b/g/n
30 | 4.使用iwpriv工具对无线网卡进行配置
31 | 5.测试过的USB无线网卡型号RT5370和RT3070
32 |
33 | 有关演示例子和更多帮助见 Doc\USB Wireless LAN for STM32F4xx Doc.pdf
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.bz2
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/README_STA_usb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/README_STA_usb
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/RT2870STA.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=11n-AP
8 | NetworkType=Infra
9 | WirelessMode=5
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_BADecline=0
44 | HT_AutoBA=1
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=0
81 | P2P_L2SD_SCAN_TOGGLE=8
82 | Wsc4digitPinCode=0
83 | P2P_WIDIEnable=0
84 | PMFMFPC=0
85 | PMFMFPR=0
86 | PMFSHA256=0
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/RT2870STACard.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/RT2870STA/RT2870STA1.dat
8 | 01CARDID=/etc/Wireless/RT2870STA/RT2870STA2.dat
9 | 02CARDID=/etc/Wireless/RT2870STA/RT2870STA3.dat
10 |
11 | 00MAC00:0E:2E:C3:D0:48=/etc/Wireless/RT2870STA/RT2870STA1.dat
12 | 01MAC00:40:F4:FF:AA:40=/etc/Wireless/RT2870STA/RT2870STA2.dat
13 | 02MAC00:0C:43:10:11:5C=/etc/Wireless/RT2870STA/RT2870STA3.dat
14 |
15 | 00CARDTYPEbgn=/etc/Wireless/RT2870STA/RT2870STA1.dat
16 | 01CARDTYPEbgn=/etc/Wireless/RT2870STA/RT2870STA2.dat
17 | 02CARDTYPEabgn=/etc/Wireless/RT2870STA/RT2870STA3.dat
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/cmm_aes.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/cmm_aes.c
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/cmm_wpa.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/cmm_wpa.c
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/crypt_hmac.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/crypt_hmac.c
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/ee_efuse.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/ee_efuse.c
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/misc.c:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #include "rt_config.h"
29 | #include "misc.h"
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/rt2870.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/rt2870.bin
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/rt2870_sw_ch_offload.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/rt2870_sw_ch_offload.bin
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/common/wfd.c:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/action.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __ACTION_H__
29 | #define __ACTION_H__
30 |
31 | typedef struct GNU_PACKED __HT_INFO_OCTET {
32 | #ifdef RT_BIG_ENDIAN
33 | UCHAR Reserved:5;
34 | UCHAR STA_Channel_Width:1;
35 | UCHAR Forty_MHz_Intolerant:1;
36 | UCHAR Request:1;
37 | #else
38 | UCHAR Request:1;
39 | UCHAR Forty_MHz_Intolerant:1;
40 | UCHAR STA_Channel_Width:1;
41 | UCHAR Reserved:5;
42 | #endif
43 | } HT_INFORMATION_OCTET;
44 |
45 | typedef struct GNU_PACKED __FRAME_HT_INFO {
46 | HEADER_802_11 Hdr;
47 | UCHAR Category;
48 | UCHAR Action;
49 | HT_INFORMATION_OCTET HT_Info;
50 | } FRAME_HT_INFO, *PFRAME_HT_INFO;
51 |
52 | #endif /* __ACTION_H__ */
53 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/br_ftph.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __BR_FTPH_H__
29 | #define __BR_FTPH_H__
30 |
31 | /* Public function prototype */
32 | /*
33 | ========================================================================
34 | Routine Description:
35 | Init bridge fast path module.
36 |
37 | Arguments:
38 | None
39 |
40 | Return Value:
41 | None
42 |
43 | Note:
44 | Used in module init.
45 | ========================================================================
46 | */
47 | VOID BG_FTPH_Init(VOID);
48 |
49 | /*
50 | ========================================================================
51 | Routine Description:
52 | Remove bridge fast path module.
53 |
54 | Arguments:
55 | None
56 |
57 | Return Value:
58 | None
59 |
60 | Note:
61 | Used in module remove.
62 | ========================================================================
63 | */
64 | VOID BG_FTPH_Remove(VOID);
65 |
66 | /*
67 | ========================================================================
68 | Routine Description:
69 | Forward the received packet.
70 |
71 | Arguments:
72 | pPacket - the received packet
73 |
74 | Return Value:
75 | None
76 |
77 | Note:
78 | ========================================================================
79 | */
80 | UINT32 BG_FTPH_PacketFromApHandle(
81 | IN PNDIS_PACKET pPacket);
82 |
83 | #endif /* __BR_FTPH_H__ */
84 |
85 | /* End of br_ftph.h */
86 |
87 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/cfg80211.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifdef RT_CFG80211_SUPPORT
29 |
30 | #include
31 |
32 | typedef struct __CFG80211_CB {
33 |
34 | /* we can change channel/rate information on the fly so we backup them */
35 | struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
36 | struct ieee80211_channel *pCfg80211_Channels;
37 | struct ieee80211_rate *pCfg80211_Rates;
38 |
39 | /* used in wiphy_unregister */
40 | struct wireless_dev *pCfg80211_Wdev;
41 |
42 | /* used in scan end */
43 | struct cfg80211_scan_request *pCfg80211_ScanReq;
44 |
45 | /* monitor filter */
46 | UINT32 MonFilterFlag;
47 |
48 | /* channel information */
49 | struct ieee80211_channel ChanInfo[MAX_NUM_OF_CHANNELS];
50 | } CFG80211_CB;
51 |
52 |
53 |
54 |
55 | /*
56 | ========================================================================
57 | Routine Description:
58 | Register MAC80211 Module.
59 |
60 | Arguments:
61 | pAd - WLAN control block pointer
62 | pDev - Generic device interface
63 | pNetDev - Network device
64 |
65 | Return Value:
66 | NONE
67 |
68 | Note:
69 | pDev != pNetDev
70 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev))
71 |
72 | Can not use pNetDev to replace pDev; Or kernel panic.
73 | ========================================================================
74 | */
75 | BOOLEAN CFG80211_Register(
76 | VOID *pAd,
77 | struct device *pDev,
78 | struct net_device *pNetDev);
79 |
80 |
81 | #endif /* RT_CFG80211_SUPPORT */
82 |
83 | /* End of cfg80211.h */
84 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/chip/chip_id.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __CHIP_ID_H__
29 | #define __CHIP_ID_H__
30 |
31 |
32 | #define NIC_PCI_VENDOR_ID 0x1814
33 |
34 | #define NIC2860_PCI_DEVICE_ID 0x0601
35 | #define NIC2860_PCIe_DEVICE_ID 0x0681
36 | #define NIC2760_PCI_DEVICE_ID 0x0701 /* 1T/2R Cardbus ??? */
37 | #define NIC2790_PCIe_DEVICE_ID 0x0781 /* 1T/2R miniCard */
38 |
39 | #define VEN_AWT_PCIe_DEVICE_ID 0x1059
40 | #define VEN_AWT_PCI_VENDOR_ID 0x1A3B
41 |
42 | #define EDIMAX_PCI_VENDOR_ID 0x1432
43 |
44 | #define NIC3090_PCIe_DEVICE_ID 0x3090 /* 1T/1R miniCard */
45 | #define NIC3091_PCIe_DEVICE_ID 0x3091 /* 1T/2R miniCard */
46 | #define NIC3092_PCIe_DEVICE_ID 0x3092 /* 2T/2R miniCard */
47 | #define NIC3390_PCIe_DEVICE_ID 0x3390 /* 1T/1R miniCard */
48 |
49 | #define NIC3062_PCI_DEVICE_ID 0x3062 /* 2T/2R miniCard */
50 | #define NIC3562_PCI_DEVICE_ID 0x3562 /* 2T/2R miniCard */
51 | #define NIC3060_PCI_DEVICE_ID 0x3060 /* 1T/1R miniCard */
52 |
53 | #define NIC3592_PCIe_DEVICE_ID 0x3592 /* 2T/2R miniCard */
54 |
55 |
56 | #define NIC3593_PCI_OR_PCIe_DEVICE_ID 0x3593
57 | #define NIC5390_PCIe_DEVICE_ID 0x5390
58 | #define NIC539F_PCIe_DEVICE_ID 0x539F
59 | #define NIC5392_PCIe_DEVICE_ID 0x5392
60 | #define NIC5360_PCI_DEVICE_ID 0x5360
61 | #define NIC5362_PCI_DEVICE_ID 0x5362
62 |
63 | #define NIC5592_PCIe_DEVICE_ID 0x5592
64 |
65 | #define NIC3290_PCIe_DEVICE_ID 0x3290
66 |
67 | #define DLINK_PCI_VENDOR_ID 0x1186
68 |
69 | #endif /* __CHIP_ID_H__ */
70 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/chip/rt2870.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RT2870_H__
29 | #define __RT2870_H__
30 |
31 | #ifdef RT2870
32 |
33 | #ifndef RTMP_USB_SUPPORT
34 | #error "For RT2870, you should define the compile flag -DRTMP_USB_SUPPORT"
35 | #endif
36 |
37 | #ifndef RTMP_MAC_USB
38 | #error "For RT2870, you should define the compile flag -DRTMP_MAC_USB"
39 | #endif
40 |
41 | #include "rtmp_type.h"
42 |
43 | #endif /* RT2870 */
44 | #endif /*__RT2870_H__ */
45 |
46 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/chip/rt28xx.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RT28XX_H__
29 | #define __RT28XX_H__
30 |
31 | #ifdef RT28xx
32 |
33 | VOID RT28xx_ChipSwitchChannel(
34 | IN struct _RTMP_ADAPTER *pAd,
35 | IN UCHAR Channel,
36 | IN BOOLEAN bScan);
37 |
38 | #endif /* RT28xx */
39 |
40 | #endif /*__RT28XX_H__ */
41 |
42 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/chip/rt3070.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RT3070_H__
29 | #define __RT3070_H__
30 |
31 | #ifdef RT3070
32 |
33 | struct _RTMP_ADAPTER;
34 | struct _RSSI_SAMPLE;
35 |
36 | #ifndef RTMP_USB_SUPPORT
37 | #error "For RT3070, you should define the compile flag -DRTMP_USB_SUPPORT"
38 | #endif
39 |
40 | #ifndef RTMP_MAC_USB
41 | #error "For RT3070, you should define the compile flag -DRTMP_MAC_USB"
42 | #endif
43 |
44 | #ifndef RTMP_RF_RW_SUPPORT
45 | #error "For RT3070, you should define the compile flag -DRTMP_RF_RW_SUPPORT"
46 | #endif
47 |
48 | #ifndef RT30xx
49 | #error "For RT3070, you should define the compile flag -DRT30xx"
50 | #endif
51 |
52 | #include "chip/rt30xx.h"
53 |
54 | /*
55 | Device ID & Vendor ID, these values should match EEPROM value
56 | */
57 |
58 |
59 | VOID RT3070_PowerTuning(
60 | IN struct _RTMP_ADAPTER *pAd,
61 | IN struct _RSSI_SAMPLE *pRssi);
62 |
63 | #endif /* RT3070 */
64 |
65 | #endif /* __RT3070_H__ */
66 |
67 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/chip/rt30xx.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RT30XX_H__
29 | #define __RT30XX_H__
30 |
31 | #ifdef RT30xx
32 |
33 | struct _RTMP_ADAPTER;
34 |
35 | #include "rtmp_type.h"
36 |
37 | extern REG_PAIR RT3020_RFRegTable[];
38 | extern UCHAR NUM_RF_3020_REG_PARMS;
39 |
40 | VOID RT30xx_Init(
41 | IN struct _RTMP_ADAPTER *pAd);
42 |
43 | VOID RT30xx_ChipSwitchChannel(
44 | IN struct _RTMP_ADAPTER *pAd,
45 | IN UCHAR Channel,
46 | IN BOOLEAN bScan);
47 |
48 | VOID RT30xx_ChipBBPAdjust(
49 | IN struct _RTMP_ADAPTER *pAd);
50 |
51 | VOID RT30xx_ChipAGCInit(
52 | IN struct _RTMP_ADAPTER *pAd,
53 | IN UCHAR BandWidth);
54 |
55 | #endif /* RT30xx */
56 |
57 | #endif /*__RT30XX_H__ */
58 |
59 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/chip/rt3370.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RT3370_H__
29 | #define __RT3370_H__
30 |
31 | #ifdef RT3370
32 |
33 |
34 | #ifndef RTMP_USB_SUPPORT
35 | #error "For RT3070, you should define the compile flag -DRTMP_USB_SUPPORT"
36 | #endif
37 |
38 | #ifndef RTMP_MAC_USB
39 | #error "For RT3070, you should define the compile flag -DRTMP_MAC_USB"
40 | #endif
41 |
42 | #ifndef RTMP_RF_RW_SUPPORT
43 | #error "For RT3070, you should define the compile flag -DRTMP_RF_RW_SUPPORT"
44 | #endif
45 |
46 | #ifndef RT33xx
47 | #error "For RT3370, you should define the compile flag -DRT33xx"
48 | #endif
49 |
50 | #ifndef RT30xx
51 | #error "For RT3070, you should define the compile flag -DRT30xx"
52 | #endif
53 |
54 |
55 | #include "chip/rt30xx.h"
56 | #include "chip/rt33xx.h"
57 |
58 | extern REG_PAIR RT3370_BBPRegTable[];
59 | extern UCHAR RT3370_NUM_BBP_REG_PARMS;
60 |
61 |
62 | /* */
63 | /* Device ID & Vendor ID, these values should match EEPROM value */
64 | /* */
65 |
66 | #endif /* RT3370 */
67 |
68 | #endif /*__RT3370_H__ */
69 |
70 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/chip/rt33xx.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RT33XX_H__
29 | #define __RT33XX_H__
30 |
31 | #ifdef RT33xx
32 |
33 | #include "rtmp_type.h"
34 |
35 |
36 | #ifdef RT3370
37 | extern REG_PAIR RT3370_RFRegTable[];
38 | extern UCHAR RT3370_NUM_RF_REG_PARMS;
39 | #define BW20RFR24 0x4F
40 | #define BW40RFR24 0X68
41 | #define BW20RFR31 0x4F
42 | #define BW40RFR31 0X6F
43 | #endif /* RT3370 */
44 |
45 | VOID RT33xx_Init(
46 | IN struct _RTMP_ADAPTER *pAd);
47 |
48 | VOID RT33xx_ChipSwitchChannel(
49 | IN struct _RTMP_ADAPTER *pAd,
50 | IN UCHAR Channel,
51 | IN BOOLEAN bScan);
52 |
53 | #ifdef RTMP_INTERNAL_TX_ALC
54 | VOID RT33xx_InitDesiredTSSITable(
55 | IN struct _RTMP_ADAPTER *pAd);
56 |
57 | UCHAR RT33xx_GetDesiredTSSI(
58 | IN struct _RTMP_ADAPTER *pAd);
59 |
60 | VOID RT33xx_AsicTxAlcGetAutoAgcOffset(
61 | IN struct _RTMP_ADAPTER *pAd,
62 | IN PCHAR pDeltaPwr,
63 | IN PCHAR pTotalDeltaPwr,
64 | IN PCHAR pAgcCompensate,
65 | IN PCHAR pDeltaPowerByBbpR1);
66 | #endif /* RTMP_INTERNAL_TX_ALC */
67 |
68 | #endif /* RT33xx */
69 |
70 | #endif /*__RT33XX_H__ */
71 |
72 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/client_wds.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __CLIENT_WDS_H__
29 | #define __CLIENT_WDS_H__
30 |
31 | #include "client_wds_cmm.h"
32 |
33 | VOID CliWds_ProxyTabInit(
34 | IN PRTMP_ADAPTER pAd);
35 |
36 | VOID CliWds_ProxyTabDestory(
37 | IN PRTMP_ADAPTER pAd);
38 |
39 | PCLIWDS_PROXY_ENTRY CliWdsEntyAlloc(
40 | IN PRTMP_ADAPTER pAd);
41 |
42 |
43 | VOID CliWdsEntyFree(
44 | IN PRTMP_ADAPTER pAd,
45 | IN PCLIWDS_PROXY_ENTRY pCliWdsEntry);
46 |
47 |
48 | PUCHAR CliWds_ProxyLookup(
49 | IN PRTMP_ADAPTER pAd,
50 | IN PUCHAR pMac);
51 |
52 |
53 | VOID CliWds_ProxyTabUpdate(
54 | IN PRTMP_ADAPTER pAd,
55 | IN SHORT Aid,
56 | IN PUCHAR pMac);
57 |
58 |
59 | VOID CliWds_ProxyTabMaintain(
60 | IN PRTMP_ADAPTER pAd);
61 |
62 | #endif /* __CLIENT_WDS_H__ */
63 |
64 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/client_wds_cmm.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __CLIENT_WDS_CMM_H__
29 | #define __CLIENT_WDS_CMM_H__
30 |
31 | #include "rtmp_def.h"
32 |
33 | #ifdef CLIENT_WDS
34 |
35 |
36 | #define CLI_WDS_ENTRY_AGEOUT 5000 /* seconds */
37 |
38 | #define CLIWDS_POOL_SIZE 128
39 | #define CLIWDS_HASH_TAB_SIZE 64 /* the legth of hash table must be power of 2. */
40 | typedef struct _CLIWDS_PROXY_ENTRY {
41 | struct _CLIWDS_PROXY_ENTRY * pNext;
42 | ULONG LastRefTime;
43 | SHORT Aid;
44 | UCHAR Addr[MAC_ADDR_LEN];
45 | } CLIWDS_PROXY_ENTRY, *PCLIWDS_PROXY_ENTRY;
46 |
47 | #endif /* CLIENT_WDS */
48 |
49 | #endif /* __CLIENT_WDS_CMM_H__ */
50 |
51 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/crypt_arc4.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __CRYPT_ARC4_H__
29 | #define __CRYPT_ARC4_H__
30 |
31 | #include "rt_config.h"
32 |
33 | /* ARC4 definition & structure */
34 | #define ARC4_KEY_BLOCK_SIZE 256
35 |
36 | typedef struct {
37 | UINT BlockIndex1;
38 | UINT BlockIndex2;
39 | UINT8 KeyBlock[256];
40 | } ARC4_CTX_STRUC, *PARC4_CTX_STRUC;
41 |
42 | /* ARC4 operations */
43 | VOID ARC4_INIT(
44 | IN ARC4_CTX_STRUC * pARC4_CTX,
45 | IN PUCHAR pKey,
46 | IN UINT KeyLength);
47 |
48 | VOID ARC4_Compute(
49 | IN ARC4_CTX_STRUC * pARC4_CTX,
50 | IN UINT8 InputBlock[],
51 | IN UINT InputBlockSize,
52 | OUT UINT8 OutputBlock[]);
53 |
54 | VOID ARC4_Discard_KeyLength(
55 | IN ARC4_CTX_STRUC * pARC4_CTX,
56 | IN UINT Length);
57 |
58 | #endif /* __CRYPT_ARC4_H__ */
59 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/crypt_hmac.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
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 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/crypt_md5.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
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 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/dfs.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __DFS_H__
29 | #define __DFS_H__
30 |
31 | /*************************************************************************
32 | *
33 | * DFS Radar related definitions.
34 | *
35 | ************************************************************************/
36 |
37 |
38 | #endif /*_DFS_H__*/
39 |
40 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/iface/iface_util.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RTMP_UTIL_H__
29 | #define __RTMP_UTIL_H__
30 |
31 | /* maximum of PCI, USB, or RBUS, int PCI, it is 0 but in USB, it is 11 */
32 | #define RTMP_PKT_TAIL_PADDING 11 /* 3(max 4 byte padding) + 4 (last packet padding) + 4 (MaxBulkOutsize align padding) */
33 |
34 | #ifdef PCI_MSI_SUPPORT
35 | #define RTMP_MSI_ENABLE(_pAd) \
36 | { POS_COOKIE _pObj = (POS_COOKIE)(_pAd->OS_Cookie); \
37 | (_pAd)->HaveMsi = pci_enable_msi(_pObj->pci_dev) == 0 ? TRUE : FALSE; \
38 | }
39 |
40 | #define RTMP_MSI_DISABLE(_pci_dev, _pHaveMsi) \
41 | { \
42 | if (*(_pHaveMsi) == TRUE) \
43 | pci_disable_msi(_pci_dev); \
44 | *(_pHaveMsi) = FALSE; \
45 | }
46 |
47 | #else
48 | #define RTMP_MSI_ENABLE(_pAd) do{}while(0)
49 | #define RTMP_MSI_DISABLE(_pci_dev, _pHaveMsi) do{}while(0)
50 | #endif /* PCI_MSI_SUPPORT */
51 |
52 | #define RTMP_PCI_DMA_TODEVICE 0xFF00
53 | #define RTMP_PCI_DMA_FROMDEVICE 0xFF01
54 |
55 |
56 |
57 |
58 | #define UNLINK_TIMEOUT_MS 3
59 |
60 | #define USBD_TRANSFER_DIRECTION_OUT 0
61 | #define USBD_TRANSFER_DIRECTION_IN 0
62 | #define USBD_SHORT_TRANSFER_OK 0
63 | #define PURB purbb_t
64 |
65 | #define OS_RTUSBMlmeUp RtmpOsMlmeUp
66 |
67 |
68 |
69 |
70 | #endif /* __RTMP_UTIL_H__ */
71 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/misc.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/misc_cmm.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/netif_block.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __NET_IF_BLOCK_H__
29 | #define __NET_IF_BLOCK_H__
30 |
31 | #include "link_list.h"
32 | #include "rtmp.h"
33 |
34 | #define FREE_NETIF_POOL_SIZE 32
35 |
36 | typedef struct _NETIF_ENTRY
37 | {
38 | struct _NETIF_ENTRY *pNext;
39 | PNET_DEV pNetDev;
40 | } NETIF_ENTRY, *PNETIF_ENTRY;
41 |
42 | void initblockQueueTab(
43 | IN PRTMP_ADAPTER pAd);
44 |
45 | BOOLEAN blockNetIf(
46 | IN PBLOCK_QUEUE_ENTRY pBlockQueueEntry,
47 | IN PNET_DEV pNetDev);
48 |
49 | VOID releaseNetIf(
50 | IN PBLOCK_QUEUE_ENTRY pBlockQueueEntry);
51 |
52 | VOID StopNetIfQueue(
53 | IN PRTMP_ADAPTER pAd,
54 | IN UCHAR QueIdx,
55 | IN PNDIS_PACKET pPacket);
56 | #endif /* __NET_IF_BLOCK_H__ */
57 |
58 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/rt_txbf.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef _RT_TXBF_H_
29 | #define _RT_TXBF_H_
30 |
31 |
32 | #endif // _RT_TXBF_H_
33 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/rtmp_iface.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RTMP_IFACE_H__
29 | #define __RTMP_IFACE_H__
30 |
31 |
32 |
33 | #ifdef RTMP_USB_SUPPORT
34 | #include "iface/rtmp_usb.h"
35 | #endif /* RTMP_USB_SUPPORT */
36 |
37 | typedef struct _INF_PCI_CONFIG_ {
38 | unsigned long CSRBaseAddress; /* PCI MMIO Base Address, all access will use */
39 | unsigned int irq_num;
40 | } INF_PCI_CONFIG;
41 |
42 | typedef struct _INF_USB_CONFIG_ {
43 | unsigned char BulkInEpAddr; /* bulk-in endpoint address */
44 | unsigned char BulkOutEpAddr[6]; /* bulk-out endpoint address */
45 | } INF_USB_CONFIG;
46 |
47 | typedef struct _INF_RBUS_CONFIG_ {
48 | unsigned long csr_addr;
49 | unsigned int irq;
50 | } INF_RBUS_CONFIG;
51 |
52 |
53 | typedef union _RTMP_INF_CONFIG_ {
54 | struct _INF_PCI_CONFIG_ pciConfig;
55 | struct _INF_USB_CONFIG_ usbConfig;
56 | struct _INF_RBUS_CONFIG_ rbusConfig;
57 | } RTMP_INF_CONFIG;
58 |
59 | #endif /* __RTMP_IFACE_H__ */
60 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/rtmp_mcu.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RTMP_MCU_H__
29 | #define __RTMP_MCU_H__
30 |
31 | INT RtmpAsicEraseFirmware(
32 | IN PRTMP_ADAPTER pAd);
33 |
34 | NDIS_STATUS RtmpAsicLoadFirmware(
35 | IN PRTMP_ADAPTER pAd);
36 |
37 | NDIS_STATUS isMCUnotReady(
38 | IN PRTMP_ADAPTER pAd);
39 |
40 | NDIS_STATUS isMCUNeedToLoadFIrmware(
41 | IN PRTMP_ADAPTER pAd);
42 |
43 | INT RtmpAsicSendCommandToMcu(
44 | IN PRTMP_ADAPTER pAd,
45 | IN UCHAR Command,
46 | IN UCHAR Token,
47 | IN UCHAR Arg0,
48 | IN UCHAR Arg1,
49 | IN BOOLEAN FlgIsNeedLocked);
50 |
51 | #endif /* __RTMP_MCU_H__ */
52 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/rtmp_osabl.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __RTMP_OS_ABL_H__
29 | #define __RTMP_OS_ABL_H__
30 |
31 | #ifdef OS_ABL_FUNC_SUPPORT
32 |
33 | #ifdef OS_ABL_OS_PCI_SUPPORT
34 | #define RTMP_MAC_PCI
35 | #define RTMP_PCI_SUPPORT
36 | #endif /* OS_ABL_OS_PCI_SUPPORT */
37 |
38 | #ifdef OS_ABL_OS_USB_SUPPORT
39 | #include
40 |
41 | #ifndef RTMP_MAC_USB
42 | #define RTMP_MAC_USB
43 | #endif /* RTMP_MAC_USB */
44 | #ifndef RTMP_USB_SUPPORT
45 | #define RTMP_USB_SUPPORT
46 | #endif /* RTMP_USB_SUPPORT */
47 | #endif /* OS_ABL_OS_USB_SUPPORT */
48 |
49 | #ifdef OS_ABL_OS_RBUS_SUPPORT
50 | #define RTMP_RBUS_SUPPORT
51 | #endif /* OS_ABL_OS_RBUS_SUPPORT */
52 |
53 | #ifdef OS_ABL_OS_AP_SUPPORT
54 | #define CONFIG_AP_SUPPORT
55 | #endif /* OS_ABL_OS_AP_SUPPORT */
56 |
57 | #ifdef OS_ABL_OS_STA_SUPPORT
58 | #ifndef CONFIG_STA_SUPPORT
59 | #define CONFIG_STA_SUPPORT
60 | #endif /* CONFIG_STA_SUPPORT */
61 | #endif /* OS_ABL_OS_STA_SUPPORT */
62 |
63 | /* AP & STA con-current */
64 | #undef RT_CONFIG_IF_OPMODE_ON_AP
65 | #undef RT_CONFIG_IF_OPMODE_ON_STA
66 |
67 | #if defined(CONFIG_AP_SUPPORT) && defined(CONFIG_STA_SUPPORT)
68 | #define RT_CONFIG_IF_OPMODE_ON_AP(__OpMode) if (__OpMode == OPMODE_AP)
69 | #define RT_CONFIG_IF_OPMODE_ON_STA(__OpMode) if (__OpMode == OPMODE_STA)
70 | #else
71 | #define RT_CONFIG_IF_OPMODE_ON_AP(__OpMode)
72 | #define RT_CONFIG_IF_OPMODE_ON_STA(__OpMode)
73 | #endif
74 |
75 | #endif /* OS_ABL_FUNC_SUPPORT */
76 |
77 | #endif /* __RTMP_OS_ABL_H__ */
78 |
79 | /* End of rtmp_osabl.h */
80 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/sta_cfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __STA_CFG_H__
29 | #define __STA_CFG_H__
30 |
31 | INT RTMPSTAPrivIoctlSet(
32 | IN RTMP_ADAPTER *pAd,
33 | IN PSTRING SetProcName,
34 | IN PSTRING ProcArg);
35 |
36 |
37 | #endif /* __STA_CFG_H__ */
38 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/video.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifdef VIDEO_TURBINE_SUPPORT
29 | extern AP_VIDEO_STRUCT GLOBAL_AP_VIDEO_CONFIG;
30 |
31 | VOID VideoModeUpdate(IN PRTMP_ADAPTER pAd);
32 | VOID VideoModeDynamicTune(IN PRTMP_ADAPTER pAd);
33 | UINT32 GetAsicDefaultRetry(IN PRTMP_ADAPTER pAd);
34 | UCHAR GetAsicDefaultTxBA(IN PRTMP_ADAPTER pAd);
35 | UINT32 GetAsicVideoRetry(IN PRTMP_ADAPTER pAd);
36 | UCHAR GetAsicVideoTxBA(IN PRTMP_ADAPTER pAd);
37 | VOID VideoConfigInit(IN PRTMP_ADAPTER pAd);
38 | #endif /* VIDEO_TURBINE_SUPPORT */
39 |
40 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/vr_ikans.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __VR_IKANS_H__
29 | #define __VR_IKANS_H__
30 |
31 | #ifndef MODULE_IKANOS
32 | #define IKANOS_EXTERN extern
33 | #else
34 | #define IKANOS_EXTERN
35 | #endif /* MODULE_IKANOS */
36 |
37 | #ifdef IKANOS_VX_1X0
38 | typedef void (*IkanosWlanTxCbFuncP)(void *, void *);
39 |
40 | struct IKANOS_TX_INFO
41 | {
42 | struct net_device *netdev;
43 | IkanosWlanTxCbFuncP *fp;
44 | };
45 | #endif /* IKANOS_VX_1X0 */
46 |
47 |
48 | IKANOS_EXTERN void VR_IKANOS_FP_Init(UINT8 BssNum, UINT8 *pApMac);
49 |
50 | IKANOS_EXTERN INT32 IKANOS_DataFramesTx(struct sk_buff *pSkb,
51 | struct net_device *pNetDev);
52 |
53 | IKANOS_EXTERN void IKANOS_DataFrameRx(PRTMP_ADAPTER pAd,
54 | struct sk_buff *pSkb);
55 |
56 | #endif /* __VR_IKANS_H__ */
57 |
58 | /* End of vr_ikans.h */
59 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/vrut_ubm.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __VR_UBICOM_H__
29 | #define __VR_UBICOM_H__
30 |
31 | #ifdef PLATFORM_UBM_IPX8
32 |
33 | #include
34 |
35 | #undef RTMP_UTIL_DCACHE_FLUSH
36 | #define RTMP_UTIL_DCACHE_FLUSH(__AddrStart, __Size) \
37 | flush_dcache_range((ULONG)(__AddrStart), \
38 | (ULONG)(((UCHAR *)(__AddrStart)) + __Size - 1))
39 |
40 | #endif /* PLATFORM_UBM_IPX8 */
41 |
42 | #endif /* __VR_UBICOM_H__ */
43 |
44 | /* End of vrut_ubm.h */
45 |
46 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/wfd.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __WFD_H__
29 | #define __WFD_H__
30 |
31 | #endif /* __WFD_H__ */
32 |
33 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/include/wfd_cmm.h:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifndef __WFD_CMM_H__
29 | #define __WFD_CMM_H__
30 |
31 | #endif /* __WFD_H__ */
32 |
33 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/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 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/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 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/os/linux/Makefile.4.util:
--------------------------------------------------------------------------------
1 | include $(RT28xx_DIR)/os/linux/config.mk
2 |
3 |
4 | #ifdef CONFIG_STA_SUPPORT
5 | ifeq ($(RT28xx_MODE), STA)
6 | MOD_NAME = rtutil$(MODULE)sta
7 | endif
8 | #endif // CONFIG_STA_SUPPORT //
9 |
10 |
11 | OBJ := $(MOD_NAME).o
12 |
13 |
14 |
15 | #ifdef CONFIG_STA_SUPPORT
16 |
17 | RT28XX_STA_OBJ := \
18 | ../../common/rt_os_util.o\
19 | ../../os/linux/rt_linux_symb.o\
20 | ../../os/linux/rt_rbus_pci_util.o\
21 | ../../os/linux/rt_usb_util.o\
22 | ../../os/linux/rt_linux.o
23 | #endif // CONFIG_STA_SUPPORT //
24 |
25 |
26 |
27 | PHONY := all clean
28 |
29 | all:$(OBJ)
30 |
31 | rtutil$(MODULE)sta.o: $(RT28XX_STA_OBJ)
32 | $(LD) -r $^ -o $@
33 |
34 | rtutil$(MODULE)ap.o: $(RT28XX_AP_OBJ)
35 | $(LD) -r $^ -o $@
36 |
37 | rtutil$(MODULE)apsta.o: $(RT28XX_APSTA_OBJ)
38 | $(LD) -r $^ -o $@
39 |
40 | clean:
41 | rm -f $(RT28xx_DIR)/common/*.o
42 | rm -f $(RT28xx_DIR)/common/.*.{cmd,flags,d}
43 | rm -f $(RT28xx_DIR)/os/linux/*.{o,ko,mod.{o,c}}
44 | rm -f $(RT28xx_DIR)/os/linux/.*.{cmd,flags,d}
45 | rm -fr $(RT28xx_DIR)/os/linux/.tmp_versions
46 | rm -f $(RT28xx_DIR)/chips/*.o
47 | rm -f $(RT28xx_DIR)/chips/.*.{cmd,flags,d}
48 | ifeq ($(RT28xx_MODE),AP)
49 | rm -f $(RT28xx_DIR)/ap/*.o
50 | rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d}
51 | else
52 | ifeq ($(RT28xx_MODE),STA)
53 | rm -f $(RT28xx_DIR)/sta/*.o
54 | rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
55 | else
56 | ifeq ($(RT28xx_MODE),APSTA)
57 | rm -f $(RT28xx_DIR)/ap/*.o
58 | rm -f $(RT28xx_DIR)/ap/.*.{cmd,flags,d}
59 | rm -f $(RT28xx_DIR)/sta/*.o
60 | rm -f $(RT28xx_DIR)/sta/.*.{cmd,flags,d}
61 | endif
62 | endif
63 | endif
64 |
65 | install:
66 | install -d $(LINUX_SRC_MODULE)
67 | install -m 644 -c $(addsuffix .o,$(MOD_NAME)) $(LINUX_SRC_MODULE)
68 | /sbin/depmod -a ${shell uname -r}
69 |
70 | uninstall:
71 | rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .o,$(MOD_NAME)))
72 | /sbin/depmod -a ${shell uname -r}
73 |
74 | # Declare the contents of the .PHONY variable as phony. We keep that
75 | # # information in a variable so we can use it in if_changed and friends.
76 | .PHONY: $(PHONY)
77 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/os/linux/Makefile.6.util:
--------------------------------------------------------------------------------
1 | include $(RT28xx_DIR)/os/linux/config.mk
2 |
3 |
4 | #ifdef CONFIG_STA_SUPPORT
5 | ifeq ($(RT28xx_MODE), STA)
6 | MOD_NAME = rtutil$(MODULE)sta
7 | endif
8 | #endif // CONFIG_STA_SUPPORT //
9 |
10 |
11 | obj-m := $(MOD_NAME).o
12 |
13 |
14 |
15 | #ifdef CONFIG_STA_SUPPORT
16 | ifeq ($(RT28xx_MODE), STA)
17 | $(MOD_NAME)-objs := \
18 | ../../common/rt_os_util.o\
19 | ../../os/linux/rt_linux_symb.o\
20 | ../../os/linux/rt_rbus_pci_util.o\
21 | ../../os/linux/rt_usb_util.o\
22 | ../../os/linux/rt_linux.o
23 | endif
24 | #endif // CONFIG_STA_SUPPORT //
25 |
26 |
27 |
28 | clean:
29 | rm -f ../../common/*.o
30 | rm -f ../../common/.*.{cmd,flags,d}
31 | rm -f ../../os/linux/*.{o,ko,mod.{o,c}}
32 | rm -f ../../os/linux/.*.{cmd,flags,d}
33 | rm -fr ../../os/linux/.tmp_versions
34 | rm -f ../../os/linux/Module.symvers
35 | rm -f ../../os/linux/Modules.symvers
36 | rm -f ../../os/linux/Module.markers
37 | rm -f ../../os/linux/modules.order
38 | rm -f ../../chips/*.o
39 | rm -f ../../chips/.*.{cmd,flags,d}
40 | ifeq ($(RT28xx_MODE),AP)
41 | rm -f ../../ap/*.o
42 | rm -f ../../ap/.*.{cmd,flags,d}
43 | else
44 | ifeq ($(RT28xx_MODE),STA)
45 | rm -f ../../sta/*.o
46 | rm -f ../../sta/.*.{cmd,flags,d}
47 | endif
48 | endif
49 |
50 | install:
51 | install -d $(LINUX_SRC_MODULE)
52 | install -m 644 -c $(addsuffix .ko,$(MOD_NAME)) $(LINUX_SRC_MODULE)
53 | /sbin/depmod -a ${shell uname -r}
54 |
55 | uninstall:
56 | rm -rf $(addprefix $(LINUX_SRC_MODULE),$(addsuffix .ko,$(MOD_NAME)))
57 | /sbin/depmod -a ${shell uname -r}
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/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/.*.{cmd,flags,d}
8 | rm -f ../../os/linux/*.{o,ko,mod.{o,c}}
9 | rm -f ../../os/linux/.*.{cmd,flags,d}
10 | rm -fr ../../os/linux/.tmp_versions
11 | #Must clean Module.symvers; or you will suffer symbol version not match
12 | #when OS_ABL = YES.
13 | rm -f ../../os/linux/Module.symvers
14 | rm -f ../../os/linux/Modules.symvers
15 | rm -f ../../os/linux/Module.markers
16 | rm -f ../../os/linux/modules.order
17 | rm -f ../../chips/*.o
18 | rm -f ../../chips/.*.{cmd,flags,d}
19 | rm -f ../../rate_ctrl/*.o
20 | rm -f ../../rate_ctrl/.*.{cmd,flags,d}
21 | rm -f ../../ate/common/*.o
22 | rm -f ../../ate/common/.*.{cmd,flags,d}
23 | rm -f ../../ate/chips/*.o
24 | rm -f ../../ate/chips/.*.{cmd,flags,d}
25 | ifeq ($(RT28xx_MODE),AP)
26 | rm -f ../../ap/*.o
27 | rm -f ../../ap/.*.{cmd,flags,d}
28 | else
29 | ifeq ($(RT28xx_MODE),STA)
30 | rm -f ../../sta/*.o
31 | rm -f ../../sta/.*.{cmd,flags,d}
32 | ifeq ($(HAS_P2P_SUPPORT),y)
33 | rm -f ../../ap/*.o
34 | rm -f ../../ap/.*.{cmd,flags,d}
35 | endif
36 | else
37 | ifeq ($(RT28xx_MODE),APSTA)
38 | rm -f ../../ap/*.o
39 | rm -f ../../ap/.*.{cmd,flags,d}
40 | rm -f ../../sta/*.o
41 | rm -f ../../sta/.*.{cmd,flags,d}
42 | endif
43 | endif
44 | endif
45 |
46 | # Declare the contents of the .PHONY variable as phony. We keep that
47 | # information in a variable so we can use it in if_changed and friends.
48 | .PHONY: $(PHONY)
49 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/os/linux/Makefile.libautoprovision.6:
--------------------------------------------------------------------------------
1 | include $(RT28xx_DIR)/os/linux/config.mk
2 |
3 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/os/linux/inf_ppa.c:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifdef INF_PPA_SUPPORT
29 |
30 | #include "rt_config.h"
31 | #include
32 | #include
33 |
34 | extern INT rt28xx_send_packets(
35 | IN struct sk_buff *skb_p,
36 | IN struct net_device *net_dev);
37 |
38 | int ifx_ra_start_xmit(
39 | struct net_device *rx_dev,
40 | struct net_device *tx_dev,
41 | struct sk_buff *skb, int len)
42 | {
43 | if(tx_dev != NULL)
44 | {
45 | SET_OS_PKT_NETDEV(skb, tx_dev);
46 | rt28xx_send_packets(skb, tx_dev);
47 | }
48 | else if(rx_dev != NULL)
49 | {
50 | skb->protocol = eth_type_trans(skb, skb->dev);
51 | netif_rx(skb);
52 | }
53 | else
54 | {
55 | dev_kfree_skb_any(skb);
56 | }
57 | return 0;
58 | }
59 | #endif /* INF_PPA_SUPPORT */
60 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/os/linux/rt_rbus_pci_drv.c:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/os/linux/rt_symb.c:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #ifdef OS_ABL_SUPPORT
29 |
30 | #include
31 | #include "rt_config.h"
32 |
33 | EXPORT_SYMBOL(RTMP_DRV_OPS_FUNCTION);
34 |
35 | #ifdef RESOURCE_BOOT_ALLOC
36 | EXPORT_SYMBOL(rtusb_tx_buf_len);
37 | EXPORT_SYMBOL(rtusb_rx_buf_len);
38 | EXPORT_SYMBOL(rtusb_tx_buf_cnt);
39 | EXPORT_SYMBOL(rtusb_rx_buf_cnt);
40 | #endif /* RESOURCE_BOOT_ALLOC */
41 | #endif /* OS_ABL_SUPPORT */
42 |
43 | /* End of rt_symb.c */
44 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/os/linux/vr_bdlt.c:
--------------------------------------------------------------------------------
1 | /*
2 | *************************************************************************
3 | * Ralink Tech Inc.
4 | * 5F., No.36, Taiyuan St., Jhubei City,
5 | * Hsinchu County 302,
6 | * Taiwan, R.O.C.
7 | *
8 | * (c) Copyright 2002-2010, Ralink Technology, Inc.
9 | *
10 | * This program is free software; you can redistribute it and/or modify *
11 | * it under the terms of the GNU General Public License as published by *
12 | * the Free Software Foundation; either version 2 of the License, or *
13 | * (at your option) any later version. *
14 | * *
15 | * This program is distributed in the hope that it will be useful, *
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 | * GNU General Public License for more details. *
19 | * *
20 | * You should have received a copy of the GNU General Public License *
21 | * along with this program; if not, write to the *
22 | * Free Software Foundation, Inc., *
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 | * *
25 | *************************************************************************/
26 |
27 |
28 | #define RTMP_MODULE_OS
29 | #define RTMP_MODULE_OS_UTIL
30 |
31 | #define MODULE_BDLT
32 |
33 | /*#include "rt_config.h" */
34 | #include "rtmp_comm.h"
35 | #include "rt_os_util.h"
36 | #include "rtmp_osabl.h"
37 |
38 |
39 | #if defined(PLATFORM_BL2348) || defined(PLATFORM_BL23570)
40 |
41 | /* global variables */
42 | int (*pToUpperLayerPktSent)(struct sk_buff *pSkb) = netif_rx ;
43 |
44 |
45 |
46 |
47 | /*
48 | ========================================================================
49 | Routine Description:
50 | Assign the briding function.
51 |
52 | Arguments:
53 | xi_destination_ptr - bridging function
54 |
55 | Return Value:
56 | None
57 |
58 | Note:
59 | The function name must be replace_upper_layer_packet_destination.
60 | ========================================================================
61 | */
62 | VOID replace_upper_layer_packet_destination(VOID *pXiDestination)
63 | {
64 | DBGPRINT(RT_DEBUG_TRACE, ("ralink broad light> replace_upper_layer_packet_destination\n"));
65 | pToUpperLayerPktSent = pXiDestination ;
66 | } /* End of replace_upper_layer_packet_destination */
67 |
68 |
69 | EXPORT_SYMBOL(pToUpperLayerPktSent);
70 | EXPORT_SYMBOL(replace_upper_layer_packet_destination);
71 |
72 | #endif /* PLATFORM_BL2348 */
73 |
74 |
75 | /* End of vr_bdlt.c */
76 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/sta/assoc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/sta/assoc.c
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/sta_ate_iwpriv_usage.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/sta_ate_iwpriv_usage.txt
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/tools/Makefile:
--------------------------------------------------------------------------------
1 | all:
2 | gcc -g bin2h.c -o bin2h
3 | clean:
4 | rm -f *.o bin2h
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/tools/bin2h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_highly_optimize/tools/bin2h
--------------------------------------------------------------------------------
/Ralink-WIFI/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/Ralink-WIFI/readme.txt
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/atomic.c:
--------------------------------------------------------------------------------
1 | #include "os.h"
2 | #include "atomic.h"
3 |
4 |
5 | int atomic_sub_return(int i, atomic_t *v)
6 | {
7 | int ret;
8 | CPU_SR cpu_sr;
9 |
10 | CPU_CRITICAL_ENTER();
11 | ret = v->counter -= i;
12 | CPU_CRITICAL_EXIT();
13 |
14 | return ret;
15 | }
16 |
17 | int atomic_add_return(int i, atomic_t *v)
18 | {
19 | int ret;
20 | CPU_SR cpu_sr;
21 |
22 | CPU_CRITICAL_ENTER();
23 | ret = v->counter += i;
24 | CPU_CRITICAL_EXIT();
25 |
26 | return ret;
27 | }
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/atomic.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _ATOMIC_H
3 | #define _ATOMIC_H
4 |
5 |
6 | typedef struct {
7 | volatile int counter;
8 | } atomic_t;
9 |
10 |
11 | #define atomic_read(v) ((v)->counter)
12 | #define atomic_set(v, i) (((v)->counter) = (i))
13 |
14 | #define atomic_inc(v) (atomic_add_return(1, (v)))
15 | #define atomic_dec(v) (atomic_sub_return(1, (v)))
16 |
17 | #define atomic_add(i, v) (atomic_add_return(i, (v)))
18 | #define atomic_sub(i, v) (atomic_sub_return(i, (v)))
19 |
20 | #define atomic_inc_return(v) (atomic_add_return(1, (v)))
21 | #define atomic_dec_return(v) (atomic_sub_return(1, (v)))
22 |
23 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0)
24 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
25 |
26 |
27 | int atomic_sub_return(int i, atomic_t *v);
28 | int atomic_add_return(int i, atomic_t *v);
29 |
30 |
31 |
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/complete.c:
--------------------------------------------------------------------------------
1 | #include "os.h"
2 | #include "sem.h"
3 | #include "complete.h"
4 | #include "kthread.h"
5 |
6 |
7 |
8 | void init_completion(struct completion *x)
9 | {
10 | sema_init(&x->sem, 0);
11 | // x->done = 0;
12 | // init_waitqueue_head(&x->wait);
13 | }
14 |
15 |
16 |
17 |
18 | void complete(struct completion *x)
19 | {
20 | up(&x->sem);
21 | }
22 |
23 | void complete_and_exit(struct completion *comp, long code)
24 | {
25 | OS_ERR err;
26 | OSSchedLock(&err);
27 | if (comp)
28 | complete(comp);
29 |
30 | kthread_exit(code);
31 | OSSchedUnlock(&err);
32 | }
33 |
34 |
35 | void wait_for_completion(struct completion *x)
36 | {
37 | down(&x->sem);
38 | }
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/complete.h:
--------------------------------------------------------------------------------
1 | #ifndef _COMPLETE_H
2 | #define _COMPLETE_H
3 |
4 |
5 |
6 |
7 |
8 | struct completion {
9 | struct semaphore sem;
10 | // unsigned int done;
11 | // wait_queue_head_t wait;
12 | };
13 |
14 |
15 |
16 |
17 | void complete(struct completion *x);
18 | void wait_for_completion(struct completion *x);
19 | void init_completion(struct completion *x);
20 | void complete_and_exit(struct completion *comp, long code);
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | #endif
32 |
33 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/err.h:
--------------------------------------------------------------------------------
1 | #ifndef _LINUX_ERR_H
2 | #define _LINUX_ERR_H
3 |
4 |
5 |
6 | #include "errno.h"
7 |
8 | /*
9 | * Kernel pointers have redundant information, so we can use a
10 | * scheme where we can return either an error code or a dentry
11 | * pointer with the same return value.
12 | *
13 | * This should be a per-architecture thing, to allow different
14 | * error and pointer decisions.
15 | */
16 | #define MAX_ERRNO 4095
17 |
18 |
19 |
20 | #define IS_ERR_VALUE(x) ((x) >= (unsigned long)-MAX_ERRNO)
21 |
22 | static inline void *ERR_PTR(long error)
23 | {
24 | return (void *) error;
25 | }
26 |
27 | static inline long PTR_ERR(const void *ptr)
28 | {
29 | return (long) ptr;
30 | }
31 |
32 | static inline long IS_ERR(const void *ptr)
33 | {
34 | return IS_ERR_VALUE((unsigned long)ptr);
35 | }
36 |
37 | /**
38 | * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
39 | * @ptr: The pointer to cast.
40 | *
41 | * Explicitly cast an error-valued pointer to another pointer type in such a
42 | * way as to make it clear that's what's going on.
43 | */
44 | static inline void *ERR_CAST(const void *ptr)
45 | {
46 | /* cast away the const */
47 | return (void *) ptr;
48 | }
49 |
50 |
51 |
52 | #endif /* _LINUX_ERR_H */
53 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/errno-base.h:
--------------------------------------------------------------------------------
1 | #ifndef _ASM_GENERIC_ERRNO_BASE_H
2 | #define _ASM_GENERIC_ERRNO_BASE_H
3 |
4 | #define EPERM 1 /* Operation not permitted */
5 | #define ENOENT 2 /* No such file or directory */
6 | #define ESRCH 3 /* No such process */
7 | #define EINTR 4 /* Interrupted system call */
8 | #define EIO 5 /* I/O error */
9 | #define ENXIO 6 /* No such device or address */
10 | #define E2BIG 7 /* Argument list too long */
11 | #define ENOEXEC 8 /* Exec format error */
12 | #define EBADF 9 /* Bad file number */
13 | #define ECHILD 10 /* No child processes */
14 | #define EAGAIN 11 /* Try again */
15 | #define ENOMEM 12 /* Out of memory */
16 | #define EACCES 13 /* Permission denied */
17 | #define EFAULT 14 /* Bad address */
18 | #define ENOTBLK 15 /* Block device required */
19 | #define EBUSY 16 /* Device or resource busy */
20 | #define EEXIST 17 /* File exists */
21 | #define EXDEV 18 /* Cross-device link */
22 | #define ENODEV 19 /* No such device */
23 | #define ENOTDIR 20 /* Not a directory */
24 | #define EISDIR 21 /* Is a directory */
25 | #define EINVAL 22 /* Invalid argument */
26 | #define ENFILE 23 /* File table overflow */
27 | #define EMFILE 24 /* Too many open files */
28 | #define ENOTTY 25 /* Not a typewriter */
29 | #define ETXTBSY 26 /* Text file busy */
30 | #define EFBIG 27 /* File too large */
31 | #define ENOSPC 28 /* No space left on device */
32 | #define ESPIPE 29 /* Illegal seek */
33 | #define EROFS 30 /* Read-only file system */
34 | #define EMLINK 31 /* Too many links */
35 | #define EPIPE 32 /* Broken pipe */
36 | #define EDOM 33 /* Math argument out of domain of func */
37 | #define ERANGE 34 /* Math result not representable */
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/fs_cvt.h:
--------------------------------------------------------------------------------
1 | #ifndef _FS_CVT_H
2 | #define _FS_CVT_H
3 |
4 | //#define USE_FATFS
5 |
6 | #ifdef USE_FATFS
7 |
8 |
9 |
10 | #define O_RDONLY FA_READ
11 | #define O_WRONLY FA_WRITE
12 | #define O_RDWR FA_READ|FA_WRITE
13 | #define O_CREAT FA_OPEN_ALWAYS
14 | #define O_TRUNC FA_CREATE_ALWAYS
15 |
16 |
17 |
18 |
19 |
20 | #else
21 |
22 | #define O_RDONLY 0x01
23 | #define O_WRONLY 0x02
24 | #define O_RDWR 0x04
25 | #define O_CREAT 0x08
26 | #define O_TRUNC 0x10
27 |
28 | //#define FIL void
29 |
30 |
31 |
32 |
33 | #endif //USE_FATFS
34 |
35 |
36 |
37 |
38 | typedef unsigned int mm_segment_t;
39 | typedef unsigned int loff_t;
40 | struct file;
41 | struct file_operations {
42 | int (*read) (struct file *, char *, unsigned int, loff_t *);
43 | int (*write) (struct file *, char *, unsigned int, loff_t *);
44 | };
45 |
46 |
47 | struct file
48 | {
49 | #ifdef USE_FATFS
50 | FIL fil;
51 | #endif
52 | struct file_operations op;
53 | struct file_operations *f_op;
54 | loff_t f_pos;
55 | };
56 | int filp_write(struct file *file, char *buff, unsigned int size, loff_t *loff);
57 | int filp_read(struct file *file, char *buff, unsigned int size, loff_t *loff);
58 | struct file *filp_open(const char *filename, int flags, int mode);
59 | int filp_close(struct file *filp, int id);
60 | int filp_seek(struct file *filp,unsigned int offset);
61 |
62 | #define KERNEL_DS ((mm_segment_t) { 0UL })
63 | #define USER_DS ((mm_segment_t) { -0x40000000000UL })
64 |
65 |
66 | #define get_fs() (current->addr_limit)
67 | #define get_ds() (KERNEL_DS)
68 | #define set_fs(x) (current->addr_limit = (x))
69 |
70 |
71 |
72 |
73 | #endif
74 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/irq.h:
--------------------------------------------------------------------------------
1 | #ifndef _IRQ_H
2 | #define _IRQ_H
3 |
4 |
5 |
6 |
7 | #define in_interrupt() (OSIntNestingCtr)
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/kref.c:
--------------------------------------------------------------------------------
1 | /*
2 | * kref.c - library routines for handling generic reference counted objects
3 | *
4 | * Copyright (C) 2004 Greg Kroah-Hartman
5 | * Copyright (C) 2004 IBM Corp.
6 | *
7 | * based on lib/kobject.c which was:
8 | * Copyright (C) 2002-2003 Patrick Mochel
9 | *
10 | * This file is released under the GPLv2.
11 | *
12 | */
13 |
14 | #include "kref.h"
15 | #include "misc_cvt.h"
16 |
17 | /**
18 | * kref_set - initialize object and set refcount to requested number.
19 | * @kref: object in question.
20 | * @num: initial reference counter
21 | */
22 | void kref_set(struct kref *kref, int num)
23 | {
24 | atomic_set(&kref->refcount, num);
25 | // smp_mb();
26 | }
27 |
28 | /**
29 | * kref_init - initialize object.
30 | * @kref: object in question.
31 | */
32 | void kref_init(struct kref *kref)
33 | {
34 | kref_set(kref, 1);
35 | }
36 |
37 | /**
38 | * kref_get - increment refcount for object.
39 | * @kref: object.
40 | */
41 | void kref_get(struct kref *kref)
42 | {
43 | WARN_ON(!atomic_read(&kref->refcount));
44 | atomic_inc(&kref->refcount);
45 | // smp_mb__after_atomic_inc();
46 | }
47 |
48 | /**
49 | * kref_put - decrement refcount for object.
50 | * @kref: object.
51 | * @release: pointer to the function that will clean up the object when the
52 | * last reference to the object is released.
53 | * This pointer is required, and it is not acceptable to pass kfree
54 | * in as this function.
55 | *
56 | * Decrement the refcount, and if 0, call release().
57 | * Return 1 if the object was removed, otherwise return 0. Beware, if this
58 | * function returns 0, you still can not count on the kref from remaining in
59 | * memory. Only use the return value if you want to see if the kref is now
60 | * gone, not present.
61 | */
62 | int kref_put(struct kref *kref, void (*release)(struct kref *kref))
63 | {
64 | WARN_ON(release == NULL);
65 | // WARN_ON(release == (void (*)(struct kref *))kfree);
66 |
67 | if (atomic_dec_and_test(&kref->refcount)) {
68 | release(kref);
69 | return 1;
70 | }
71 | return 0;
72 | }
73 |
74 |
75 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/kref.h:
--------------------------------------------------------------------------------
1 | /*
2 | * kref.c - library routines for handling generic reference counted objects
3 | *
4 | * Copyright (C) 2004 Greg Kroah-Hartman
5 | * Copyright (C) 2004 IBM Corp.
6 | *
7 | * based on kobject.h which was:
8 | * Copyright (C) 2002-2003 Patrick Mochel
9 | * Copyright (C) 2002-2003 Open Source Development Labs
10 | *
11 | * This file is released under the GPLv2.
12 | *
13 | */
14 |
15 | #ifndef _KREF_H_
16 | #define _KREF_H_
17 |
18 |
19 | #include "atomic.h"
20 |
21 | struct kref {
22 | atomic_t refcount;
23 | };
24 |
25 | void kref_set(struct kref *kref, int num);
26 | void kref_init(struct kref *kref);
27 | void kref_get(struct kref *kref);
28 | int kref_put(struct kref *kref, void (*release) (struct kref *kref));
29 |
30 | #endif /* _KREF_H_ */
31 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/misc_cvt.c:
--------------------------------------------------------------------------------
1 | #include "string.h"
2 |
3 |
4 |
5 | // /**
6 | // * strpbrk - Find the first occurrence of a set of characters
7 | // * @cs: The string to be searched
8 | // * @ct: The characters to search for
9 | // */
10 | // char *strpbrk(const char *cs, const char *ct)
11 | // {
12 | // const char *sc1, *sc2;
13 |
14 | // for (sc1 = cs; *sc1 != '\0'; ++sc1) {
15 | // for (sc2 = ct; *sc2 != '\0'; ++sc2) {
16 | // if (*sc1 == *sc2)
17 | // return (char *)sc1;
18 | // }
19 | // }
20 | // return NULL;
21 | // }
22 |
23 | /**
24 | * strsep - Split a string into tokens
25 | * @s: The string to be searched
26 | * @ct: The characters to search for
27 | *
28 | * strsep() updates @s to point after the token, ready for the next call.
29 | *
30 | * It returns empty tokens, too, behaving exactly like the libc function
31 | * of that name. In fact, it was stolen from glibc2 and de-fancy-fied.
32 | * Same semantics, slimmer shape. ;)
33 | */
34 | char *strsep(char **s, const char *ct)
35 | {
36 | char *sbegin = *s;
37 | char *end;
38 |
39 | if (sbegin == NULL)
40 | return NULL;
41 |
42 | end = strpbrk(sbegin, ct);
43 | if (end)
44 | *end++ = '\0';
45 | *s = end;
46 | return sbegin;
47 | }
48 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/mutex.c:
--------------------------------------------------------------------------------
1 | #include "os.h"
2 | #include "stdio.h"
3 | #include "mutex.h"
4 |
5 |
6 |
7 |
8 |
9 |
10 | void _mutex_init(char *name, struct mutex *mutex)
11 | {
12 | OS_ERR err;
13 | CPU_SR cpu_sr;
14 |
15 | #if OS_CFG_DBG_EN > 0u
16 | //The procedure _mutex_init()-->OSMutexCreate()-->OS_MutexDbgListAdd() is dangerous,
17 | //because some linux driver don't call mutex_destroy(), the mutex instance will
18 | //still exsit in OSMutexDbgListPtr after freed. Alway set OSMutexDbgListPtr to zero.
19 | CPU_CRITICAL_ENTER();
20 | OSMutexDbgListPtr = NULL;
21 | CPU_CRITICAL_EXIT();
22 | #endif
23 | OSMutexCreate(&mutex->mutex, name, &err);
24 |
25 | if(err != OS_ERR_NONE)
26 | {
27 | printf("_mutex_init failed:%d hang!!\r\n",err);
28 | while(1);
29 | }
30 | }
31 |
32 | void mutex_destroy(struct mutex *mutex)
33 | {
34 | OS_ERR err;
35 |
36 | OSMutexDel (&mutex->mutex, OS_OPT_DEL_ALWAYS, &err);
37 |
38 | if(err != OS_ERR_NONE)
39 | {
40 | printf("mutex_destroy failed:%d hang!!\r\n",err);
41 | while(1);
42 | }
43 | }
44 |
45 | void mutex_lock(struct mutex *lock)
46 | {
47 | OS_ERR err;
48 |
49 | OSMutexPend(&lock->mutex, 0, OS_OPT_PEND_BLOCKING, NULL, &err);
50 | if(err != OS_ERR_NONE)
51 | {
52 | printf("mutex_lock failed:%d hang!!\r\n",err);
53 | while(1);
54 | }
55 | }
56 |
57 | void mutex_unlock(struct mutex *lock)
58 | {
59 | OS_ERR err;
60 |
61 | OSMutexPost(&lock->mutex, OS_OPT_POST_NONE, &err);
62 | if(err != OS_ERR_NONE)
63 | {
64 | printf("mutex_unlock failed:%d hang!!\r\n",err);
65 | while(1);
66 | }
67 | }
68 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/mutex.h:
--------------------------------------------------------------------------------
1 | #ifndef _MUTEX_H
2 | #define _MUTEX_H
3 |
4 |
5 |
6 |
7 |
8 |
9 | struct mutex {
10 | OS_MUTEX mutex;
11 | };
12 |
13 |
14 |
15 |
16 | void _mutex_init(char *name, struct mutex *mutex);
17 | #define mutex_init(mutex) _mutex_init(#mutex, mutex)
18 |
19 |
20 | void mutex_lock(struct mutex *lock);
21 | void mutex_unlock(struct mutex *lock);
22 |
23 |
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/sem.h:
--------------------------------------------------------------------------------
1 | #ifndef _SEM_H
2 | #define _SEM_H
3 |
4 |
5 |
6 |
7 | struct semaphore {
8 | OS_SEM p_os_sem;
9 | };
10 |
11 |
12 | #define DECLARE_MUTEX(name) \
13 | struct semaphore name
14 |
15 |
16 | void _sema_init(char *name, struct semaphore *sem, int val);
17 | int _down_interruptible(struct semaphore *sem);
18 | void _up(struct semaphore *sem);
19 | void _sema_destroy(struct semaphore *sem);
20 | int down_trylock(struct semaphore *sem);
21 | void down(struct semaphore *sem);
22 |
23 |
24 | #define init_MUTEX(sem) sema_init(sem, 1)
25 | #define init_MUTEX_LOCKED(sem) sema_init(sem, 0)
26 |
27 |
28 | #define sema_init(sem,val) _sema_init(#sem, sem, val)
29 | #define down_interruptible _down_interruptible
30 | #define up _up
31 | #define sema_destroy _sema_destroy
32 |
33 |
34 | #define rcu_read_lock()
35 | #define rcu_read_unlock()
36 |
37 | #define rtnl_lock()
38 | #define rtnl_unlock()
39 |
40 |
41 |
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/spinlock.c:
--------------------------------------------------------------------------------
1 | #include "os.h"
2 | #include "spinlock.h"
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/spinlock.h:
--------------------------------------------------------------------------------
1 | #ifndef _SPINLOCK_H
2 | #define _SPINLOCK_H
3 |
4 | #include "usbh_debug.h"
5 | #include "cpu_cfg.h"
6 |
7 |
8 | #ifdef CPU_CFG_INT_DIS_MEAS_EN
9 | #define CPU_CRITICAL_ENTER_EX(irqflags) do { irqflags = CPU_SR_Save(); \
10 | CPU_IntDisMeasStart(); } while (0)
11 | /* Stop & measure interrupts disabled time, */
12 | /* ... & re-enable interrupts. */
13 | #define CPU_CRITICAL_EXIT_EX(irqflags) do { CPU_IntDisMeasStop(); \
14 | CPU_SR_Restore(irqflags); } while (0)
15 | #else
16 | #define CPU_CRITICAL_ENTER_EX(irqflags) do { irqflags = CPU_SR_Save(); } while (0) /* Disable interrupts. */
17 | #define CPU_CRITICAL_EXIT_EX(irqflags) do { CPU_SR_Restore(irqflags); } while (0) /* Re-enable interrupts. */
18 | #endif
19 |
20 |
21 |
22 | typedef int spinlock_t;
23 |
24 |
25 | #define SPIN_LOCK_UNLOCKED 0
26 | #define SPIN_LOCK_LOCKED 1
27 |
28 | #define spin_lock_init(lock) \
29 | do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)
30 |
31 |
32 | #define spin_lock_bh spin_lock
33 | #define spin_unlock_bh spin_unlock
34 |
35 | #define spin_lock(lock)\
36 | do{\
37 | OS_ERR err;\
38 | OSSchedLock(&err);\
39 | if(err != OS_ERR_NONE) USBH_DBG("spin_lock OSSchedLock Failed %d\r\n",err);\
40 | if(*(lock) == SPIN_LOCK_LOCKED) USBH_DBG("spin_lock Failed spinlock has been locked\r\n");\
41 | *(lock) = SPIN_LOCK_LOCKED;\
42 | }while(0)
43 |
44 |
45 | #define spin_unlock(lock)\
46 | do {\
47 | OS_ERR err;\
48 | if(*(lock) == SPIN_LOCK_UNLOCKED) USBH_DBG("spin_unlock Failed spinlock has been unlocked\r\n");\
49 | *(lock) = SPIN_LOCK_UNLOCKED;\
50 | OSSchedUnlock(&err);\
51 | if((err != OS_ERR_NONE) && (err != OS_ERR_SCHED_LOCKED)) USBH_DBG("spin_unlock OSSchedUnlock Failed %d\r\n",err);\
52 | } while (0)
53 |
54 |
55 | //do OSSchedLock(), prevent call ucos post func may lead to sched fail
56 | #define spin_lock_irqsave(lock, irqflags)\
57 | do {\
58 | OS_ERR err;\
59 | CPU_CRITICAL_ENTER_EX(irqflags);\
60 | OSSchedLock(&err);\
61 | if(err != OS_ERR_NONE) USBH_DBG("spin_lock_irqsave OSSchedLock Failed %d\r\n",err);\
62 | if(*(lock) == SPIN_LOCK_LOCKED) USBH_DBG("spin_lock_irqsave Failed spinlock has been locked\r\n");\
63 | *(lock) = SPIN_LOCK_LOCKED;\
64 | } while (0)
65 |
66 |
67 |
68 |
69 |
70 | #define spin_unlock_irqrestore(lock,irqflags)\
71 | do {\
72 | OS_ERR err;\
73 | if(*(lock) == SPIN_LOCK_UNLOCKED) USBH_DBG("spin_unlock_irqrestore Failed spinlock has been unlocked\r\n");\
74 | *(lock) = SPIN_LOCK_UNLOCKED;\
75 | OSSchedUnlock(&err);\
76 | if((err != OS_ERR_NONE) && (err != OS_ERR_SCHED_LOCKED)) USBH_DBG("spin_unlock_irqrestore OSSchedUnlock Failed %d\r\n",err);\
77 | CPU_CRITICAL_EXIT_EX(irqflags);\
78 | } while (0)
79 |
80 |
81 |
82 |
83 | #endif
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/tasklet.h:
--------------------------------------------------------------------------------
1 | #ifndef _TASKLET_H
2 | #define _TASKLET_H
3 |
4 | #include "atomic.h"
5 |
6 |
7 |
8 | struct tasklet_struct
9 | {
10 | // struct tasklet_struct *next;
11 | unsigned long state;
12 | atomic_t count;
13 | void (*func)(unsigned long);
14 | unsigned long data;
15 | };
16 |
17 | #define tasklet_hi_schedule tasklet_schedule
18 |
19 | void tasklet_schedule(struct tasklet_struct *t);
20 |
21 | void tasklet_init(struct tasklet_struct *t,
22 | void (*func)(unsigned long), unsigned long data);
23 |
24 |
25 | void flush_scheduled_work(void);
26 |
27 | void tasklet_task_init(void);
28 |
29 |
30 |
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/timer.h:
--------------------------------------------------------------------------------
1 | #ifndef _TIMER_H
2 | #define _TIMER_H
3 |
4 | #include "os_cfg_app.h"
5 | #include "stdint.h"
6 | #include "delay.h"
7 |
8 |
9 | #define jiffies OSTickCtr
10 |
11 | #define HZ OS_CFG_TICK_RATE_HZ
12 |
13 | #define udelay delay_us
14 | #define mdelay delay_ms
15 |
16 | struct timer_list {
17 | OS_TMR tmr;
18 | char *name;
19 | unsigned long expires;
20 |
21 | void (*function)(unsigned long);
22 | unsigned long data;
23 | };
24 |
25 | //#define init_timer(timer) _init_timer(#)
26 |
27 | //#define mod_timer(timer, expires) _mod_timer(#timer, timer, expires)
28 |
29 | #define del_timer_sync(t) del_timer(t)
30 | int mod_timer(struct timer_list *timer, unsigned long expires);
31 |
32 | void init_timer(struct timer_list *timer);
33 |
34 | void add_timer(struct timer_list *timer);
35 | int timer_pending(struct timer_list * timer);
36 |
37 | int del_timer(struct timer_list *timer);
38 |
39 | void msleep(unsigned int msecs);
40 |
41 |
42 |
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/type.h:
--------------------------------------------------------------------------------
1 | #ifndef _TYPE_H
2 | #define _TYPE_H
3 |
4 |
5 | #include "stdint.h"
6 |
7 |
8 |
9 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
10 |
11 |
12 |
13 | typedef int16_t __s16;
14 | typedef int32_t __s32;
15 | typedef uint32_t __u32;
16 | typedef uint16_t __u16;
17 | typedef uint8_t __u8;
18 | typedef uint32_t u_int32_t;
19 |
20 |
21 | typedef uint32_t u32;
22 | typedef uint16_t u16;
23 | typedef uint8_t u8;
24 |
25 |
26 |
27 |
28 | typedef uint32_t loff_t;
29 | typedef unsigned char u_char;
30 | typedef unsigned short u_short;
31 | typedef unsigned int u_int;
32 | typedef unsigned long u_long;
33 | typedef unsigned short __be16;
34 | typedef uint32_t gfp_t;
35 | typedef uint32_t dma_addr_t;
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/unaligned.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/USB_Host_Linux_Convert/object/unaligned.c
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/object/unaligned.h:
--------------------------------------------------------------------------------
1 | #ifndef _UNALIGNED_H
2 | #define _UNALIGNED_H
3 |
4 | #include "stdint.h"
5 | #define get_unaligned __get_unaligned_le
6 | #define put_unaligned __put_unaligned_le
7 |
8 |
9 |
10 | /*
11 | * Cause a link-time error if we try an unaligned access other than
12 | * 1,2,4 or 8 bytes long
13 | */
14 | extern void __bad_unaligned_access_size(void);
15 |
16 | #define __get_unaligned_le(ptr) ((/*__attribute__(force)*/ typeof(*(ptr)))({ \
17 | __builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \
18 | __builtin_choose_expr(sizeof(*(ptr)) == 2, get_unaligned_le16((ptr)), \
19 | __builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_le32((ptr)), \
20 | __builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_le64((ptr)), \
21 | __bad_unaligned_access_size())))); \
22 | }))
23 |
24 |
25 |
26 | static inline uint16_t __get_unaligned_le16(const uint8_t *p)
27 | {
28 | return p[0] | p[1] << 8;
29 | }
30 |
31 | static inline uint32_t __get_unaligned_le32(const uint8_t *p)
32 | {
33 | return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24;
34 | }
35 |
36 | static inline uint64_t __get_unaligned_le64(const uint8_t *p)
37 | {
38 | return (uint64_t)__get_unaligned_le32(p + 4) << 32 |
39 | __get_unaligned_le32(p);
40 | }
41 |
42 | static inline void __put_unaligned_le16(uint16_t val, uint8_t *p)
43 | {
44 | *p++ = val;
45 | *p++ = val >> 8;
46 | }
47 |
48 | static inline void __put_unaligned_le32(uint32_t val, uint8_t *p)
49 | {
50 | __put_unaligned_le16(val >> 16, p + 2);
51 | __put_unaligned_le16(val, p);
52 | }
53 |
54 | static inline void __put_unaligned_le64(uint64_t val, uint8_t *p)
55 | {
56 | __put_unaligned_le32(val >> 32, p + 4);
57 | __put_unaligned_le32(val, p);
58 | }
59 |
60 | static inline uint16_t get_unaligned_le16(const void *p)
61 | {
62 | return __get_unaligned_le16((const uint8_t *)p);
63 | }
64 |
65 | static inline uint32_t get_unaligned_le32(const void *p)
66 | {
67 | return __get_unaligned_le32((const uint8_t *)p);
68 | }
69 |
70 | static inline uint64_t get_unaligned_le64(const void *p)
71 | {
72 | return __get_unaligned_le64((const uint8_t *)p);
73 | }
74 |
75 | static inline void put_unaligned_le16(uint16_t val, void *p)
76 | {
77 | __put_unaligned_le16(val, p);
78 | }
79 |
80 | static inline void put_unaligned_le32(uint32_t val, void *p)
81 | {
82 | __put_unaligned_le32(val, p);
83 | }
84 |
85 | static inline void put_unaligned_le64(uint64_t val, void *p)
86 | {
87 | __put_unaligned_le64(val, p);
88 | }
89 |
90 |
91 |
92 |
93 |
94 | #endif
95 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/usb_host/usb_bsp.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usb_bsp.h
4 | * @author MCD Application Team
5 | * @version V2.1.0
6 | * @date 19-March-2012
7 | * @brief Specific api's relative to the used hardware platform
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT 2012 STMicroelectronics
12 | *
13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 | * You may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at:
16 | *
17 | * http://www.st.com/software_license_agreement_liberty_v2
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | ******************************************************************************
26 | */
27 |
28 | /* Define to prevent recursive inclusion -------------------------------------*/
29 | #ifndef __USB_BSP__H__
30 | #define __USB_BSP__H__
31 |
32 | /* Includes ------------------------------------------------------------------*/
33 | #include "usb_conf.h"
34 | #include "usbh_def.h"
35 | #include "usb_hcd_int.h"
36 | /** @addtogroup USB_OTG_DRIVER
37 | * @{
38 | */
39 |
40 | /** @defgroup USB_BSP
41 | * @brief This file is the
42 | * @{
43 | */
44 |
45 |
46 | /** @defgroup USB_BSP_Exported_Defines
47 | * @{
48 | */
49 | /**
50 | * @}
51 | */
52 | #define USBH_TASK_PRIO 16u
53 | #define USBH_PROBE_TASK_PRIO 15u
54 |
55 | #define USBH_TASK_STK_SIZE 128u
56 | #define USBH_PROBE_TASK_STK_SIZE 512u
57 |
58 |
59 | /** @defgroup USB_BSP_Exported_Types
60 | * @{
61 | */
62 | /**
63 | * @}
64 | */
65 |
66 |
67 | /** @defgroup USB_BSP_Exported_Macros
68 | * @{
69 | */
70 | /**
71 | * @}
72 | */
73 |
74 | /** @defgroup USB_BSP_Exported_Variables
75 | * @{
76 | */
77 | /**
78 | * @}
79 | */
80 |
81 | /** @defgroup USB_BSP_Exported_FunctionsPrototype
82 | * @{
83 | */
84 |
85 |
86 | void USB_OTG_BSP_Init (int coreID);
87 | void USB_OTG_BSP_uDelay (const uint32_t usec);
88 | void USB_OTG_BSP_mDelay (const uint32_t msec);
89 | void USB_OTG_BSP_EnableInterrupt(void *otg_handle, int coreID);
90 | void USB_OTG_BSP_ConfigVBUS(int coreID);
91 | void USB_OTG_BSP_DriveVBUS(uint8_t state, int coreID);
92 |
93 | /**
94 | * @}
95 | */
96 |
97 | #endif //__USB_BSP__H__
98 |
99 | /**
100 | * @}
101 | */
102 |
103 | /**
104 | * @}
105 | */
106 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
107 |
108 |
--------------------------------------------------------------------------------
/USB_Host_Linux_Convert/usb_host/usbh_debug.h:
--------------------------------------------------------------------------------
1 | #ifndef _USBH_DEBUG_H
2 | #define _USBH_DEBUG_H
3 |
4 |
5 | #include "stdio.h"
6 |
7 |
8 | #define DEBUG
9 |
10 |
11 |
12 |
13 | #define USB_HALT "" /* system is unusable */
14 | #define USB_EMERG "" /* system is unusable */
15 | #define USB_ALERT "" /* action must be taken immediately */
16 | #define USB_CRIT "" /* critical conditions */
17 | #define USB_ERR "" /* error conditions */
18 | #define USB_WARNING "" /* warning conditions */
19 | #define USB_NOTICE "" /* normal but significant condition */
20 | #define USB_INFO "" /* informational */
21 | #define USB_DEBUG "" /* debug-level messages */
22 |
23 |
24 |
25 |
26 | #define usb_printk(level, dev, format, arg...) \
27 | printf(level "%s: " format , \
28 | ((dev) != NULL)?(dev)->name:"" , ## arg)
29 |
30 | #define usb_halt(dev, format, arg...) \
31 | do{usb_printk(USB_HALT , dev , "%s " format , __func__, ## arg);while(1);}while(0)
32 | #define usb_emerg(dev, format, arg...) \
33 | usb_printk(USB_EMERG , dev , "%s "format , __func__, ## arg)
34 | #define usb_alert(dev, format, arg...) \
35 | usb_printk(USB_ALERT , dev , format , ## arg)
36 | #define usb_crit(dev, format, arg...) \
37 | usb_printk(USB_CRIT , dev , format , ## arg)
38 | #define usb_err(dev, format, arg...) \
39 | usb_printk(USB_ERR , dev , format , ## arg)
40 | #define usb_warn(dev, format, arg...) \
41 | usb_printk(USB_WARNING , dev , format , ## arg)
42 | #define usb_notice(dev, format, arg...) \
43 | usb_printk(USB_NOTICE , dev , format , ## arg)
44 | #define usb_info(dev, format, arg...) \
45 | usb_printk(USB_INFO , dev , format , ## arg)
46 |
47 | #if defined(DEBUG)
48 | #define usb_dbg(dev, format, arg...) \
49 | usb_printk(USB_DEBUG , dev , format , ## arg)
50 | #else
51 | #define usb_dbg(dev, format, arg...) \
52 | ({ if (0) usb_printk(USB_DEBUG, dev, format, ##arg); 0; })
53 | #endif
54 |
55 |
56 |
57 | #ifndef USBH_DEBUG_LEVEL
58 | #define USBH_DEBUG_LEVEL USBH_DEBUG_ERROR
59 | #endif
60 |
61 | #define USBH_DEBUG_OFF 0
62 | #define USBH_DEBUG_ERROR 1
63 | #define USBH_DEBUG_TRACE 2
64 |
65 |
66 | #define USBH_TRACE(...) ((USBH_DEBUG_LEVEL >= USBH_DEBUG_TRACE) ? (void)(printf(__VA_ARGS__)) : (void)0)
67 | #define USBH_DBG(...) ((USBH_DEBUG_LEVEL >= USBH_DEBUG_ERROR) ? (void)(printf(__VA_ARGS__)) : (void)0)
68 |
69 |
70 |
71 |
72 | #endif
73 |
--------------------------------------------------------------------------------
/iperf/AUTHORS:
--------------------------------------------------------------------------------
1 | Mark Gates
2 | Alex Warshavsky
3 |
4 | * original authors
5 |
6 | Ajay Tirumala
7 |
8 | * general improvements
9 |
10 | Jim Ferguson
11 |
12 | * Project management
13 |
14 | Jon Dugan
15 |
16 | * Project maintainer and release coordinator
17 | * various patches and autoconf fixes, general maintenance
18 |
19 | Feng Qin
20 | Kevin Gibbs
21 |
22 | * windows porting work
23 |
24 | John Estabrook
25 |
26 | Andrew Gallatin
27 | * threading fix and non Linux performance improvements
28 |
29 | Stephen Hemminger
30 | * Linux congestion control selection and theading improvements
31 |
32 | Nathan Jones
33 | * patch for underflow when value specified in -n is not a multiple of -l
34 |
35 | Gerrit Renker
36 | * replace costly gettimeofday() with nanonsleep()
37 |
38 | Joshua Spence
39 | * porting to WICED platform
40 |
--------------------------------------------------------------------------------
/iperf/compat/Makefile.am:
--------------------------------------------------------------------------------
1 | noinst_LIBRARIES = libcompat.a
2 |
3 | AM_CPPFLAGS = @STRIP_BEGIN@ \
4 | -I$(top_srcdir)/include \
5 | -I$(top_builddir)/include \
6 | @STRIP_END@
7 |
8 | if DEBUG
9 | AM_CFLAGS = -Wall -g -O0 -DDEBUG
10 | AM_CXXFLAGS = -Wall -g -O0 -DDEBUG
11 | else
12 | AM_CFLAGS = -Wall -O3
13 | AM_CXXFLAGS = -Wall -O3
14 | endif
15 |
16 | libcompat_a_SOURCES = \
17 | Thread.c \
18 | error.c \
19 | delay.cpp \
20 | gettimeofday.c \
21 | headers_slim.h \
22 | inet_ntop.c \
23 | inet_pton.c \
24 | signal.c \
25 | snprintf.c \
26 | string.c \
27 | setitimer.c
28 |
29 |
--------------------------------------------------------------------------------
/iperf/doc/Makefile.am:
--------------------------------------------------------------------------------
1 | EXTRA_DIST = index.html ui_license.html dast.gif
2 |
--------------------------------------------------------------------------------
/iperf/doc/dast.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/iperf/doc/dast.gif
--------------------------------------------------------------------------------
/iperf/include/Makefile.am:
--------------------------------------------------------------------------------
1 | EXTRA_DIST = \
2 | Client.hpp \
3 | Condition.h \
4 | Extractor.h \
5 | List.h \
6 | Listener.hpp \
7 | Locale.h \
8 | Makefile.am \
9 | Mutex.h \
10 | PerfSocket.hpp \
11 | Reporter.h \
12 | Server.hpp \
13 | Settings.hpp \
14 | SocketAddr.h \
15 | Thread.h \
16 | Timestamp.hpp \
17 | config.wiced.h \
18 | config.win32.h \
19 | debug.h \
20 | delay.hpp \
21 | gettimeofday.h \
22 | gnu_getopt.h \
23 | headers.h \
24 | inet_aton.h \
25 | report_CSV.h \
26 | report_default.h \
27 | service.h \
28 | setitimer.h \
29 | snprintf.h \
30 | util.h \
31 | version.h
32 | DISTCLEANFILES = $(top_builddir)/include/iperf-int.h
33 |
--------------------------------------------------------------------------------
/iperf/include/config.wiced.h:
--------------------------------------------------------------------------------
1 | /* config.h. Generated by hand for WICED. */
2 | #ifndef CONFIG_H
3 | #define CONFIG_H
4 |
5 | /* ===================================================================
6 | * config.h
7 | *
8 | * config.h is derived from config.h.in -- do not edit config.h
9 | *
10 | * This contains variables that the configure script checks and
11 | * then defines or undefines. The source code checks for these
12 | * variables to know if certain features are present.
13 | * =================================================================== */
14 |
15 | /* Define if threads exist (using pthreads or Win32 threads) */
16 | /* #undef HAVE_THREAD */
17 | /* #undef HAVE_POSIX_THREAD */
18 | /* #undef HAVE_WIN32_THREAD */
19 | /* #undef _REENTRANT */
20 |
21 | /* Define if on OSF1 and need special extern "C" around some header files */
22 | /* #undef SPECIAL_OSF1_EXTERN */
23 |
24 | /* Define if the strings.h header file exists */
25 | #define HAVE_STRINGS_H
26 |
27 | /* Define the intXX_t, u_intXX_t, size_t, ssize_t, and socklen_t types */
28 | /* On the Cray J90 there is no 4 byte integer, so we define int32_t
29 | * but it is 8 bytes, and we leave HAVE_INT32_T undefined. */
30 | #define SIZEOF_INT 4
31 | #define HAVE_U_INT16_T 1
32 | #define HAVE_INT32_T 1
33 | #define HAVE_INT64_T 1
34 | #define HAVE_U_INT32_T 1
35 |
36 | #define int32_t int32_t
37 | #define u_int16_t uint16_t
38 | #define u_int32_t uint32_t
39 | #define useconds_t uint32_t
40 | typedef unsigned char u_char;
41 |
42 | #define ssize_t int
43 |
44 | /* #undef size_t */
45 | /* #undef ssize_t */
46 |
47 | #define Socklen_t socklen_t
48 |
49 | /* Define if you have these functions. */
50 | #define HAVE_SNPRINTF 1
51 | /* #undef HAVE_INET_PTON */
52 | /* #undef HAVE_INET_NTOP */
53 | /* #undef HAVE_GETTIMEOFDAY */
54 | /* #undef HAVE_PTHREAD_CANCEL */
55 | /* #undef HAVE_USLEEP */
56 | /* #undef HAVE_QUAD_SUPPORT */
57 | /* #undef HAVE_PRINTF_QD */
58 |
59 | /* standard C++, which isn't always... */
60 | /* #undef bool */
61 | #define true 1
62 | #define false 0
63 |
64 | /* Define if the host is Big Endian (network byte order) */
65 | /* #undef WORDS_BIGENDIAN */
66 |
67 | /* Define if multicast support exists */
68 | /* #undef HAVE_MULTICAST */
69 | //#define HAVE_MULTICAST
70 |
71 | /* Define if all IPv6 headers/structures are present */
72 | /* #undef HAVE_IPV6 */
73 |
74 | /* Define if IPv6 multicast support exists */
75 | /* #undef HAVE_IPV6_MULTICAST */
76 |
77 | /* Define if Debugging of sockets is desired */
78 | /* #undef DBG_MJZ */
79 |
80 | #endif /* CONFIG_H */
81 |
--------------------------------------------------------------------------------
/iperf/include/config.win32.h:
--------------------------------------------------------------------------------
1 | /* config.h. Generated by hand for Windows. */
2 | #ifndef CONFIG_H
3 | #define CONFIG_H
4 |
5 | /* ===================================================================
6 | * config.h
7 | *
8 | * config.h is derived from config.h.in -- do not edit config.h
9 | *
10 | * This contains variables that the configure script checks and
11 | * then defines or undefines. The source code checks for these
12 | * variables to know if certain features are present.
13 | *
14 | * by Mark Gates
15 | *
16 | * Copyright 1999 The Board of Trustees of the University of Illinois
17 | * All rights reserved. See doc/license.txt for complete text.
18 | *
19 | * $Id: config.win32.h,v 1.1.1.1 2004/05/18 01:50:44 kgibbs Exp $
20 | * =================================================================== */
21 |
22 | /* Define if threads exist (using pthreads or Win32 threads) */
23 | /* #undef HAVE_POSIX_THREAD */
24 | #define HAVE_WIN32_THREAD 1
25 | /* #undef _REENTRANT */
26 |
27 | /* Define if on OSF1 and need special extern "C" around some header files */
28 | /* #undef SPECIAL_OSF1_EXTERN */
29 |
30 | /* Define if the strings.h header file exists */
31 | /* #undef HAVE_STRINGS_H */
32 |
33 | /* Define the intXX_t, u_intXX_t, size_t, ssize_t, and socklen_t types */
34 | /* On the Cray J90 there is no 4 byte integer, so we define int32_t
35 | * but it is 8 bytes, and we leave HAVE_INT32_T undefined. */
36 | #define SIZEOF_INT 4
37 | #define HAVE_U_INT16_T 1
38 | #define HAVE_INT32_T 1
39 | #define HAVE_INT64_T 1
40 | #define HAVE_U_INT32_T 1
41 |
42 | #define int32_t LONG32
43 | #define u_int16_t UINT16
44 | #define u_int32_t ULONG32
45 | /* #undef size_t */
46 | #define ssize_t int
47 |
48 | /* socklen_t usually defined in . Unfortunately it doesn't
49 | * work on some systems (like DEC OSF/1), so we'll use our own Socklen_t */
50 | #define Socklen_t int
51 |
52 | /* Define if you have these functions. */
53 | #define HAVE_SNPRINTF 1
54 | /* #undef HAVE_INET_PTON */
55 | /* #undef HAVE_INET_NTOP */
56 | /* #undef HAVE_GETTIMEOFDAY */
57 | /* #undef HAVE_PTHREAD_CANCEL */
58 | #define HAVE_USLEEP 1
59 | /* #undef HAVE_QUAD_SUPPORT */
60 | /* #undef HAVE_PRINTF_QD */
61 | /*
62 | * Added to make sure these aren't defined... configure script sometimes get
63 | * this wrong.
64 | */
65 | #undef HAVE_GETTIMEOFDAY
66 | #undef HAVE_POSIX_THREAD
67 |
68 | /* standard C++, which isn't always... */
69 | /* #undef bool */
70 | #define true 1
71 | #define false 0
72 |
73 | /* Define if the host is Big Endian (network byte order) */
74 | /* #undef WORDS_BIGENDIAN */
75 |
76 | /* Define if multicast support exists */
77 | #define HAVE_MULTICAST 1
78 |
79 | /* Define if all IPv6 headers/structures are present */
80 | #define HAVE_IPV6 1
81 |
82 | /* Define if IPv6 multicast support exists */
83 | #define HAVE_IPV6_MULTICAST 1
84 |
85 | /* Define if Debugging of sockets is desired */
86 | /* #undef DBG_MJZ */
87 |
88 | #endif /* CONFIG_H */
89 |
--------------------------------------------------------------------------------
/iperf/include/delay.hpp:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------
2 | * Copyright (c) 1999,2000,2001,2002,2003
3 | * The Board of Trustees of the University of Illinois
4 | * All Rights Reserved.
5 | *---------------------------------------------------------------
6 | * Permission is hereby granted, free of charge, to any person
7 | * obtaining a copy of this software (Iperf) and associated
8 | * documentation files (the "Software"), to deal in the Software
9 | * without restriction, including without limitation the
10 | * rights to use, copy, modify, merge, publish, distribute,
11 | * sublicense, and/or sell copies of the Software, and to permit
12 | * persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | *
16 | * Redistributions of source code must retain the above
17 | * copyright notice, this list of conditions and
18 | * the following disclaimers.
19 | *
20 | *
21 | * Redistributions in binary form must reproduce the above
22 | * copyright notice, this list of conditions and the following
23 | * disclaimers in the documentation and/or other materials
24 | * provided with the distribution.
25 | *
26 | *
27 | * Neither the names of the University of Illinois, NCSA,
28 | * nor the names of its contributors may be used to endorse
29 | * or promote products derived from this Software without
30 | * specific prior written permission.
31 | *
32 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35 | * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT
36 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
38 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE
39 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 | * ________________________________________________________________
41 | * National Laboratory for Applied Network Research
42 | * National Center for Supercomputing Applications
43 | * University of Illinois at Urbana-Champaign
44 | * http://www.ncsa.uiuc.edu
45 | * ________________________________________________________________
46 | *
47 | * delay.hpp
48 | * by Mark Gates
49 | * -------------------------------------------------------------------
50 | * accurate microsecond delay
51 | * ------------------------------------------------------------------- */
52 |
53 | #ifndef DELAY_H
54 | #define DELAY_H
55 |
56 | void delay_loop( unsigned long usecs );
57 |
58 | #endif /* DELAY_H */
59 |
--------------------------------------------------------------------------------
/iperf/include/gettimeofday.h:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------
2 | * Copyright (c) 1999,2000,2001,2002,2003
3 | * The Board of Trustees of the University of Illinois
4 | * All Rights Reserved.
5 | *---------------------------------------------------------------
6 | * Permission is hereby granted, free of charge, to any person
7 | * obtaining a copy of this software (Iperf) and associated
8 | * documentation files (the "Software"), to deal in the Software
9 | * without restriction, including without limitation the
10 | * rights to use, copy, modify, merge, publish, distribute,
11 | * sublicense, and/or sell copies of the Software, and to permit
12 | * persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | *
16 | * Redistributions of source code must retain the above
17 | * copyright notice, this list of conditions and
18 | * the following disclaimers.
19 | *
20 | *
21 | * Redistributions in binary form must reproduce the above
22 | * copyright notice, this list of conditions and the following
23 | * disclaimers in the documentation and/or other materials
24 | * provided with the distribution.
25 | *
26 | *
27 | * Neither the names of the University of Illinois, NCSA,
28 | * nor the names of its contributors may be used to endorse
29 | * or promote products derived from this Software without
30 | * specific prior written permission.
31 | *
32 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35 | * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT
36 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
38 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE
39 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 | * ________________________________________________________________
41 | * National Laboratory for Applied Network Research
42 | * National Center for Supercomputing Applications
43 | * University of Illinois at Urbana-Champaign
44 | * http://www.ncsa.uiuc.edu
45 | * ________________________________________________________________
46 | *
47 | * gettimeofday.h
48 | *
49 | * Mark Gates
50 | * -------------------------------------------------------------------
51 | * An implementation of gettimeofday for Windows.
52 | * ------------------------------------------------------------------- */
53 |
54 | #if !defined(GETTIMEOFDAY_H) && !defined(HAVE_GETTIMEOFDAY)
55 | #define GETTIMEOFDAY_H
56 |
57 | #ifdef __cplusplus
58 | extern "C"
59 | #endif /* __cplusplus */
60 | int gettimeofday( struct timeval* tv, void* timezone );
61 |
62 | #endif /* !defined(GETTIMEOFDAY_H) && !defined(HAVE_GETTIMEOFDAY) */
63 |
--------------------------------------------------------------------------------
/iperf/include/header_version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014, Broadcom Corporation
3 | * All Rights Reserved.
4 | *
5 | * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
6 | * the contents of this file may not be disclosed to third parties, copied
7 | * or duplicated in any form, in whole or in part, without the prior
8 | * written permission of Broadcom Corporation.
9 | */
10 |
11 | #ifndef HEADER_VERSION_H_
12 | #define HEADER_VERSION_H_
13 |
14 | #define HEADER_VERSION1 0x80000000
15 | #define HEADER_VERSION2 0x81000000 /* not yet used */
16 |
17 | #endif /* HEADER_VERSION_H_ */
18 |
--------------------------------------------------------------------------------
/iperf/include/report_CSV.h:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------
2 | * Copyright (c) 1999,2000,2001,2002,2003
3 | * The Board of Trustees of the University of Illinois
4 | * All Rights Reserved.
5 | *---------------------------------------------------------------
6 | * Permission is hereby granted, free of charge, to any person
7 | * obtaining a copy of this software (Iperf) and associated
8 | * documentation files (the "Software"), to deal in the Software
9 | * without restriction, including without limitation the
10 | * rights to use, copy, modify, merge, publish, distribute,
11 | * sublicense, and/or sell copies of the Software, and to permit
12 | * persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | *
16 | * Redistributions of source code must retain the above
17 | * copyright notice, this list of conditions and
18 | * the following disclaimers.
19 | *
20 | *
21 | * Redistributions in binary form must reproduce the above
22 | * copyright notice, this list of conditions and the following
23 | * disclaimers in the documentation and/or other materials
24 | * provided with the distribution.
25 | *
26 | *
27 | * Neither the names of the University of Illinois, NCSA,
28 | * nor the names of its contributors may be used to endorse
29 | * or promote products derived from this Software without
30 | * specific prior written permission.
31 | *
32 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35 | * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT
36 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
38 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE
39 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 | * ________________________________________________________________
41 | * National Laboratory for Applied Network Research
42 | * National Center for Supercomputing Applications
43 | * University of Illinois at Urbana-Champaign
44 | * http://www.ncsa.uiuc.edu
45 | * ________________________________________________________________
46 | *
47 | * report_CSV.h
48 | * by Kevin Gibbs
49 | *
50 | * ________________________________________________________________ */
51 |
52 | #ifndef REPORT_CSV_H
53 | #define REPORT_CSV_H
54 |
55 | void CSV_stats( Transfer_Info *stats );
56 | void *CSV_peer( Connection_Info *stats, int ID);
57 | void CSV_serverstats( Connection_Info *conn, Transfer_Info *stats );
58 |
59 | #endif /* REPORT_CSV_H */
60 |
--------------------------------------------------------------------------------
/iperf/include/report_default.h:
--------------------------------------------------------------------------------
1 | /*---------------------------------------------------------------
2 | * Copyright (c) 1999,2000,2001,2002,2003
3 | * The Board of Trustees of the University of Illinois
4 | * All Rights Reserved.
5 | *---------------------------------------------------------------
6 | * Permission is hereby granted, free of charge, to any person
7 | * obtaining a copy of this software (Iperf) and associated
8 | * documentation files (the "Software"), to deal in the Software
9 | * without restriction, including without limitation the
10 | * rights to use, copy, modify, merge, publish, distribute,
11 | * sublicense, and/or sell copies of the Software, and to permit
12 | * persons to whom the Software is furnished to do
13 | * so, subject to the following conditions:
14 | *
15 | *
16 | * Redistributions of source code must retain the above
17 | * copyright notice, this list of conditions and
18 | * the following disclaimers.
19 | *
20 | *
21 | * Redistributions in binary form must reproduce the above
22 | * copyright notice, this list of conditions and the following
23 | * disclaimers in the documentation and/or other materials
24 | * provided with the distribution.
25 | *
26 | *
27 | * Neither the names of the University of Illinois, NCSA,
28 | * nor the names of its contributors may be used to endorse
29 | * or promote products derived from this Software without
30 | * specific prior written permission.
31 | *
32 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35 | * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTIBUTORS OR COPYRIGHT
36 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
38 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE
39 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 | * ________________________________________________________________
41 | * National Laboratory for Applied Network Research
42 | * National Center for Supercomputing Applications
43 | * University of Illinois at Urbana-Champaign
44 | * http://www.ncsa.uiuc.edu
45 | * ________________________________________________________________
46 | *
47 | * report_default.h
48 | * by Kevin Gibbs
49 | *
50 | * ________________________________________________________________ */
51 |
52 | #ifndef REPORT_DEFAULT_H
53 | #define REPORT_DEFAULT_H
54 |
55 | void reporter_printstats( Transfer_Info *stats );
56 | void reporter_multistats( Transfer_Info *stats );
57 | void reporter_serverstats( Connection_Info *conn, Transfer_Info *stats );
58 | void reporter_reportsettings( ReporterData *stats );
59 | void *reporter_reportpeer( Connection_Info *stats, int ID);
60 |
61 | #endif /* REPORT_DEFAULT_H */
62 |
--------------------------------------------------------------------------------
/iperf/include/setitimer.h:
--------------------------------------------------------------------------------
1 | #if !defined(SETITIMER_H) && !defined(HAVE_SETITIMER) && defined(WIN32)
2 | #define SETITIMER_H
3 |
4 | #include
5 |
6 | #ifdef __cplusplus
7 | extern "C" {
8 | #endif /* __cplusplus */
9 |
10 | #define ITIMER_REAL 0
11 |
12 | struct itimerval {
13 | struct timeval it_interval;
14 | struct timeval it_value;
15 | };
16 |
17 | typedef void SigAlrmFunc();
18 | typedef SigAlrmFunc *SigAlrmFuncPtr;
19 |
20 | void setsigalrmfunc( SigAlrmFuncPtr inFunc );
21 |
22 | int setitimer(int which, const struct itimerval * value, struct itimerval * ovalue);
23 |
24 | #ifdef __cplusplus
25 | } /* end extern "C" */
26 | #endif /* __cplusplus */
27 |
28 | #endif /* !defined(SETITIMER_H) && !defined(HAVE_SETITIMER) && defined(WIN32) */
29 |
--------------------------------------------------------------------------------
/iperf/include/snprintf.h:
--------------------------------------------------------------------------------
1 | #if !defined(SNPRINTF_H) && !defined(HAVE_SNPRINTF)
2 | #define SNPRINTF_H
3 |
4 | /* ===================================================================
5 | * snprintf.h
6 | *
7 | * This is from
8 | * W. Richard Stevens, 'UNIX Network Programming', Vol 1, 2nd Edition,
9 | * Prentice Hall, 1998.
10 | *
11 | * Mark Gates
12 | * July 1998
13 | *
14 | * to use this prototype, make sure HAVE_SNPRINTF is not defined
15 | *
16 | * =================================================================== */
17 |
18 | /*
19 | * Throughout the book I use snprintf() because it's safer than sprintf().
20 | * But as of the time of this writing, not all systems provide this
21 | * function. The function below should only be built on those systems
22 | * that do not provide a real snprintf().
23 | * The function below just acts like sprintf(); it is not safe, but it
24 | * tries to detect overflow.
25 | */
26 |
27 | #ifdef __cplusplus
28 | extern "C"
29 | #endif /* __cplusplus */
30 | int snprintf(char *buf, size_t size, const char *fmt, ...);
31 |
32 | #endif /* !defined(SNPRINTF_H) && !defined(HAVE_SNPRINTF) */
33 |
--------------------------------------------------------------------------------
/iperf/include/version.h:
--------------------------------------------------------------------------------
1 | #define IPERF_VERSION "2.1.0"
2 | #define IPERF_VERSION_DATE "20 Feb 2012"
3 |
--------------------------------------------------------------------------------
/iperf/src/Makefile.am:
--------------------------------------------------------------------------------
1 | bin_PROGRAMS = iperf
2 |
3 | LIBCOMPAT_LDADDS = @STRIP_BEGIN@ \
4 | $(top_builddir)/compat/libcompat.a \
5 | @STRIP_END@
6 |
7 | AM_CPPFLAGS = @STRIP_BEGIN@ \
8 | -I$(top_srcdir)/include \
9 | -I$(top_builddir)/include \
10 | @STRIP_END@
11 |
12 | if DEBUG
13 | AM_CFLAGS = -Wall -g -O0 -DDEBUG
14 | AM_CXXFLAGS = -Wall -g -O0 -DDEBUG
15 | else
16 | AM_CFLAGS = -Wall -O3
17 | AM_CXXFLAGS = -Wall -O3
18 | endif
19 |
20 | iperf_LDFLAGS = @CFLAGS@ @PTHREAD_CFLAGS@ @WEB100_CFLAGS@ @DEFS@
21 |
22 | iperf_SOURCES = \
23 | Client.cpp \
24 | Extractor.c \
25 | Launch.cpp \
26 | List.cpp \
27 | Listener.cpp \
28 | Locale.c \
29 | PerfSocket.cpp \
30 | ReportCSV.c \
31 | ReportDefault.c \
32 | Reporter.c \
33 | Server.cpp \
34 | Settings.cpp \
35 | SocketAddr.c \
36 | gnu_getopt.c \
37 | gnu_getopt_long.c \
38 | main.cpp \
39 | service.c \
40 | sockets.c \
41 | stdio.c \
42 | tcp_window_size.c \
43 | debug.c
44 |
45 | iperf_LDADD = $(LIBCOMPAT_LDADDS)
46 |
--------------------------------------------------------------------------------
/iperf/src/debug.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014, Broadcom Corporation
3 | * All Rights Reserved.
4 | *
5 | * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
6 | * the contents of this file may not be disclosed to third parties, copied
7 | * or duplicated in any form, in whole or in part, without the prior
8 | * written permission of Broadcom Corporation.
9 | */
10 |
11 | #include "headers.h"
12 | #include "debug.h"
13 | #include "Mutex.h"
14 |
15 | #if IPERF_DEBUG
16 | static Mutex debugprint_mutex;
17 | static int debugprint_mutex_init = 0;
18 |
19 | void debug_get_mutex() {
20 | if (debugprint_mutex_init != 0)
21 | Mutex_Lock(&debugprint_mutex);
22 | }
23 |
24 | void debug_release_mutex() {
25 | if (debugprint_mutex_init != 0)
26 | Mutex_Unlock(&debugprint_mutex);
27 | }
28 | #endif /* IPERF_DEBUG */
29 |
30 | void debug_init() {
31 | #if IPERF_DEBUG
32 | Mutex_Initialize(&debugprint_mutex);
33 | debugprint_mutex_init = 1;
34 | #endif /* IPERF_DEBUG */
35 | }
36 |
37 | void debug_destroy() {
38 | #if IPERF_DEBUG
39 | Mutex_Destroy(&debugprint_mutex);
40 | debugprint_mutex_init = 0;
41 | #endif /* IPERF_DEBUG */
42 | }
43 |
--------------------------------------------------------------------------------
/lwip-1.4.1/doc/FILES:
--------------------------------------------------------------------------------
1 | savannah.txt - How to obtain the current development source code.
2 | contrib.txt - How to contribute to lwIP as a developer.
3 | rawapi.txt - The documentation for the core API of lwIP.
4 | Also provides an overview about the other APIs and multithreading.
5 | snmp_agent.txt - The documentation for the lwIP SNMP agent.
6 | sys_arch.txt - The documentation for a system abstraction layer of lwIP.
7 |
--------------------------------------------------------------------------------
/lwip-1.4.1/port/Standalone/wlan_ethernetif.h:
--------------------------------------------------------------------------------
1 | #ifndef __WLAN_ETHERNETIF_H__
2 | #define __WLAN_ETHERNETIF_H__
3 |
4 |
5 | #include "lwip/err.h"
6 | #include "lwip/netif.h"
7 |
8 | err_t wlan_ethernetif_init(struct netif *netif);
9 | void wlan_ethernetif_input(struct netif *netif, unsigned char *data, u16_t len);
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/lwip-1.4.1/port/arch/cpu.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification,
6 | * are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. The name of the author may not be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25 | * OF SUCH DAMAGE.
26 | *
27 | * This file is part of the lwIP TCP/IP stack.
28 | *
29 | * Author: Adam Dunkels
30 | *
31 | */
32 | #ifndef __CPU_H__
33 | #define __CPU_H__
34 |
35 | #define BYTE_ORDER LITTLE_ENDIAN
36 |
37 | #endif /* __CPU_H__ */
38 |
--------------------------------------------------------------------------------
/lwip-1.4.1/port/arch/perf.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification,
6 | * are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. The name of the author may not be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25 | * OF SUCH DAMAGE.
26 | *
27 | * This file is part of the lwIP TCP/IP stack.
28 | *
29 | * Author: Adam Dunkels
30 | *
31 | */
32 | #ifndef __PERF_H__
33 | #define __PERF_H__
34 |
35 | #define PERF_START /* null definition */
36 | #define PERF_STOP(x) /* null definition */
37 |
38 | #endif /* __PERF_H__ */
39 |
--------------------------------------------------------------------------------
/lwip-1.4.1/port/arch/sys_arch.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification,
6 | * are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. The name of the author may not be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25 | * OF SUCH DAMAGE.
26 | *
27 | * This file is part of the lwIP TCP/IP stack.
28 | *
29 | * Author: Adam Dunkels
30 | *
31 | */
32 | #ifndef __SYS_UCOS_III_H__
33 | #define __SYS_UCOS_III_H__
34 |
35 | #include "os.h"
36 |
37 | //#define SYS_MBOX_NULL (osMessageQId)0
38 | //#define SYS_SEM_NULL (osSemaphoreId)0
39 |
40 | //not less than 2
41 | #define LWIP_THREAD_NUM_MAX 2
42 | #define LWIP_THREAD_STK_SIZE 512
43 |
44 | #define LWIP_COMPAT_MUTEX 0
45 | #define sys_msleep sys_ms_delay
46 |
47 | #define SYS_ARCH_DECL_PROTECT(lev) CPU_SR cpu_sr
48 | #define SYS_ARCH_PROTECT(lev) CPU_CRITICAL_ENTER()
49 | #define SYS_ARCH_UNPROTECT(lev) CPU_CRITICAL_EXIT()
50 |
51 |
52 | typedef OS_SEM sys_sem_t;
53 | typedef OS_MUTEX sys_mutex_t;
54 | typedef OS_Q sys_mbox_t;
55 | typedef OS_TCB* sys_thread_t;
56 |
57 |
58 | #define SYS_MBOX_NULL (sys_mbox_t *)NULL
59 | #define SYS_SEM_NULL (sys_sem_t *)NULL
60 |
61 |
62 | #endif /* __SYS_UCOS_III_H__ */
63 |
64 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/FILES:
--------------------------------------------------------------------------------
1 | api/ - The code for the high-level wrapper API. Not needed if
2 | you use the lowel-level call-back/raw API.
3 |
4 | core/ - The core of the TPC/IP stack; protocol implementations,
5 | memory and buffer management, and the low-level raw API.
6 |
7 | include/ - lwIP include files.
8 |
9 | netif/ - Generic network interface device drivers are kept here,
10 | as well as the ARP module.
11 |
12 | For more information on the various subdirectories, check the FILES
13 | file in each directory.
14 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/core/ipv4/inet.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file
3 | * Functions common to all TCP/IPv4 modules, such as the byte order functions.
4 | *
5 | */
6 |
7 | /*
8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
9 | * All rights reserved.
10 | *
11 | * Redistribution and use in source and binary forms, with or without modification,
12 | * are permitted provided that the following conditions are met:
13 | *
14 | * 1. Redistributions of source code must retain the above copyright notice,
15 | * this list of conditions and the following disclaimer.
16 | * 2. Redistributions in binary form must reproduce the above copyright notice,
17 | * this list of conditions and the following disclaimer in the documentation
18 | * and/or other materials provided with the distribution.
19 | * 3. The name of the author may not be used to endorse or promote products
20 | * derived from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31 | * OF SUCH DAMAGE.
32 | *
33 | * This file is part of the lwIP TCP/IP stack.
34 | *
35 | * Author: Adam Dunkels
36 | *
37 | */
38 |
39 | #include "lwip/opt.h"
40 |
41 | #include "lwip/inet.h"
42 |
43 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/core/ipv6/README:
--------------------------------------------------------------------------------
1 | IPv6 support in lwIP is very experimental.
2 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/core/ipv6/ip6_addr.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification,
6 | * are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. The name of the author may not be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25 | * OF SUCH DAMAGE.
26 | *
27 | * This file is part of the lwIP TCP/IP stack.
28 | *
29 | * Author: Adam Dunkels
30 | *
31 | */
32 |
33 | #include "lwip/opt.h"
34 | #include "lwip/ip_addr.h"
35 | #include "lwip/inet.h"
36 |
37 | u8_t
38 | ip_addr_netcmp(struct ip_addr *addr1, struct ip_addr *addr2,
39 | struct ip_addr *mask)
40 | {
41 | return((addr1->addr[0] & mask->addr[0]) == (addr2->addr[0] & mask->addr[0]) &&
42 | (addr1->addr[1] & mask->addr[1]) == (addr2->addr[1] & mask->addr[1]) &&
43 | (addr1->addr[2] & mask->addr[2]) == (addr2->addr[2] & mask->addr[2]) &&
44 | (addr1->addr[3] & mask->addr[3]) == (addr2->addr[3] & mask->addr[3]));
45 |
46 | }
47 |
48 | u8_t
49 | ip_addr_cmp(struct ip_addr *addr1, struct ip_addr *addr2)
50 | {
51 | return(addr1->addr[0] == addr2->addr[0] &&
52 | addr1->addr[1] == addr2->addr[1] &&
53 | addr1->addr[2] == addr2->addr[2] &&
54 | addr1->addr[3] == addr2->addr[3]);
55 | }
56 |
57 | void
58 | ip_addr_set(struct ip_addr *dest, struct ip_addr *src)
59 | {
60 | SMEMCPY(dest, src, sizeof(struct ip_addr));
61 | /* dest->addr[0] = src->addr[0];
62 | dest->addr[1] = src->addr[1];
63 | dest->addr[2] = src->addr[2];
64 | dest->addr[3] = src->addr[3];*/
65 | }
66 |
67 | u8_t
68 | ip_addr_isany(struct ip_addr *addr)
69 | {
70 | if (addr == NULL) return 1;
71 | return((addr->addr[0] | addr->addr[1] | addr->addr[2] | addr->addr[3]) == 0);
72 | }
73 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/core/sys.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file
3 | * lwIP Operating System abstraction
4 | *
5 | */
6 |
7 | /*
8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
9 | * All rights reserved.
10 | *
11 | * Redistribution and use in source and binary forms, with or without modification,
12 | * are permitted provided that the following conditions are met:
13 | *
14 | * 1. Redistributions of source code must retain the above copyright notice,
15 | * this list of conditions and the following disclaimer.
16 | * 2. Redistributions in binary form must reproduce the above copyright notice,
17 | * this list of conditions and the following disclaimer in the documentation
18 | * and/or other materials provided with the distribution.
19 | * 3. The name of the author may not be used to endorse or promote products
20 | * derived from this software without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
31 | * OF SUCH DAMAGE.
32 | *
33 | * This file is part of the lwIP TCP/IP stack.
34 | *
35 | * Author: Adam Dunkels
36 | *
37 | */
38 |
39 | #include "lwip/opt.h"
40 |
41 | #include "lwip/sys.h"
42 |
43 | /* Most of the functions defined in sys.h must be implemented in the
44 | * architecture-dependent file sys_arch.c */
45 |
46 | #if !NO_SYS
47 |
48 | #ifndef sys_msleep
49 | /**
50 | * Sleep for some ms. Timeouts are NOT processed while sleeping.
51 | *
52 | * @param ms number of milliseconds to sleep
53 | */
54 | void
55 | sys_msleep(u32_t ms)
56 | {
57 | if (ms > 0) {
58 | sys_sem_t delaysem;
59 | err_t err = sys_sem_new(&delaysem, 0);
60 | if (err == ERR_OK) {
61 | sys_arch_sem_wait(&delaysem, ms);
62 | sys_sem_free(&delaysem);
63 | }
64 | }
65 | }
66 | #endif /* sys_msleep */
67 |
68 | #endif /* !NO_SYS */
69 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/include/ipv6/lwip/inet.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification,
6 | * are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. The name of the author may not be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25 | * OF SUCH DAMAGE.
26 | *
27 | * This file is part of the lwIP TCP/IP stack.
28 | *
29 | * Author: Adam Dunkels
30 | *
31 | */
32 | #ifndef __LWIP_INET_H__
33 | #define __LWIP_INET_H__
34 |
35 | #include "lwip/opt.h"
36 | #include "lwip/pbuf.h"
37 | #include "lwip/ip_addr.h"
38 |
39 | #ifdef __cplusplus
40 | extern "C" {
41 | #endif
42 |
43 | u16_t inet_chksum(void *data, u16_t len);
44 | u16_t inet_chksum_pbuf(struct pbuf *p);
45 | u16_t inet_chksum_pseudo(struct pbuf *p,
46 | struct ip_addr *src, struct ip_addr *dest,
47 | u8_t proto, u32_t proto_len);
48 |
49 | u32_t inet_addr(const char *cp);
50 | s8_t inet_aton(const char *cp, struct in_addr *addr);
51 |
52 | #ifndef _MACHINE_ENDIAN_H_
53 | #ifndef _NETINET_IN_H
54 | #ifndef _LINUX_BYTEORDER_GENERIC_H
55 | u16_t htons(u16_t n);
56 | u16_t ntohs(u16_t n);
57 | u32_t htonl(u32_t n);
58 | u32_t ntohl(u32_t n);
59 | #endif /* _LINUX_BYTEORDER_GENERIC_H */
60 | #endif /* _NETINET_IN_H */
61 | #endif /* _MACHINE_ENDIAN_H_ */
62 |
63 | #ifdef __cplusplus
64 | }
65 | #endif
66 |
67 | #endif /* __LWIP_INET_H__ */
68 |
69 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/include/posix/netdb.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file
3 | * This file is a posix wrapper for lwip/netdb.h.
4 | */
5 |
6 | /*
7 | * Redistribution and use in source and binary forms, with or without modification,
8 | * are permitted provided that the following conditions are met:
9 | *
10 | * 1. Redistributions of source code must retain the above copyright notice,
11 | * this list of conditions and the following disclaimer.
12 | * 2. Redistributions in binary form must reproduce the above copyright notice,
13 | * this list of conditions and the following disclaimer in the documentation
14 | * and/or other materials provided with the distribution.
15 | * 3. The name of the author may not be used to endorse or promote products
16 | * derived from this software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
27 | * OF SUCH DAMAGE.
28 | *
29 | * This file is part of the lwIP TCP/IP stack.
30 | *
31 | */
32 |
33 | #include "lwip/netdb.h"
34 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/include/posix/sys/socket.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file
3 | * This file is a posix wrapper for lwip/sockets.h.
4 | */
5 |
6 | /*
7 | * Redistribution and use in source and binary forms, with or without modification,
8 | * are permitted provided that the following conditions are met:
9 | *
10 | * 1. Redistributions of source code must retain the above copyright notice,
11 | * this list of conditions and the following disclaimer.
12 | * 2. Redistributions in binary form must reproduce the above copyright notice,
13 | * this list of conditions and the following disclaimer in the documentation
14 | * and/or other materials provided with the distribution.
15 | * 3. The name of the author may not be used to endorse or promote products
16 | * derived from this software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
27 | * OF SUCH DAMAGE.
28 | *
29 | * This file is part of the lwIP TCP/IP stack.
30 | *
31 | */
32 |
33 | #include "lwip/sockets.h"
34 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/netif/FILES:
--------------------------------------------------------------------------------
1 | This directory contains generic network interface device drivers that
2 | do not contain any hardware or architecture specific code. The files
3 | are:
4 |
5 | etharp.c
6 | Implements the ARP (Address Resolution Protocol) over
7 | Ethernet. The code in this file should be used together with
8 | Ethernet device drivers. Note that this module has been
9 | largely made Ethernet independent so you should be able to
10 | adapt this for other link layers (such as Firewire).
11 |
12 | ethernetif.c
13 | An example of how an Ethernet device driver could look. This
14 | file can be used as a "skeleton" for developing new Ethernet
15 | network device drivers. It uses the etharp.c ARP code.
16 |
17 | loopif.c
18 | A "loopback" network interface driver. It requires configuration
19 | through the define LWIP_LOOPIF_MULTITHREADING (see opt.h).
20 |
21 | slipif.c
22 | A generic implementation of the SLIP (Serial Line IP)
23 | protocol. It requires a sio (serial I/O) module to work.
24 |
25 | ppp/ Point-to-Point Protocol stack
26 | The PPP stack has been ported from ucip (http://ucip.sourceforge.net).
27 | It matches quite well to pppd 2.3.1 (http://ppp.samba.org), although
28 | compared to that, it has some modifications for embedded systems and
29 | the source code has been reordered a bit.
--------------------------------------------------------------------------------
/lwip-1.4.1/src/netif/ppp/chpms.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | * chpms.h - Network Microsoft Challenge Handshake Protocol header file.
3 | *
4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
5 | * portions Copyright (c) 1998 Global Election Systems Inc.
6 | *
7 | * The authors hereby grant permission to use, copy, modify, distribute,
8 | * and license this software and its documentation for any purpose, provided
9 | * that existing copyright notices are retained in all copies and that this
10 | * notice and the following disclaimer are included verbatim in any
11 | * distributions. No written agreement, license, or royalty fee is required
12 | * for any of the authorized uses.
13 | *
14 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | *
25 | ******************************************************************************
26 | * REVISION HISTORY
27 | *
28 | * 03-01-01 Marc Boucher
29 | * Ported to lwIP.
30 | * 98-01-30 Guy Lancaster , Global Election Systems Inc.
31 | * Original built from BSD network code.
32 | ******************************************************************************/
33 | /*
34 | * chap.h - Challenge Handshake Authentication Protocol definitions.
35 | *
36 | * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited.
37 | * http://www.strataware.com/
38 | *
39 | * All rights reserved.
40 | *
41 | * Redistribution and use in source and binary forms are permitted
42 | * provided that the above copyright notice and this paragraph are
43 | * duplicated in all such forms and that any documentation,
44 | * advertising materials, and other materials related to such
45 | * distribution and use acknowledge that the software was developed
46 | * by Eric Rosenquist. The name of the author may not be used to
47 | * endorse or promote products derived from this software without
48 | * specific prior written permission.
49 | *
50 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
51 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
52 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
53 | *
54 | * $Id: chpms.h,v 1.5 2007/12/19 20:47:23 fbernon Exp $
55 | */
56 |
57 | #ifndef CHPMS_H
58 | #define CHPMS_H
59 |
60 | #define MAX_NT_PASSWORD 256 /* Maximum number of (Unicode) chars in an NT password */
61 |
62 | void ChapMS (chap_state *, char *, int, char *, int);
63 |
64 | #endif /* CHPMS_H */
65 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/netif/ppp/magic.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | * magic.h - Network Random Number Generator header file.
3 | *
4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
5 | * portions Copyright (c) 1997 Global Election Systems Inc.
6 | *
7 | * The authors hereby grant permission to use, copy, modify, distribute,
8 | * and license this software and its documentation for any purpose, provided
9 | * that existing copyright notices are retained in all copies and that this
10 | * notice and the following disclaimer are included verbatim in any
11 | * distributions. No written agreement, license, or royalty fee is required
12 | * for any of the authorized uses.
13 | *
14 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 | *
25 | ******************************************************************************
26 | * REVISION HISTORY
27 | *
28 | * 03-01-01 Marc Boucher
29 | * Ported to lwIP.
30 | * 97-12-04 Guy Lancaster , Global Election Systems Inc.
31 | * Original derived from BSD codes.
32 | *****************************************************************************/
33 | /*
34 | * magic.h - PPP Magic Number definitions.
35 | *
36 | * Copyright (c) 1989 Carnegie Mellon University.
37 | * All rights reserved.
38 | *
39 | * Redistribution and use in source and binary forms are permitted
40 | * provided that the above copyright notice and this paragraph are
41 | * duplicated in all such forms and that any documentation,
42 | * advertising materials, and other materials related to such
43 | * distribution and use acknowledge that the software was developed
44 | * by Carnegie Mellon University. The name of the
45 | * University may not be used to endorse or promote products derived
46 | * from this software without specific prior written permission.
47 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
48 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
49 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
50 | *
51 | * $Id: magic.h,v 1.3 2010/01/18 20:49:43 goldsimon Exp $
52 | */
53 |
54 | #ifndef MAGIC_H
55 | #define MAGIC_H
56 |
57 | /* Initialize the magic number generator */
58 | void magicInit(void);
59 |
60 | /* Returns the next magic number */
61 | u32_t magic(void);
62 |
63 | #endif /* MAGIC_H */
64 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/netif/ppp/md5.h:
--------------------------------------------------------------------------------
1 | /*
2 | ***********************************************************************
3 | ** md5.h -- header file for implementation of MD5 **
4 | ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
5 | ** Created: 2/17/90 RLR **
6 | ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
7 | ** Revised (for MD5): RLR 4/27/91 **
8 | ** -- G modified to have y&~z instead of y&z **
9 | ** -- FF, GG, HH modified to add in last register done **
10 | ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
11 | ** -- distinct additive constant for each step **
12 | ** -- round 4 added, working mod 7 **
13 | ***********************************************************************
14 | */
15 |
16 | /*
17 | ***********************************************************************
18 | ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
19 | ** **
20 | ** License to copy and use this software is granted provided that **
21 | ** it is identified as the "RSA Data Security, Inc. MD5 Message- **
22 | ** Digest Algorithm" in all material mentioning or referencing this **
23 | ** software or this function. **
24 | ** **
25 | ** License is also granted to make and use derivative works **
26 | ** provided that such works are identified as "derived from the RSA **
27 | ** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
28 | ** material mentioning or referencing the derived work. **
29 | ** **
30 | ** RSA Data Security, Inc. makes no representations concerning **
31 | ** either the merchantability of this software or the suitability **
32 | ** of this software for any particular purpose. It is provided "as **
33 | ** is" without express or implied warranty of any kind. **
34 | ** **
35 | ** These notices must be retained in any copies of any part of this **
36 | ** documentation and/or software. **
37 | ***********************************************************************
38 | */
39 |
40 | #ifndef MD5_H
41 | #define MD5_H
42 |
43 | /* Data structure for MD5 (Message-Digest) computation */
44 | typedef struct {
45 | u32_t i[2]; /* number of _bits_ handled mod 2^64 */
46 | u32_t buf[4]; /* scratch buffer */
47 | unsigned char in[64]; /* input buffer */
48 | unsigned char digest[16]; /* actual digest after MD5Final call */
49 | } MD5_CTX;
50 |
51 | void MD5Init ( MD5_CTX *mdContext);
52 | void MD5Update( MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen);
53 | void MD5Final ( unsigned char hash[], MD5_CTX *mdContext);
54 |
55 | #endif /* MD5_H */
56 |
--------------------------------------------------------------------------------
/lwip-1.4.1/src/netif/ppp/pppdebug.h:
--------------------------------------------------------------------------------
1 | /*****************************************************************************
2 | * pppdebug.h - System debugging utilities.
3 | *
4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
5 | * portions Copyright (c) 1998 Global Election Systems Inc.
6 | * portions Copyright (c) 2001 by Cognizant Pty Ltd.
7 | *
8 | * The authors hereby grant permission to use, copy, modify, distribute,
9 | * and license this software and its documentation for any purpose, provided
10 | * that existing copyright notices are retained in all copies and that this
11 | * notice and the following disclaimer are included verbatim in any
12 | * distributions. No written agreement, license, or royalty fee is required
13 | * for any of the authorized uses.
14 | *
15 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 | *
26 | ******************************************************************************
27 | * REVISION HISTORY (please don't use tabs!)
28 | *
29 | * 03-01-01 Marc Boucher
30 | * Ported to lwIP.
31 | * 98-07-29 Guy Lancaster , Global Election Systems Inc.
32 | * Original.
33 | *
34 | *****************************************************************************
35 | */
36 | #ifndef PPPDEBUG_H
37 | #define PPPDEBUG_H
38 |
39 | /* Trace levels. */
40 | #define LOG_CRITICAL (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE)
41 | #define LOG_ERR (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE)
42 | #define LOG_NOTICE (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING)
43 | #define LOG_WARNING (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING)
44 | #define LOG_INFO (PPP_DEBUG)
45 | #define LOG_DETAIL (PPP_DEBUG)
46 | #define LOG_DEBUG (PPP_DEBUG)
47 |
48 |
49 | #define TRACELCP PPP_DEBUG
50 |
51 | #if PPP_DEBUG
52 |
53 | #define AUTHDEBUG(a, b) LWIP_DEBUGF(a, b)
54 | #define IPCPDEBUG(a, b) LWIP_DEBUGF(a, b)
55 | #define UPAPDEBUG(a, b) LWIP_DEBUGF(a, b)
56 | #define LCPDEBUG(a, b) LWIP_DEBUGF(a, b)
57 | #define FSMDEBUG(a, b) LWIP_DEBUGF(a, b)
58 | #define CHAPDEBUG(a, b) LWIP_DEBUGF(a, b)
59 | #define PPPDEBUG(a, b) LWIP_DEBUGF(a, b)
60 |
61 | #else /* PPP_DEBUG */
62 |
63 | #define AUTHDEBUG(a, b)
64 | #define IPCPDEBUG(a, b)
65 | #define UPAPDEBUG(a, b)
66 | #define LCPDEBUG(a, b)
67 | #define FSMDEBUG(a, b)
68 | #define CHAPDEBUG(a, b)
69 | #define PPPDEBUG(a, b)
70 |
71 | #endif /* PPP_DEBUG */
72 |
73 | #endif /* PPPDEBUG_H */
74 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/core/test_mem.c:
--------------------------------------------------------------------------------
1 | #include "test_mem.h"
2 |
3 | #include "lwip/mem.h"
4 | #include "lwip/stats.h"
5 |
6 | #if !LWIP_STATS || !MEM_STATS
7 | #error "This tests needs MEM-statistics enabled"
8 | #endif
9 | #if LWIP_DNS
10 | #error "This test needs DNS turned off (as it mallocs on init)"
11 | #endif
12 |
13 | /* Setups/teardown functions */
14 |
15 | static void
16 | mem_setup(void)
17 | {
18 | }
19 |
20 | static void
21 | mem_teardown(void)
22 | {
23 | }
24 |
25 |
26 | /* Test functions */
27 |
28 | /** Call mem_malloc, mem_free and mem_trim and check stats */
29 | START_TEST(test_mem_one)
30 | {
31 | #define SIZE1 16
32 | #define SIZE1_2 12
33 | #define SIZE2 16
34 | void *p1, *p2;
35 | mem_size_t s1, s2;
36 | LWIP_UNUSED_ARG(_i);
37 |
38 | #if LWIP_DNS
39 | fail("This test needs DNS turned off (as it mallocs on init)");
40 | #endif
41 |
42 | fail_unless(lwip_stats.mem.used == 0);
43 |
44 | p1 = mem_malloc(SIZE1);
45 | fail_unless(p1 != NULL);
46 | fail_unless(lwip_stats.mem.used >= SIZE1);
47 | s1 = lwip_stats.mem.used;
48 |
49 | p2 = mem_malloc(SIZE2);
50 | fail_unless(p2 != NULL);
51 | fail_unless(lwip_stats.mem.used >= SIZE2 + s1);
52 | s2 = lwip_stats.mem.used;
53 |
54 | mem_trim(p1, SIZE1_2);
55 |
56 | mem_free(p2);
57 | fail_unless(lwip_stats.mem.used <= s2 - SIZE2);
58 |
59 | mem_free(p1);
60 | fail_unless(lwip_stats.mem.used == 0);
61 | }
62 | END_TEST
63 |
64 |
65 | /** Create the suite including all tests for this module */
66 | Suite *
67 | mem_suite(void)
68 | {
69 | TFun tests[] = {
70 | test_mem_one
71 | };
72 | return create_suite("MEM", tests, sizeof(tests)/sizeof(TFun), mem_setup, mem_teardown);
73 | }
74 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/core/test_mem.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_MEM_H__
2 | #define __TEST_MEM_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite *mem_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/etharp/test_etharp.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_ETHARP_H__
2 | #define __TEST_ETHARP_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite* etharp_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/lwip_check.h:
--------------------------------------------------------------------------------
1 | #ifndef __LWIP_CHECK_H__
2 | #define __LWIP_CHECK_H__
3 |
4 | /* Common header file for lwIP unit tests using the check framework */
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | #define FAIL_RET() do { fail(); return; } while(0)
11 | #define EXPECT(x) fail_unless(x)
12 | #define EXPECT_RET(x) do { fail_unless(x); if(!(x)) { return; }} while(0)
13 | #define EXPECT_RETX(x, y) do { fail_unless(x); if(!(x)) { return y; }} while(0)
14 | #define EXPECT_RETNULL(x) EXPECT_RETX(x, NULL)
15 |
16 | /** typedef for a function returning a test suite */
17 | typedef Suite* (suite_getter_fn)(void);
18 |
19 | /** Create a test suite */
20 | static Suite* create_suite(const char* name, TFun *tests, size_t num_tests, SFun setup, SFun teardown)
21 | {
22 | size_t i;
23 | Suite *s = suite_create(name);
24 |
25 | for(i = 0; i < num_tests; i++) {
26 | /* Core test case */
27 | TCase *tc_core = tcase_create("Core");
28 | if ((setup != NULL) || (teardown != NULL)) {
29 | tcase_add_checked_fixture(tc_core, setup, teardown);
30 | }
31 | tcase_add_test(tc_core, tests[i]);
32 | suite_add_tcase(s, tc_core);
33 | }
34 | return s;
35 | }
36 |
37 | #endif /* __LWIP_CHECK_H__ */
38 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/lwip_unittests.c:
--------------------------------------------------------------------------------
1 | #include "lwip_check.h"
2 |
3 | #include "udp/test_udp.h"
4 | #include "tcp/test_tcp.h"
5 | #include "tcp/test_tcp_oos.h"
6 | #include "core/test_mem.h"
7 | #include "etharp/test_etharp.h"
8 |
9 | #include "lwip/init.h"
10 |
11 |
12 | int main()
13 | {
14 | int number_failed;
15 | SRunner *sr;
16 | size_t i;
17 | suite_getter_fn* suites[] = {
18 | udp_suite,
19 | tcp_suite,
20 | tcp_oos_suite,
21 | mem_suite,
22 | etharp_suite
23 | };
24 | size_t num = sizeof(suites)/sizeof(void*);
25 | LWIP_ASSERT("No suites defined", num > 0);
26 |
27 | lwip_init();
28 |
29 | sr = srunner_create((suites[0])());
30 | for(i = 1; i < num; i++) {
31 | srunner_add_suite(sr, ((suite_getter_fn*)suites[i])());
32 | }
33 |
34 | #ifdef LWIP_UNITTESTS_NOFORK
35 | srunner_set_fork_status(sr, CK_NOFORK);
36 | #endif
37 | #ifdef LWIP_UNITTESTS_FORK
38 | srunner_set_fork_status(sr, CK_FORK);
39 | #endif
40 |
41 | srunner_run_all(sr, CK_NORMAL);
42 | number_failed = srunner_ntests_failed(sr);
43 | srunner_free(sr);
44 | return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
45 | }
46 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/lwipopts.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification,
6 | * are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. The name of the author may not be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25 | * OF SUCH DAMAGE.
26 | *
27 | * This file is part of the lwIP TCP/IP stack.
28 | *
29 | * Author: Simon Goldschmidt
30 | *
31 | */
32 | #ifndef __LWIPOPTS_H__
33 | #define __LWIPOPTS_H__
34 |
35 | /* Prevent having to link sys_arch.c (we don't test the API layers in unit tests) */
36 | #define NO_SYS 1
37 | #define LWIP_NETCONN 0
38 | #define LWIP_SOCKET 0
39 |
40 | /* Minimal changes to opt.h required for tcp unit tests: */
41 | #define MEM_SIZE 16000
42 | #define TCP_SND_QUEUELEN 40
43 | #define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
44 | #define TCP_SND_BUF (12 * TCP_MSS)
45 | #define TCP_WND (10 * TCP_MSS)
46 |
47 | /* Minimal changes to opt.h required for etharp unit tests: */
48 | #define ETHARP_SUPPORT_STATIC_ENTRIES 1
49 |
50 | #endif /* __LWIPOPTS_H__ */
51 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/tcp/tcp_helper.h:
--------------------------------------------------------------------------------
1 | #ifndef __TCP_HELPER_H__
2 | #define __TCP_HELPER_H__
3 |
4 | #include "../lwip_check.h"
5 | #include "lwip/arch.h"
6 | #include "lwip/tcp.h"
7 | #include "lwip/netif.h"
8 |
9 | /* counters used for test_tcp_counters_* callback functions */
10 | struct test_tcp_counters {
11 | u32_t recv_calls;
12 | u32_t recved_bytes;
13 | u32_t recv_calls_after_close;
14 | u32_t recved_bytes_after_close;
15 | u32_t close_calls;
16 | u32_t err_calls;
17 | err_t last_err;
18 | char* expected_data;
19 | u32_t expected_data_len;
20 | };
21 |
22 | struct test_tcp_txcounters {
23 | u32_t num_tx_calls;
24 | u32_t num_tx_bytes;
25 | u8_t copy_tx_packets;
26 | struct pbuf *tx_packets;
27 | };
28 |
29 | /* Helper functions */
30 | void tcp_remove_all(void);
31 |
32 | struct pbuf* tcp_create_segment(ip_addr_t* src_ip, ip_addr_t* dst_ip,
33 | u16_t src_port, u16_t dst_port, void* data, size_t data_len,
34 | u32_t seqno, u32_t ackno, u8_t headerflags);
35 | struct pbuf* tcp_create_rx_segment(struct tcp_pcb* pcb, void* data, size_t data_len,
36 | u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags);
37 | struct pbuf* tcp_create_rx_segment_wnd(struct tcp_pcb* pcb, void* data, size_t data_len,
38 | u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags, u16_t wnd);
39 | void tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, ip_addr_t* local_ip,
40 | ip_addr_t* remote_ip, u16_t local_port, u16_t remote_port);
41 | void test_tcp_counters_err(void* arg, err_t err);
42 | err_t test_tcp_counters_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err);
43 |
44 | struct tcp_pcb* test_tcp_new_counters_pcb(struct test_tcp_counters* counters);
45 |
46 | void test_tcp_input(struct pbuf *p, struct netif *inp);
47 |
48 | void test_tcp_init_netif(struct netif *netif, struct test_tcp_txcounters *txcounters,
49 | ip_addr_t *ip_addr, ip_addr_t *netmask);
50 |
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/tcp/test_tcp.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_TCP_H__
2 | #define __TEST_TCP_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite *tcp_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/tcp/test_tcp_oos.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_TCP_OOS_H__
2 | #define __TEST_TCP_OOS_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite *tcp_oos_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/udp/test_udp.c:
--------------------------------------------------------------------------------
1 | #include "test_udp.h"
2 |
3 | #include "lwip/udp.h"
4 | #include "lwip/stats.h"
5 |
6 | #if !LWIP_STATS || !UDP_STATS || !MEMP_STATS
7 | #error "This tests needs UDP- and MEMP-statistics enabled"
8 | #endif
9 |
10 | /* Helper functions */
11 | static void
12 | udp_remove_all(void)
13 | {
14 | struct udp_pcb *pcb = udp_pcbs;
15 | struct udp_pcb *pcb2;
16 |
17 | while(pcb != NULL) {
18 | pcb2 = pcb;
19 | pcb = pcb->next;
20 | udp_remove(pcb2);
21 | }
22 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
23 | }
24 |
25 | /* Setups/teardown functions */
26 |
27 | static void
28 | udp_setup(void)
29 | {
30 | udp_remove_all();
31 | }
32 |
33 | static void
34 | udp_teardown(void)
35 | {
36 | udp_remove_all();
37 | }
38 |
39 |
40 | /* Test functions */
41 |
42 | START_TEST(test_udp_new_remove)
43 | {
44 | struct udp_pcb* pcb;
45 | LWIP_UNUSED_ARG(_i);
46 |
47 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
48 |
49 | pcb = udp_new();
50 | fail_unless(pcb != NULL);
51 | if (pcb != NULL) {
52 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 1);
53 | udp_remove(pcb);
54 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
55 | }
56 | }
57 | END_TEST
58 |
59 |
60 | /** Create the suite including all tests for this module */
61 | Suite *
62 | udp_suite(void)
63 | {
64 | TFun tests[] = {
65 | test_udp_new_remove,
66 | };
67 | return create_suite("UDP", tests, sizeof(tests)/sizeof(TFun), udp_setup, udp_teardown);
68 | }
69 |
--------------------------------------------------------------------------------
/lwip-1.4.1/test/unit/udp/test_udp.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_UDP_H__
2 | #define __TEST_UDP_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite* udp_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/uC-Shell/Doc/Shell-Manual.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/uC-Shell/Doc/Shell-Manual.pdf
--------------------------------------------------------------------------------
/uC-Shell/Doc/Shell-ReleaseNotes.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/uC-Shell/Doc/Shell-ReleaseNotes.pdf
--------------------------------------------------------------------------------
/uCOS-III/Ports/ARM-Cortex-M4/Generic/IAR/os_cpu_c.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linkaiqin/USB-Wireless-LAN-Driver-for-STM32F4xx/c0762803be6560db3417c47849d01845e8bb80a4/uCOS-III/Ports/ARM-Cortex-M4/Generic/IAR/os_cpu_c.c
--------------------------------------------------------------------------------
/uCOS-III/Source/os_var.c:
--------------------------------------------------------------------------------
1 | /*
2 | ************************************************************************************************************************
3 | * uC/OS-III
4 | * The Real-Time Kernel
5 | *
6 | * (c) Copyright 2009-2012; Micrium, Inc.; Weston, FL
7 | * All rights reserved. Protected by international copyright laws.
8 | *
9 | * VARIABLES
10 | *
11 | * File : OS_VAR.C
12 | * By : JJL
13 | * Version : V3.03.01
14 | *
15 | * LICENSING TERMS:
16 | * ---------------
17 | * uC/OS-III is provided in source form for FREE short-term evaluation, for educational use or
18 | * for peaceful research. If you plan or intend to use uC/OS-III in a commercial application/
19 | * product then, you need to contact Micrium to properly license uC/OS-III for its use in your
20 | * application/product. We provide ALL the source code for your convenience and to help you
21 | * experience uC/OS-III. The fact that the source is provided does NOT mean that you can use
22 | * it commercially without paying a licensing fee.
23 | *
24 | * Knowledge of the source code may NOT be used to develop a similar product.
25 | *
26 | * Please help us continue to provide the embedded community with the finest software available.
27 | * Your honesty is greatly appreciated.
28 | *
29 | * You can contact us at www.micrium.com, or by phone at +1 (954) 217-2036.
30 | ************************************************************************************************************************
31 | */
32 |
33 | #define OS_GLOBALS
34 |
35 | #define MICRIUM_SOURCE
36 | #include
37 |
38 | #ifdef VSC_INCLUDE_SOURCE_FILE_NAMES
39 | const CPU_CHAR *os_var__c = "$Id: $";
40 | #endif
41 |
--------------------------------------------------------------------------------